389676c4ef
- Fix SLE-11 build. Gdb 9.1 requires make 3.82, but SLE-11 has make 3.81: * gdbserver-fix-build-with-make-3.81.patch - Fix patch context: * gdb-fix-the-thread-pool.c-compilation.patch - Fix build error due to missing DIAGNOSTIC_IGNORE_UNUSED_FUNCTION. * gdb-fix-the-thread-pool.c-compilation.patch - Drop ChangeLog part of patch: * gdb-fix-unused-function-error.patch - Fix Werror=unused-function with gcc 4.8 (for Leap 42.3). * gdb-fix-unused-function-error.patch - Require %{suse_version} >= 1500 for --with-system-readline. - Rebase to 9.1 release (as in fedora 32 @ 1735910). * Breakpoints on nested functions and subroutines in Fortran. * Multithreaded symbol loading, disabled by default. Enable using 'maint set worker-threads unlimited'. * Multi-target debugging support. * New command pipe. * New command set logging debugredirect [on|off]. * New fortran commands info modules, info module functions, info module variables. - Fedora-specific patches dropped: * gdb-libexec-add-index.patch * gdb-6.3-rh-testversion-20041202.patch * gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch - Obsoleted fedora patches dropped: * gdb-6.5-bz216711-clone-is-outermost.patch * gdb-6.6-scheduler_locking-step-is-default.patch * gdb-6.8-bz436037-reg-no-longer-active.patch * gdb-bz541866-rwatch-before-run.patch * gdb-bz568248-oom-is-error.patch * gdb-follow-child-stale-parent.patch * gdb-readline62-ask-more-rh.patch * gdb-rhbz1371380-gcore-elf-headers.patch * gdb-rhbz1553086-binutils-warning-loadable-section-outside-elf.patch * gdb-rhbz1704406-disable-style-log-output-1of3.patch * gdb-rhbz1704406-disable-style-log-output-2of3.patch * gdb-rhbz1704406-disable-style-log-output-3of3.patch * gdb-rhbz1708192-parse_macro_definition-crash.patch * gdb-rhbz1723564-gdb-crash-PYTHONMALLOC-debug.patch * gdb-rhbz795424-bitpos-20of25.patch * gdb-rhbz795424-bitpos-21of25.patch * gdb-rhbz795424-bitpos-22of25.patch * gdb-rhbz795424-bitpos-23of25.patch * gdb-rhbz795424-bitpos-25of25-test.patch * gdb-rhbz795424-bitpos-25of25.patch * gdb-rhbz795424-bitpos-arrayview.patch * gdb-rhbz795424-bitpos-lazyvalue.patch * gdb-testsuite-readline63-sigint.patch - Fedora patches added: * gdb-rhbz1818011-bfd-gcc10-error.patch - Obsoleted patched dropped: * gdb-fix-s390-build.diff * gdb-fix-riscv-tdep.patch * gdb-testsuite-add-missing-initial-prompt-read-in-multidictionary.exp.patch * gdb-testsuite-pie-no-pie.patch * gdb-testsuite-read1-fixes.patch * gdb-testsuite-i386-pkru-exp.patch * gdb-s390-handle-arch13.diff * gdb-fix-heap-use-after-free-in-typename-concat.patch * gdb-dwarf-reader-reject-sections-with-invalid-sizes.patch * gdb-0001-remove-alloca-0-calls.patch * gdb-arch13-1.diff * gdb-arch13-2.diff * gdb-arch13-3.diff * bfd-change-num_group-to-unsigned-int.patch * gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch * gdb-symtab-prefer-var-def-over-decl.patch * gdb-only-force-interp_console-ui_out-for-breakpoint-commands-in-mi-mode.patch * gdb-testsuite-8.3-kfail-xfail-unsupported.patch - Backport from master: * gdb-fix-debug-agent-odr-bool-int.patch * gdb-fix-python3.9-related-runtime-problems.patch OBS-URL: https://build.opensuse.org/request/show/822281 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=251
103 lines
3.2 KiB
Diff
103 lines
3.2 KiB
Diff
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
Subject: gdb-archer-pie-addons-keep-disabled.patch
|
|
|
|
;;=push+jan: Breakpoints disabling matching should not be based on address.
|
|
|
|
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
|
--- a/gdb/breakpoint.c
|
|
+++ b/gdb/breakpoint.c
|
|
@@ -15396,6 +15396,51 @@ static struct cmd_list_element *enablebreaklist = NULL;
|
|
|
|
cmd_list_element *commands_cmd_element = nullptr;
|
|
|
|
+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);
|
|
+
|
|
+ bl->address += delta_offset;
|
|
+ bl->requested_address += delta_offset;
|
|
+
|
|
+ changed = 1;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+
|
|
+ if (changed)
|
|
+ std::sort (bp_locations, bp_locations + bp_locations_count,
|
|
+ bp_location_is_less_than);
|
|
+}
|
|
+
|
|
+void _initialize_breakpoint (void);
|
|
void
|
|
_initialize_breakpoint (void)
|
|
{
|
|
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
|
|
--- a/gdb/breakpoint.h
|
|
+++ b/gdb/breakpoint.h
|
|
@@ -1696,6 +1696,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
|
|
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);
|
|
+
|
|
/* Print the specified breakpoint. */
|
|
extern void print_breakpoint (breakpoint *bp);
|
|
|
|
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
|
--- a/gdb/objfiles.c
|
|
+++ b/gdb/objfiles.c
|
|
@@ -816,6 +816,11 @@ objfile_relocate1 (struct objfile *objfile,
|
|
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;
|
|
}
|
|
diff --git a/gdb/value.c b/gdb/value.c
|
|
--- a/gdb/value.c
|
|
+++ b/gdb/value.c
|
|
@@ -2840,7 +2840,7 @@ value_static_field (struct type *type, int fieldno)
|
|
case FIELD_LOC_KIND_PHYSADDR:
|
|
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
|
TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)
|
|
- + (TYPE_OBJFILE (type) == NULL ? 0 : TYPE_OBJFILE (type)->section_offsets[SECT_OFF_TEXT (TYPE_OBJFILE (type))]));
|
|
+ + (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
|
|
break;
|
|
case FIELD_LOC_KIND_PHYSNAME:
|
|
{
|