aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/breakpoint.c67
-rw-r--r--gdb/breakpoint.h2
-rw-r--r--gdb/objfiles.c2
-rw-r--r--gdb/symfile.c2
5 files changed, 40 insertions, 43 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e6d9f2e..9b19194 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ Revert 2009-05-14 breakpoint commit (no longer needed).
+ * breakpoint.h (breakpoint_re_set_objfile): Remove
+ * breakpoint.c (breakpoint_re_set_objfile): Likewise
+ (create_overlay_event_breakpoint): Remove objfile parameter,
+ iterate over all objfiles.
+ * objfiles.c (objfile_relocate): Update.
+ * symfile.c (new_symfile_objfile): Likewise.
+
2009-06-23 Tom Tromey <tromey@redhat.com>
PR gdb/10309:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c32ad90..1bc30bb 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1476,28 +1476,33 @@ create_internal_breakpoint (CORE_ADDR address, enum bptype type)
}
static void
-create_overlay_event_breakpoint (char *func_name, struct objfile *objfile)
+create_overlay_event_breakpoint (char *func_name)
{
- struct breakpoint *b;
- struct minimal_symbol *m;
+ struct objfile *objfile;
- m = lookup_minimal_symbol_text (func_name, objfile);
- if (m == NULL)
- return;
+ ALL_OBJFILES (objfile)
+ {
+ struct breakpoint *b;
+ struct minimal_symbol *m;
+
+ m = lookup_minimal_symbol_text (func_name, objfile);
+ if (m == NULL)
+ continue;
- b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m),
- bp_overlay_event);
- b->addr_string = xstrdup (func_name);
+ b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m),
+ bp_overlay_event);
+ b->addr_string = xstrdup (func_name);
- if (overlay_debugging == ovly_auto)
- {
- b->enable_state = bp_enabled;
- overlay_events_enabled = 1;
- }
- else
- {
- b->enable_state = bp_disabled;
- overlay_events_enabled = 0;
+ if (overlay_debugging == ovly_auto)
+ {
+ b->enable_state = bp_enabled;
+ overlay_events_enabled = 1;
+ }
+ else
+ {
+ b->enable_state = bp_disabled;
+ overlay_events_enabled = 0;
+ }
}
update_global_location_list (1);
}
@@ -1508,7 +1513,6 @@ update_breakpoints_after_exec (void)
struct breakpoint *b;
struct breakpoint *temp;
struct bp_location *bploc;
- struct objfile *objfile;
/* We're about to delete breakpoints from GDB's lists. If the
INSERTED flag is true, GDB will try to lift the breakpoints by
@@ -1603,8 +1607,7 @@ update_breakpoints_after_exec (void)
}
}
/* FIXME what about longjmp breakpoints? Re-create them here? */
- ALL_OBJFILES (objfile)
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
+ create_overlay_event_breakpoint ("_ovly_debug_event");
}
int
@@ -7771,13 +7774,9 @@ breakpoint_re_set_one (void *bint)
return 0;
}
-/* Re-set all breakpoints after symbols have been re-loaded.
-
- If OBJFILE is non-null, create overlay break point only in OBJFILE
- (speed optimization). Otherwise rescan all loaded objfiles. */
-
+/* Re-set all breakpoints after symbols have been re-loaded. */
void
-breakpoint_re_set_objfile (struct objfile *objfile)
+breakpoint_re_set (void)
{
struct breakpoint *b, *temp;
enum language save_language;
@@ -7797,19 +7796,7 @@ breakpoint_re_set_objfile (struct objfile *objfile)
set_language (save_language);
input_radix = save_input_radix;
- if (objfile == NULL)
- ALL_OBJFILES (objfile)
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
- else
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
-}
-
-/* Re-set all breakpoints after symbols have been re-loaded. */
-
-void
-breakpoint_re_set (void)
-{
- breakpoint_re_set_objfile (NULL);
+ create_overlay_event_breakpoint ("_ovly_debug_event");
}
/* Reset the thread number of this breakpoint:
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 4e672b5..17f627b 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -687,7 +687,7 @@ extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
extern void until_break_command (char *, int, int);
extern void breakpoint_re_set (void);
-extern void breakpoint_re_set_objfile (struct objfile *);
+
extern void breakpoint_re_set_thread (struct breakpoint *);
extern struct breakpoint *set_momentary_breakpoint
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 30a4313..795d53b 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -674,7 +674,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
}
/* Relocate breakpoints as necessary, after things are relocated. */
- breakpoint_re_set_objfile (objfile);
+ breakpoint_re_set ();
}
/* Many places in gdb want to test just to see if we have any partial
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 47e05b1..968c8a8 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -919,7 +919,7 @@ new_symfile_objfile (struct objfile *objfile, int add_flags)
}
else if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
{
- breakpoint_re_set_objfile (objfile);
+ breakpoint_re_set ();
}
/* We're done reading the symbol file; finish off complaints. */