gdb/gdb-archer-pie-addons-keep-disabled.patch
Michael Matz b288fe5a9a - Rebase to gdb version 7.11 as of version in Fedora 24:
* Per-inferior thread numbers. 
  * Breakpoint "explicit locations" (via CLI and GDB/MI). 
  * New convenience variables ($_gthread, $_inferior). 
  * Record btrace now supports non-stop mode. 
  * Various improvements on AArch64 GNU/Linux: 
    - Multi-architecture debugging support. 
    - displaced stepping. 
    - tracepoint support added in GDBserver. 
  * In Ada, the overloads selection menu provides the parameter
    types and return types for the matching overloaded subprograms. 
  * Various remote protocol improvements, including several
    new packets which can be used to support features such as
    follow-exec-mode, exec catchpoints, syscall catchpoints, etc. 
  * Some minor improvements in the Python API for extending GDB. 
- Added new patches from Fedora:
    gdb-fedora-libncursesw.patch
    gdb-fortran-stride-intel-1of6.patch
    gdb-fortran-stride-intel-2of6.patch
    gdb-fortran-stride-intel-3of6.patch
    gdb-fortran-stride-intel-4of6.patch
    gdb-fortran-stride-intel-5of6.patch
    gdb-fortran-stride-intel-6of6-nokfail.patch
    gdb-fortran-stride-intel-6of6.patch
    gdb-opcodes-clflushopt-test.patch
    gdb-testsuite-readline63-sigint.patch
- Removed obsolete patches:
    gdb-6.3-bz231832-obstack-2gb.patch
    gdb-pahole-python2.patch
    gdb-probes-based-interface-robust-1of2.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=132
2016-02-29 19:38:18 +00:00

84 lines
2.6 KiB
Diff

Index: gdb-7.10.50.20160121/gdb/breakpoint.c
===================================================================
--- gdb-7.10.50.20160121.orig/gdb/breakpoint.c 2016-01-21 21:52:34.243387043 +0100
+++ gdb-7.10.50.20160121/gdb/breakpoint.c 2016-01-21 21:53:00.365542925 +0100
@@ -16139,6 +16139,50 @@
static struct cmd_list_element *enablebreaklist = NULL;
void
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
+{
+ struct bp_location *bl, **blp_tmp;
+ int changed = 0;
+
+ gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
+
+ ALL_BP_LOCATIONS (bl, blp_tmp)
+ {
+ struct obj_section *osect;
+
+ /* BL->SECTION can be correctly NULL for breakpoints with multiple
+ locations expanded through symtab. */
+
+ ALL_OBJFILE_OSECTIONS (objfile, osect)
+ {
+ CORE_ADDR relocated_address;
+ CORE_ADDR delta_offset;
+
+ delta_offset = ANOFFSET (delta, osect->the_bfd_section->index);
+ if (delta_offset == 0)
+ continue;
+ relocated_address = bl->address + delta_offset;
+
+ if (obj_section_addr (osect) <= relocated_address
+ && relocated_address < obj_section_endaddr (osect))
+ {
+ if (bl->inserted)
+ remove_breakpoint (bl, mark_uninserted);
+
+ bl->address += delta_offset;
+ bl->requested_address += delta_offset;
+
+ changed = 1;
+ }
+ }
+ }
+
+ if (changed)
+ qsort (bp_location, bp_location_count, sizeof (*bp_location),
+ bp_location_compare);
+}
+
+void
_initialize_breakpoint (void)
{
struct cmd_list_element *c;
Index: gdb-7.10.50.20160121/gdb/breakpoint.h
===================================================================
--- gdb-7.10.50.20160121.orig/gdb/breakpoint.h 2016-01-21 21:52:34.244387049 +0100
+++ gdb-7.10.50.20160121/gdb/breakpoint.h 2016-01-21 21:53:00.366542931 +0100
@@ -1629,4 +1629,7 @@
UIOUT iff debugging multiple threads. */
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
+extern void breakpoints_relocate (struct objfile *objfile,
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
Index: gdb-7.10.50.20160121/gdb/objfiles.c
===================================================================
--- gdb-7.10.50.20160121.orig/gdb/objfiles.c 2016-01-21 21:52:34.245387055 +0100
+++ gdb-7.10.50.20160121/gdb/objfiles.c 2016-01-21 21:53:00.367542937 +0100
@@ -916,6 +916,11 @@
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);
+
/* Data changed. */
return 1;
}