Accepting request 38053 from devel:gcc

Copy from devel:gcc/gdb based on submit request 38053 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/38053
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=72
This commit is contained in:
OBS User autobuild
2010-04-16 16:29:50 +00:00
committed by Git OBS Bridge
parent a86c952226
commit d30d33dd0d
95 changed files with 25612 additions and 17955 deletions

View File

@@ -1,6 +1,8 @@
--- ./gdb/breakpoint.c 2009-12-18 00:13:49.000000000 +0100
+++ ./gdb/breakpoint.c 2009-12-18 00:13:16.000000000 +0100
@@ -8563,6 +8563,49 @@ update_breakpoint_locations (struct brea
Index: gdb-7.0.50.20100115/gdb/breakpoint.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/breakpoint.c 2010-01-15 21:35:16.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/breakpoint.c 2010-01-15 21:51:20.000000000 +0100
@@ -9167,6 +9167,49 @@ update_breakpoint_locations (struct brea
update_global_location_list (1);
}
@@ -45,14 +47,16 @@
+
+ if (changed)
+ qsort (bp_location, bp_location_count, sizeof (*bp_location),
+ bp_location_compare_for_qsort);
+ bp_location_compare);
+}
/* Reset a breakpoint given it's struct breakpoint * BINT.
The value we return ends up being the return value from catch_errors.
--- ./gdb/breakpoint.h 2009-12-18 00:13:48.000000000 +0100
+++ ./gdb/breakpoint.h 2009-12-17 22:11:10.000000000 +0100
@@ -970,4 +970,7 @@ extern struct breakpoint *get_tracepoint
Index: gdb-7.0.50.20100115/gdb/breakpoint.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/breakpoint.h 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/breakpoint.h 2010-01-15 21:50:12.000000000 +0100
@@ -1015,4 +1015,7 @@ extern struct breakpoint *get_tracepoint
is newly allocated; the caller should free when done with it. */
extern VEC(breakpoint_p) *all_tracepoints (void);
@@ -60,63 +64,19 @@
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
--- ./gdb/objfiles.c 2009-12-18 00:13:48.000000000 +0100
+++ ./gdb/objfiles.c 2009-12-17 23:19:22.000000000 +0100
@@ -546,7 +546,7 @@ free_all_objfiles (void)
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
entries in new_offsets. SEPARATE_DEBUG_OBJFILE is not touched here. */
-static void
+static int
objfile_relocate1 (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct obj_section *s;
@@ -565,7 +565,7 @@ objfile_relocate1 (struct objfile *objfi
something_changed = 1;
}
if (!something_changed)
- return;
+ return 0;
}
/* OK, get all the symtabs. */
@@ -706,6 +706,13 @@ objfile_relocate1 (struct objfile *objfi
exec_set_section_address (bfd_get_filename (objfile->obfd), idx,
Index: gdb-7.0.50.20100115/gdb/objfiles.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/objfiles.c 2010-01-15 21:35:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/objfiles.c 2010-01-15 21:50:45.000000000 +0100
@@ -856,6 +856,11 @@ objfile_relocate1 (struct objfile *objfi
obj_section_addr (s));
}
+
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
+ their addresses match. */
+ if (objfile->separate_debug_objfile_backlink == NULL)
+ breakpoints_relocate (objfile, delta);
+
+ return 1;
/* Data changed. */
return 1;
}
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
@@ -720,7 +727,9 @@ objfile_relocate1 (struct objfile *objfi
void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
- objfile_relocate1 (objfile, new_offsets);
+ int changed = 0;
+
+ changed |= objfile_relocate1 (objfile, new_offsets);
if (objfile->separate_debug_objfile != NULL)
{
@@ -747,11 +756,12 @@ objfile_relocate (struct objfile *objfil
objfile_addrs);
do_cleanups (my_cleanups);
- objfile_relocate1 (debug_objfile, new_debug_offsets);
+ changed |= objfile_relocate1 (debug_objfile, new_debug_offsets);
}
/* Relocate breakpoints as necessary, after things are relocated. */
- breakpoint_re_set ();
+ if (changed)
+ breakpoint_re_set ();
}
/* Return non-zero if OBJFILE has partial symbols. */