diff options
author | Nathan J. Williams <nathanw@wasabisystems.com> | 2004-08-27 18:03:32 +0000 |
---|---|---|
committer | Nathan J. Williams <nathanw@wasabisystems.com> | 2004-08-27 18:03:32 +0000 |
commit | e354df01666a71881088ba0c6ac144f8b4fd023e (patch) | |
tree | dfd7d8c95663977f1f3ef192a3189242ce0f1294 /gdb/target.c | |
parent | 699733f62ed40ee19b1975f3ae9bf21ae3d2838d (diff) | |
download | gdb-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.c | 7 |
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; |