diff options
author | Daniel Jacobowitz <drow@false.org> | 2010-03-02 17:55:39 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2010-03-02 17:55:39 +0000 |
commit | 7e9af34afe1f237dae5286f2366301ead2d57290 (patch) | |
tree | 53c924808255e6c33554aefd0ad89326aab3fd59 /gdb/progspace.c | |
parent | 01637564babaecf321df2df1bde199f7ff70b35f (diff) | |
download | gdb-7e9af34afe1f237dae5286f2366301ead2d57290.zip gdb-7e9af34afe1f237dae5286f2366301ead2d57290.tar.gz gdb-7e9af34afe1f237dae5286f2366301ead2d57290.tar.bz2 |
* progspace.c (update_address_spaces): Update inferior address spaces
also.
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r-- | gdb/progspace.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c index 259e641..42139fd 100644 --- a/gdb/progspace.c +++ b/gdb/progspace.c @@ -430,24 +430,30 @@ void update_address_spaces (void) { int shared_aspace = gdbarch_has_shared_address_space (target_gdbarch); - struct address_space *aspace = NULL; struct program_space *pspace; + struct inferior *inf; init_address_spaces (); - ALL_PSPACES (pspace) + if (shared_aspace) { - free_address_space (pspace->aspace); - - if (shared_aspace) - { - if (aspace == NULL) - aspace = new_address_space (); - pspace->aspace = aspace; - } - else - pspace->aspace = new_address_space (); + struct address_space *aspace = new_address_space (); + free_address_space (current_program_space->aspace); + ALL_PSPACES (pspace) + pspace->aspace = aspace; } + else + ALL_PSPACES (pspace) + { + free_address_space (pspace->aspace); + pspace->aspace = new_address_space (); + } + + for (inf = inferior_list; inf; inf = inf->next) + if (gdbarch_has_global_solist (target_gdbarch)) + inf->aspace = maybe_new_address_space (); + else + inf->aspace = inf->pspace->aspace; } /* Save the current program space so that it may be restored by a later |