diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-17 17:45:17 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-17 17:45:17 +0000 |
commit | c1e56572463d2126e46eda8ce8d4bce221667f98 (patch) | |
tree | 3f7dae8a1dd565c8c77dc068337ad5896d2f91ce /gdb/symfile.c | |
parent | 0c91cf04574d756ea883ec506a84fb7ac9589459 (diff) | |
download | gdb-c1e56572463d2126e46eda8ce8d4bce221667f98.zip gdb-c1e56572463d2126e46eda8ce8d4bce221667f98.tar.gz gdb-c1e56572463d2126e46eda8ce8d4bce221667f98.tar.bz2 |
gdb/
* infrun.c (follow_exec): Replace symbol_file_add_main by
symbol_file_add with SYMFILE_DEFER_BP_RESET, set_initial_language and
breakpoint_re_set.
* m32r-rom.c (m32r_load, m32r_upload_command): Use parameter 0 for
clear_symtab_users.
* objfiles.c (free_all_objfiles): Likewise.
* remote-m32r-sdi.c (m32r_load): Likewise.
* solib-som.c (som_solib_create_inferior_hook): Likewise.
* symfile.c (new_symfile_objfile): New comment for add_flags. Call
clear_symtab_users with ADD_FLAGS.
(reread_symbols): Use parameter 0 for clear_symtab_users.
(clear_symtab_users): New parameter add_flags. Do not call
breakpoint_re_set if SYMFILE_DEFER_BP_RESET.
(clear_symtab_users_cleanup): Use parameter 0 for clear_symtab_users.
* symtab.h (clear_symtab_users): New parameter add_flags.
gdb/testsuite/
* gdb.base/pie-execl.exp: New file.
* gdb.base/pie-execl.c: New file.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 91f0765..cfbfd55 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1038,7 +1038,7 @@ syms_from_objfile (struct objfile *objfile, /* Perform required actions after either reading in the initial symbols for a new objfile, or mapping in the symbols from a reusable - objfile. */ + objfile. ADD_FLAGS is a bitmask of enum symfile_add_flags. */ void new_symfile_objfile (struct objfile *objfile, int add_flags) @@ -1051,7 +1051,7 @@ new_symfile_objfile (struct objfile *objfile, int add_flags) /* OK, make it the "real" symbol file. */ symfile_objfile = objfile; - clear_symtab_users (); + clear_symtab_users (add_flags); } else if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0) { @@ -2530,7 +2530,7 @@ reread_symbols (void) /* Notify objfiles that we've modified objfile sections. */ objfiles_changed (); - clear_symtab_users (); + clear_symtab_users (0); /* At least one objfile has changed, so we can consider that the executable we're debugging has changed too. */ observer_notify_executable_changed (); @@ -2748,10 +2748,10 @@ allocate_symtab (const char *filename, struct objfile *objfile) /* Reset all data structures in gdb which may contain references to symbol - table data. */ + table data. ADD_FLAGS is a bitmask of enum symfile_add_flags. */ void -clear_symtab_users (void) +clear_symtab_users (int add_flags) { /* Someday, we should do better than this, by only blowing away the things that really need to be blown. */ @@ -2761,7 +2761,8 @@ clear_symtab_users (void) clear_current_source_symtab_and_line (); clear_displays (); - breakpoint_re_set (); + if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0) + breakpoint_re_set (); set_default_breakpoint (0, NULL, 0, 0, 0); clear_pc_function_cache (); observer_notify_new_objfile (NULL); @@ -2780,7 +2781,7 @@ clear_symtab_users (void) static void clear_symtab_users_cleanup (void *ignore) { - clear_symtab_users (); + clear_symtab_users (0); } /* OVERLAYS: |