Rebase to FSF GDB 8.3.50.20190412 (8.4pre).
Adjust 'gdb-6.3-rh-testversion-20041202.patch'. Remove 'gdb-follow-child-stale-parent.patch'. Remove 'gdb-rhbz795424-bitpos-20of25.patch'. Remove 'gdb-rhbz795424-bitpos-21of25.patch'. Remove 'gdb-rhbz795424-bitpos-22of25.patch'. Remove 'gdb-rhbz795424-bitpos-23of25.patch'. Remove 'gdb-rhbz795424-bitpos-25of25.patch'. Remove 'gdb-rhbz795424-bitpos-25of25-test.patch'. Remove 'gdb-rhbz795424-bitpos-arrayview.patch'. Remove 'gdb-rhbz795424-bitpos-lazyvalue.patch'. Remove 'gdb-bz541866-rwatch-before-run.patch'.
This commit is contained in:
parent
116197567a
commit
e90857f9de
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
|
||||
/v2.0.tar.gz
|
||||
/gdb-8.3.50.20190321.tar.xz
|
||||
/gdb-8.3.50.20190412.tar.xz
|
||||
|
@ -196,273 +196,224 @@ Patch048: gdb-x86_64-i386-syscall-restart.patch
|
||||
#=push+jan: It requires some better DWARF annotations.
|
||||
Patch049: gdb-bz533176-fortran-omp-step.patch
|
||||
|
||||
# Fix regression by python on ia64 due to stale current frame.
|
||||
#=push+jan
|
||||
Patch050: gdb-follow-child-stale-parent.patch
|
||||
|
||||
# Workaround ccache making lineno non-zero for command-line definitions.
|
||||
#=fedoratest: ccache is rarely used and it is even fixed now.
|
||||
Patch051: gdb-ccache-workaround.patch
|
||||
Patch050: gdb-ccache-workaround.patch
|
||||
|
||||
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||
Patch052: gdb-archer-pie-addons.patch
|
||||
Patch051: gdb-archer-pie-addons.patch
|
||||
|
||||
#=push+jan: Breakpoints disabling matching should not be based on address.
|
||||
Patch053: gdb-archer-pie-addons-keep-disabled.patch
|
||||
Patch052: gdb-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
||||
#=fedoratest
|
||||
Patch054: gdb-lineno-makeup-test.patch
|
||||
Patch053: gdb-lineno-makeup-test.patch
|
||||
|
||||
# Test power7 ppc disassembly.
|
||||
#=fedoratest
|
||||
Patch055: gdb-ppc-power7-test.patch
|
||||
|
||||
# Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
|
||||
# Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
#=push+jan: It should be fixed properly instead.
|
||||
Patch056: gdb-bz541866-rwatch-before-run.patch
|
||||
Patch054: gdb-ppc-power7-test.patch
|
||||
|
||||
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
||||
#=push+jan: Currently it is still not fully safe.
|
||||
Patch057: gdb-moribund-utrace-workaround.patch
|
||||
Patch055: gdb-moribund-utrace-workaround.patch
|
||||
|
||||
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
#=fedoratest
|
||||
Patch058: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
Patch056: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
#=fedoratest
|
||||
Patch059: gdb-bz601887-dwarf4-rh-test.patch
|
||||
Patch057: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
#=push+jan
|
||||
Patch060: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Patch058: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
|
||||
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||
#=push+jan
|
||||
Patch061: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
Patch059: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
|
||||
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
|
||||
#=fedoratest
|
||||
Patch062: gdb-test-bt-cfi-without-die.patch
|
||||
Patch060: gdb-test-bt-cfi-without-die.patch
|
||||
|
||||
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
||||
#=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted.
|
||||
Patch063: gdb-bz568248-oom-is-error.patch
|
||||
Patch061: gdb-bz568248-oom-is-error.patch
|
||||
|
||||
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
||||
#=fedoratest
|
||||
Patch064: gdb-bz634108-solib_address.patch
|
||||
Patch062: gdb-bz634108-solib_address.patch
|
||||
|
||||
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
|
||||
#=fedoratest
|
||||
Patch065: gdb-test-pid0-core.patch
|
||||
Patch063: gdb-test-pid0-core.patch
|
||||
|
||||
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
|
||||
#=fedoratest
|
||||
Patch066: gdb-test-dw2-aranges.patch
|
||||
Patch064: gdb-test-dw2-aranges.patch
|
||||
|
||||
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
||||
#=fedoratest
|
||||
Patch067: gdb-test-expr-cumulative-archer.patch
|
||||
Patch065: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
#=fedoratest
|
||||
Patch068: gdb-physname-pr11734-test.patch
|
||||
Patch066: gdb-physname-pr11734-test.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
#=fedoratest
|
||||
Patch069: gdb-physname-pr12273-test.patch
|
||||
Patch067: gdb-physname-pr12273-test.patch
|
||||
|
||||
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
||||
#=fedoratest
|
||||
Patch070: gdb-test-ivy-bridge.patch
|
||||
Patch068: gdb-test-ivy-bridge.patch
|
||||
|
||||
# Hack for proper PIE run of the testsuite.
|
||||
#=fedoratest
|
||||
Patch071: gdb-runtest-pie-override.patch
|
||||
Patch069: gdb-runtest-pie-override.patch
|
||||
|
||||
# Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
||||
#=push+jan
|
||||
Patch072: gdb-attach-fail-reasons-5of5.patch
|
||||
Patch070: gdb-attach-fail-reasons-5of5.patch
|
||||
|
||||
# Workaround PR libc/14166 for inferior calls of strstr.
|
||||
#=fedoratest: Compatibility with RHELs (unchecked which ones).
|
||||
Patch073: gdb-glibc-strstr-workaround.patch
|
||||
Patch071: gdb-glibc-strstr-workaround.patch
|
||||
|
||||
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
|
||||
#=fedoratest
|
||||
Patch074: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
Patch072: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
|
||||
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
|
||||
#=fedoratest
|
||||
Patch075: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch076: gdb-rhbz795424-bitpos-20of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch077: gdb-rhbz795424-bitpos-21of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch078: gdb-rhbz795424-bitpos-22of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch079: gdb-rhbz795424-bitpos-23of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch080: gdb-rhbz795424-bitpos-25of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch081: gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch082: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
Patch073: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
|
||||
# Import regression test for `gdb/findvar.c:417: internal-error:
|
||||
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
|
||||
#=fedoratest
|
||||
Patch083: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
Patch074: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
|
||||
# Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||
#=push+jan
|
||||
Patch084: gdb-gnat-dwarf-crash-3of3.patch
|
||||
Patch075: gdb-gnat-dwarf-crash-3of3.patch
|
||||
|
||||
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
||||
#=fedoratest
|
||||
Patch085: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
Patch076: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
|
||||
# Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
||||
# but not corresponding binary pkg' (RH BZ 981154).
|
||||
#=push+jan
|
||||
Patch086: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
Patch077: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch087: gdb-archer-vla-tests.patch
|
||||
Patch078: gdb-archer-vla-tests.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch088: gdb-vla-intel-tests.patch
|
||||
Patch079: gdb-vla-intel-tests.patch
|
||||
|
||||
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
#=push
|
||||
Patch089: gdb-btrobust.patch
|
||||
Patch080: gdb-btrobust.patch
|
||||
|
||||
# Display Fortran strings in backtraces.
|
||||
#=fedoratest
|
||||
Patch090: gdb-fortran-frame-string.patch
|
||||
Patch081: gdb-fortran-frame-string.patch
|
||||
|
||||
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
||||
# crash.' (RH BZ 1156192).
|
||||
#=fedoratest
|
||||
Patch091: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
Patch082: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
|
||||
# Fix jit-reader.h for multi-lib.
|
||||
#=push+jan
|
||||
Patch092: gdb-jit-reader-multilib.patch
|
||||
Patch083: gdb-jit-reader-multilib.patch
|
||||
|
||||
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
|
||||
# (Philippe Waroquiers, RH BZ 1149205).
|
||||
#=fedoratest
|
||||
Patch093: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||
Patch084: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||
|
||||
# Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
|
||||
# description: 'C++ (and objc): Internal error on unqualified name
|
||||
# re-set', PR 11657] (RH BZ 1186476).
|
||||
#=fedoratest
|
||||
Patch094: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||
Patch085: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||
|
||||
# Test 'info type-printers' Python error (RH BZ 1350436).
|
||||
#=fedoratest
|
||||
Patch095: gdb-rhbz1350436-type-printers-error.patch
|
||||
Patch086: gdb-rhbz1350436-type-printers-error.patch
|
||||
|
||||
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
|
||||
# Kratochvil, RH BZ 1084404).
|
||||
#=fedoratest
|
||||
Patch096: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
||||
Patch087: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
||||
|
||||
# Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
||||
#=push+jan
|
||||
Patch097: gdb-bz1219747-attach-kills.patch
|
||||
Patch088: gdb-bz1219747-attach-kills.patch
|
||||
|
||||
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||
#=push+jan
|
||||
Patch098: gdb-fedora-libncursesw.patch
|
||||
Patch089: gdb-fedora-libncursesw.patch
|
||||
|
||||
# Test clflushopt instruction decode (for RH BZ 1262471).
|
||||
#=fedoratest
|
||||
Patch099: gdb-opcodes-clflushopt-test.patch
|
||||
Patch090: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||
#=fedora
|
||||
Patch100: gdb-dts-rhel6-python-compat.patch
|
||||
Patch091: gdb-dts-rhel6-python-compat.patch
|
||||
|
||||
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||
#=push+jan
|
||||
Patch101: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
Patch092: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
|
||||
# Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
|
||||
#=fedora
|
||||
Patch102: gdb-readline62-ask-more-rh.patch
|
||||
Patch093: gdb-readline62-ask-more-rh.patch
|
||||
|
||||
# Make the GDB quit processing non-abortable to cleanup everything properly.
|
||||
#=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||
Patch103: gdb-6.8-quit-never-aborts.patch
|
||||
Patch094: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
|
||||
#=fedoratest
|
||||
Patch104: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
Patch095: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
|
||||
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||
#=fedora
|
||||
Patch105: gdb-container-rh-pkg.patch
|
||||
Patch096: gdb-container-rh-pkg.patch
|
||||
|
||||
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
|
||||
#=fedoratest
|
||||
Patch106: gdb-rhbz1325795-framefilters-test.patch
|
||||
Patch097: gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||
#=fedora
|
||||
Patch107: gdb-linux_perf-bundle.patch
|
||||
Patch098: gdb-linux_perf-bundle.patch
|
||||
|
||||
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
#=fedora
|
||||
Patch108: gdb-libexec-add-index.patch
|
||||
Patch099: gdb-libexec-add-index.patch
|
||||
|
||||
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
||||
#=fedoratest
|
||||
Patch109: gdb-rhbz1398387-tab-crash-test.patch
|
||||
Patch100: gdb-rhbz1398387-tab-crash-test.patch
|
||||
|
||||
# [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka).
|
||||
#=fedoratest
|
||||
Patch110: gdb-testsuite-readline63-sigint.patch
|
||||
Patch101: gdb-testsuite-readline63-sigint.patch
|
||||
|
||||
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
#=push
|
||||
Patch111: gdb-archer.patch
|
||||
Patch102: gdb-archer.patch
|
||||
|
||||
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
|
||||
Patch112: gdb-vla-intel-fix-print-char-array.patch
|
||||
Patch103: gdb-vla-intel-fix-print-char-array.patch
|
||||
|
||||
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
|
||||
# =fedoratest
|
||||
Patch113: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
|
||||
# This patch is needed to compile GDB after -Werror=narrowing has
|
||||
# been enabled by default.
|
||||
# Author: Sergio Durigan Junior.
|
||||
Patch114: gdb-rhbz795424-bitpos-arrayview.patch
|
||||
Patch104: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
|
||||
|
@ -102,13 +102,3 @@
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p1
|
||||
%patch114 -p1
|
||||
|
@ -1 +1 @@
|
||||
cc00a5d100973549bf5e4840937529633f4de1fa
|
||||
3822612df0694cc07597e534fa73b34aa2540812
|
||||
|
10
_patch_order
10
_patch_order
@ -47,13 +47,11 @@ gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||
gdb-core-open-vdso-warning.patch
|
||||
gdb-x86_64-i386-syscall-restart.patch
|
||||
gdb-bz533176-fortran-omp-step.patch
|
||||
gdb-follow-child-stale-parent.patch
|
||||
gdb-ccache-workaround.patch
|
||||
gdb-archer-pie-addons.patch
|
||||
gdb-archer-pie-addons-keep-disabled.patch
|
||||
gdb-lineno-makeup-test.patch
|
||||
gdb-ppc-power7-test.patch
|
||||
gdb-bz541866-rwatch-before-run.patch
|
||||
gdb-moribund-utrace-workaround.patch
|
||||
gdb-archer-next-over-throw-cxx-exec.patch
|
||||
gdb-bz601887-dwarf4-rh-test.patch
|
||||
@ -73,13 +71,6 @@ gdb-attach-fail-reasons-5of5.patch
|
||||
gdb-glibc-strstr-workaround.patch
|
||||
gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
gdb-rhbz-818343-set-solib-absolute-prefix-testcase.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.patch
|
||||
gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
gdb-gnat-dwarf-crash-3of3.patch
|
||||
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
@ -111,4 +102,3 @@ gdb-testsuite-readline63-sigint.patch
|
||||
gdb-archer.patch
|
||||
gdb-vla-intel-fix-print-char-array.patch
|
||||
gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
gdb-rhbz795424-bitpos-arrayview.patch
|
||||
|
@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1749,7 +1749,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
@@ -1751,7 +1751,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
install: all
|
||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||
|
||||
@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e "$$t"` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1798,7 +1798,25 @@ install-guile:
|
||||
@@ -1800,7 +1800,25 @@ install-guile:
|
||||
install-python:
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||
|
||||
@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
transformed_name=`t='$(program_transform_name)'; \
|
||||
echo gdb | sed -e $$t` ; \
|
||||
if test "x$$transformed_name" = x; then \
|
||||
@@ -1821,6 +1839,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
@@ -1823,6 +1841,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
fi
|
||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
|
@ -24,3 +24,15 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest
|
||||
}
|
||||
|
||||
# start the "xgdb" process
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -2011,7 +2011,7 @@ init_gdb_version_vars (void)
|
||||
struct internalvar *major_version_var = create_internalvar ("_gdb_major");
|
||||
struct internalvar *minor_version_var = create_internalvar ("_gdb_minor");
|
||||
int vmajor = 0, vminor = 0, vrevision = 0;
|
||||
- sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||
+ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||
set_internalvar_integer (major_version_var, vmajor);
|
||||
set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
|
||||
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -2601,6 +2601,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
@@ -2600,6 +2600,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_frame_cache (this_frame, this_cache);
|
||||
@ -135,7 +135,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
return UNWIND_UNAVAILABLE;
|
||||
@@ -2609,6 +2610,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
@@ -2608,6 +2609,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
if (cache->base == 0)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
@ -146,7 +146,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
return UNWIND_NO_REASON;
|
||||
}
|
||||
|
||||
@@ -2743,6 +2748,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
@@ -2741,6 +2746,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_sigtramp_frame_cache (this_frame, this_cache);
|
||||
@ -154,7 +154,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame));
|
||||
@@ -2751,6 +2757,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
@@ -2749,6 +2755,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
/* This marks the outermost frame. */
|
||||
return;
|
||||
}
|
||||
@ -169,7 +169,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
|
||||
--- a/gdb/i386-tdep.c
|
||||
+++ b/gdb/i386-tdep.c
|
||||
@@ -8420,6 +8420,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
@@ -8417,6 +8417,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
|
||||
tdep->xsave_xcr0_offset = -1;
|
||||
|
||||
|
@ -11,7 +11,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||
--- a/gdb/symtab.c
|
||||
+++ b/gdb/symtab.c
|
||||
@@ -3177,6 +3177,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
@@ -3168,6 +3168,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
SYMBOL_LINKAGE_NAME (msymbol)); */
|
||||
;
|
||||
/* fall through */
|
||||
|
@ -64,7 +64,7 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
|
||||
--- a/gdb/common/common-exceptions.h
|
||||
+++ b/gdb/common/common-exceptions.h
|
||||
@@ -104,6 +104,9 @@ enum errors {
|
||||
@@ -106,6 +106,9 @@ enum errors {
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
@ -77,15 +77,16 @@ diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "gcore.h"
|
||||
#include "source.h"
|
||||
+#include "exceptions.h"
|
||||
@@ -18,6 +18,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -355,12 +356,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
#include "defs.h"
|
||||
+#include "arch-utils.h"
|
||||
+#include "exceptions.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
#include "target.h"
|
||||
@@ -345,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@ -119,7 +120,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -440,6 +440,35 @@ struct cmdarg
|
||||
@@ -439,6 +439,34 @@ struct cmdarg
|
||||
char *string;
|
||||
};
|
||||
|
||||
@ -132,11 +133,11 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+{
|
||||
+ gdb_assert (exec_bfd == NULL);
|
||||
+
|
||||
+ TRY
|
||||
+ try
|
||||
+ {
|
||||
+ exec_file_attach (filename, from_tty);
|
||||
+ }
|
||||
+ CATCH (e, RETURN_MASK_ALL)
|
||||
+ catch (const gdb_exception_error &e)
|
||||
+ {
|
||||
+ if (e.error == IS_CORE_ERROR)
|
||||
+ {
|
||||
@ -149,13 +150,12 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+ }
|
||||
+ throw_exception (e);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
+}
|
||||
+
|
||||
static void
|
||||
captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
@@ -885,6 +914,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -884,6 +912,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@ -164,7 +164,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -1035,12 +1066,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1034,12 +1064,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -711,6 +711,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
@@ -710,6 +710,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -745,7 +745,11 @@ static int missing_rpm_list_entries;
|
||||
@@ -744,7 +744,11 @@ static int missing_rpm_list_entries;
|
||||
/* Returns the count of newly added rpms. */
|
||||
|
||||
static int
|
||||
@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
static int rpm_init_done = 0;
|
||||
rpmts ts;
|
||||
@@ -852,7 +856,11 @@ missing_rpm_enlist (const char *filename)
|
||||
@@ -851,7 +855,11 @@ missing_rpm_enlist (const char *filename)
|
||||
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||
if (mi != NULL)
|
||||
{
|
||||
@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
Header h;
|
||||
char *debuginfo, **slot, *s, *s2;
|
||||
@@ -970,6 +978,37 @@ missing_rpm_enlist (const char *filename)
|
||||
@@ -969,6 +977,37 @@ missing_rpm_enlist (const char *filename)
|
||||
xfree (debuginfo);
|
||||
count++;
|
||||
}
|
||||
@ -74,7 +74,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
|
||||
rpmdbFreeIterator_p (mi);
|
||||
}
|
||||
@@ -979,6 +1018,20 @@ missing_rpm_enlist (const char *filename)
|
||||
@@ -978,6 +1017,20 @@ missing_rpm_enlist (const char *filename)
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -235,20 +235,15 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "elf/common.h"
|
||||
#include "elf-bfd.h"
|
||||
#include <sys/stat.h>
|
||||
+#include "elf/external.h"
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "gdbcore.h"
|
||||
+#include "inferior.h"
|
||||
|
||||
#define BUILD_ID_VERBOSE_NONE 0
|
||||
#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
@@ -696,12 +698,362 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
return NULL;
|
||||
|
||||
result = xstrdup (bfd_get_filename (abfd));
|
||||
- abfd.release ();
|
||||
#include "libbfd.h"
|
||||
#include "objfiles.h"
|
||||
#include "observable.h"
|
||||
@@ -699,8 +700,359 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -609,7 +604,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -755,11 +1107,17 @@ missing_filepair_change (void)
|
||||
@@ -754,11 +1106,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -627,7 +622,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -826,14 +1184,39 @@ debug_print_missing (const char *binary, const char *debug)
|
||||
@@ -825,14 +1183,39 @@ debug_print_missing (const char *binary, const char *debug)
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -1456,55 +1451,11 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -330,10 +330,9 @@ static void
|
||||
build_id_locate_exec (int from_tty)
|
||||
{
|
||||
CORE_ADDR at_entry;
|
||||
- struct bfd_build_id *build_id;
|
||||
- char *execfilename;
|
||||
+ gdb::unique_xmalloc_ptr<struct bfd_build_id> build_id;
|
||||
+ gdb::unique_xmalloc_ptr<char> execfilename;
|
||||
char *build_id_filename;
|
||||
- struct cleanup *back_to;
|
||||
|
||||
if (exec_bfd != NULL || symfile_objfile != NULL)
|
||||
return;
|
||||
@@ -341,10 +340,9 @@ build_id_locate_exec (int from_tty)
|
||||
if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0)
|
||||
return;
|
||||
|
||||
- build_id = build_id_addr_get (at_entry);
|
||||
+ build_id.reset (build_id_addr_get (at_entry));
|
||||
if (build_id == NULL)
|
||||
return;
|
||||
- back_to = make_cleanup (xfree, build_id);
|
||||
|
||||
/* SYMFILE_OBJFILE should refer to the main executable (not only to its
|
||||
separate debug info file). gcc44+ keeps .eh_frame only in the main
|
||||
@@ -352,22 +350,19 @@ build_id_locate_exec (int from_tty)
|
||||
file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
|
||||
directly to the separate debug info file. */
|
||||
|
||||
- execfilename = build_id_to_filename (build_id, &build_id_filename);
|
||||
- make_cleanup (xfree, build_id_filename);
|
||||
+ execfilename.reset (build_id_to_filename (build_id.get (),
|
||||
+ &build_id_filename));
|
||||
|
||||
if (execfilename != NULL)
|
||||
{
|
||||
- make_cleanup (xfree, execfilename);
|
||||
- exec_file_attach (execfilename, from_tty);
|
||||
- symbol_file_add_main (execfilename,
|
||||
+ exec_file_attach (execfilename.get (), from_tty);
|
||||
+ symbol_file_add_main (execfilename.get (),
|
||||
symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE));
|
||||
if (symfile_objfile != NULL)
|
||||
@@ -362,7 +362,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
- debug_print_missing (_("the main executable file"), build_id_filename);
|
||||
-
|
||||
- do_cleanups (back_to);
|
||||
+ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
|
||||
|
||||
/* No automatic SOLIB_ADD as the libraries would get read twice. */
|
||||
@ -1520,7 +1471,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -359,6 +360,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
@@ -358,6 +359,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -1529,7 +1480,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
/* Do not call the python hook on an explicit prompt change as
|
||||
passed to this function, as this forms a secondary/local prompt,
|
||||
IE, displayed but not set. */
|
||||
@@ -770,7 +773,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
@@ -769,7 +772,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
command_handler (cmd);
|
||||
|
||||
if (ui->prompt_state != PROMPTED)
|
||||
|
@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -1348,14 +1348,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1346,14 +1346,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
}
|
||||
|
||||
{
|
||||
@ -44,7 +44,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
if (build_id != NULL)
|
||||
{
|
||||
char *name, *build_id_filename;
|
||||
@@ -1370,23 +1383,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1368,23 +1381,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
xfree (name);
|
||||
}
|
||||
else
|
||||
|
@ -9,19 +9,25 @@ Subject: gdb-6.6-buildid-locate.patch
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -26,11 +26,67 @@
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
#include "gdbcore.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "gdbcore.h"
|
||||
+#include "gdbcmd.h"
|
||||
+#include "observable.h"
|
||||
@@ -22,15 +22,71 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "build-id.h"
|
||||
#include "common/gdb_vecs.h"
|
||||
-#include "symfile.h"
|
||||
-#include "objfiles.h"
|
||||
+#include <sys/stat.h>
|
||||
+#include "elf-bfd.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "elf/external.h"
|
||||
+#include "elf/internal.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "elf-bfd.h"
|
||||
+#include <sys/stat.h>
|
||||
#include "filenames.h"
|
||||
+#include "gdb_bfd.h"
|
||||
+#include "gdbcmd.h"
|
||||
#include "gdbcore.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "objfiles.h"
|
||||
+#include "observable.h"
|
||||
+#include "symfile.h"
|
||||
+
|
||||
+#define BUILD_ID_VERBOSE_NONE 0
|
||||
+#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
@ -554,7 +560,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+
|
||||
+ /* We expect to be silent on the non-existing files. */
|
||||
+ gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename.get (), gnutarget, -1);
|
||||
+
|
||||
|
||||
- return {};
|
||||
+ if (debug_bfd == NULL)
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
@ -570,8 +577,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
- return {};
|
||||
+
|
||||
+ ret_bfd = debug_bfd;
|
||||
+ break;
|
||||
}
|
||||
@ -593,13 +599,13 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+
|
||||
+ if (add_debug_suffix)
|
||||
+ link0 += ".debug";
|
||||
+
|
||||
|
||||
- return {};
|
||||
+ /* If the symlink has target request to install the target.
|
||||
+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */
|
||||
+ std::string link0_resolved (link_resolve (link0.c_str (), 0));
|
||||
|
||||
- return {};
|
||||
+
|
||||
+ if (link_all.empty ())
|
||||
+ link_all = link0_resolved;
|
||||
+ else
|
||||
@ -669,7 +675,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
if (debug_bfd != NULL)
|
||||
return debug_bfd;
|
||||
}
|
||||
@@ -175,22 +685,190 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
|
||||
@@ -175,22 +685,189 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -684,7 +690,6 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ return NULL;
|
||||
+
|
||||
+ result = xstrdup (bfd_get_filename (abfd));
|
||||
+ abfd.release ();
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
@ -863,7 +868,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (abfd != NULL
|
||||
&& filename_cmp (bfd_get_filename (abfd.get ()),
|
||||
@@ -203,3 +881,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
@@ -203,3 +880,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
|
||||
return std::string ();
|
||||
}
|
||||
@ -940,18 +945,18 @@ diff --git a/gdb/coffread.c b/gdb/coffread.c
|
||||
diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -43,6 +43,10 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "completer.h"
|
||||
#include "common/filestuff.h"
|
||||
@@ -22,6 +22,10 @@
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include "frame.h" /* required by inferior.h */
|
||||
+#include "auxv.h"
|
||||
+#include "build-id.h"
|
||||
+#include "elf/common.h"
|
||||
+#include "gdbcmd.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -320,6 +324,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "symtab.h"
|
||||
@@ -320,6 +324,49 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -961,10 +966,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+build_id_locate_exec (int from_tty)
|
||||
+{
|
||||
+ CORE_ADDR at_entry;
|
||||
+ struct bfd_build_id *build_id;
|
||||
+ char *execfilename;
|
||||
+ gdb::unique_xmalloc_ptr<struct bfd_build_id> build_id;
|
||||
+ gdb::unique_xmalloc_ptr<char> execfilename;
|
||||
+ char *build_id_filename;
|
||||
+ struct cleanup *back_to;
|
||||
+
|
||||
+ if (exec_bfd != NULL || symfile_objfile != NULL)
|
||||
+ return;
|
||||
@ -972,10 +976,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+ if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0)
|
||||
+ return;
|
||||
+
|
||||
+ build_id = build_id_addr_get (at_entry);
|
||||
+ build_id.reset (build_id_addr_get (at_entry));
|
||||
+ if (build_id == NULL)
|
||||
+ return;
|
||||
+ back_to = make_cleanup (xfree, build_id);
|
||||
+
|
||||
+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
|
||||
+ separate debug info file). gcc44+ keeps .eh_frame only in the main
|
||||
@ -983,14 +986,13 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+ file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
|
||||
+ directly to the separate debug info file. */
|
||||
+
|
||||
+ execfilename = build_id_to_filename (build_id, &build_id_filename);
|
||||
+ make_cleanup (xfree, build_id_filename);
|
||||
+ execfilename.reset (build_id_to_filename (build_id.get (),
|
||||
+ &build_id_filename));
|
||||
+
|
||||
+ if (execfilename != NULL)
|
||||
+ {
|
||||
+ make_cleanup (xfree, execfilename);
|
||||
+ exec_file_attach (execfilename, from_tty);
|
||||
+ symbol_file_add_main (execfilename,
|
||||
+ exec_file_attach (execfilename.get (), from_tty);
|
||||
+ symbol_file_add_main (execfilename.get (),
|
||||
+ symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE));
|
||||
+ if (symfile_objfile != NULL)
|
||||
+ symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
@ -998,15 +1000,13 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+ else
|
||||
+ debug_print_missing (_("the main executable file"), build_id_filename);
|
||||
+
|
||||
+ do_cleanups (back_to);
|
||||
+
|
||||
+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
|
||||
+}
|
||||
+
|
||||
/* Issue a message saying we have no core to debug, if FROM_TTY. */
|
||||
|
||||
static void
|
||||
@@ -455,6 +507,14 @@ core_target_open (const char *arg, int from_tty)
|
||||
@@ -455,6 +502,14 @@ core_target_open (const char *arg, int from_tty)
|
||||
switch_to_thread (thread);
|
||||
}
|
||||
|
||||
@ -1021,7 +1021,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
post_create_inferior (target, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -1061,4 +1121,11 @@ void
|
||||
@@ -1059,4 +1114,11 @@ void
|
||||
_initialize_corelow (void)
|
||||
{
|
||||
add_target (core_target_info, core_target_open, filename_completer);
|
||||
@ -1036,7 +1036,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -19945,6 +19945,27 @@ information files.
|
||||
@@ -19967,6 +19967,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -1134,7 +1134,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
--- a/gdb/objfiles.h
|
||||
+++ b/gdb/objfiles.h
|
||||
@@ -553,6 +553,10 @@ struct objfile
|
||||
@@ -618,6 +618,10 @@ struct objfile
|
||||
htab_t static_links {};
|
||||
};
|
||||
|
||||
@ -1150,14 +1150,14 @@ diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
|
||||
+++ b/gdb/python/py-objfile.c
|
||||
@@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
|
||||
|
||||
TRY
|
||||
try
|
||||
{
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
catch (const gdb_exception &except)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
|
||||
@@ -533,7 +533,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
|
||||
/* Don't return separate debug files. */
|
||||
if (objfile->separate_debug_objfile_backlink != NULL)
|
||||
continue;
|
||||
@ -1177,7 +1177,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
|
||||
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
|
||||
static int svr4_have_link_map_offsets (void);
|
||||
@@ -1346,9 +1347,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1344,9 +1345,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1297,7 +1297,7 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -1697,6 +1697,16 @@ proc default_gdb_start { } {
|
||||
@@ -1716,6 +1716,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ Subject: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -2065,7 +2065,7 @@ static const char *const scheduler_enums[] = {
|
||||
@@ -2068,7 +2068,7 @@ static const char *const scheduler_enums[] = {
|
||||
schedlock_replay,
|
||||
NULL
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ diff --git a/gdb/extension.c b/gdb/extension.c
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -1617,7 +1617,13 @@ quit_force (int *exit_arg, int from_tty)
|
||||
@@ -1618,7 +1618,13 @@ quit_force (int *exit_arg, int from_tty)
|
||||
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
@ -58,7 +58,7 @@ diff --git a/gdb/top.c b/gdb/top.c
|
||||
+#endif
|
||||
|
||||
/* Get out of tfind mode, and kill or detach all inferiors. */
|
||||
TRY
|
||||
try
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
|
@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons-keep-disabled.patch
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -15451,6 +15451,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
|
||||
@@ -15437,6 +15437,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
|
||||
|
||||
cmd_list_element *commands_cmd_element = nullptr;
|
||||
|
||||
|
@ -51,7 +51,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
diff --git a/gdb/value.c b/gdb/value.c
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -2827,7 +2827,8 @@ value_static_field (struct type *type, int fieldno)
|
||||
@@ -2825,7 +2825,8 @@ value_static_field (struct type *type, int fieldno)
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
@ -17,7 +17,7 @@ tromey/python
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -2082,6 +2082,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
@@ -2084,6 +2084,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
@ -112,7 +112,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "objfiles.h"
|
||||
@@ -470,7 +471,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
@@ -468,7 +469,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
}
|
||||
|
||||
static void
|
||||
@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
{
|
||||
int argc = context->argc;
|
||||
char **argv = context->argv;
|
||||
@@ -690,10 +691,14 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -688,10 +689,14 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{"args", no_argument, &set_args, 1},
|
||||
{"l", required_argument, 0, 'l'},
|
||||
{"return-child-result", no_argument, &return_child_result, 1},
|
||||
@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
{
|
||||
int option_index;
|
||||
|
||||
@@ -711,6 +716,9 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -709,6 +714,9 @@ captured_main_1 (struct captured_main_args *context)
|
||||
case 0:
|
||||
/* Long option that just sets a flag. */
|
||||
break;
|
||||
@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
case OPT_SE:
|
||||
symarg = optarg;
|
||||
execarg = optarg;
|
||||
@@ -890,7 +898,31 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -888,7 +896,31 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Now that gdb_init has created the initial inferior, we're in
|
||||
position to set args for that inferior. */
|
||||
@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1191,7 +1223,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1189,7 +1221,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1207,24 +1240,37 @@ static void
|
||||
@@ -1205,22 +1238,35 @@ static void
|
||||
captured_main (void *data)
|
||||
{
|
||||
struct captured_main_args *context = (struct captured_main_args *) data;
|
||||
@ -207,11 +207,11 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+#if HAVE_PYTHON
|
||||
+ if (python_script)
|
||||
{
|
||||
- TRY
|
||||
- try
|
||||
- {
|
||||
- captured_command_loop ();
|
||||
- }
|
||||
- CATCH (ex, RETURN_MASK_ALL)
|
||||
- catch (const gdb_exception &ex)
|
||||
+ extern int pagination_enabled;
|
||||
+ pagination_enabled = 0;
|
||||
+ run_python_script (context->argc - optind, &context->argv[optind]);
|
||||
@ -227,21 +227,18 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+ while (1)
|
||||
{
|
||||
- exception_print (gdb_stderr, ex);
|
||||
+ TRY
|
||||
+ try
|
||||
+ {
|
||||
+ captured_command_loop ();
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ALL)
|
||||
+ catch (const gdb_exception &ex)
|
||||
+ {
|
||||
+ exception_print (gdb_stderr, ex);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
- END_CATCH
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1267,6 +1313,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
@@ -1263,6 +1309,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
fputs_unfiltered (_("\
|
||||
This is the GNU debugger. Usage:\n\n\
|
||||
gdb [options] [executable-file [core-file or process-id]]\n\
|
||||
@ -254,7 +251,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1312,6 +1364,13 @@ Output and user interface control:\n\n\
|
||||
@@ -1308,6 +1360,13 @@ Output and user interface control:\n\n\
|
||||
#endif
|
||||
fputs_unfiltered (_("\
|
||||
--dbx DBX compatibility mode.\n\
|
||||
@ -374,7 +371,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
#include "target.h"
|
||||
#include "gdbthread.h"
|
||||
#include "interps.h"
|
||||
@@ -1283,6 +1285,94 @@ gdbpy_print_stack_or_quit ()
|
||||
@@ -1276,6 +1278,94 @@ gdbpy_print_stack_or_quit ()
|
||||
|
||||
|
||||
|
||||
@ -469,7 +466,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
/* Return a sequence holding all the Progspaces. */
|
||||
|
||||
static PyObject *
|
||||
@@ -1935,6 +2025,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
@@ -1928,6 +2018,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
|
||||
a Python String containing the output of the command if to_string is\n\
|
||||
set to True." },
|
||||
|
@ -255,7 +255,7 @@ diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
|
||||
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
|
||||
--- a/gdb/gdbserver/linux-low.c
|
||||
+++ b/gdb/gdbserver/linux-low.c
|
||||
@@ -967,7 +967,16 @@ linux_ptrace_fun ()
|
||||
@@ -971,7 +971,16 @@ linux_ptrace_fun ()
|
||||
{
|
||||
if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
|
||||
(PTRACE_TYPE_ARG4) 0) < 0)
|
||||
@ -276,22 +276,21 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -1098,7 +1098,17 @@ linux_nat_target::create_inferior (const char *exec_file,
|
||||
@@ -1098,7 +1098,16 @@ linux_nat_target::create_inferior (const char *exec_file,
|
||||
/* Make sure we report all signals during startup. */
|
||||
pass_signals ({});
|
||||
|
||||
- inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
|
||||
+ TRY
|
||||
+ try
|
||||
+ {
|
||||
+ inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ catch (const gdb_exception_error &ex)
|
||||
+ {
|
||||
+ std::string result = linux_ptrace_create_warnings ();
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", result.c_str (), ex.message);
|
||||
+ throw_error (ex.error, "%s%s", result.c_str (), ex.message->c_str ());
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
|
||||
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
|
||||
|
@ -14,7 +14,7 @@ printed, but a default backtrace will occur in this case.
|
||||
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
--- a/gdb/python/py-framefilter.c
|
||||
+++ b/gdb/python/py-framefilter.c
|
||||
@@ -1139,6 +1139,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
@@ -1138,6 +1138,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
htab_eq_pointer,
|
||||
NULL));
|
||||
|
||||
@ -22,7 +22,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
while (true)
|
||||
{
|
||||
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
||||
@@ -1147,8 +1148,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
@@ -1146,8 +1147,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
{
|
||||
if (PyErr_Occurred ())
|
||||
{
|
||||
@ -33,7 +33,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1181,7 +1182,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
@@ -1179,7 +1180,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
/* Do not exit on error printing a single frame. Print the
|
||||
error and continue with other frames. */
|
||||
if (success == EXT_LANG_BT_ERROR)
|
||||
|
@ -80,7 +80,7 @@ gdb/testsuite/ChangeLog
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -1121,7 +1121,10 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1119,7 +1119,10 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
ret = catch_command_errors (attach_command, pid_or_core_arg,
|
||||
!batch_flag);
|
||||
|
@ -30,7 +30,7 @@ debugging problem of GOMP outside of the scope of this Bug.
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -6492,6 +6492,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
@@ -6448,6 +6448,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
||||
{
|
||||
@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
/* We're doing a "next".
|
||||
|
||||
Normal (forward) execution: set a breakpoint at the
|
||||
@@ -6525,6 +6535,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
@@ -6481,6 +6491,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
keep_going (ecs);
|
||||
return;
|
||||
|
@ -1,175 +0,0 @@
|
||||
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-bz541866-rwatch-before-run.patch
|
||||
|
||||
;; Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
|
||||
;; Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
;;=push+jan: It should be fixed properly instead.
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -8783,7 +8783,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
|
||||
int enabled, int internal, unsigned flags,
|
||||
int display_canonical)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
|
||||
if (type == bp_hardware_breakpoint)
|
||||
{
|
||||
@@ -14281,7 +14281,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
|
||||
|
||||
if (bpt->type == bp_hardware_breakpoint)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
i = hw_breakpoint_used_count ();
|
||||
target_resources_ok =
|
||||
target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
|
||||
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#ifndef NM_LINUX_H
|
||||
+#define NM_LINUX_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Red Hat backward compatibility with gdb-6.8. */
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux64.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#ifndef NM_LINUX64_H
|
||||
+#define NM_LINUX64_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Red Hat backward compatibility with gdb-6.8. */
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
diff --git a/gdb/configure.nat b/gdb/configure.nat
|
||||
--- a/gdb/configure.nat
|
||||
+++ b/gdb/configure.nat
|
||||
@@ -245,6 +245,7 @@ case ${gdb_host} in
|
||||
;;
|
||||
i386)
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
|
||||
i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
|
||||
nat/x86-linux.o nat/x86-linux-dregs.o"
|
||||
@@ -301,6 +302,7 @@ case ${gdb_host} in
|
||||
case ${gdb_host_cpu} in
|
||||
i386)
|
||||
# Host: GNU/Linux x86-64
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
|
||||
amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
|
||||
nat/linux-btrace.o \
|
||||
diff --git a/gdb/target.h b/gdb/target.h
|
||||
--- a/gdb/target.h
|
||||
+++ b/gdb/target.h
|
||||
@@ -1971,9 +1971,11 @@ extern struct thread_info *target_thread_handle_to_thread_info
|
||||
one. OTHERTYPE is the number of watchpoints of other types than
|
||||
this one used so far. */
|
||||
|
||||
+#ifndef target_can_use_hardware_watchpoint
|
||||
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
|
||||
(current_top_target ()->can_use_hw_breakpoint) ( \
|
||||
TYPE, CNT, OTHERTYPE)
|
||||
+#endif
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
||||
+if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
||||
+ && ![istarget "ia64-*-*"])
|
||||
+ || [target_info exists gdb,no_hardware_watchpoints]} then {
|
||||
+ verbose "Skipping watchpoint-hw-before-run test."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set test watchpoint-hw-before-run
|
||||
+set srcfile watchpoint-hw-hit-once.c
|
||||
+if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
|
||||
+
|
||||
+# `runto_main' or `runto main' would delete the watchpoint created above.
|
||||
+
|
||||
+if { [gdb_start_cmd] < 0 } {
|
||||
+ untested start
|
||||
+ return -1
|
||||
+}
|
||||
+gdb_test "" "main .* at .*" "start"
|
||||
+
|
||||
+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
|
@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch
|
||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -13922,7 +13922,17 @@ remote_target::pid_to_exec_file (int pid)
|
||||
@@ -13920,7 +13920,17 @@ remote_target::pid_to_exec_file (int pid)
|
||||
char *annex = NULL;
|
||||
|
||||
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
|
||||
|
@ -1,36 +0,0 @@
|
||||
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-follow-child-stale-parent.patch
|
||||
|
||||
;; Fix regression by python on ia64 due to stale current frame.
|
||||
;;=push+jan
|
||||
|
||||
Problem occurs with python and its get_current_arch () as it selects
|
||||
selected_frame and current_frame while still inferior_ptid is valid for the
|
||||
original parent. But since this place it is already attached and later
|
||||
unwinders try to access it, breaking:
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -755,6 +755,9 @@ follow_fork (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ /* Possibly referenced PARENT is no longer valid. */
|
||||
+ reinit_frame_cache ();
|
||||
+
|
||||
/* This pending follow fork event is now handled, one way
|
||||
or another. The previous selected thread may be gone
|
||||
from the lists by now, but if it is still around, need
|
@ -42,7 +42,7 @@ gdb/
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -10587,6 +10587,13 @@ private:
|
||||
@@ -10586,6 +10586,13 @@ private:
|
||||
static void
|
||||
process_die (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
@ -99,7 +99,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1368,6 +1377,25 @@ get_detach_signal (struct lwp_info *lp)
|
||||
@@ -1367,6 +1376,25 @@ get_detach_signal (struct lwp_info *lp)
|
||||
return gdb_signal_to_host (signo);
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1517,6 +1545,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
|
||||
@@ -1515,6 +1543,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
|
||||
detach_one_lwp (main_lwp, &signo);
|
||||
|
||||
detach_success (inf);
|
||||
@ -136,7 +136,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1775,6 +1807,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
|
||||
@@ -1772,6 +1804,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, [=] (struct lwp_info *info)
|
||||
{
|
||||
@@ -3777,6 +3819,10 @@ linux_nat_target::mourn_inferior ()
|
||||
@@ -3773,6 +3815,10 @@ linux_nat_target::mourn_inferior ()
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_target->low_forget_process (pid);
|
||||
|
@ -14,7 +14,7 @@ Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -11939,6 +11939,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
|
||||
@@ -11931,6 +11931,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
|
||||
traps we can no longer explain. */
|
||||
|
||||
old_loc->events_till_retirement = 3 * (thread_count () + 1);
|
||||
|
@ -9,7 +9,7 @@ Subject: gdb-readline62-ask-more-rh.patch
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -1179,6 +1179,13 @@ gdb_setup_readline (int editing)
|
||||
@@ -1176,6 +1176,13 @@ gdb_setup_readline (int editing)
|
||||
{
|
||||
struct ui *ui = current_ui;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,181 +0,0 @@
|
||||
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-rhbz795424-bitpos-21of25.patch
|
||||
|
||||
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
;; (RH BZ 795424).
|
||||
;;=push
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2012-09/msg00632.html
|
||||
|
||||
--MP_/PnL6l3LUsXWpZ/olqawWlzb
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
This is part two of the bitpos expansion patch. This implements checks
|
||||
in some places in the code to ensure that a type size in ULONGEST is
|
||||
small enough to fit into host memory. Tested for regressions on x86_64
|
||||
Fedora 16.
|
||||
|
||||
Regards,
|
||||
Siddhesh
|
||||
|
||||
--MP_/PnL6l3LUsXWpZ/olqawWlzb
|
||||
Content-Type: text/plain
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Disposition: attachment; filename=ChangeLog-ensure_sizet
|
||||
|
||||
gdb/ChangeLog
|
||||
|
||||
* alpha-tdep.c (alpha_push_dummy_call) Check for underflow in
|
||||
SP.
|
||||
* cp-valprint (cp_print_value): Ensure BASECLASS fits into
|
||||
size_t.
|
||||
* dwarf2loc.c (read_pieced_value): Ensure that THIS_SIZE fits
|
||||
into size_t.
|
||||
(write_pieced_value): Likewise.
|
||||
* findcmd.c (parse_find_args): Ensure PATTERN_BUF_SIZE fits into
|
||||
size_t.
|
||||
* p-valprint (pascal_object_print_value): Ensure BASECLASS fits
|
||||
into size_t.
|
||||
* utils.c (ulongest_fits_host_or_error): New function to find if
|
||||
a ULONGEST number fits into size_t.
|
||||
* utils.h: Declare ulongest_fits_host_or_error.
|
||||
* valops.c (search_struct_method): Ensure BASECLASS fits into
|
||||
size_t.
|
||||
* value.c (allocate_value_lazy): Ensure TYPE fits into size_t.
|
||||
(allocate_value_contents): Likewise.
|
||||
(set_value_enclosing_type): Ensure NEW_ENCL_TYPE fits into
|
||||
size_t.
|
||||
* vax-tdep.c (vax_return_value): Ensure that TYPE fits into
|
||||
size_t.
|
||||
|
||||
--MP_/PnL6l3LUsXWpZ/olqawWlzb
|
||||
Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch
|
||||
|
||||
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
|
||||
--- a/gdb/alpha-tdep.c
|
||||
+++ b/gdb/alpha-tdep.c
|
||||
@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
accumulate_size = 0;
|
||||
else
|
||||
accumulate_size -= sizeof(arg_reg_buffer);
|
||||
+
|
||||
+ /* Check for underflow. */
|
||||
+ if (sp - accumulate_size > sp)
|
||||
+ error (_("Insufficient memory in GDB host for arguments, "
|
||||
+ "need %s bytes, but less than %s bytes available."),
|
||||
+ plongest (accumulate_size), plongest (CORE_ADDR_MAX - sp));
|
||||
+
|
||||
sp -= accumulate_size;
|
||||
|
||||
/* Keep sp aligned to a multiple of 16 as the ABI requires. */
|
||||
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
|
||||
--- a/gdb/cp-valprint.c
|
||||
+++ b/gdb/cp-valprint.c
|
||||
@@ -529,6 +529,7 @@ cp_print_value (struct type *type, struct type *real_type,
|
||||
if ((boffset + offset) < 0
|
||||
|| (boffset + offset) >= TYPE_LENGTH (real_type))
|
||||
{
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
|
||||
gdb::byte_vector buf (TYPE_LENGTH (baseclass));
|
||||
|
||||
if (target_read_memory (address + boffset, buf.data (),
|
||||
diff --git a/gdb/defs.h b/gdb/defs.h
|
||||
--- a/gdb/defs.h
|
||||
+++ b/gdb/defs.h
|
||||
@@ -669,4 +669,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what);
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
+extern void ulongest_fits_host_or_error (ULONGEST num);
|
||||
+
|
||||
#endif /* #ifndef DEFS_H */
|
||||
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
|
||||
--- a/gdb/p-valprint.c
|
||||
+++ b/gdb/p-valprint.c
|
||||
@@ -773,6 +773,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
|
||||
|
||||
if (boffset < 0 || boffset >= TYPE_LENGTH (type))
|
||||
{
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
|
||||
buf.resize (TYPE_LENGTH (baseclass));
|
||||
|
||||
base_valaddr = buf.data ();
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -2932,6 +2932,17 @@ string_to_core_addr (const char *my_string)
|
||||
return addr;
|
||||
}
|
||||
|
||||
+/* Ensure that the input NUM is not larger than the maximum capacity of the
|
||||
+ host system. We choose SIZE_MAX / 8 as a conservative estimate of the size
|
||||
+ of a resource that a system may allocate. */
|
||||
+void
|
||||
+ulongest_fits_host_or_error (ULONGEST num)
|
||||
+{
|
||||
+ if (num > SIZE_MAX / 8)
|
||||
+ error (_("Insufficient memory in host GDB for object of size %s bytes, "
|
||||
+ "maximum allowed %s bytes."), pulongest (num),
|
||||
+ pulongest (SIZE_MAX / 8));
|
||||
+}
|
||||
#if GDB_SELF_TEST
|
||||
|
||||
static void
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -2064,6 +2064,7 @@ search_struct_method (const char *name, struct value **arg1p,
|
||||
{
|
||||
CORE_ADDR address;
|
||||
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
|
||||
gdb::byte_vector tmp (TYPE_LENGTH (baseclass));
|
||||
address = value_address (*arg1p);
|
||||
|
||||
diff --git a/gdb/value.c b/gdb/value.c
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -933,6 +933,7 @@ allocate_value_lazy (struct type *type)
|
||||
description correctly. */
|
||||
check_typedef (type);
|
||||
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (type));
|
||||
val = new struct value (type);
|
||||
|
||||
/* Values start out on the all_values chain. */
|
||||
@@ -1015,6 +1016,8 @@ check_type_length_before_alloc (const struct type *type)
|
||||
static void
|
||||
allocate_value_contents (struct value *val)
|
||||
{
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type));
|
||||
+
|
||||
if (!val->contents)
|
||||
{
|
||||
check_type_length_before_alloc (val->enclosing_type);
|
||||
@@ -2874,6 +2877,7 @@ set_value_enclosing_type (struct value *val, struct type *new_encl_type)
|
||||
if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
|
||||
{
|
||||
check_type_length_before_alloc (new_encl_type);
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type));
|
||||
val->contents
|
||||
.reset ((gdb_byte *) xrealloc (val->contents.release (),
|
||||
TYPE_LENGTH (new_encl_type)));
|
||||
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
|
||||
--- a/gdb/vax-tdep.c
|
||||
+++ b/gdb/vax-tdep.c
|
||||
@@ -219,6 +219,7 @@ vax_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
ULONGEST addr;
|
||||
|
||||
regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
|
||||
+ ulongest_fits_host_or_error (TYPE_LENGTH (type));
|
||||
read_memory (addr, readbuf, len);
|
||||
}
|
||||
|
@ -1,558 +0,0 @@
|
||||
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-rhbz795424-bitpos-22of25.patch
|
||||
|
||||
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
;; (RH BZ 795424).
|
||||
;;=push
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2012-09/msg00629.html
|
||||
|
||||
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
This is part three of the bitpos expansion change. Some architectures
|
||||
allow arbitrary length watchpoints and combined with the fact that type
|
||||
lengths could be large enough, we need LONGEST for watchpoint lengths.
|
||||
It is architecture dependent however, whether the LONGEST is needed or
|
||||
not. This patch updates the signatures of watchpoint insertion and
|
||||
removal functions of all architectures (to comply with the function
|
||||
signatures in the callback struct), but expands types only in
|
||||
architectures that need it. Tested on Fedora 16 x86_64.
|
||||
|
||||
Regards,
|
||||
Siddhesh
|
||||
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
||||
Content-Type: text/plain
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
Content-Disposition: attachment; filename=ChangeLog-wp
|
||||
|
||||
gdb/ChangeLog:
|
||||
|
||||
* arm-linux-nat.c (arm_linux_insert_watchpoint): Expand
|
||||
parameter LEN to LONGEST.
|
||||
(arm_linux_remove_watchpoint): Likewise.
|
||||
(arm_linux_watchpoint_addr_within_range): Expand parameter
|
||||
LENGTH to LONGEST.
|
||||
* i386-nat.c (i386_insert_watchpoint): Expand parameter LEN to
|
||||
LONGEST.
|
||||
(i386_remove_watchpoint): Likewise.
|
||||
* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
|
||||
(ia64_linux_remove_watchpoint): Likewise.
|
||||
* inf-ttrace.c (inf_ttrace_insert_watchpoint): Likewise.
|
||||
Expand NUM_PAGES, PAGE to LONGEST.
|
||||
(inf_ttrace_remove_watchpoint): Likewise.
|
||||
* mips-linux-nat.c (mips_linux_insert_watchpoint): Expand
|
||||
parameter LEN to LONGEST.
|
||||
(mips_linux_remove_watchpoint): Likewise.
|
||||
* nto-procfs.c (procfs_remove_hw_watchpoint): Likewise.
|
||||
(procfs_insert_hw_watchpoint): Likewise.
|
||||
* ppc-linux-nat.c (calculate_dvc): Likewise. Expand I,
|
||||
NUM_BYTE_ENABLE to LONGEST.
|
||||
(check_condition): Expand parameter LEN to point to LONGEST.
|
||||
(ppc_linux_can_accel_watchpoint_condition): Expand parameter
|
||||
LEN to LONGEST.
|
||||
(create_watchpoint_request): Likewise.
|
||||
(ppc_linux_insert_watchpoint): Likewise.
|
||||
(ppc_linux_remove_watchpoint): Likewise.
|
||||
(ppc_linux_watchpoint_addr_within_range): Expand parameter
|
||||
LENGTH to LONGEST.
|
||||
* procfs.c (proc_set_watchpoint): Expand parameter LEN to
|
||||
LONGEST.
|
||||
(procfs_set_watchpoint): Likewise.
|
||||
(procfs_insert_watchpoint): Likewise.
|
||||
(procfs_remove_watchpoint): Likewise.
|
||||
* remote-m32r-sdi.c (m32r_insert_watchpoint): Likewise. Use
|
||||
plongest to format print LEN.
|
||||
(m32r_remove_watchpoint): Likewise.
|
||||
* remote-mips.c (mips_insert_watchpoint): Expand parameter LEN
|
||||
to LONGEST.
|
||||
(mips_remove_watchpoint): Likewise.
|
||||
* remote.c (remote_insert_watchpoint): Likewise.
|
||||
Use phex_nz to format print LEN.
|
||||
(remote_remove_watchpoint): Likewise.
|
||||
(remote_watchpoint_addr_within_range): Expand parameter LENGTH
|
||||
to LONGEST.
|
||||
* s390-linux-nat.c (s390_insert_watchpoint): Expand parameter LEN to
|
||||
LONGEST.
|
||||
(s390_remove_watchpoint): Likewise.
|
||||
* target.c (update_current_target): Expand parameter LEN for
|
||||
callbacks to TO_INSERT_WATCHPOINT, TO_REMOVE_WATCHPOINT,
|
||||
TO_CAN_ACCEL_WATCHPOINT_CONDITION, to LONGEST.
|
||||
(default_watchpoint_addr_within_range): Expand parameter
|
||||
LENGTH to LONGEST.
|
||||
(debug_to_can_accel_watchpoint_condition): Expand parameter LEN
|
||||
to LONGEST. Use plongest to format print LEN.
|
||||
(debug_to_watchpoint_addr_within_range): Expand parameter LENGTH
|
||||
to LONGEST. Use plongest to format print LENGTH.
|
||||
(debug_to_insert_watchpoint): Expand parameter LEN to LONGEST.
|
||||
Use plongest to format print LEN.
|
||||
(debug_to_remove_watchpoint): Likewise.
|
||||
* target.h (struct target_ops): Expand parameter LEN of
|
||||
TO_REMOVE_WATCHPOINT, TO_INSERT_WATCHPOINT,
|
||||
TO_WATCHPOINT_ADDR_WITHIN_RANGE and
|
||||
TO_CAN_ACCEL_WATCHPOINT_CONDITION to LONGEST.
|
||||
|
||||
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
||||
Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-wp.patch
|
||||
|
||||
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
|
||||
--- a/gdb/aarch64-linux-nat.c
|
||||
+++ b/gdb/aarch64-linux-nat.c
|
||||
@@ -63,14 +63,14 @@ public:
|
||||
int can_use_hw_breakpoint (enum bptype, int, int) override;
|
||||
int insert_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
|
||||
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
|
||||
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
|
||||
+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override;
|
||||
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
|
||||
struct expression *) override;
|
||||
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
|
||||
struct expression *) override;
|
||||
bool stopped_by_watchpoint () override;
|
||||
bool stopped_data_address (CORE_ADDR *) override;
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override;
|
||||
|
||||
int can_do_single_step () override;
|
||||
|
||||
@@ -887,7 +887,8 @@ aarch64_linux_nat_target::stopped_by_watchpoint ()
|
||||
|
||||
bool
|
||||
aarch64_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
|
||||
- CORE_ADDR start, int length)
|
||||
+ CORE_ADDR start,
|
||||
+ LONGEST length)
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
|
||||
--- a/gdb/arm-linux-nat.c
|
||||
+++ b/gdb/arm-linux-nat.c
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
|
||||
|
||||
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
|
||||
+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override;
|
||||
|
||||
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
|
||||
struct expression *) override;
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
bool stopped_data_address (CORE_ADDR *) override;
|
||||
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override;
|
||||
|
||||
const struct target_desc *read_description () override;
|
||||
|
||||
@@ -1199,7 +1199,7 @@ arm_linux_nat_target::stopped_by_watchpoint ()
|
||||
bool
|
||||
arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
|
||||
CORE_ADDR start,
|
||||
- int length)
|
||||
+ LONGEST length)
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c
|
||||
--- a/gdb/nat/aarch64-linux-hw-point.c
|
||||
+++ b/gdb/nat/aarch64-linux-hw-point.c
|
||||
@@ -137,7 +137,7 @@ aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int offset, int len)
|
||||
Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */
|
||||
|
||||
static int
|
||||
-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
|
||||
+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len)
|
||||
{
|
||||
unsigned int alignment = 0;
|
||||
|
||||
@@ -212,9 +212,10 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
|
||||
an address within the latter. */
|
||||
|
||||
static void
|
||||
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
|
||||
+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len,
|
||||
+ CORE_ADDR *aligned_addr_p,
|
||||
int *aligned_offset_p, int *aligned_len_p,
|
||||
- CORE_ADDR *next_addr_p, int *next_len_p,
|
||||
+ CORE_ADDR *next_addr_p, LONGEST *next_len_p,
|
||||
CORE_ADDR *next_addr_orig_p)
|
||||
{
|
||||
int aligned_len;
|
||||
@@ -602,7 +603,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type,
|
||||
|
||||
static int
|
||||
aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
|
||||
- CORE_ADDR addr, int len, int is_insert,
|
||||
+ CORE_ADDR addr, LONGEST len, int is_insert,
|
||||
struct aarch64_debug_reg_state *state)
|
||||
{
|
||||
CORE_ADDR addr_orig = addr;
|
||||
@@ -632,12 +633,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
|
||||
" "
|
||||
"addr_orig: %s\n"
|
||||
" "
|
||||
- "next_addr: %s, next_len: %d\n"
|
||||
+ "next_addr: %s, next_len: %s\n"
|
||||
" "
|
||||
"addr_orig_next: %s\n",
|
||||
is_insert, core_addr_to_string_nz (aligned_addr),
|
||||
aligned_len, core_addr_to_string_nz (addr_orig),
|
||||
- core_addr_to_string_nz (addr), len,
|
||||
+ core_addr_to_string_nz (addr), plongest (len),
|
||||
core_addr_to_string_nz (addr_orig_next));
|
||||
|
||||
addr_orig = addr_orig_next;
|
||||
@@ -651,7 +652,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
|
||||
|
||||
int
|
||||
aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
|
||||
- int len, int is_insert,
|
||||
+ LONGEST len, int is_insert,
|
||||
struct aarch64_debug_reg_state *state)
|
||||
{
|
||||
if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
|
||||
@@ -733,14 +734,14 @@ aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state,
|
||||
void
|
||||
aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
|
||||
const char *func, CORE_ADDR addr,
|
||||
- int len, enum target_hw_bp_type type)
|
||||
+ LONGEST len, enum target_hw_bp_type type)
|
||||
{
|
||||
int i;
|
||||
|
||||
debug_printf ("%s", func);
|
||||
if (addr || len)
|
||||
- debug_printf (" (addr=0x%08lx, len=%d, type=%s)",
|
||||
- (unsigned long) addr, len,
|
||||
+ debug_printf (" (addr=0x%08lx, len=%s, type=%s)",
|
||||
+ (unsigned long) addr, plongest (len),
|
||||
type == hw_write ? "hw-write-watchpoint"
|
||||
: (type == hw_read ? "hw-read-watchpoint"
|
||||
: (type == hw_access ? "hw-access-watchpoint"
|
||||
@@ -823,7 +824,7 @@ aarch64_linux_get_debug_reg_capacity (int tid)
|
||||
ADDR and whose length is LEN in bytes. */
|
||||
|
||||
int
|
||||
-aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len)
|
||||
+aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len)
|
||||
{
|
||||
CORE_ADDR aligned_addr;
|
||||
|
||||
diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h
|
||||
--- a/gdb/nat/aarch64-linux-hw-point.h
|
||||
+++ b/gdb/nat/aarch64-linux-hw-point.h
|
||||
@@ -176,7 +176,7 @@ int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
|
||||
int len, int is_insert,
|
||||
struct aarch64_debug_reg_state *state);
|
||||
int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
|
||||
- int len, int is_insert,
|
||||
+ LONGEST len, int is_insert,
|
||||
struct aarch64_debug_reg_state *state);
|
||||
|
||||
void aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state,
|
||||
@@ -189,12 +189,12 @@ bool aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state,
|
||||
|
||||
void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
|
||||
const char *func, CORE_ADDR addr,
|
||||
- int len, enum target_hw_bp_type type);
|
||||
+ LONGEST len, enum target_hw_bp_type type);
|
||||
|
||||
void aarch64_linux_get_debug_reg_capacity (int tid);
|
||||
|
||||
struct aarch64_debug_reg_state *aarch64_get_debug_reg_state (pid_t pid);
|
||||
|
||||
-int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len);
|
||||
+int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len);
|
||||
|
||||
#endif /* NAT_AARCH64_LINUX_HW_POINT_H */
|
||||
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
|
||||
--- a/gdb/ppc-linux-nat.c
|
||||
+++ b/gdb/ppc-linux-nat.c
|
||||
@@ -284,7 +284,7 @@ struct ppc_linux_nat_target final : public linux_nat_target
|
||||
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
|
||||
override;
|
||||
|
||||
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
|
||||
+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override;
|
||||
|
||||
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
|
||||
struct expression *) override;
|
||||
@@ -302,9 +302,9 @@ struct ppc_linux_nat_target final : public linux_nat_target
|
||||
|
||||
bool stopped_data_address (CORE_ADDR *) override;
|
||||
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override;
|
||||
|
||||
- bool can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *)
|
||||
+ bool can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int, struct expression *)
|
||||
override;
|
||||
|
||||
int masked_watch_num_registers (CORE_ADDR, CORE_ADDR) override;
|
||||
@@ -2065,11 +2065,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
CONDITION_VALUE will hold the value which should be put in the
|
||||
DVC register. */
|
||||
static void
|
||||
-calculate_dvc (CORE_ADDR addr, int len, CORE_ADDR data_value,
|
||||
+calculate_dvc (CORE_ADDR addr, LONGEST len, CORE_ADDR data_value,
|
||||
uint32_t *condition_mode, uint64_t *condition_value)
|
||||
{
|
||||
- int i, num_byte_enable, align_offset, num_bytes_off_dvc,
|
||||
- rightmost_enabled_byte;
|
||||
+ LONGEST i, num_byte_enable;
|
||||
+ int align_offset, num_bytes_off_dvc, rightmost_enabled_byte;
|
||||
CORE_ADDR addr_end_data, addr_end_dvc;
|
||||
|
||||
/* The DVC register compares bytes within fixed-length windows which
|
||||
@@ -2157,7 +2157,7 @@ num_memory_accesses (const std::vector<value_ref_ptr> &chain)
|
||||
of the constant. */
|
||||
static int
|
||||
check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
||||
- CORE_ADDR *data_value, int *len)
|
||||
+ CORE_ADDR *data_value, LONGEST *len)
|
||||
{
|
||||
int pc = 1, num_accesses_left, num_accesses_right;
|
||||
struct value *left_val, *right_val;
|
||||
@@ -2208,7 +2208,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
||||
the condition expression, thus only triggering the watchpoint when it is
|
||||
true. */
|
||||
bool
|
||||
-ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len,
|
||||
+ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr,
|
||||
+ LONGEST len,
|
||||
int rw,
|
||||
struct expression *cond)
|
||||
{
|
||||
@@ -2226,7 +2227,7 @@ ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len,
|
||||
|
||||
static void
|
||||
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
||||
- int len, enum target_hw_bp_type type,
|
||||
+ LONGEST len, enum target_hw_bp_type type,
|
||||
struct expression *cond, int insert)
|
||||
{
|
||||
if (len == 1
|
||||
@@ -2492,7 +2493,7 @@ ppc_linux_nat_target::stopped_by_watchpoint ()
|
||||
bool
|
||||
ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
|
||||
CORE_ADDR start,
|
||||
- int length)
|
||||
+ LONGEST length)
|
||||
{
|
||||
int mask;
|
||||
|
||||
diff --git a/gdb/procfs.c b/gdb/procfs.c
|
||||
--- a/gdb/procfs.c
|
||||
+++ b/gdb/procfs.c
|
||||
@@ -1546,7 +1546,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr)
|
||||
}
|
||||
|
||||
static int
|
||||
-proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
|
||||
+proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, LONGEST len, int wflags)
|
||||
{
|
||||
struct {
|
||||
procfs_ctl_t cmd;
|
||||
@@ -3232,7 +3232,7 @@ procfs_target::pid_to_exec_file (int pid)
|
||||
/* Insert a watchpoint. */
|
||||
|
||||
static int
|
||||
-procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
|
||||
+procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, LONGEST len, int rwflag,
|
||||
int after)
|
||||
{
|
||||
int pflags = 0;
|
||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
|
||||
bool stopped_data_address (CORE_ADDR *) override;
|
||||
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override;
|
||||
|
||||
int can_use_hw_breakpoint (enum bptype, int, int) override;
|
||||
|
||||
@@ -10298,7 +10298,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len,
|
||||
p = strchr (rs->buf.data (), '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
- xsnprintf (p, endbuf - p, ",%x", len);
|
||||
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
|
||||
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, 0);
|
||||
@@ -10318,7 +10318,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len,
|
||||
|
||||
bool
|
||||
remote_target::watchpoint_addr_within_range (CORE_ADDR addr,
|
||||
- CORE_ADDR start, int length)
|
||||
+ CORE_ADDR start, LONGEST length)
|
||||
{
|
||||
CORE_ADDR diff = remote_address_masked (addr - start);
|
||||
|
||||
@@ -10347,7 +10347,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len,
|
||||
p = strchr (rs->buf.data (), '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
- xsnprintf (p, endbuf - p, ",%x", len);
|
||||
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, 0);
|
||||
|
||||
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
|
||||
--- a/gdb/s390-linux-nat.c
|
||||
+++ b/gdb/s390-linux-nat.c
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
override;
|
||||
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
|
||||
override;
|
||||
- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
|
||||
+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override;
|
||||
bool stopped_by_watchpoint () override;
|
||||
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
|
||||
struct expression *) override;
|
||||
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
|
||||
--- a/gdb/target-delegates.c
|
||||
+++ b/gdb/target-delegates.c
|
||||
@@ -37,9 +37,9 @@ struct dummy_target : public target_ops
|
||||
bool stopped_by_watchpoint () override;
|
||||
bool have_steppable_watchpoint () override;
|
||||
bool stopped_data_address (CORE_ADDR *arg0) override;
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) override;
|
||||
int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override;
|
||||
- bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
|
||||
+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) override;
|
||||
int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override;
|
||||
int can_do_single_step () override;
|
||||
bool supports_terminal_ours () override;
|
||||
@@ -204,9 +204,9 @@ struct debug_target : public target_ops
|
||||
bool stopped_by_watchpoint () override;
|
||||
bool have_steppable_watchpoint () override;
|
||||
bool stopped_data_address (CORE_ADDR *arg0) override;
|
||||
- bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override;
|
||||
+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) override;
|
||||
int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override;
|
||||
- bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override;
|
||||
+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) override;
|
||||
int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override;
|
||||
int can_do_single_step () override;
|
||||
bool supports_terminal_ours () override;
|
||||
@@ -1041,19 +1041,19 @@ debug_target::stopped_data_address (CORE_ADDR *arg0)
|
||||
}
|
||||
|
||||
bool
|
||||
-target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
|
||||
+target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
|
||||
{
|
||||
return this->beneath ()->watchpoint_addr_within_range (arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
-dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
|
||||
+dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
|
||||
{
|
||||
return default_watchpoint_addr_within_range (this, arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
bool
|
||||
-debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
|
||||
+debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
|
||||
{
|
||||
bool result;
|
||||
fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ());
|
||||
@@ -1063,7 +1063,7 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
target_debug_print_CORE_ADDR (arg1);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
- target_debug_print_int (arg2);
|
||||
+ target_debug_print_LONGEST (arg2);
|
||||
fputs_unfiltered (") = ", gdb_stdlog);
|
||||
target_debug_print_bool (result);
|
||||
fputs_unfiltered ("\n", gdb_stdlog);
|
||||
@@ -1099,19 +1099,19 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1)
|
||||
}
|
||||
|
||||
bool
|
||||
-target_ops::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
|
||||
+target_ops::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3)
|
||||
{
|
||||
return this->beneath ()->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
bool
|
||||
-dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
|
||||
+dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
-debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3)
|
||||
+debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3)
|
||||
{
|
||||
bool result;
|
||||
fprintf_unfiltered (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath ()->shortname ());
|
||||
@@ -1119,7 +1119,7 @@ debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2
|
||||
fprintf_unfiltered (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ());
|
||||
target_debug_print_CORE_ADDR (arg0);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
- target_debug_print_int (arg1);
|
||||
+ target_debug_print_LONGEST (arg1);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
target_debug_print_int (arg2);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
diff --git a/gdb/target.c b/gdb/target.c
|
||||
--- a/gdb/target.c
|
||||
+++ b/gdb/target.c
|
||||
@@ -55,7 +55,7 @@ static void generic_tls_error (void) ATTRIBUTE_NORETURN;
|
||||
static void default_terminal_info (struct target_ops *, const char *, int);
|
||||
|
||||
static int default_watchpoint_addr_within_range (struct target_ops *,
|
||||
- CORE_ADDR, CORE_ADDR, int);
|
||||
+ CORE_ADDR, CORE_ADDR, LONGEST);
|
||||
|
||||
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
|
||||
CORE_ADDR, LONGEST);
|
||||
@@ -3125,7 +3125,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self,
|
||||
static int
|
||||
default_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
- CORE_ADDR start, int length)
|
||||
+ CORE_ADDR start, LONGEST length)
|
||||
{
|
||||
return addr >= start && addr < start + length;
|
||||
}
|
||||
diff --git a/gdb/target.h b/gdb/target.h
|
||||
--- a/gdb/target.h
|
||||
+++ b/gdb/target.h
|
||||
@@ -561,7 +561,7 @@ struct target_ops
|
||||
TARGET_DEFAULT_RETURN (false);
|
||||
virtual bool stopped_data_address (CORE_ADDR *)
|
||||
TARGET_DEFAULT_RETURN (false);
|
||||
- virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int)
|
||||
+ virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST)
|
||||
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
|
||||
|
||||
/* Documentation of this routine is provided with the corresponding
|
||||
@@ -569,7 +569,7 @@ struct target_ops
|
||||
virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST)
|
||||
TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
|
||||
|
||||
- virtual bool can_accel_watchpoint_condition (CORE_ADDR, int, int,
|
||||
+ virtual bool can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int,
|
||||
struct expression *)
|
||||
TARGET_DEFAULT_RETURN (false);
|
||||
virtual int masked_watch_num_registers (CORE_ADDR, CORE_ADDR)
|
File diff suppressed because it is too large
Load Diff
@ -1,638 +0,0 @@
|
||||
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-rhbz795424-bitpos-25of25-test.patch
|
||||
|
||||
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
;; (RH BZ 795424).
|
||||
;;=push
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2012-10/msg00231.html
|
||||
|
||||
On Mon, 15 Oct 2012 15:25:55 +0200, Jan Kratochvil wrote:
|
||||
> I have filed for it now:
|
||||
> Invalid debug/ array bounds w/-fno-range-check and 32-bit target
|
||||
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54934
|
||||
|
||||
Therefore it looks as a valid gfortran FSF GCC HEAD bug so provided
|
||||
a hand-patched .S file for i386; patched GDB PASSes with it.
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
2012-10-15 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.fortran/array-bounds.exp: New test file.
|
||||
* gdb.fortran/array-bounds.f: New test file.
|
||||
* gdb.fortran/array-bounds.S: New test file.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/array-bounds.S b/gdb/testsuite/gdb.fortran/array-bounds.S
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/array-bounds.S
|
||||
@@ -0,0 +1,529 @@
|
||||
+/* Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ This file is part of the gdb testsuite. */
|
||||
+
|
||||
+ .file "array-bounds.f"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .type MAIN__, @function
|
||||
+MAIN__:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.fortran/array-bounds.f"
|
||||
+ # gdb.fortran/array-bounds.f:16
|
||||
+ .loc 1 16 0
|
||||
+ .cfi_startproc
|
||||
+# BLOCK 2 seq:0
|
||||
+# PRED: ENTRY (FALLTHRU)
|
||||
+ pushl %ebp
|
||||
+.LCFI0:
|
||||
+ .cfi_def_cfa_offset 8
|
||||
+ .cfi_offset 5, -8
|
||||
+ movl %esp, %ebp
|
||||
+.LCFI1:
|
||||
+ .cfi_def_cfa_register 5
|
||||
+ subl $40, %esp
|
||||
+.LBB2:
|
||||
+# SUCC: 3 (FALLTHRU)
|
||||
+ # gdb.fortran/array-bounds.f:18
|
||||
+ .loc 1 18 0
|
||||
+ movl $-1, %eax
|
||||
+# BLOCK 3 seq:1
|
||||
+# PRED: 2 (FALLTHRU) 4 [100.0%]
|
||||
+.L3:
|
||||
+ # gdb.fortran/array-bounds.f:18
|
||||
+ .loc 1 18 0 is_stmt 0 discriminator 1
|
||||
+ testl %eax, %eax
|
||||
+# SUCC: 5 4 (FALLTHRU)
|
||||
+ jg .L2
|
||||
+# BLOCK 4 seq:2
|
||||
+# PRED: 3 (FALLTHRU)
|
||||
+ # gdb.fortran/array-bounds.f:18
|
||||
+ .loc 1 18 0 discriminator 2
|
||||
+ leal 1(%eax), %ecx
|
||||
+ movl .LC0, %edx
|
||||
+ movl %edx, -16(%ebp,%ecx,4)
|
||||
+ addl $1, %eax
|
||||
+# SUCC: 3 [100.0%]
|
||||
+ jmp .L3
|
||||
+# BLOCK 5 seq:3
|
||||
+# PRED: 3
|
||||
+.L2:
|
||||
+.LBE2:
|
||||
+ # gdb.fortran/array-bounds.f:19
|
||||
+ .loc 1 19 0 is_stmt 1
|
||||
+ movl -16(%ebp), %eax
|
||||
+ movl -12(%ebp), %edx
|
||||
+ movl %eax, -24(%ebp)
|
||||
+ movl %edx, -20(%ebp)
|
||||
+ # gdb.fortran/array-bounds.f:20
|
||||
+ .loc 1 20 0
|
||||
+ movl $0, 4(%esp)
|
||||
+ movl $0, (%esp)
|
||||
+# SUCC:
|
||||
+ call _gfortran_stop_string
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size MAIN__, .-MAIN__
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB1:
|
||||
+ # gdb.fortran/array-bounds.f:21
|
||||
+ .loc 1 21 0
|
||||
+ .cfi_startproc
|
||||
+# BLOCK 2 seq:0
|
||||
+# PRED: ENTRY (FALLTHRU)
|
||||
+ pushl %ebp
|
||||
+.LCFI2:
|
||||
+ .cfi_def_cfa_offset 8
|
||||
+ .cfi_offset 5, -8
|
||||
+ movl %esp, %ebp
|
||||
+.LCFI3:
|
||||
+ .cfi_def_cfa_register 5
|
||||
+ andl $-16, %esp
|
||||
+ subl $16, %esp
|
||||
+ # gdb.fortran/array-bounds.f:21
|
||||
+ .loc 1 21 0
|
||||
+ movl 12(%ebp), %eax
|
||||
+ movl %eax, 4(%esp)
|
||||
+ movl 8(%ebp), %eax
|
||||
+ movl %eax, (%esp)
|
||||
+ call _gfortran_set_args
|
||||
+ movl $options.1.1824, 4(%esp)
|
||||
+ movl $7, (%esp)
|
||||
+ call _gfortran_set_options
|
||||
+ call MAIN__
|
||||
+ movl $0, %eax
|
||||
+ leave
|
||||
+.LCFI4:
|
||||
+ .cfi_restore 5
|
||||
+ .cfi_def_cfa 4, 4
|
||||
+# SUCC: EXIT [100.0%]
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE1:
|
||||
+ .size main, .-main
|
||||
+ .section .rodata
|
||||
+ .align 4
|
||||
+ .type options.1.1824, @object
|
||||
+ .size options.1.1824, 28
|
||||
+options.1.1824:
|
||||
+ .long 68
|
||||
+ .long 1023
|
||||
+ .long 0
|
||||
+ .long 0
|
||||
+ .long 1
|
||||
+ .long 1
|
||||
+ .long 0
|
||||
+ .align 4
|
||||
+.LC0:
|
||||
+ .long 1109917696
|
||||
+ .text
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 2f - 1f # Length of Compilation Unit Info
|
||||
+1:
|
||||
+ .value 0x2 # DWARF version number
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .byte 0x4 # Pointer Size (in bytes)
|
||||
+dieb: .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
|
||||
+ .long .LASF5 # DW_AT_producer: "GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude"
|
||||
+ .byte 0xe # DW_AT_language
|
||||
+ .byte 0x2 # DW_AT_identifier_case
|
||||
+ .long .LASF6 # DW_AT_name: "gdb.fortran/array-bounds.f"
|
||||
+ .long .LASF7 # DW_AT_comp_dir: ""
|
||||
+ .long .Ltext0 # DW_AT_low_pc
|
||||
+ .long .Letext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+die26: .uleb128 0x2 # (DIE (0x26) DW_TAG_subprogram)
|
||||
+ .long .LASF8 # DW_AT_name: "MAIN__"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x10 # DW_AT_decl_line
|
||||
+ .long .LFB0 # DW_AT_low_pc
|
||||
+ .long .LFE0 # DW_AT_high_pc
|
||||
+ .long .LLST0 # DW_AT_frame_base
|
||||
+ .byte 0x1 # DW_AT_GNU_all_tail_call_sites
|
||||
+ .byte 0x1 # DW_AT_main_subprogram
|
||||
+ .byte 0x2 # DW_AT_calling_convention
|
||||
+ .long die66 - .Ldebug_info0 # DW_AT_sibling
|
||||
+die40: .uleb128 0x3 # (DIE (0x40) DW_TAG_variable)
|
||||
+ .ascii "bar\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x11 # DW_AT_decl_line
|
||||
+ .long die66 - .Ldebug_info0 # DW_AT_type
|
||||
+ .byte 0x2 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 -24
|
||||
+die4e: .uleb128 0x3 # (DIE (0x4e) DW_TAG_variable)
|
||||
+ .ascii "foo\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x10 # DW_AT_decl_line
|
||||
+ .long die88 - .Ldebug_info0 # DW_AT_type
|
||||
+ .byte 0x2 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 -32
|
||||
+die5c: .uleb128 0x4 # (DIE (0x5c) DW_TAG_lexical_block)
|
||||
+ .long .LBB2 # DW_AT_low_pc
|
||||
+ .long .LBE2 # DW_AT_high_pc
|
||||
+ .byte 0 # end of children of DIE 0x26
|
||||
+die66: .uleb128 0x5 # (DIE (0x66) DW_TAG_array_type)
|
||||
+ .long die81 - .Ldebug_info0 # DW_AT_type
|
||||
+ .long die7a - .Ldebug_info0 # DW_AT_sibling
|
||||
+die6f: .uleb128 0x6 # (DIE (0x6f) DW_TAG_subrange_type)
|
||||
+ .long die7a - .Ldebug_info0 # DW_AT_type
|
||||
+#if 0
|
||||
+ .long 0xffffffff # DW_AT_lower_bound
|
||||
+ .byte 0 # DW_AT_upper_bound
|
||||
+#else
|
||||
+ .quad 0xfffffffeffffffff # DW_AT_lower_bound
|
||||
+ .quad 0xffffffff00000000 # DW_AT_upper_bound
|
||||
+#endif
|
||||
+ .byte 0 # end of children of DIE 0x66
|
||||
+die7a: .uleb128 0x7 # (DIE (0x7a) DW_TAG_base_type)
|
||||
+#if 0
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+#else
|
||||
+ .byte 0x8 # DW_AT_byte_size
|
||||
+#endif
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .long .LASF0 # DW_AT_name: "integer(kind=4)"
|
||||
+die81: .uleb128 0x7 # (DIE (0x81) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x4 # DW_AT_encoding
|
||||
+ .long .LASF1 # DW_AT_name: "real(kind=4)"
|
||||
+die88: .uleb128 0x5 # (DIE (0x88) DW_TAG_array_type)
|
||||
+ .long die81 - .Ldebug_info0 # DW_AT_type
|
||||
+ .long die99 - .Ldebug_info0 # DW_AT_sibling
|
||||
+die91: .uleb128 0x8 # (DIE (0x91) DW_TAG_subrange_type)
|
||||
+ .long die7a - .Ldebug_info0 # DW_AT_type
|
||||
+#if 0
|
||||
+ .byte 0 # DW_AT_lower_bound
|
||||
+ .byte 0x1 # DW_AT_upper_bound
|
||||
+#else
|
||||
+ .quad 0x100000000 # DW_AT_lower_bound
|
||||
+ .quad 0x100000001 # DW_AT_upper_bound
|
||||
+#endif
|
||||
+ .byte 0 # end of children of DIE 0x88
|
||||
+die99: .uleb128 0x9 # (DIE (0x99) DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_AT_external
|
||||
+ .long .LASF9 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long die7a - .Ldebug_info0 # DW_AT_type
|
||||
+ .long .LFB1 # DW_AT_low_pc
|
||||
+ .long .LFE1 # DW_AT_high_pc
|
||||
+ .long .LLST1 # DW_AT_frame_base
|
||||
+ .byte 0x1 # DW_AT_GNU_all_tail_call_sites
|
||||
+ .long died4 - .Ldebug_info0 # DW_AT_sibling
|
||||
+dieb6: .uleb128 0xa # (DIE (0xb6) DW_TAG_formal_parameter)
|
||||
+ .long .LASF2 # DW_AT_name: "argc"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long died4 - .Ldebug_info0 # DW_AT_type
|
||||
+ .byte 0x2 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 0
|
||||
+diec4: .uleb128 0xa # (DIE (0xc4) DW_TAG_formal_parameter)
|
||||
+ .long .LASF3 # DW_AT_name: "argv"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long died9 - .Ldebug_info0 # DW_AT_type
|
||||
+ .byte 0x3 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 4
|
||||
+ .byte 0x6 # DW_OP_deref
|
||||
+ .byte 0 # end of children of DIE 0x99
|
||||
+died4: .uleb128 0xb # (DIE (0xd4) DW_TAG_const_type)
|
||||
+ .long die7a - .Ldebug_info0 # DW_AT_type
|
||||
+died9: .uleb128 0xc # (DIE (0xd9) DW_TAG_pointer_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .long diedf - .Ldebug_info0 # DW_AT_type
|
||||
+diedf: .uleb128 0x7 # (DIE (0xdf) DW_TAG_base_type)
|
||||
+ .byte 0x1 # DW_AT_byte_size
|
||||
+ .byte 0x8 # DW_AT_encoding
|
||||
+ .long .LASF4 # DW_AT_name: "character(kind=1)"
|
||||
+ .byte 0 # end of children of DIE 0xb
|
||||
+2:
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x25 # (DW_AT_producer)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x13 # (DW_AT_language)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x42 # (DW_AT_identifier_case)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x1b # (DW_AT_comp_dir)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x6 # (DW_FORM_data4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x6 # (DW_FORM_data4)
|
||||
+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites)
|
||||
+ .uleb128 0xc # (DW_FORM_flag)
|
||||
+ .uleb128 0x6a # (DW_AT_main_subprogram)
|
||||
+ .uleb128 0xc # (DW_FORM_flag)
|
||||
+ .uleb128 0x36 # (DW_AT_calling_convention)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0xa # (DW_FORM_block1)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x4 # (abbrev code)
|
||||
+ .uleb128 0xb # (TAG: DW_TAG_lexical_block)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x5 # (abbrev code)
|
||||
+ .uleb128 0x1 # (TAG: DW_TAG_array_type)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 # (abbrev code)
|
||||
+ .uleb128 0x21 # (TAG: DW_TAG_subrange_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+#if 0
|
||||
+ .uleb128 0x22 # (DW_AT_lower_bound)
|
||||
+ .uleb128 0x6 # (DW_FORM_data4)
|
||||
+ .uleb128 0x2f # (DW_AT_upper_bound)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+#else
|
||||
+ .uleb128 0x22 # (DW_AT_lower_bound)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+ .uleb128 0x2f # (DW_AT_upper_bound)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+#endif
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3e # (DW_AT_encoding)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x8 # (abbrev code)
|
||||
+ .uleb128 0x21 # (TAG: DW_TAG_subrange_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+#if 0
|
||||
+ .uleb128 0x22 # (DW_AT_lower_bound)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x2f # (DW_AT_upper_bound)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+#else
|
||||
+ .uleb128 0x22 # (DW_AT_lower_bound)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+ .uleb128 0x2f # (DW_AT_upper_bound)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+#endif
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0xc # (DW_FORM_flag)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x6 # (DW_FORM_data4)
|
||||
+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites)
|
||||
+ .uleb128 0xc # (DW_FORM_flag)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa # (abbrev code)
|
||||
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0xa # (DW_FORM_block1)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xb # (abbrev code)
|
||||
+ .uleb128 0x26 # (TAG: DW_TAG_const_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xc # (abbrev code)
|
||||
+ .uleb128 0xf # (TAG: DW_TAG_pointer_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_loc,"",@progbits
|
||||
+.Ldebug_loc0:
|
||||
+.LLST0:
|
||||
+ .long .LFB0-.Ltext0 # Location list begin address (*.LLST0)
|
||||
+ .long .LCFI0-.Ltext0 # Location list end address (*.LLST0)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x74 # DW_OP_breg4
|
||||
+ .sleb128 4
|
||||
+ .long .LCFI0-.Ltext0 # Location list begin address (*.LLST0)
|
||||
+ .long .LCFI1-.Ltext0 # Location list end address (*.LLST0)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x74 # DW_OP_breg4
|
||||
+ .sleb128 8
|
||||
+ .long .LCFI1-.Ltext0 # Location list begin address (*.LLST0)
|
||||
+ .long .LFE0-.Ltext0 # Location list end address (*.LLST0)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x75 # DW_OP_breg5
|
||||
+ .sleb128 8
|
||||
+ .long 0 # Location list terminator begin (*.LLST0)
|
||||
+ .long 0 # Location list terminator end (*.LLST0)
|
||||
+.LLST1:
|
||||
+ .long .LFB1-.Ltext0 # Location list begin address (*.LLST1)
|
||||
+ .long .LCFI2-.Ltext0 # Location list end address (*.LLST1)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x74 # DW_OP_breg4
|
||||
+ .sleb128 4
|
||||
+ .long .LCFI2-.Ltext0 # Location list begin address (*.LLST1)
|
||||
+ .long .LCFI3-.Ltext0 # Location list end address (*.LLST1)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x74 # DW_OP_breg4
|
||||
+ .sleb128 8
|
||||
+ .long .LCFI3-.Ltext0 # Location list begin address (*.LLST1)
|
||||
+ .long .LCFI4-.Ltext0 # Location list end address (*.LLST1)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x75 # DW_OP_breg5
|
||||
+ .sleb128 8
|
||||
+ .long .LCFI4-.Ltext0 # Location list begin address (*.LLST1)
|
||||
+ .long .LFE1-.Ltext0 # Location list end address (*.LLST1)
|
||||
+ .value 0x2 # Location expression size
|
||||
+ .byte 0x74 # DW_OP_breg4
|
||||
+ .sleb128 4
|
||||
+ .long 0 # Location list terminator begin (*.LLST1)
|
||||
+ .long 0 # Location list terminator end (*.LLST1)
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x1c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x4 # Size of Address
|
||||
+ .byte 0 # Size of Segment Descriptor
|
||||
+ .value 0 # Pad to 8 byte boundary
|
||||
+ .value 0
|
||||
+ .long .Ltext0 # Address
|
||||
+ .long .Letext0-.Ltext0 # Length
|
||||
+ .long 0
|
||||
+ .long 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF4:
|
||||
+ .string "character(kind=1)"
|
||||
+.LASF5:
|
||||
+ .string "GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude"
|
||||
+.LASF7:
|
||||
+ .string ""
|
||||
+.LASF0:
|
||||
+#if 0
|
||||
+ .string "integer(kind=4)"
|
||||
+#else
|
||||
+ .string "integer(kind=8)"
|
||||
+#endif
|
||||
+.LASF9:
|
||||
+ .string "main"
|
||||
+.LASF8:
|
||||
+ .string "MAIN__"
|
||||
+.LASF6:
|
||||
+ .string "gdb.fortran/array-bounds.f"
|
||||
+.LASF2:
|
||||
+ .string "argc"
|
||||
+.LASF1:
|
||||
+ .string "real(kind=4)"
|
||||
+.LASF3:
|
||||
+ .string "argv"
|
||||
+ .ident "GCC: (GNU) 4.8.0 20121015 (experimental)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/array-bounds.exp
|
||||
@@ -0,0 +1,43 @@
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the gdb testsuite. It contains test to ensure that
|
||||
+# array bounds accept LONGEST.
|
||||
+
|
||||
+if { [skip_fortran_tests] } { return -1 }
|
||||
+
|
||||
+set testfile "array-bounds"
|
||||
+
|
||||
+if { [is_ilp32_target] && ([istarget "i\[34567\]86-*-linux*"]
|
||||
+ || [istarget "x86_64-*-linux*"]) } {
|
||||
+ set srcfile ${testfile}.S
|
||||
+ set opts {nodebug f90}
|
||||
+} else {
|
||||
+ set srcfile ${testfile}.f
|
||||
+ set opts {debug f90}
|
||||
+}
|
||||
+
|
||||
+if {[prepare_for_testing $testfile.exp $testfile $srcfile $opts]} {
|
||||
+ print "compile failed"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { ![runto MAIN__] } {
|
||||
+ perror "Could not run to breakpoint `MAIN__'."
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+gdb_test "print &foo" {.*\(4294967296:4294967297\).*}
|
||||
+gdb_test "print &bar" {.*\(-4294967297:-4294967296\).*}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/array-bounds.f b/gdb/testsuite/gdb.fortran/array-bounds.f
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/array-bounds.f
|
||||
@@ -0,0 +1,22 @@
|
||||
+c Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+c This program is free software; you can redistribute it and/or modify
|
||||
+c it under the terms of the GNU General Public License as published by
|
||||
+c the Free Software Foundation; either version 3 of the License, or
|
||||
+c (at your option) any later version.
|
||||
+c
|
||||
+c This program is distributed in the hope that it will be useful,
|
||||
+c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+c GNU General Public License for more details.
|
||||
+c
|
||||
+c You should have received a copy of the GNU General Public License
|
||||
+c along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ dimension foo(4294967296_8:4294967297_8)
|
||||
+ dimension bar(-4294967297_8:-4294967296_8)
|
||||
+ bar = 42
|
||||
+ foo=bar
|
||||
+ stop
|
||||
+ end
|
||||
+
|
@ -1,140 +0,0 @@
|
||||
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-rhbz795424-bitpos-25of25.patch
|
||||
|
||||
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
;; (RH BZ 795424).
|
||||
;;=push
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2012-08/msg00562.html
|
||||
|
||||
--MP_/90J7bck2fqDySEX9JkZtaqL
|
||||
Content-Type: text/plain; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
Range bounds for a gdb type can have LONGEST values for low and high
|
||||
bounds. Fortran range bounds functions however use only int. The larger
|
||||
ranges don't compile by default on gcc, but it is possible to override
|
||||
the check in the compiler by using -fno-range-check. As a result, this
|
||||
check is necessary so that we don't print junk in case of an overflow.
|
||||
|
||||
Attached patch does this expansion and also includes a test case that
|
||||
verifies that the problem is fixed. I have also verified on x86_64 that
|
||||
this patch does not cause any regressions.
|
||||
|
||||
Regards,
|
||||
Siddhesh
|
||||
|
||||
gdb/ChangeLog:
|
||||
|
||||
* f-lang.h (f77_get_upperbound): Return LONGEST.
|
||||
(f77_get_lowerbound): Likewise.
|
||||
* f-typeprint.c (f_type_print_varspec_suffix): Expand
|
||||
UPPER_BOUND and LOWER_BOUND to LONGEST. Use plongest to format
|
||||
print them.
|
||||
(f_type_print_base): Expand UPPER_BOUND to LONGEST. Use
|
||||
plongest to format print it.
|
||||
* f-valprint.c (f77_get_lowerbound): Return LONGEST.
|
||||
(f77_get_upperbound): Likewise.
|
||||
(f77_get_dynamic_length_of_aggregate): Expand UPPER_BOUND,
|
||||
LOWER_BOUND to LONGEST.
|
||||
(f77_create_arrayprint_offset_tbl): Likewise.
|
||||
|
||||
testsuite/ChangeLog:
|
||||
|
||||
* gdb.fortran/array-bounds.exp: New test case.
|
||||
* gdb.fortran/array-bounds.f: New test case.
|
||||
|
||||
--MP_/90J7bck2fqDySEX9JkZtaqL
|
||||
Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=f77-bounds.patch
|
||||
|
||||
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
|
||||
--- a/gdb/f-lang.h
|
||||
+++ b/gdb/f-lang.h
|
||||
@@ -50,9 +50,9 @@ struct common_block
|
||||
struct symbol *contents[1];
|
||||
};
|
||||
|
||||
-extern int f77_get_upperbound (struct type *);
|
||||
+extern LONGEST f77_get_upperbound (struct type *);
|
||||
|
||||
-extern int f77_get_lowerbound (struct type *);
|
||||
+extern LONGEST f77_get_lowerbound (struct type *);
|
||||
|
||||
extern void f77_get_dynamic_array_length (struct type *);
|
||||
|
||||
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
||||
--- a/gdb/f-typeprint.c
|
||||
+++ b/gdb/f-typeprint.c
|
||||
@@ -149,7 +149,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
int show, int passed_a_ptr, int demangled_args,
|
||||
int arrayprint_recurse_level, int print_rank_only)
|
||||
{
|
||||
- int upper_bound, lower_bound;
|
||||
+ LONGEST upper_bound, lower_bound;
|
||||
|
||||
/* No static variables are permitted as an error call may occur during
|
||||
execution of this function. */
|
||||
@@ -196,7 +196,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
{
|
||||
lower_bound = f77_get_lowerbound (type);
|
||||
if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%d:", lower_bound);
|
||||
+ fprintf_filtered (stream, "%s:", plongest (lower_bound));
|
||||
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*'. */
|
||||
@@ -206,7 +206,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ fprintf_filtered (stream, "%s", plongest (upper_bound));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ void
|
||||
f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
- int upper_bound;
|
||||
+ LONGEST upper_bound;
|
||||
int index;
|
||||
|
||||
QUIT;
|
||||
@@ -370,7 +370,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "character*%d", upper_bound);
|
||||
+ fprintf_filtered (stream, "character*%s", plongest (upper_bound));
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
|
||||
--- a/gdb/f-valprint.c
|
||||
+++ b/gdb/f-valprint.c
|
||||
@@ -41,7 +41,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
|
||||
/* Array which holds offsets to be applied to get a row's elements
|
||||
for a given array. Array also holds the size of each subarray. */
|
||||
|
||||
-int
|
||||
+LONGEST
|
||||
f77_get_lowerbound (struct type *type)
|
||||
{
|
||||
if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
|
||||
@@ -50,7 +50,7 @@ f77_get_lowerbound (struct type *type)
|
||||
return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
|
||||
}
|
||||
|
||||
-int
|
||||
+LONGEST
|
||||
f77_get_upperbound (struct type *type)
|
||||
{
|
||||
if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
@ -1,60 +0,0 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
Date: Wed, 12 Sep 2018 00:02:17 -0400
|
||||
Subject: gdb-rhbz795424-bitpos-arrayview.patch
|
||||
|
||||
;; This patch is needed to compile GDB after -Werror=narrowing has
|
||||
;; been enabled by default.
|
||||
;; Author: Sergio Durigan Junior.
|
||||
|
||||
diff --git a/gdb/common/array-view.h b/gdb/common/array-view.h
|
||||
--- a/gdb/common/array-view.h
|
||||
+++ b/gdb/common/array-view.h
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
using value_type = T;
|
||||
using reference = T &;
|
||||
using const_reference = const T &;
|
||||
- using size_type = size_t;
|
||||
+ using size_type = ULONGEST;
|
||||
|
||||
/* Default construction creates an empty view. */
|
||||
constexpr array_view () noexcept
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
count. */
|
||||
template<typename U,
|
||||
typename = Requires<DecayedConvertible<U>>>
|
||||
- constexpr array_view (U *array, size_t size) noexcept
|
||||
+ constexpr array_view (U *array, ULONGEST size) noexcept
|
||||
: m_array (array), m_size (size)
|
||||
{}
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
{}
|
||||
|
||||
/* Create an array view from an array. */
|
||||
- template<typename U, size_t Size,
|
||||
+ template<typename U, ULONGEST Size,
|
||||
typename = Requires<DecayedConvertible<U>>>
|
||||
constexpr array_view (U (&array)[Size]) noexcept
|
||||
: m_array (array), m_size (Size)
|
||||
@@ -161,9 +161,9 @@ public:
|
||||
/*constexpr14*/ T *end () noexcept { return m_array + m_size; }
|
||||
constexpr const T *end () const noexcept { return m_array + m_size; }
|
||||
|
||||
- /*constexpr14*/ reference operator[] (size_t index) noexcept
|
||||
+ /*constexpr14*/ reference operator[] (ULONGEST index) noexcept
|
||||
{ return m_array[index]; }
|
||||
- constexpr const_reference operator[] (size_t index) const noexcept
|
||||
+ constexpr const_reference operator[] (ULONGEST index) const noexcept
|
||||
{ return m_array[index]; }
|
||||
|
||||
constexpr size_type size () const noexcept { return m_size; }
|
||||
@@ -196,7 +196,7 @@ operator== (const gdb::array_view<T> &lhs, const gdb::array_view<T> &rhs)
|
||||
if (lhs.size () != rhs.size ())
|
||||
return false;
|
||||
|
||||
- for (size_t i = 0; i < lhs.size (); i++)
|
||||
+ for (ULONGEST i = 0; i < lhs.size (); i++)
|
||||
if (!(lhs[i] == rhs[i]))
|
||||
return false;
|
||||
|
@ -1,432 +0,0 @@
|
||||
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-rhbz795424-bitpos-lazyvalue.patch
|
||||
|
||||
;; Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
;; (RH BZ 795424).
|
||||
;;=push
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.S b/gdb/testsuite/gdb.base/longest-types-64bit.S
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.S
|
||||
@@ -0,0 +1,249 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+ .file "longest-types-64bit.c"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .globl main
|
||||
+main:
|
||||
+ .comm f,8,8
|
||||
+.Letext0:
|
||||
+ .file 1 "gdb.base/longest-types-64bit.c"
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .4byte 0x9a /* Length of Compilation Unit Info */
|
||||
+ .2byte 0x2 /* DWARF version number */
|
||||
+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
|
||||
+ .byte 0x8 /* Pointer Size (in bytes) */
|
||||
+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */
|
||||
+ .4byte .LASF3 /* DW_AT_producer: "GNU C 4.7.3 20121109 (prerelease)" */
|
||||
+ .byte 0x1 /* DW_AT_language */
|
||||
+ .4byte .LASF4 /* DW_AT_name: "gdb.base/longest-types-64bit.c" */
|
||||
+ .4byte .LASF5 /* DW_AT_comp_dir: "" */
|
||||
+ .4byte .Ldebug_line0 /* DW_AT_stmt_list */
|
||||
+ .uleb128 0x2 /* (DIE (0x1d) DW_TAG_structure_type) */
|
||||
+ .ascii "foo\0" /* DW_AT_name */
|
||||
+ .4byte 0xff000002 /* DW_AT_byte_size */
|
||||
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
|
||||
+ .byte 0x12 /* DW_AT_decl_line */
|
||||
+ .4byte 0x4e /* DW_AT_sibling */
|
||||
+ .uleb128 0x3 /* (DIE (0x2c) DW_TAG_member) */
|
||||
+ .ascii "buf\0" /* DW_AT_name */
|
||||
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
|
||||
+ .byte 0x14 /* DW_AT_decl_line */
|
||||
+ .4byte 0x4e /* DW_AT_type */
|
||||
+ .byte 0x2 /* DW_AT_data_member_location */
|
||||
+ .byte 0x23 /* DW_OP_plus_uconst */
|
||||
+ .uleb128 0
|
||||
+ .uleb128 0x4 /* (DIE (0x3a) DW_TAG_member) */
|
||||
+ .4byte .LASF0 /* DW_AT_name: "buf2" */
|
||||
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
|
||||
+ .byte 0x15 /* DW_AT_decl_line */
|
||||
+ .4byte 0x73 /* DW_AT_type */
|
||||
+ .byte 0x7 /* DW_AT_data_member_location */
|
||||
+ .byte 0x23 /* DW_OP_plus_uconst */
|
||||
+ .uleb128 0xffff000000
|
||||
+ .byte 0 /* end of children of DIE 0x1d */
|
||||
+ .uleb128 0x5 /* (DIE (0x4e) DW_TAG_array_type) */
|
||||
+ .4byte 0x6c /* DW_AT_type */
|
||||
+ .4byte 0x65 /* DW_AT_sibling */
|
||||
+ .uleb128 0x6 /* (DIE (0x57) DW_TAG_subrange_type) */
|
||||
+ .4byte 0x65 /* DW_AT_type */
|
||||
+ .quad 0xfffeffffff /* DW_AT_upper_bound */
|
||||
+ .byte 0 /* end of children of DIE 0x4e */
|
||||
+ .uleb128 0x7 /* (DIE (0x65) DW_TAG_base_type) */
|
||||
+ .byte 0x8 /* DW_AT_byte_size */
|
||||
+ .byte 0x7 /* DW_AT_encoding */
|
||||
+ .4byte .LASF1 /* DW_AT_name: "sizetype" */
|
||||
+ .uleb128 0x7 /* (DIE (0x6c) DW_TAG_base_type) */
|
||||
+ .byte 0x1 /* DW_AT_byte_size */
|
||||
+ .byte 0x6 /* DW_AT_encoding */
|
||||
+ .4byte .LASF2 /* DW_AT_name: "char" */
|
||||
+ .uleb128 0x5 /* (DIE (0x73) DW_TAG_array_type) */
|
||||
+ .4byte 0x6c /* DW_AT_type */
|
||||
+ .4byte 0x83 /* DW_AT_sibling */
|
||||
+ .uleb128 0x8 /* (DIE (0x7c) DW_TAG_subrange_type) */
|
||||
+ .4byte 0x65 /* DW_AT_type */
|
||||
+ .byte 0x1 /* DW_AT_upper_bound */
|
||||
+ .byte 0 /* end of children of DIE 0x73 */
|
||||
+ .uleb128 0x9 /* (DIE (0x83) DW_TAG_variable) */
|
||||
+ .ascii "f\0" /* DW_AT_name */
|
||||
+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
|
||||
+ .byte 0x16 /* DW_AT_decl_line */
|
||||
+ .4byte 0x97 /* DW_AT_type */
|
||||
+ .byte 0x1 /* DW_AT_external */
|
||||
+ .byte 0x9 /* DW_AT_location */
|
||||
+ .byte 0x3 /* DW_OP_addr */
|
||||
+ .quad f
|
||||
+ .uleb128 0xa /* (DIE (0x97) DW_TAG_pointer_type) */
|
||||
+ .byte 0x8 /* DW_AT_byte_size */
|
||||
+ .4byte 0x1d /* DW_AT_type */
|
||||
+ .byte 0 /* end of children of DIE 0xb */
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 /* (abbrev code) */
|
||||
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x25 /* (DW_AT_producer) */
|
||||
+ .uleb128 0xe /* (DW_FORM_strp) */
|
||||
+ .uleb128 0x13 /* (DW_AT_language) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0xe /* (DW_FORM_strp) */
|
||||
+ .uleb128 0x1b /* (DW_AT_comp_dir) */
|
||||
+ .uleb128 0xe /* (DW_FORM_strp) */
|
||||
+ .uleb128 0x10 /* (DW_AT_stmt_list) */
|
||||
+ .uleb128 0x6 /* (DW_FORM_data4) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 /* (abbrev code) */
|
||||
+ .uleb128 0x13 /* (TAG: DW_TAG_structure_type) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0xb /* (DW_AT_byte_size) */
|
||||
+ .uleb128 0x6 /* (DW_FORM_data4) */
|
||||
+ .uleb128 0x3a /* (DW_AT_decl_file) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3b /* (DW_AT_decl_line) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x1 /* (DW_AT_sibling) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 /* (abbrev code) */
|
||||
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x3a /* (DW_AT_decl_file) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3b /* (DW_AT_decl_line) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
|
||||
+ .uleb128 0xa /* (DW_FORM_block1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x4 /* (abbrev code) */
|
||||
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0xe /* (DW_FORM_strp) */
|
||||
+ .uleb128 0x3a /* (DW_AT_decl_file) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3b /* (DW_AT_decl_line) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
|
||||
+ .uleb128 0xa /* (DW_FORM_block1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x5 /* (abbrev code) */
|
||||
+ .uleb128 0x1 /* (TAG: DW_TAG_array_type) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x1 /* (DW_AT_sibling) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 /* (abbrev code) */
|
||||
+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x2f /* (DW_AT_upper_bound) */
|
||||
+ .uleb128 0x7 /* (DW_FORM_data8) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 /* (abbrev code) */
|
||||
+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0xb /* (DW_AT_byte_size) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3e /* (DW_AT_encoding) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0xe /* (DW_FORM_strp) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x8 /* (abbrev code) */
|
||||
+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x2f /* (DW_AT_upper_bound) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 /* (abbrev code) */
|
||||
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x3a /* (DW_AT_decl_file) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x3b /* (DW_AT_decl_line) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .uleb128 0x3f /* (DW_AT_external) */
|
||||
+ .uleb128 0xc /* (DW_FORM_flag) */
|
||||
+ .uleb128 0x2 /* (DW_AT_location) */
|
||||
+ .uleb128 0xa /* (DW_FORM_block1) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa /* (abbrev code) */
|
||||
+ .uleb128 0xf /* (TAG: DW_TAG_pointer_type) */
|
||||
+ .byte 0 /* DW_children_no */
|
||||
+ .uleb128 0xb /* (DW_AT_byte_size) */
|
||||
+ .uleb128 0xb /* (DW_FORM_data1) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .4byte 0x1c /* Length of Address Ranges Info */
|
||||
+ .2byte 0x2 /* DWARF Version */
|
||||
+ .4byte .Ldebug_info0 /* Offset of Compilation Unit Info */
|
||||
+ .byte 0x8 /* Size of Address */
|
||||
+ .byte 0 /* Size of Segment Descriptor */
|
||||
+ .2byte 0 /* Pad to 16 byte boundary */
|
||||
+ .2byte 0
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF4:
|
||||
+ .string "gdb.base/longest-types-64bit.c"
|
||||
+.LASF3:
|
||||
+ .string "GNU C 4.7.3 20121109 (prerelease)"
|
||||
+.LASF0:
|
||||
+ .string "buf2"
|
||||
+.LASF1:
|
||||
+ .string "sizetype"
|
||||
+.LASF5:
|
||||
+ .string ""
|
||||
+.LASF2:
|
||||
+ .string "char"
|
||||
+ .ident "GCC: (GNU) 4.7.3 20121109 (prerelease)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu
|
||||
@@ -0,0 +1,67 @@
|
||||
+begin 755 gdb.base/longest-types-64bit.bz2
|
||||
+M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_%
|
||||
+M=VY7?F_[X`F]]SG7531-==V:Z-.FW;M.U7=';:UH@<&FD31,E3]J'HE-/TR@
|
||||
+M]4_5/32;%/U3]1--HU/U$#$R'I'J,FC0T-,)B'J#:CU,F@]0`/4:>F@CU/4,
|
||||
+MA@$S2>IH!H`TR/0-$$:9`C(&FHU3VE-J;4\%,@>4T:#]49-J/4`>HT!H#3)^
|
||||
+MJ`!H-``T]0&@-```:'J``&@`:9!`R9,@&3(`#3!#0!H``-#$--`,@``T`T#(
|
||||
+M:`:`&0&@::,0:-```:``-`E-$1#4-3:4]3R9-39(Q/)#3R-30:9#$T!D!H&@
|
||||
+M,CTGI!H#(#0T`#0``T`T`:``-``T`0,F3(!DR``TP0T`:``#0Q#30#(``-`-
|
||||
+M`R&@&@!D!H&FC$&C0``&@`#0)%)H32>JGZ&!)Z1B1X@)DTVC4>H`&0:``R&@
|
||||
+M,C0:``T``,C0``!H``#(`T`:#0U^\?]7K8M.96V/2[?M*DC)>WIUF)H7T\<T
|
||||
+M[0D)70G25.YB!,:;8Q(;&XPAB4+$Q%:P)PA-;E=!-&$KNR22EM>$:KKRE&\Q
|
||||
+M..M]L1*,!>D!X)RW,[,1I,9N%X-N&2+*:&)DJY4(VFQG%9K[/?J06WACF6-I
|
||||
+MJ&JJ9,ZK4;X28M@[==%ME(A54:%>+3->MRK(G!8#TY>@E$6DR&<_5:C&/RZE
|
||||
+MI<ON+RY5`LA"@DD$$DF!I9O]5X%G985_=V<.;?K9:G2R-#K<CB,1;26A<H4G
|
||||
+M3R3I!)WX,-%>,!E6#`;*8R*E@++*))U)[6=OKFM%'+$-H5\X@1D)_Y*"NKV.
|
||||
+M&\F8?SXW^<O]_DW.8WD@HY.NMMIBXFVROM_SKZ#4-`>HQ:Y@(Q[.>PEG=]@^
|
||||
+M%C"3EZ/1X'H*02ZQH":6"@;8Z0LEW6<OKJ%$`01%`B;O!N*W1V.HC$``,:CS
|
||||
+M6(/OTI'-:O6=7$/#?0T9Q[GSY1)6V`+CV@#XWMF`<S:AG<!43X"VGD,E=>)>
|
||||
+M6^V=*`FB'5G4MD8L3J5XT#SW;J1]ZO+"SPIS%J(P46+Q=CC2$H-`-B&TD)M`
|
||||
+M&A:066DA%AB0C6,460>M8B+$:-BR&@NM()F`S',,F8+#&0.SMOK@.G<'83N.
|
||||
+MDA"#5-`JVC("1*TA;/M()&8J0+YH%IFV)+OA@4,`E?3M$[$@&Q`3]A!$&A(-
|
||||
+M$PBT+2,@PU+2H9(T-H3N6'(2;""%2T*1I2P@`L?AG8&A!=31J7)1(9FB'8X=
|
||||
+MWJ0S#YEG9K$.#.[L.[CNA"4JSJ^GK2*)UH=MC0.R8+E75'.09<NU&R0G1>[G
|
||||
+MMQ1*[GI:>#>K`_NZS:V6>$K;OX6#!!N'"2413$DTL&]7KY>B<3V5!!C8#X5+
|
||||
+MF%9<N\]C%B6OS;LH@1LR3R<LS+<]N]9\JZ<LJ#2_S2'UW('DZ!N>X!8NOKM5
|
||||
+M+"N&P4.75C16!A9Q;:C.6N`WZDV=-]!<BTB<1Q*P(T4'&*2:@$=J@(M8)!5=
|
||||
+MO;[ECS>,5PG<T[XC594XI0@RVPD86,M11%(T>]SNP[GV^L?YGI]7_'D8N?XV
|
||||
+M'[7KZJWYVMXGBQS[`!)YI%3:D)I2!;%'R`W&YB<`9O2#F"C/)F;JK9P+@3&(
|
||||
+MAH31[W)=YCODQDUKNM7A"3.C!2%CHTJNZ"Z\+#F-?(DLE>XAC%07B8;$%J_L
|
||||
+MJPK48QC&,916=IM+<1&WRKLB6&Q2O79*!7S$,`7J8*!`!=K:5W550[NH9M#_
|
||||
+MKL!LT,&;59GZW7S"5Z4%`%&!`9"J9`0:IR&H=MTKT=PEYC$,4K90M9AT'%;_
|
||||
+MB0HVLE)(W&YWF,C:TURXO:`M[RX(A-GT97456Q4Z*HPU*4J:*[WU-4GD.9UV
|
||||
+MSA#L4X[[*Y+)8IF.EO<.TP4IC2?(4HX)W1#:GOMOD2F;HM1BV#<E%PM+0&N5
|
||||
+MP@$\$FD4C-Q^L"H^)NP2-.^JTT!8+!;'Z=KM7%'K@\)*PSETF&M6<Q#>;PH[
|
||||
+M7:PJ-!#,!6N<3')-0C,>15'IZ>@U^CJJJ+>+>%%)%BBATD\)*F6&BLMIR&?\
|
||||
+MQ2_?33@"NR1/CN\:)>5DG6`>$;$3QA94'-3]*CU6YG])<=2)'GC"RP-RK&-3
|
||||
+MZDT-M_)R+F06DS?CR>E@^!,33"U6X<@OXO$Q>U$\T@IU<H-42=0YE[$,T`\H
|
||||
+M('>'@T=>K`G7H8K5GLXMS3*^@JLVBHHE'.&?9RKC?Y`&&3J5!/C$++<@U#Q'
|
||||
+M9R3I.$+S`%]-.UO>WH^C73F<&;RIJR+(Q@7(3PP*W[-O,,DD3S7BUK^I@D%*
|
||||
+M`Y<*2TXJ&7;2'6'R.U>]0-="M`K+&N%/==N4U@9%@M1)U&251C($^S"WL"]T
|
||||
+M-XN'D2[II3-$K%+&`3['O)%,8G*E%_8RV6A5B_4(2/?-AIC.\/>,YFJ<(G.8
|
||||
+MAVP?UN*=ME:7&T!C%)I:&4H:-5>&^!&0>A.O'0G'/6&ZZ964@04&=#DC`%&:
|
||||
+MUNLOS?,?'T:T!8L80<H_W1>='M:96K4;JX)6.('1#J$.1/L)$IS<4/*'2D34
|
||||
+M/@J\BA(I2T40JS%9G8F!7U5_!#'U!+[7$ES&)@:*QAET-IBX6'_N5^7/#>@V
|
||||
+MN3&,-6(AG[8&!8LV+F_U"W?/)+Y^,;=1K:SW28<0WA2"UPHP^8FG#R$!`Y`,
|
||||
+MLF<`U*NNU\[6N03"*?I8D=K7.Z*H=A_3<H1Z%.Q8%2SR@I45('.EGR<N^\`Z
|
||||
+M\[Z\D+/3>7;S=LVC(BQ,5<M0A"#`]7UK7W3%5(:FBMER3XSP15N!)`-^ZJZ%
|
||||
+M:4)>8Q_\#G`'P*_-]T!G4$`V0BS]'S)D/;V7R?.2F?SF)N+2+#P2_<G#1B)C
|
||||
+M(8?NF/+?:UMR3B#9$MBDCI2G7&N'T`FV!ERQ[21DOJ_8I73#BILTTSK)B5P<
|
||||
+MG22S=*7TI>G(49TCE&*UIVT-MP808VTVV-$(*`VT<%>%96AHOL`(7%SI2%-R
|
||||
+M#G2F02VQQH-7KT3E05I9Z)E\$Y8ED1KU`(4QHT%B]1$F:F1&8DAN.Q4&*?F@
|
||||
+M.8D965.$PRH<VD+()"8&I%<R"P,Y[A,)^B(O%1(J%,)M(O6)8E%LY?C6X@@K
|
||||
+M(F!2TA\,RE<O"E2*G?JE2YF\*OJM?$KWXW6R(3LR-)W.[:ZJC?ZE4,("J$()
|
||||
+M5@U!62M"WBJ=&Q(L$5,4494K=.0B0#,C3$*``XLTF$DN!6P#%,4K%HTIC[*O
|
||||
+M6"4S,;RN&@=NP7@72:=U#&JPBQ-60OEAWY;CUYF+$73.R>T5HD,G=G!KTF3D
|
||||
+M94"&ZA-F,.19=8`\(Q;A07Q%!19*3#*F9Q+D(0K@V87@O.=7EJIM6`!4`>D!
|
||||
+M)49QHA!BV+:4O@K00$$!5*6>A@2@4D)@R\"%$2F"O:24J*L(RP#N;O4K7I&2
|
||||
+M[#)KR47H-N[<O^S-)"_Q\>VJ%3>$`9,AF8QID&I3G+D`*]BX98B$2K":A7_\
|
||||
+M_]7LT!4,$NL5)NE>9[:MK2_/'GO:7"P`=<X'"U9""0<PJ`3`.:*(Z]-.GQ,9
|
||||
+M>P(\L]O?"-APH(834$,W!IJS+U1F1C.!D$!&KS^-6%F90PQ[F]F=$^QE\X+-
|
||||
+M@.W*LPH_78B>MHH@69RU[*'1J@8QAC\KSV@IG\(;_CUW:ZR2.,0$E3LZ_^P=
|
||||
+M<_DCP"Q<`;+_;YP#^U%&E^#2M%,T?F3UN^>TSH)GFL"\%RF[KNZ+[R+@<&.$
|
||||
+MC42)B96\1-.O_I).K7)X]W>EQ):4C(XB*+:S%0_37D^EBP+1HU(D?3"%_O2R
|
||||
+M6-#X>AU#<$*!/,W6QC^;O^%]LR&_X'<8X$<3CUU_QFAJ;">H)2443GD4W!4#
|
||||
+?<55!2^6_8J$)-O<>\H0U/6Q^>UG0%W)%.%"0P>X.^@``
|
||||
+`
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.c b/gdb/testsuite/gdb.base/longest-types-64bit.c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+struct foo
|
||||
+{
|
||||
+ char buf[0xffff000000];
|
||||
+ char buf2[2];
|
||||
+} *f;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.exp b/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/longest-types-64bit.exp
|
||||
@@ -0,0 +1,59 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile .c longest-types-64bit.S
|
||||
+
|
||||
+proc test { name } { with_test_prefix $name {
|
||||
+ # 64-bit array size should not overflow
|
||||
+ gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0}
|
||||
+
|
||||
+ # The offset should not overflow
|
||||
+ gdb_test "print &f->buf2" {= \(char \(\*\)\[2\]\) 0xffff000000}
|
||||
+}}
|
||||
+
|
||||
+
|
||||
+# Test 64-bit file first as it is not compiled so its compilation never fails.
|
||||
+
|
||||
+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
|
||||
+set file64bit [standard_output_file ${testfile}]
|
||||
+
|
||||
+if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} {
|
||||
+ untested "failed uudecode or bzip2"
|
||||
+ return -1
|
||||
+}
|
||||
+file stat ${file64bit} file64bitstat
|
||||
+if {$file64bitstat(size) != 9501} {
|
||||
+ untested "uudecode or bzip2 produce invalid result"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart ${file64bit}
|
||||
+
|
||||
+#if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile2 {nodebug}] } {
|
||||
+# return -1
|
||||
+#}
|
||||
+
|
||||
+test "64bit"
|
||||
+
|
||||
+
|
||||
+# And here is the native build test.
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+test "native"
|
@ -22,7 +22,7 @@ And adjust its testcase.
|
||||
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
|
||||
--- a/gdb/f-valprint.c
|
||||
+++ b/gdb/f-valprint.c
|
||||
@@ -313,8 +313,22 @@ f_val_print (struct type *type, LONGEST embedded_offset,
|
||||
@@ -313,8 +313,22 @@ f_val_print (struct type *type, int embedded_offset,
|
||||
original_value, &opts, 0, stream);
|
||||
}
|
||||
else
|
||||
|
@ -37,7 +37,7 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922
|
||||
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
--- a/gdb/dwarf2loc.c
|
||||
+++ b/gdb/dwarf2loc.c
|
||||
@@ -2428,11 +2428,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
|
||||
@@ -2425,11 +2425,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
|
||||
/* See dwarf2loc.h. */
|
||||
|
||||
int
|
||||
@ -54,7 +54,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
if (prop == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -2456,7 +2459,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
@@ -2453,7 +2456,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
|
||||
*value = value_as_address (val);
|
||||
}
|
||||
@ -63,7 +63,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2478,7 +2481,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
@@ -2475,7 +2478,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
if (!value_optimized_out (val))
|
||||
{
|
||||
*value = value_as_address (val);
|
||||
@ -72,7 +72,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2486,8 +2489,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
@@ -2483,8 +2486,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
|
||||
case PROP_CONST:
|
||||
*value = prop->data.const_val;
|
||||
@ -83,7 +83,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
case PROP_ADDR_OFFSET:
|
||||
{
|
||||
struct dwarf2_property_baton *baton
|
||||
@@ -2508,11 +2511,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
@@ -2505,11 +2508,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
|
||||
val = value_at (baton->offset_info.type,
|
||||
pinfo->addr + baton->offset_info.offset);
|
||||
*value = value_as_address (val);
|
||||
@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -17751,7 +17751,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17784,7 +17784,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
struct type *base_type, *orig_base_type;
|
||||
struct type *range_type;
|
||||
struct attribute *attr;
|
||||
@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
int low_default_is_valid;
|
||||
int high_bound_is_count = 0;
|
||||
const char *name;
|
||||
@@ -17771,7 +17771,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17804,7 +17804,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
low.kind = PROP_CONST;
|
||||
high.kind = PROP_CONST;
|
||||
@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
|
||||
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
|
||||
omitting DW_AT_lower_bound. */
|
||||
@@ -17804,6 +17806,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17837,6 +17839,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
|
||||
if (attr)
|
||||
attr_to_dynamic_prop (attr, die, cu, &low);
|
||||
@@ -17896,7 +17906,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17929,7 +17939,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
|
||||
high.data.const_val |= negative_mask;
|
||||
|
||||
@ -189,7 +189,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
--- a/gdb/eval.c
|
||||
+++ b/gdb/eval.c
|
||||
@@ -377,29 +377,324 @@ init_array_element (struct value *array, struct value *element,
|
||||
@@ -375,29 +375,324 @@ init_array_element (struct value *array, struct value *element,
|
||||
return index;
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
}
|
||||
|
||||
|
||||
@@ -1242,19 +1537,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
|
||||
@@ -1238,19 +1533,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
|
||||
return eval_call (exp, noside, nargs, argvec, var_func_name, expect_type);
|
||||
}
|
||||
|
||||
@ -553,7 +553,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
struct value *
|
||||
evaluate_subexp_standard (struct type *expect_type,
|
||||
struct expression *exp, int *pos,
|
||||
@@ -1949,33 +2231,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -1945,33 +2227,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
switch (code)
|
||||
{
|
||||
case TYPE_CODE_ARRAY:
|
||||
@ -588,7 +588,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_FUNC:
|
||||
@@ -2385,49 +2642,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
@@ -2384,49 +2641,6 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||
}
|
||||
return (arg1);
|
||||
|
||||
@ -638,7 +638,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c
|
||||
case BINOP_LOGICAL_AND:
|
||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
if (noside == EVAL_SKIP)
|
||||
@@ -3347,6 +3561,9 @@ calc_f77_array_dims (struct type *array_type)
|
||||
@@ -3346,6 +3560,9 @@ calc_f77_array_dims (struct type *array_type)
|
||||
int ndimen = 1;
|
||||
struct type *tmp_type;
|
||||
|
||||
@ -723,7 +723,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c
|
||||
diff --git a/gdb/expression.h b/gdb/expression.h
|
||||
--- a/gdb/expression.h
|
||||
+++ b/gdb/expression.h
|
||||
@@ -150,28 +150,27 @@ extern void dump_raw_expression (struct expression *,
|
||||
@@ -164,28 +164,27 @@ extern void dump_raw_expression (struct expression *,
|
||||
struct ui_file *, const char *);
|
||||
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
||||
|
||||
@ -775,12 +775,12 @@ diff --git a/gdb/expression.h b/gdb/expression.h
|
||||
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
|
||||
--- a/gdb/f-exp.y
|
||||
+++ b/gdb/f-exp.y
|
||||
@@ -270,31 +270,63 @@ arglist : subrange
|
||||
@@ -276,31 +276,63 @@ arglist : subrange
|
||||
|
||||
arglist : arglist ',' exp %prec ABOVE_COMMA
|
||||
{ arglist_len++; }
|
||||
{ pstate->arglist_len++; }
|
||||
+ | arglist ',' subrange %prec ABOVE_COMMA
|
||||
+ { arglist_len++; }
|
||||
+ { pstate->arglist_len++; }
|
||||
;
|
||||
|
||||
/* There are four sorts of subrange types in F90. */
|
||||
@ -1033,7 +1033,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
diff --git a/gdb/parse.c b/gdb/parse.c
|
||||
--- a/gdb/parse.c
|
||||
+++ b/gdb/parse.c
|
||||
@@ -990,24 +990,20 @@ operator_length_standard (const struct expression *expr, int endpos,
|
||||
@@ -939,24 +939,20 @@ operator_length_standard (const struct expression *expr, int endpos,
|
||||
|
||||
case OP_RANGE:
|
||||
oplen = 3;
|
||||
@ -1072,7 +1072,7 @@ diff --git a/gdb/parse.c b/gdb/parse.c
|
||||
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
|
||||
--- a/gdb/rust-exp.y
|
||||
+++ b/gdb/rust-exp.y
|
||||
@@ -2475,24 +2475,28 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation,
|
||||
@@ -2492,24 +2492,28 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation,
|
||||
|
||||
case OP_RANGE:
|
||||
{
|
||||
@ -1818,7 +1818,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -3792,56 +3792,195 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
@@ -3790,56 +3790,195 @@ value_of_this_silent (const struct language_defn *lang)
|
||||
|
||||
struct value *
|
||||
value_slice (struct value *array, int lowbound, int length)
|
||||
|
@ -33,7 +33,7 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings
|
||||
diff --git a/gdb/NEWS b/gdb/NEWS
|
||||
--- a/gdb/NEWS
|
||||
+++ b/gdb/NEWS
|
||||
@@ -352,6 +352,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
|
||||
@@ -376,6 +376,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
|
||||
|
||||
*** Changes in GDB 8.1
|
||||
|
||||
@ -45,7 +45,7 @@ diff --git a/gdb/NEWS b/gdb/NEWS
|
||||
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
|
||||
--- a/gdb/c-valprint.c
|
||||
+++ b/gdb/c-valprint.c
|
||||
@@ -652,6 +652,28 @@ c_value_print (struct value *val, struct ui_file *stream,
|
||||
@@ -651,6 +651,28 @@ c_value_print (struct value *val, struct ui_file *stream,
|
||||
else
|
||||
{
|
||||
/* normal case */
|
||||
@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
|
||||
/* memory allocation interface */
|
||||
|
||||
@@ -13756,7 +13757,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -13755,7 +13756,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
newobj->static_link
|
||||
= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
|
||||
@ -96,7 +96,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
cu->list_in_scope = cu->get_builder ()->get_local_symbols ();
|
||||
@@ -16494,7 +16495,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -16493,7 +16494,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
byte_stride_prop
|
||||
= (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop));
|
||||
@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
if (!stride_ok)
|
||||
{
|
||||
complaint (_("unable to read array DW_AT_byte_stride "
|
||||
@@ -17255,29 +17257,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17254,29 +17256,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct type *type, *range_type, *index_type, *char_type;
|
||||
struct attribute *attr;
|
||||
@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
char_type = language_string_char_type (cu->language_defn, gdbarch);
|
||||
type = create_string_type (NULL, char_type, range_type);
|
||||
|
||||
@@ -17645,7 +17708,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17678,7 +17741,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
static int
|
||||
attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
{
|
||||
struct dwarf2_property_baton *baton;
|
||||
struct obstack *obstack
|
||||
@@ -17656,14 +17720,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
@@ -17689,14 +17753,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
}
|
||||
else if (attr_form_is_ref (attr))
|
||||
{
|
||||
@@ -17696,8 +17779,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
@@ -17729,8 +17812,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
|
||||
baton = XOBNEW (obstack, struct dwarf2_property_baton);
|
||||
baton->referenced_type = die_type (target_die, target_cu);
|
||||
baton->locexpr.per_cu = cu->per_cu;
|
||||
@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
prop->data.baton = baton;
|
||||
prop->kind = PROP_LOCEXPR;
|
||||
gdb_assert (prop->data.baton != NULL);
|
||||
@@ -17808,7 +17911,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17841,7 +17944,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
|
||||
if (attr)
|
||||
@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
complaint (_("Missing DW_AT_byte_stride "
|
||||
"- DIE at 0x%s [in module %s]"),
|
||||
sect_offset_str (die->sect_off),
|
||||
@@ -17816,7 +17919,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17849,7 +17952,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
|
||||
if (attr)
|
||||
@ -305,7 +305,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
else if (!low_default_is_valid)
|
||||
complaint (_("Missing DW_AT_lower_bound "
|
||||
"- DIE at %s [in module %s]"),
|
||||
@@ -17825,10 +17928,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
@@ -17858,10 +17961,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
||||
struct attribute *attr_ub, *attr_count;
|
||||
attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu);
|
||||
@ -318,7 +318,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
{
|
||||
/* If bounds are constant do the final calculation here. */
|
||||
if (low.kind == PROP_CONST && high.kind == PROP_CONST)
|
||||
@@ -25394,7 +25497,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
@@ -25446,7 +25549,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
attr = dwarf2_attr (die, DW_AT_allocated, cu);
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
add_dyn_prop (DYN_PROP_ALLOCATED, prop, type);
|
||||
}
|
||||
else if (attr != NULL)
|
||||
@@ -25408,7 +25511,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
@@ -25460,7 +25563,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
attr = dwarf2_attr (die, DW_AT_associated, cu);
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type);
|
||||
}
|
||||
else if (attr != NULL)
|
||||
@@ -25420,7 +25523,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
@@ -25472,7 +25575,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
||||
|
||||
/* Read DW_AT_data_location and set in type. */
|
||||
attr = dwarf2_attr (die, DW_AT_data_location, cu);
|
||||
@ -392,9 +392,9 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
||||
- int arrayprint_recurse_level)
|
||||
+ int arrayprint_recurse_level, int print_rank_only)
|
||||
{
|
||||
int upper_bound, lower_bound;
|
||||
|
||||
@@ -183,34 +171,50 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
/* No static variables are permitted as an error call may occur during
|
||||
execution of this function. */
|
||||
@@ -181,36 +169,52 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
fprintf_filtered (stream, "(");
|
||||
|
||||
if (type_not_associated (type))
|
||||
@ -426,48 +426,46 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
||||
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY)
|
||||
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- 0, 0, arrayprint_recurse_level);
|
||||
-
|
||||
- lower_bound = f77_get_lowerbound (type);
|
||||
- if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%d:", lower_bound);
|
||||
-
|
||||
- /* Make sure that, if we have an assumed size array, we
|
||||
- print out a warning and print the upperbound as '*'. */
|
||||
-
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
- fprintf_filtered (stream, "*");
|
||||
- else
|
||||
- {
|
||||
- upper_bound = f77_get_upperbound (type);
|
||||
- fprintf_filtered (stream, "%d", upper_bound);
|
||||
- }
|
||||
-
|
||||
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- 0, 0, arrayprint_recurse_level);
|
||||
- }
|
||||
+ {
|
||||
+ lower_bound = f77_get_lowerbound (type);
|
||||
+ LONGEST lower_bound = f77_get_lowerbound (type);
|
||||
|
||||
- LONGEST lower_bound = f77_get_lowerbound (type);
|
||||
+ if (lower_bound != 1) /* Not the default. */
|
||||
+ fprintf_filtered (stream, "%d:", lower_bound);
|
||||
+
|
||||
+ fprintf_filtered (stream, "%s:", plongest (lower_bound));
|
||||
|
||||
- if (lower_bound != 1) /* Not the default. */
|
||||
- fprintf_filtered (stream, "%s:", plongest (lower_bound));
|
||||
+ /* Make sure that, if we have an assumed size array, we
|
||||
+ print out a warning and print the upperbound as '*'. */
|
||||
+
|
||||
|
||||
- /* Make sure that, if we have an assumed size array, we
|
||||
- print out a warning and print the upperbound as '*'. */
|
||||
+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
+ fprintf_filtered (stream, "*");
|
||||
+ else
|
||||
+ {
|
||||
+ upper_bound = f77_get_upperbound (type);
|
||||
+ fprintf_filtered (stream, "%d", upper_bound);
|
||||
+ LONGEST upper_bound = f77_get_upperbound (type);
|
||||
|
||||
- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||
- fprintf_filtered (stream, "*");
|
||||
- else
|
||||
- {
|
||||
- LONGEST upper_bound = f77_get_upperbound (type);
|
||||
+ fprintf_filtered (stream, "%s", plongest (upper_bound));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
- fputs_filtered (plongest (upper_bound), stream);
|
||||
- }
|
||||
+ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
+ f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
+ 0, 0, arrayprint_recurse_level,
|
||||
+ print_rank_only);
|
||||
+
|
||||
|
||||
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- 0, 0, arrayprint_recurse_level);
|
||||
- }
|
||||
if (arrayprint_recurse_level == 1)
|
||||
fprintf_filtered (stream, ")");
|
||||
else
|
||||
@ -1339,7 +1337,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
diff --git a/gdb/valprint.c b/gdb/valprint.c
|
||||
--- a/gdb/valprint.c
|
||||
+++ b/gdb/valprint.c
|
||||
@@ -1106,12 +1106,6 @@ value_check_printable (struct value *val, struct ui_file *stream,
|
||||
@@ -1105,12 +1105,6 @@ value_check_printable (struct value *val, struct ui_file *stream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -30,15 +30,7 @@ Jan
|
||||
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
|
||||
--- a/gdb/dwarf2loc.c
|
||||
+++ b/gdb/dwarf2loc.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
+#include <functional>
|
||||
#include "common/underlying.h"
|
||||
#include "common/byte-vector.h"
|
||||
|
||||
@@ -2157,6 +2158,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
@@ -2156,6 +2156,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
|
||||
ctx.per_cu = per_cu;
|
||||
ctx.obj_address = 0;
|
||||
|
||||
|
18
gdb.spec
18
gdb.spec
@ -22,7 +22,7 @@
|
||||
Name: %{?scl_prefix}gdb
|
||||
|
||||
# Freeze it when GDB gets branched
|
||||
%global snapsrc 20190321
|
||||
%global snapsrc 20190412
|
||||
# See timestamp of source gnulib installed into gdb/gnulib/ .
|
||||
%global snapgnulib 20161115
|
||||
%global tarname gdb-%{version}
|
||||
@ -30,7 +30,7 @@ Version: 8.3.50.%{snapsrc}
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
|
||||
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
||||
@ -1025,6 +1025,20 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Apr 12 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190412-5
|
||||
- Rebase to FSF GDB 8.3.50.20190412 (8.4pre).
|
||||
- Adjust 'gdb-6.3-rh-testversion-20041202.patch'.
|
||||
- Remove 'gdb-follow-child-stale-parent.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-20of25.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-21of25.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-22of25.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-23of25.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-25of25.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-25of25-test.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-arrayview.patch'.
|
||||
- Remove 'gdb-rhbz795424-bitpos-lazyvalue.patch'.
|
||||
- Remove 'gdb-bz541866-rwatch-before-run.patch'.
|
||||
|
||||
* Fri Mar 29 2019 Sergio Durigan Junior <sergiodj@fedoraproject.org> - 8.3.50.20190321-4
|
||||
- Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing
|
||||
gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091).
|
||||
|
2
sources
2
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8
|
||||
SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939
|
||||
SHA512 (gdb-8.3.50.20190321.tar.xz) = 4ab37571398418a3b5bc43cfe103ee585330bc3b076b113e3bf6c6c3ce5266b6e6b5040c1303ad0de62b8f4211df27e75795d7fce4fd1d9a96ec0308ace2fcf8
|
||||
SHA512 (gdb-8.3.50.20190412.tar.xz) = fbdc83b6e88d2d9489a25c1fbdf08764708e1558eb187f9a3a72bcc8fd058e98e9810f8f889044cf55b4165b9a3ac5d996d0a13a4e4d54823e485b354c1a2b0e
|
||||
|
Loading…
Reference in New Issue
Block a user