gdb/gdb-archer-pie-addons-keep-disabled.patch
Sascha Peilicke ab51a8efb0 Accepting request 78265 from devel:gcc
- Merge from gdb-7.3-41.fc15.src.rpm.  [fate#310741]
  * Tue Jul 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3-41.fc15
  - Rebase to the final FSF GDB 7.3 release.
  - Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
  
  * Sun Jul  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15
  - Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
    - Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
  
  * Fri Jun 24 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-39.fc15
  - Fix install-info for the gdb-doc subpackage (BZ 715228).

- Merge from gdb-7.2.90.20110525-38.fc15.src.rpm.  [fate#310741]
  * Wed May 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-38.fc15
  - Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release).
  - [stap] Fix double free (Sergio Durigan Junior).
  
  * Tue May  3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-37.fc15
  - Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377).

- Merge from gdb-7.2.90.20110429-36.fc15.src.rpm.
  * Mon May  2 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-36.fc15
  - Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
    - Use --without-system-readline, disable Requires and BuildRequires of readline.
    - Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch.
  
  * Fri Apr 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-35.fc15
  - Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release).
  - Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253).
  - Fix case insensitive symbols for Fortran by iFort (BZ 645773).

OBS-URL: https://build.opensuse.org/request/show/78265
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=85
2011-08-11 13:47:36 +00:00

84 lines
2.8 KiB
Diff

Index: gdb-7.2.90.20110411/gdb/breakpoint.c
===================================================================
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.c 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/breakpoint.c 2011-04-11 19:18:10.000000000 +0200
@@ -11233,6 +11233,50 @@ re_set_breakpoint (struct breakpoint *b)
do_cleanups (cleanups);
}
+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);
+}
+
/* Reset a breakpoint given it's struct breakpoint * BINT.
The value we return ends up being the return value from catch_errors.
Unused in this case. */
Index: gdb-7.2.90.20110411/gdb/breakpoint.h
===================================================================
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.h 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/breakpoint.h 2011-04-11 19:17:53.000000000 +0200
@@ -1245,4 +1245,7 @@ extern int user_breakpoint_p (struct bre
extern void modify_semaphore (struct bp_location *location, int set);
+extern void breakpoints_relocate (struct objfile *objfile,
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
Index: gdb-7.2.90.20110411/gdb/objfiles.c
===================================================================
--- gdb-7.2.90.20110411.orig/gdb/objfiles.c 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/objfiles.c 2011-04-11 19:17:53.000000000 +0200
@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
new_offsets, delta);
+ /* 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;
}