aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorNathan J. Williams <nathanw@wasabisystems.com>2004-08-27 18:03:32 +0000
committerNathan J. Williams <nathanw@wasabisystems.com>2004-08-27 18:03:32 +0000
commite354df01666a71881088ba0c6ac144f8b4fd023e (patch)
treedfd7d8c95663977f1f3ef192a3189242ce0f1294 /gdb/target.c
parent699733f62ed40ee19b1975f3ae9bf21ae3d2838d (diff)
downloadgdb-e354df01666a71881088ba0c6ac144f8b4fd023e.zip
gdb-e354df01666a71881088ba0c6ac144f8b4fd023e.tar.gz
gdb-e354df01666a71881088ba0c6ac144f8b4fd023e.tar.bz2
* target.c (target_resize_to_sections): Check
current_target.to_sections for an old value when updating.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index d577055..5faf5a8 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1415,6 +1415,13 @@ target_resize_to_sections (struct target_ops *target, int num_added)
(*t)->to_sections_end = target->to_sections_end;
}
}
+ /* There is a flattened view of the target stack in current_target,
+ so its to_sections pointer might also need updating. */
+ if (current_target.to_sections == old_value)
+ {
+ current_target.to_sections = target->to_sections;
+ current_target.to_sections_end = target->to_sections_end;
+ }
}
return old_count;