aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2015-09-30 14:23:12 -0700
committerKeith Seitz <keiths@redhat.com>2015-10-01 11:48:39 -0700
commit23916b7dc0f2f05982da7a76726d931cf738d2cc (patch)
treeb08bad1994250bf0a7d849fe099fd6f5c2d7da80 /gdb/symfile.c
parent398e081380a204e3b9fb4eb4da069ccf471f930e (diff)
downloadbinutils-users/keiths/intelligent-breakpoint_re_set.zip
binutils-users/keiths/intelligent-breakpoint_re_set.tar.gz
binutils-users/keiths/intelligent-breakpoint_re_set.tar.bz2
Initial publication of breakpoint reset project.users/keiths/intelligent-breakpoint_re_set
This is a work-in-progress publication of an intelligent breakpoint_re_set redesign. See the project wiki page for more information: https://sourceware.org/gdb/wiki/BreakpointReset
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 682e3ca..5980c65 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1114,7 +1114,13 @@ finish_new_objfile (struct objfile *objfile, int add_flags)
}
else if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
{
- breakpoint_re_set ();
+ struct breakpoint_reset_reason r;
+
+ init_breakpoint_reset_reason (&r);
+ /*r.reason = BREAKPOINT_RESET_???;*/
+ /*VEC_safe_push (objfilep, &(r.objfile_list), objfile);*/
+ r.where = __func__;
+ breakpoint_re_set (&r);
}
/* We're done reading the symbol file; finish off complaints. */
@@ -2072,6 +2078,7 @@ generic_load (const char *args, int from_tty)
struct load_section_data cbdata;
struct load_progress_data total_progress;
struct ui_out *uiout = current_uiout;
+ struct breakpoint_reset_reason reset_reason;
CORE_ADDR entry;
char **argv;
@@ -2154,7 +2161,11 @@ generic_load (const char *args, int from_tty)
breakpoint locations. Loading has changed the contents of that
memory. */
- breakpoint_re_set ();
+ init_breakpoint_reset_reason (&reset_reason);
+ reset_reason.reason = BREAKPOINT_RESET_ADD_OBJFILE;
+ /*VEC_safe_push (objfilep, &(reset_reason.objfile_list), ???); */
+ reset_reason.where = __func__;
+ breakpoint_re_set (&reset_reason);
/* FIXME: are we supposed to call symbol_file_add or not? According
to a comment from remote-mips.c (where a call to symbol_file_add
@@ -2458,10 +2469,6 @@ remove_symbol_file_command (char *args, int from_tty)
do_cleanups (my_cleanups);
}
-typedef struct objfile *objfilep;
-
-DEF_VEC_P (objfilep);
-
/* Re-read symbols if a symbol-file has changed. */
void
@@ -3022,7 +3029,14 @@ clear_symtab_users (int add_flags)
/* Now that the various caches have been cleared, we can re_set
our breakpoints without risking it using stale data. */
if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
- breakpoint_re_set ();
+ {
+ struct breakpoint_reset_reason r;
+
+ init_breakpoint_reset_reason (&r);
+ /*r.reason = BREAKPOINT_RESET_???;*/
+ r.where = __func__;
+ breakpoint_re_set (&r);
+ }
}
static void