Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
commit
eaa7f088e3
|
@ -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.20190501.tar.xz
|
||||
|
|
|
@ -188,283 +188,235 @@ Patch046: gdb-simultaneous-step-resume-breakpoint-test.patch
|
|||
#=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*>
|
||||
Patch047: gdb-core-open-vdso-warning.patch
|
||||
|
||||
# Fix syscall restarts for amd64->i386 biarch.
|
||||
#=push+jan
|
||||
Patch048: gdb-x86_64-i386-syscall-restart.patch
|
||||
|
||||
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||
#=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
|
||||
Patch048: gdb-bz533176-fortran-omp-step.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
|
||||
Patch049: gdb-ccache-workaround.patch
|
||||
|
||||
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||
Patch052: gdb-archer-pie-addons.patch
|
||||
Patch050: gdb-archer-pie-addons.patch
|
||||
|
||||
#=push+jan: Breakpoints disabling matching should not be based on address.
|
||||
Patch053: gdb-archer-pie-addons-keep-disabled.patch
|
||||
Patch051: 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
|
||||
Patch052: 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
|
||||
Patch053: 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
|
||||
Patch054: 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
|
||||
Patch055: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
#=fedoratest
|
||||
Patch059: gdb-bz601887-dwarf4-rh-test.patch
|
||||
Patch056: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
#=push+jan
|
||||
Patch060: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Patch057: 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
|
||||
Patch058: 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
|
||||
Patch059: 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
|
||||
Patch060: 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
|
||||
Patch061: 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
|
||||
Patch062: gdb-test-pid0-core.patch
|
||||
|
||||
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
|
||||
#=fedoratest
|
||||
Patch066: gdb-test-dw2-aranges.patch
|
||||
Patch063: gdb-test-dw2-aranges.patch
|
||||
|
||||
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
||||
#=fedoratest
|
||||
Patch067: gdb-test-expr-cumulative-archer.patch
|
||||
Patch064: 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
|
||||
Patch065: gdb-physname-pr11734-test.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
#=fedoratest
|
||||
Patch069: gdb-physname-pr12273-test.patch
|
||||
Patch066: gdb-physname-pr12273-test.patch
|
||||
|
||||
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
||||
#=fedoratest
|
||||
Patch070: gdb-test-ivy-bridge.patch
|
||||
Patch067: gdb-test-ivy-bridge.patch
|
||||
|
||||
# Hack for proper PIE run of the testsuite.
|
||||
#=fedoratest
|
||||
Patch071: gdb-runtest-pie-override.patch
|
||||
Patch068: 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
|
||||
Patch069: 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
|
||||
Patch070: 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
|
||||
Patch071: 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
|
||||
Patch072: 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
|
||||
Patch073: 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
|
||||
Patch074: 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
|
||||
Patch075: 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
|
||||
Patch076: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch087: gdb-archer-vla-tests.patch
|
||||
Patch077: gdb-archer-vla-tests.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch088: gdb-vla-intel-tests.patch
|
||||
Patch078: gdb-vla-intel-tests.patch
|
||||
|
||||
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
#=push
|
||||
Patch089: gdb-btrobust.patch
|
||||
Patch079: gdb-btrobust.patch
|
||||
|
||||
# Display Fortran strings in backtraces.
|
||||
#=fedoratest
|
||||
Patch090: gdb-fortran-frame-string.patch
|
||||
Patch080: 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
|
||||
Patch081: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
|
||||
# Fix jit-reader.h for multi-lib.
|
||||
#=push+jan
|
||||
Patch092: gdb-jit-reader-multilib.patch
|
||||
Patch082: 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
|
||||
Patch083: 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
|
||||
Patch084: 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
|
||||
Patch085: 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
|
||||
Patch086: 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
|
||||
Patch087: gdb-bz1219747-attach-kills.patch
|
||||
|
||||
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||
#=push+jan
|
||||
Patch098: gdb-fedora-libncursesw.patch
|
||||
Patch088: gdb-fedora-libncursesw.patch
|
||||
|
||||
# Test clflushopt instruction decode (for RH BZ 1262471).
|
||||
#=fedoratest
|
||||
Patch099: gdb-opcodes-clflushopt-test.patch
|
||||
Patch089: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||
#=fedora
|
||||
Patch100: gdb-dts-rhel6-python-compat.patch
|
||||
Patch090: 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
|
||||
Patch091: 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
|
||||
Patch092: 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
|
||||
Patch093: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
|
||||
#=fedoratest
|
||||
Patch104: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
Patch094: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
|
||||
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||
#=fedora
|
||||
Patch105: gdb-container-rh-pkg.patch
|
||||
Patch095: 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
|
||||
Patch096: gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||
#=fedora
|
||||
Patch107: gdb-linux_perf-bundle.patch
|
||||
Patch097: gdb-linux_perf-bundle.patch
|
||||
|
||||
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
#
|
||||
# Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
||||
# present. For rationale, see:
|
||||
#
|
||||
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
||||
#=fedora
|
||||
Patch108: gdb-libexec-add-index.patch
|
||||
Patch098: 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
|
||||
Patch099: 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
|
||||
Patch100: gdb-testsuite-readline63-sigint.patch
|
||||
|
||||
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
#=push
|
||||
Patch111: gdb-archer.patch
|
||||
Patch101: gdb-archer.patch
|
||||
|
||||
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
|
||||
Patch112: gdb-vla-intel-fix-print-char-array.patch
|
||||
Patch102: 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
|
||||
Patch103: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
|
||||
# Same as gdb-rhbz795424-bitpos-20of25, but for RISC-V
|
||||
# (which was added alter on)
|
||||
|
|
|
@ -101,15 +101,4 @@
|
|||
%patch101 -p1
|
||||
%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
|
||||
%patch130 -p1
|
||||
|
|
|
@ -1 +1 @@
|
|||
cc00a5d100973549bf5e4840937529633f4de1fa
|
||||
640c50672cffe19a58a0296bbf7731b59a013cd5
|
||||
|
|
11
_patch_order
11
_patch_order
|
@ -45,15 +45,12 @@ gdb-6.8-bz436037-reg-no-longer-active.patch
|
|||
gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
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 +70,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,5 +101,4 @@ 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
|
||||
gdb-rhbz795424-bitpos-20of25-riscv.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
|
||||
@@ -2021,7 +2021,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,
|
||||
@@ -2624,6 +2624,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,
|
||||
@@ -2632,6 +2633,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,
|
||||
@@ -2765,6 +2770,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,
|
||||
@@ -2773,6 +2779,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 (gdb_exception_error &e)
|
||||
+ {
|
||||
+ if (e.error == IS_CORE_ERROR)
|
||||
+ {
|
||||
|
@ -147,15 +148,14 @@ diff --git a/gdb/main.c b/gdb/main.c
|
|||
+ if (exec_bfd != NULL)
|
||||
+ return;
|
||||
+ }
|
||||
+ throw_exception (e);
|
||||
+ throw_exception (std::move (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;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
|||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -3500,6 +3500,16 @@ read_gdb_index_from_buffer (struct objfile *objfile,
|
||||
@@ -3496,6 +3496,16 @@ read_gdb_index_from_buffer (struct objfile *objfile,
|
||||
"set use-deprecated-index-sections on". */
|
||||
if (version < 6 && !deprecated_ok)
|
||||
{
|
||||
|
@ -115,7 +115,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
|||
static int warning_printed = 0;
|
||||
if (!warning_printed)
|
||||
{
|
||||
@@ -3511,6 +3521,10 @@ to use the section anyway."),
|
||||
@@ -3507,6 +3517,10 @@ to use the section anyway."),
|
||||
warning_printed = 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -720,7 +715,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbmi
|
||||
@@ -914,6 +920,11 @@ CCC
|
||||
@@ -915,6 +921,11 @@ CCC
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
|
@ -732,7 +727,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1585,6 +1596,8 @@ Optional Packages:
|
||||
@@ -1588,6 +1599,8 @@ Optional Packages:
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
|
@ -741,7 +736,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1642,6 +1655,13 @@ Some influential environment variables:
|
||||
@@ -1645,6 +1658,13 @@ Some influential environment variables:
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
|
@ -755,7 +750,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
YACC The `Yet Another Compiler Compiler' implementation to use.
|
||||
Defaults to the first program found out of: `bison -y', `byacc',
|
||||
`yacc'.
|
||||
@@ -6623,6 +6643,494 @@ _ACEOF
|
||||
@@ -6626,6 +6646,494 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
|
@ -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)
|
||||
@@ -362,6 +363,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)
|
||||
@@ -773,7 +776,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,
|
||||
@@ -1352,14 +1352,27 @@ svr4_read_so_list (svr4_info *info, 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,
|
||||
@@ -1374,23 +1387,7 @@ svr4_read_so_list (svr4_info *info, 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.
|
||||
@@ -20059,6 +20059,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c
|
|||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -2726,7 +2726,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
|
||||
@@ -2722,7 +2722,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
|
||||
}
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
|
@ -1088,7 +1088,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
|||
|
||||
if (dwz_bfd == NULL)
|
||||
error (_("could not find '.gnu_debugaltlink' file for %s"),
|
||||
@@ -6236,7 +6236,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
@@ -6232,7 +6232,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
|
||||
{
|
||||
|
@ -1097,7 +1097,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
|||
if (build_id == nullptr)
|
||||
return {};
|
||||
|
||||
@@ -6249,7 +6249,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
|
||||
@@ -6245,7 +6245,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
|
||||
{
|
||||
|
@ -1134,8 +1134,8 @@ 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
|
||||
htab_t static_links {};
|
||||
@@ -618,6 +618,10 @@ struct objfile
|
||||
htab_up static_links;
|
||||
};
|
||||
|
||||
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
|
||||
|
@ -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,
|
||||
@@ -1350,9 +1351,51 @@ svr4_read_so_list (svr4_info *info, 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 { } {
|
||||
@@ -1746,6 +1746,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
@@ -1628,7 +1628,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;
|
||||
|
||||
|
@ -75,7 +75,7 @@ diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
|
|||
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
||||
--- a/gdb/objfiles.c
|
||||
+++ b/gdb/objfiles.c
|
||||
@@ -849,6 +849,11 @@ objfile_relocate1 (struct objfile *objfile,
|
||||
@@ -843,6 +843,11 @@ objfile_relocate1 (struct objfile *objfile,
|
||||
obj_section_addr (s));
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons.patch
|
|||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
--- a/gdb/gdbtypes.h
|
||||
+++ b/gdb/gdbtypes.h
|
||||
@@ -507,6 +507,7 @@ enum field_loc_kind
|
||||
@@ -511,6 +511,7 @@ enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /**< bitpos */
|
||||
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
|
||||
|
@ -16,7 +16,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME, /**< physname */
|
||||
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
|
||||
@@ -558,6 +559,7 @@ union field_location
|
||||
@@ -562,6 +563,7 @@ union field_location
|
||||
field. Otherwise, physname is the mangled label of the
|
||||
static field. */
|
||||
|
||||
|
@ -24,7 +24,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
|
||||
@@ -1436,6 +1438,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
@@ -1450,6 +1452,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
|
||||
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
|
@ -32,7 +32,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
@@ -1447,6 +1450,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
@@ -1461,6 +1464,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
|
@ -40,7 +40,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1463,6 +1467,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
@@ -1477,6 +1481,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
|
||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
|
@ -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),
|
||||
|
|
|
@ -2804,7 +2804,7 @@ new file mode 100644
|
|||
+gdb_breakpoint [gdb_get_line_number "varx-allocated"]
|
||||
+gdb_continue_to_breakpoint "varx-allocated"
|
||||
+# $1 = (( ( 0, 0, 0, 0, 0, 0) ( 0, 0, 0, 0, 0, 0) --- , 0) ) ( ( 0, 0, ...) ...) ...)
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)" "ptype varx allocated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx allocated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
|
||||
+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varx allocated"
|
||||
+
|
||||
|
@ -2831,7 +2831,7 @@ new file mode 100644
|
|||
+gdb_test "p varv(3, 7, 19)" "\\$\[0-9\]* = 6" "p varv(3, 7, 19) associated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
|
||||
+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varv associated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)" "ptype varx with varv associated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx with varv associated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses the pointer type.
|
||||
+gdb_test "ptype varv" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)\\)?" "ptype varv associated"
|
||||
+
|
||||
|
@ -2852,7 +2852,7 @@ new file mode 100644
|
|||
+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
|
||||
+gdb_continue_to_breakpoint "varx-deallocated"
|
||||
+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx deallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\) \(:,:,:\)} "ptype varx deallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\), allocatable \(:,:,:\)} "ptype varx deallocated"
|
||||
+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varx deallocated"
|
||||
+gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) deallocated"
|
||||
+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated"
|
||||
|
|
|
@ -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." },
|
||||
|
|
|
@ -68,7 +68,7 @@ diff --git a/gdb/config.in b/gdb/config.in
|
|||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -15790,6 +15790,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
@@ -15814,6 +15814,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
@ -136,7 +136,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -2020,6 +2020,10 @@ case $host_os in
|
||||
@@ -2039,6 +2039,10 @@ case $host_os in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
|
@ -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)
|
||||
@@ -6445,6 +6445,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)
|
||||
@@ -6478,6 +6488,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)
|
||||
|
|
|
@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
|||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9415,6 +9415,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
@@ -9418,6 +9418,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
||||
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
||||
# a situation.
|
||||
|
@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
|
||||
$as_echo_n "checking for library containing waddstr... " >&6; }
|
||||
if ${ac_cv_search_waddstr+:} false; then :
|
||||
@@ -9439,7 +9440,7 @@ return waddstr ();
|
||||
@@ -9442,7 +9443,7 @@ return waddstr ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
|
@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
@@ -9513,6 +9514,7 @@ case $host_os in
|
||||
@@ -9516,6 +9517,7 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
|
@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
|
||||
$as_echo_n "checking for library containing tgetent... " >&6; }
|
||||
if ${ac_cv_search_tgetent+:} false; then :
|
||||
@@ -9537,7 +9539,7 @@ return tgetent ();
|
||||
@@ -9540,7 +9542,7 @@ return tgetent ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
|
|
|
@ -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:
|
||||
@@ -10585,6 +10585,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);
|
||||
|
|
|
@ -9,7 +9,7 @@ Subject: gdb-jit-reader-multilib.patch
|
|||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9702,10 +9702,12 @@ _ACEOF
|
||||
@@ -9705,10 +9705,12 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,17 @@ Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|||
Subject: gdb-libexec-add-index.patch
|
||||
|
||||
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
;;
|
||||
;; Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
||||
;; present. For rationale, see:
|
||||
;;
|
||||
;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
||||
;;=fedora
|
||||
|
||||
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||
--- a/gdb/contrib/gdb-add-index.sh
|
||||
+++ b/gdb/contrib/gdb-add-index.sh
|
||||
@@ -21,6 +21,11 @@
|
||||
@@ -21,6 +21,20 @@
|
||||
GDB=${GDB:=gdb}
|
||||
OBJCOPY=${OBJCOPY:=objcopy}
|
||||
|
||||
|
@ -17,6 +22,15 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
|||
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
||||
+ GDB=$GDB2
|
||||
+fi
|
||||
+
|
||||
+# We default to using /usr/bin/gdb.minimal if it's present. See
|
||||
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and
|
||||
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for
|
||||
+# explanations.
|
||||
+GDB3=/usr/bin/gdb.minimal
|
||||
+if test -x $GDB3; then
|
||||
+ GDB=$GDB3
|
||||
+fi
|
||||
+
|
||||
myname="${0##*/}"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Subject: gdb-linux_perf-bundle.patch
|
|||
diff --git a/gdb/configure b/gdb/configure
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -12029,7 +12029,7 @@ else
|
||||
@@ -12053,7 +12053,7 @@ else
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
|
@ -21,7 +21,7 @@ diff --git a/gdb/configure b/gdb/configure
|
|||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -1469,7 +1469,7 @@ else
|
||||
@@ -1488,7 +1488,7 @@ else
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
|
|
|
@ -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)
|
||||
@@ -1180,6 +1180,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"
|
|
@ -25,7 +25,7 @@ a problem with make -j parallelization of the testsuite.
|
|||
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
|
||||
--- a/gdb/testsuite/lib/future.exp
|
||||
+++ b/gdb/testsuite/lib/future.exp
|
||||
@@ -185,6 +185,10 @@ proc gdb_default_target_compile {source destfile type options} {
|
||||
@@ -195,6 +195,10 @@ proc gdb_default_target_compile {source destfile type options} {
|
||||
set ldflags ""
|
||||
set dest [target_info name]
|
||||
|
||||
|
@ -36,7 +36,7 @@ diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
|
|||
if {[info exists CFLAGS_FOR_TARGET]} {
|
||||
append add_flags " $CFLAGS_FOR_TARGET"
|
||||
}
|
||||
@@ -519,10 +523,6 @@ proc gdb_default_target_compile {source destfile type options} {
|
||||
@@ -529,10 +533,6 @@ proc gdb_default_target_compile {source destfile type options} {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
@@ -17834,7 +17834,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)
|
||||
@@ -17854,7 +17854,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)
|
||||
@@ -17887,6 +17889,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)
|
||||
@@ -17979,7 +17989,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;
|
||||
|
||||
|
@ -673,7 +673,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c
|
|||
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
|
||||
fputs_filtered (")", stream);
|
||||
return;
|
||||
@@ -1106,22 +1103,24 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
@@ -1105,22 +1102,24 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
|
||||
switch (range_type)
|
||||
{
|
||||
|
@ -706,7 +706,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c
|
|||
fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream);
|
||||
break;
|
||||
default:
|
||||
@@ -1129,11 +1128,9 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
@@ -1128,11 +1127,9 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -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 *,
|
||||
@@ -165,28 +165,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
|
||||
@@ -280,31 +280,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. */
|
||||
|
@ -866,7 +866,7 @@ diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
|
|||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -911,7 +911,8 @@ operator== (const range_bounds &l, const range_bounds &r)
|
||||
@@ -912,7 +912,8 @@ operator== (const range_bounds &l, const range_bounds &r)
|
||||
struct type *
|
||||
create_range_type (struct type *result_type, struct type *index_type,
|
||||
const struct dynamic_prop *low_bound,
|
||||
|
@ -876,7 +876,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
{
|
||||
if (result_type == NULL)
|
||||
result_type = alloc_type_copy (index_type);
|
||||
@@ -926,6 +927,7 @@ create_range_type (struct type *result_type, struct type *index_type,
|
||||
@@ -927,6 +928,7 @@ create_range_type (struct type *result_type, struct type *index_type,
|
||||
TYPE_ZALLOC (result_type, sizeof (struct range_bounds));
|
||||
TYPE_RANGE_DATA (result_type)->low = *low_bound;
|
||||
TYPE_RANGE_DATA (result_type)->high = *high_bound;
|
||||
|
@ -884,7 +884,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
|
||||
if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0)
|
||||
TYPE_UNSIGNED (result_type) = 1;
|
||||
@@ -954,7 +956,7 @@ struct type *
|
||||
@@ -955,7 +957,7 @@ struct type *
|
||||
create_static_range_type (struct type *result_type, struct type *index_type,
|
||||
LONGEST low_bound, LONGEST high_bound)
|
||||
{
|
||||
|
@ -893,7 +893,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
|
||||
low.kind = PROP_CONST;
|
||||
low.data.const_val = low_bound;
|
||||
@@ -962,7 +964,11 @@ create_static_range_type (struct type *result_type, struct type *index_type,
|
||||
@@ -963,7 +965,11 @@ create_static_range_type (struct type *result_type, struct type *index_type,
|
||||
high.kind = PROP_CONST;
|
||||
high.data.const_val = high_bound;
|
||||
|
||||
|
@ -906,7 +906,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
|
||||
return result_type;
|
||||
}
|
||||
@@ -1180,16 +1186,20 @@ create_array_type_with_stride (struct type *result_type,
|
||||
@@ -1181,16 +1187,20 @@ create_array_type_with_stride (struct type *result_type,
|
||||
&& (!type_not_associated (result_type)
|
||||
&& !type_not_allocated (result_type)))
|
||||
{
|
||||
|
@ -928,7 +928,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
else if (bit_stride > 0)
|
||||
TYPE_LENGTH (result_type) =
|
||||
(bit_stride * (high_bound - low_bound + 1) + 7) / 8;
|
||||
@@ -1974,12 +1984,12 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
@@ -1975,12 +1985,12 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
CORE_ADDR value;
|
||||
struct type *static_range_type, *static_target_type;
|
||||
const struct dynamic_prop *prop;
|
||||
|
@ -943,7 +943,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
{
|
||||
low_bound.kind = PROP_CONST;
|
||||
low_bound.data.const_val = value;
|
||||
@@ -1991,7 +2001,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
@@ -1992,7 +2002,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
}
|
||||
|
||||
prop = &TYPE_RANGE_DATA (dyn_range_type)->high;
|
||||
|
@ -952,7 +952,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
{
|
||||
high_bound.kind = PROP_CONST;
|
||||
high_bound.data.const_val = value;
|
||||
@@ -2006,12 +2016,20 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
@@ -2007,12 +2017,20 @@ resolve_dynamic_range (struct type *dyn_range_type,
|
||||
high_bound.data.const_val = 0;
|
||||
}
|
||||
|
||||
|
@ -977,7 +977,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
--- a/gdb/gdbtypes.h
|
||||
+++ b/gdb/gdbtypes.h
|
||||
@@ -614,6 +614,10 @@ struct range_bounds
|
||||
@@ -618,6 +618,10 @@ struct range_bounds
|
||||
|
||||
struct dynamic_prop high;
|
||||
|
||||
|
@ -988,7 +988,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
/* True if HIGH range bound contains the number of elements in the
|
||||
subrange. This affects how the final hight bound is computed. */
|
||||
|
||||
@@ -778,7 +782,6 @@ struct main_type
|
||||
@@ -782,7 +786,6 @@ struct main_type
|
||||
/* * Union member used for range types. */
|
||||
|
||||
struct range_bounds *bounds;
|
||||
|
@ -996,7 +996,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
} flds_bnds;
|
||||
|
||||
/* * Slot to point to additional language-specific fields of this
|
||||
@@ -1327,6 +1330,15 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||
@@ -1341,6 +1344,15 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||
TYPE_RANGE_DATA(range_type)->high.kind
|
||||
#define TYPE_LOW_BOUND_KIND(range_type) \
|
||||
TYPE_RANGE_DATA(range_type)->low.kind
|
||||
|
@ -1012,7 +1012,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
|
||||
/* Property accessors for the type data location. */
|
||||
#define TYPE_DATA_LOCATION(thistype) \
|
||||
@@ -1361,6 +1373,9 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||
@@ -1375,6 +1387,9 @@ extern bool set_type_align (struct type *, ULONGEST);
|
||||
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
|
||||
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
|
||||
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
|
||||
|
@ -1022,7 +1022,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|||
|
||||
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
|
||||
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
|
||||
@@ -1934,6 +1949,7 @@ extern struct type *create_array_type_with_stride
|
||||
@@ -1948,6 +1963,7 @@ extern struct type *create_array_type_with_stride
|
||||
struct dynamic_prop *, unsigned int);
|
||||
|
||||
extern struct type *create_range_type (struct type *, struct type *,
|
||||
|
@ -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,
|
||||
@@ -919,24 +919,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:
|
||||
{
|
||||
|
@ -1112,7 +1112,7 @@ diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
|
|||
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
||||
--- a/gdb/rust-lang.c
|
||||
+++ b/gdb/rust-lang.c
|
||||
@@ -1193,13 +1193,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
|
||||
@@ -1213,13 +1213,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
|
||||
kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
|
||||
*pos += 3;
|
||||
|
||||
|
@ -1129,7 +1129,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
|||
|
||||
if (noside == EVAL_SKIP)
|
||||
return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1);
|
||||
@@ -1288,7 +1286,7 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
@@ -1308,7 +1306,7 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
|
||||
*low = 0;
|
||||
*high = 0;
|
||||
|
@ -1138,7 +1138,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
|||
|
||||
if (TYPE_NFIELDS (type) == 0)
|
||||
return;
|
||||
@@ -1296,15 +1294,14 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
@@ -1316,15 +1314,14 @@ rust_compute_range (struct type *type, struct value *range,
|
||||
i = 0;
|
||||
if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
|
||||
{
|
||||
|
@ -1156,7 +1156,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
|||
*high = value_as_long (value_field (range, i));
|
||||
|
||||
if (rust_inclusive_range_type_p (type))
|
||||
@@ -1322,7 +1319,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
@@ -1342,7 +1339,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
struct type *rhstype;
|
||||
LONGEST low, high_bound;
|
||||
/* Initialized to appease the compiler. */
|
||||
|
@ -1165,7 +1165,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
|||
LONGEST high = 0;
|
||||
int want_slice = 0;
|
||||
|
||||
@@ -1420,7 +1417,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
@@ -1440,7 +1437,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
error (_("Cannot subscript non-array type"));
|
||||
|
||||
if (want_slice
|
||||
|
@ -1174,7 +1174,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
|
|||
low = low_bound;
|
||||
if (low < 0)
|
||||
error (_("Index less than zero"));
|
||||
@@ -1438,7 +1435,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
@@ -1458,7 +1455,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
|
||||
CORE_ADDR addr;
|
||||
struct value *addrval, *tem;
|
||||
|
||||
|
@ -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*
|
||||
@@ -397,6 +397,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 */
|
||||
|
@ -77,7 +77,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
|
|||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -1832,7 +1832,8 @@ static void read_signatured_type (struct signatured_type *);
|
||||
@@ -1827,7 +1827,8 @@ static void read_signatured_type (struct signatured_type *);
|
||||
|
||||
static int attr_to_dynamic_prop (const struct attribute *attr,
|
||||
struct die_info *die, struct dwarf2_cu *cu,
|
||||
|
@ -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)
|
||||
@@ -13754,7 +13755,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)
|
||||
@@ -16513,7 +16514,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)
|
||||
@@ -17274,29 +17276,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)
|
||||
@@ -17728,7 +17791,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,
|
||||
@@ -17739,14 +17803,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,
|
||||
@@ -17779,8 +17862,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)
|
||||
@@ -17891,7 +17994,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)
|
||||
@@ -17899,7 +18002,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)
|
||||
@@ -17908,10 +18011,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)
|
||||
@@ -25548,7 +25651,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)
|
||||
@@ -25562,7 +25665,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)
|
||||
@@ -25574,7 +25677,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);
|
||||
|
@ -376,7 +376,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
|||
f_type_print_base (type, stream, show, level);
|
||||
code = TYPE_CODE (type);
|
||||
if ((varstring != NULL && *varstring != '\0')
|
||||
@@ -89,7 +77,7 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
|
||||
@@ -96,7 +84,7 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
|
||||
|
||||
demangled_args = (*varstring != '\0'
|
||||
&& varstring[strlen (varstring) - 1] == ')');
|
||||
|
@ -385,16 +385,16 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
|||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +147,7 @@ f_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
||||
@@ -166,7 +154,7 @@ f_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
||||
static void
|
||||
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 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. */
|
||||
@@ -188,36 +176,52 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
fprintf_filtered (stream, "(");
|
||||
|
||||
if (type_not_associated (type))
|
||||
|
@ -426,69 +426,71 @@ 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
|
||||
@@ -221,13 +225,14 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
@@ -228,8 +232,8 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_REF:
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0,
|
||||
- arrayprint_recurse_level);
|
||||
- fprintf_filtered (stream, " )");
|
||||
+ arrayprint_recurse_level, 0);
|
||||
fprintf_filtered (stream, ")");
|
||||
+ fprintf_filtered (stream, ")");
|
||||
break;
|
||||
|
||||
case TYPE_CODE_FUNC:
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- passed_a_ptr, 0, arrayprint_recurse_level);
|
||||
+ passed_a_ptr, 0, arrayprint_recurse_level,
|
||||
+ 0);
|
||||
if (passed_a_ptr)
|
||||
fprintf_filtered (stream, ")");
|
||||
@@ -237,7 +241,8 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||
int i, nfields = TYPE_NFIELDS (type);
|
||||
|
||||
@@ -388,7 +393,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
- passed_a_ptr, 0, arrayprint_recurse_level);
|
||||
+ passed_a_ptr, 0, arrayprint_recurse_level,
|
||||
+ 0);
|
||||
if (passed_a_ptr)
|
||||
fprintf_filtered (stream, ") ");
|
||||
fprintf_filtered (stream, "(");
|
||||
@@ -416,7 +421,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
fputs_filtered (" :: ", stream);
|
||||
fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
|
||||
f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
|
||||
|
@ -500,7 +502,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
|
|||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -1897,7 +1897,8 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
@@ -1898,7 +1898,8 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
type = check_typedef (type);
|
||||
|
||||
/* We only want to recognize references at the outermost level. */
|
||||
|
@ -510,7 +512,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
type = check_typedef (TYPE_TARGET_TYPE (type));
|
||||
|
||||
/* Types that have a dynamic TYPE_DATA_LOCATION are considered
|
||||
@@ -1931,6 +1932,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
@@ -1932,6 +1933,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
}
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
|
@ -518,7 +520,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
{
|
||||
gdb_assert (TYPE_NFIELDS (type) == 1);
|
||||
|
||||
@@ -2049,7 +2051,8 @@ resolve_dynamic_array (struct type *type,
|
||||
@@ -2050,7 +2052,8 @@ resolve_dynamic_array (struct type *type,
|
||||
struct dynamic_prop *prop;
|
||||
unsigned int bit_stride = 0;
|
||||
|
||||
|
@ -528,7 +530,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
|
||||
type = copy_type (type);
|
||||
|
||||
@@ -2074,11 +2077,15 @@ resolve_dynamic_array (struct type *type,
|
||||
@@ -2075,11 +2078,15 @@ resolve_dynamic_array (struct type *type,
|
||||
|
||||
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
|
||||
|
||||
|
@ -545,7 +547,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type);
|
||||
if (prop != NULL)
|
||||
{
|
||||
@@ -2233,6 +2240,28 @@ resolve_dynamic_struct (struct type *type,
|
||||
@@ -2234,6 +2241,28 @@ resolve_dynamic_struct (struct type *type,
|
||||
return resolved_type;
|
||||
}
|
||||
|
||||
|
@ -574,7 +576,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
|||
/* Worker for resolved_dynamic_type. */
|
||||
|
||||
static struct type *
|
||||
@@ -2281,7 +2310,12 @@ resolve_dynamic_type_internal (struct type *type,
|
||||
@@ -2282,7 +2311,12 @@ resolve_dynamic_type_internal (struct type *type,
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -683,15 +685,15 @@ new file mode 100644
|
|||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
+gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) 0x0" "print logp, not associated"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical\\)\\) 0x0" "print logp, not associated"
|
||||
+gdb_test "print *logp" "Cannot access memory at address 0x0" "print *logp, not associated"
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) 0x0" "print comp, not associated"
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex\\)\\) 0x0" "print comp, not associated"
|
||||
+gdb_test "print *comp" "Cannot access memory at address 0x0" "print *comp, not associated"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) 0x0" "print charp, not associated"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1\\)\\) 0x0" "print charp, not associated"
|
||||
+gdb_test "print *charp" "Cannot access memory at address 0x0" "print *charp, not associated"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) 0x0" "print charap, not associated"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3\\)\\) 0x0" "print charap, not associated"
|
||||
+gdb_test "print *charap" "Cannot access memory at address 0x0" "print *charap, not associated"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0" "print intp, not associated"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int\\)\\) 0x0" "print intp, not associated"
|
||||
+gdb_test "print *intp" "Cannot access memory at address 0x0" "print *intp, not associated"
|
||||
+set test "print intap, not associated"
|
||||
+gdb_test_multiple "print intap" $test {
|
||||
|
@ -702,9 +704,9 @@ new file mode 100644
|
|||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) 0x0" "print realp, not associated"
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real\\)\\) 0x0" "print realp, not associated"
|
||||
+gdb_test "print *realp" "Cannot access memory at address 0x0" "print *realp, not associated"
|
||||
+gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int \\)\\) 0x0"
|
||||
+gdb_test "print \$my_var = intp" "= \\(PTR TO -> \\( $int\\)\\) 0x0"
|
||||
+set test "print cyclicp1, not associated"
|
||||
+gdb_test_multiple "print cyclicp1" $test {
|
||||
+ -re "= \\( i = -?\\d+, p = 0x0 \\)\r\n$gdb_prompt $" {
|
||||
|
@ -716,10 +718,10 @@ new file mode 100644
|
|||
+}
|
||||
+set test "print cyclicp1%p, not associated"
|
||||
+gdb_test_multiple "print cyclicp1%p" $test {
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer\\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer \\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( Type typewithpointer\\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
|
@ -732,15 +734,15 @@ new file mode 100644
|
|||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "After value assignment"]
|
||||
+gdb_continue_to_breakpoint "After value assignment"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print logp" "= \\(PTR TO -> \\( $logical\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *logp" "= \\.TRUE\\."
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print comp" "= \\(PTR TO -> \\( $complex\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *comp" "= \\(1,2\\)"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1 \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print charp" "= \\(PTR TO -> \\( character\\*1\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *charp" "= 'a'"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print charap" "= \\(PTR TO -> \\( character\\*3\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *charap" "= 'abc'"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print intp" "= \\(PTR TO -> \\( $int\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *intp" "= 10"
|
||||
+set test_name "print intap, associated"
|
||||
+gdb_test_multiple "print intap" $test_name {
|
||||
|
@ -762,16 +764,16 @@ new file mode 100644
|
|||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print realp" "= \\(PTR TO -> \\( $real\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *realp" "= 3\\.14000\\d+"
|
||||
+gdb_test "print arrayOfPtr(2)%p" "= \\(PTR TO -> \\( Type two \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print arrayOfPtr(2)%p" "= \\(PTR TO -> \\( Type two\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *(arrayOfPtr(2)%p)" "= \\( ivla1 = \\(11, 12, 13\\), ivla2 = \\(\\( 211, 221\\) \\( 212, 222\\) \\) \\)"
|
||||
+set test_name "print arrayOfPtr(3)%p"
|
||||
+gdb_test_multiple $test_name $test_name {
|
||||
+ -re "= \\(PTR TO -> \\( Type two \\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( Type two\\)\\) <not associated>\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+ -re "= \\(PTR TO -> \\( Type two \\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( Type two\\)\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test_name
|
||||
+ }
|
||||
+}
|
||||
|
@ -785,10 +787,10 @@ new file mode 100644
|
|||
+ }
|
||||
+}
|
||||
+gdb_test "print cyclicp1" "= \\( i = 1, p = $hex\( <.*>\)? \\)"
|
||||
+gdb_test "print cyclicp1%p" "= \\(PTR TO -> \\( Type typewithpointer \\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print cyclicp1%p" "= \\(PTR TO -> \\( Type typewithpointer\\)\\) $hex\( <.*>\)?"
|
||||
+gdb_test "print *((integer*) &inta + 2)" "= 3" "print temporary pointer, array"
|
||||
+gdb_test "print *((integer*) &intvla + 3)" "= 4" "print temporary pointer, allocated vla"
|
||||
+gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\)\\(\\)\\)\\) $hex <pointers\\+\\d+>" "Print program counter"
|
||||
+gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\) \\(\\)\\)\\) $hex <pointers\\+\\d+>" "Print program counter"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/pointers.f90 b/gdb/testsuite/gdb.fortran/pointers.f90
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
@ -945,11 +947,11 @@ new file mode 100644
|
|||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
|
||||
+gdb_continue_to_breakpoint "Before pointer assignment"
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical \\)" "ptype logp, not associated"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex \\)" "ptype comp, not associated"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1 \\)" "ptype charp, not associated"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3 \\)" "ptype charap, not associated"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)" "ptype intp, not associated"
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical\\)" "ptype logp, not associated"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex\\)" "ptype comp, not associated"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1\\)" "ptype charp, not associated"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3\\)" "ptype charap, not associated"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int\\)" "ptype intp, not associated"
|
||||
+set test "ptype intap, not associated"
|
||||
+gdb_test_multiple "ptype intap" $test {
|
||||
+ -re "type = PTR TO -> \\( $int \\(:,:\\)\\)\r\n$gdb_prompt $" {
|
||||
|
@ -959,17 +961,17 @@ new file mode 100644
|
|||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)" "ptype realp, not associated"
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real\\)" "ptype realp, not associated"
|
||||
+gdb_test "ptype twop" \
|
||||
+ [multi_line "type = PTR TO -> \\( Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two \\)"] \
|
||||
+ " $int, allocatable :: ivla1\\(:\\)" \
|
||||
+ " $int, allocatable :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two\\)"] \
|
||||
+ "ptype twop, not associated"
|
||||
+gdb_test "ptype two" \
|
||||
+ [multi_line "type = Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ " $int, allocatable :: ivla1\\(:\\)" \
|
||||
+ " $int, allocatable :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two"]
|
||||
+
|
||||
+
|
||||
|
@ -977,9 +979,9 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "Before value assignment"
|
||||
+gdb_test "ptype twop" \
|
||||
+ [multi_line "type = PTR TO -> \\( Type two" \
|
||||
+ " $int :: ivla1\\(:\\)" \
|
||||
+ " $int :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two \\)"]
|
||||
+ " $int, allocatable :: ivla1\\(:\\)" \
|
||||
+ " $int, allocatable :: ivla2\\(:,:\\)" \
|
||||
+ "End Type two\\)"]
|
||||
+
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "After value assignment"]
|
||||
|
@ -993,11 +995,11 @@ new file mode 100644
|
|||
+gdb_test "ptype realv" "type = $real"
|
||||
+
|
||||
+
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical \\)"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex \\)"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1 \\)"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3 \\)"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)"
|
||||
+gdb_test "ptype logp" "type = PTR TO -> \\( $logical\\)"
|
||||
+gdb_test "ptype comp" "type = PTR TO -> \\( $complex\\)"
|
||||
+gdb_test "ptype charp" "type = PTR TO -> \\( character\\*1\\)"
|
||||
+gdb_test "ptype charap" "type = PTR TO -> \\( character\\*3\\)"
|
||||
+gdb_test "ptype intp" "type = PTR TO -> \\( $int\\)"
|
||||
+set test "ptype intap"
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "type = $int \\(10,2\\)\r\n$gdb_prompt $" {
|
||||
|
@ -1007,7 +1009,7 @@ new file mode 100644
|
|||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)"
|
||||
+gdb_test "ptype realp" "type = PTR TO -> \\( $real\\)"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp
|
||||
--- a/gdb/testsuite/gdb.fortran/vla-ptype.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp
|
||||
|
@ -1018,13 +1020,13 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran
|
|||
-gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not initialized"
|
||||
-gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not initialized"
|
||||
-gdb_test "ptype pvla" "type = <not associated>" "ptype pvla not initialized"
|
||||
+gdb_test "ptype vla1" "type = $real \\(:,:,:\\)" "ptype vla1 not initialized"
|
||||
+gdb_test "ptype vla2" "type = $real \\(:,:,:\\)" "ptype vla2 not initialized"
|
||||
+gdb_test "ptype vla1" "type = $real, allocatable \\(:,:,:\\)" "ptype vla1 not initialized"
|
||||
+gdb_test "ptype vla2" "type = $real, allocatable \\(:,:,:\\)" "ptype vla2 not initialized"
|
||||
+gdb_test "ptype pvla" "type = $real \\(:,:,:\\)" "ptype pvla not initialized"
|
||||
gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla1(3, 6, 9) not initialized"
|
||||
gdb_test "ptype vla2(5, 45, 20)" \
|
||||
@@ -81,20 +81,20 @@ gdb_test "ptype vla2(5, 45, 20)" "type = $real" \
|
||||
@@ -81,24 +81,24 @@ gdb_test "ptype vla2(5, 45, 20)" "type = $real" \
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
|
||||
gdb_continue_to_breakpoint "pvla-deassociated"
|
||||
|
@ -1037,17 +1039,22 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran
|
|||
gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
|
||||
gdb_continue_to_breakpoint "vla1-deallocated"
|
||||
-gdb_test "ptype vla1" "type = <not allocated>" "ptype vla1 not allocated"
|
||||
+gdb_test "ptype vla1" "type = $real \\(:,:,:\\)" "ptype vla1 not allocated"
|
||||
+gdb_test "ptype vla1" "type = $real, allocatable \\(:,:,:\\)" "ptype vla1 not allocated"
|
||||
gdb_test "ptype vla1(3, 6, 9)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla1(3, 6, 9) not allocated"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "vla2-deallocated"]
|
||||
gdb_continue_to_breakpoint "vla2-deallocated"
|
||||
-gdb_test "ptype vla2" "type = <not allocated>" "ptype vla2 not allocated"
|
||||
+gdb_test "ptype vla2" "type = $real \\(:,:,:\\)" "ptype vla2 not allocated"
|
||||
+gdb_test "ptype vla2" "type = $real, allocatable \\(:,:,:\\)" "ptype vla2 not allocated"
|
||||
gdb_test "ptype vla2(5, 45, 20)" \
|
||||
"no such vector element \\\(vector not allocated\\\)" \
|
||||
"ptype vla2(5, 45, 20) not allocated"
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "vla1-neg-bounds"]
|
||||
gdb_continue_to_breakpoint "vla1-neg-bounds"
|
||||
-gdb_test "ptype vla1" "type = $real \\(-2:1,-5:4,-3:-1\\)" "ptype vla1 negative bounds"
|
||||
+gdb_test "ptype vla1" "type = $real, allocatable \\(-2:1,-5:4,-3:-1\\)" "ptype vla1 negative bounds"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-strings.exp b/gdb/testsuite/gdb.fortran/vla-strings.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
@ -1087,7 +1094,7 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "var_char-allocated-1"
|
||||
+set test "whatis var_char first time"
|
||||
+gdb_test_multiple "whatis var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
|
||||
+ -re "type = PTR TO -> \\( character\\*10\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*10\r\n$gdb_prompt $" {
|
||||
|
@ -1096,7 +1103,7 @@ new file mode 100644
|
|||
+}
|
||||
+set test "ptype var_char first time"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*10 \\)\r\n$gdb_prompt $" {
|
||||
+ -re "type = PTR TO -> \\( character\\*10\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*10\r\n$gdb_prompt $" {
|
||||
|
@ -1114,7 +1121,7 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "var_char-filled-1"
|
||||
+set test "print var_char, var_char-filled-1"
|
||||
+gdb_test_multiple "print var_char" $test {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*3 \\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*3\\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *var_char" "= 'foo'" "print *var_char, var_char-filled-1"
|
||||
+ pass $test
|
||||
+ }
|
||||
|
@ -1124,7 +1131,7 @@ new file mode 100644
|
|||
+}
|
||||
+set test "ptype var_char, var_char-filled-1"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*3 \\)\r\n$gdb_prompt $" {
|
||||
+ -re "type = PTR TO -> \\( character\\*3\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*3\r\n$gdb_prompt $" {
|
||||
|
@ -1139,7 +1146,7 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "var_char-filled-2"
|
||||
+set test "print var_char, var_char-filled-2"
|
||||
+gdb_test_multiple "print var_char" $test {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*6 \\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ -re "= \\(PTR TO -> \\( character\\*6\\)\\) $hex\r\n$gdb_prompt $" {
|
||||
+ gdb_test "print *var_char" "= 'foobar'" "print *var_char, var_char-filled-2"
|
||||
+ pass $test
|
||||
+ }
|
||||
|
@ -1149,7 +1156,7 @@ new file mode 100644
|
|||
+}
|
||||
+set test "ptype var_char, var_char-filled-2"
|
||||
+gdb_test_multiple "ptype var_char" $test {
|
||||
+ -re "type = PTR TO -> \\( character\\*6 \\)\r\n$gdb_prompt $" {
|
||||
+ -re "type = PTR TO -> \\( character\\*6\\)\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "type = character\\*6\r\n$gdb_prompt $" {
|
||||
|
@ -1211,7 +1218,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/
|
|||
+gdb_test "ptype fivedynarr" \
|
||||
+ [multi_line "type = Type five" \
|
||||
+ " Type one :: tone" \
|
||||
+ "End Type five \\(:\\)" ]
|
||||
+ "End Type five, allocatable \\(:\\)" ]
|
||||
gdb_test "next" ""
|
||||
gdb_test "ptype fivedynarr(2)" \
|
||||
[multi_line "type = Type five" \
|
||||
|
@ -1219,8 +1226,8 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/
|
|||
"ptype fivedynarr(2), tone is not allocated"
|
||||
gdb_test "ptype fivedynarr(2)%tone" \
|
||||
[multi_line "type = Type one" \
|
||||
- " $int :: ivla\\(<not allocated>\\)" \
|
||||
+ " $int :: ivla\\(:,:,:\\)" \
|
||||
- " $int, allocatable :: ivla\\(<not allocated>\\)" \
|
||||
+ " $int, allocatable :: ivla\\(:,:,:\\)" \
|
||||
"End Type one" ] \
|
||||
"ptype fivedynarr(2)%tone, not allocated"
|
||||
|
||||
|
@ -1231,20 +1238,38 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran
|
|||
gdb_continue_to_breakpoint "vla1-init"
|
||||
gdb_test "print vla1" " = <not allocated>" "print non-allocated vla1"
|
||||
gdb_test "print &vla1" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(<not allocated>\\\)\\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(:,:,:\\\)\\\)\\\) $hex" \
|
||||
- " = \\\(PTR TO -> \\\( $real, allocatable \\\(<not allocated>\\\) \\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real, allocatable \\\(:,:,:\\\)\\\)\\\) $hex" \
|
||||
"print non-allocated &vla1"
|
||||
gdb_test "print vla1(1,1,1)" "no such vector element \\\(vector not allocated\\\)" \
|
||||
"print member in non-allocated vla1 (1)"
|
||||
@@ -56,7 +56,7 @@ with_timeout_factor 15 {
|
||||
"step over value assignment of vla1"
|
||||
}
|
||||
gdb_test "print &vla1" \
|
||||
- " = \\\(PTR TO -> \\\( $real, allocatable \\\(10,10,10\\\) \\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real, allocatable \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
"print allocated &vla1"
|
||||
gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)"
|
||||
gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)"
|
||||
@@ -76,7 +76,7 @@ gdb_test "print vla1(9, 9, 9)" " = 999" \
|
||||
# Try to access values in undefined pointer to VLA (dangling)
|
||||
gdb_test "print pvla" " = <not associated>" "print undefined pvla"
|
||||
gdb_test "print &pvla" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\)\\\)\\\) $hex" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(<not associated>\\\) \\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(:,:,:\\\)\\\)\\\) $hex" \
|
||||
"print non-associated &pvla"
|
||||
gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated\\\)" \
|
||||
"print undefined pvla(1,3,8)"
|
||||
@@ -85,7 +85,7 @@ gdb_test "print pvla(1, 3, 8)" "no such vector element \\\(vector not associated
|
||||
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
|
||||
gdb_continue_to_breakpoint "pvla-associated"
|
||||
gdb_test "print &pvla" \
|
||||
- " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\) \\\)\\\) $hex" \
|
||||
+ " = \\\(PTR TO -> \\\( $real \\\(10,10,10\\\)\\\)\\\) $hex" \
|
||||
"print associated &pvla"
|
||||
gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)"
|
||||
gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)"
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
--- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
+++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp
|
||||
|
@ -1253,11 +1278,11 @@ diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-v
|
|||
"500\\^done,value=\"<not allocated>\"" "evaluate not allocated vla, before allocation"
|
||||
|
||||
-mi_create_varobj_checked vla1_not_allocated vla1 "<not allocated>" \
|
||||
+mi_create_varobj_checked vla1_not_allocated vla1 "$real \\(:\\)" \
|
||||
+mi_create_varobj_checked vla1_not_allocated vla1 "$real, allocatable \\(:\\)" \
|
||||
"create local variable vla1_not_allocated"
|
||||
mi_gdb_test "501-var-info-type vla1_not_allocated" \
|
||||
- "501\\^done,type=\"<not allocated>\"" \
|
||||
+ "501\\^done,type=\"$real \\(:\\)\"" \
|
||||
+ "501\\^done,type=\"$real, allocatable \\(:\\)\"" \
|
||||
"info type variable vla1_not_allocated"
|
||||
mi_gdb_test "502-var-show-format vla1_not_allocated" \
|
||||
"502\\^done,format=\"natural\"" \
|
||||
|
@ -1339,7 +1364,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,
|
||||
@@ -1141,12 +1141,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;
|
||||
|
||||
|
|
|
@ -5,6 +5,25 @@ Subject: gdb-vla-intel-tests.patch
|
|||
|
||||
;;=fedoratest
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
|
||||
--- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp
|
||||
@@ -37,5 +37,5 @@ gdb_continue_to_breakpoint "BP1"
|
||||
gdb_test "ptype tinsta" \
|
||||
[multi_line "type = Type tuserdef" \
|
||||
" $int :: i" \
|
||||
- " PTR TO -> \\( $real :: ptr \\)" \
|
||||
+ " PTR TO -> \\( $real :: ptr\\)" \
|
||||
"End Type tuserdef"]
|
||||
diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
|
||||
--- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp
|
||||
@@ -42,4 +42,4 @@ gdb_test "ptype say_numbers" \
|
||||
"type = void \\(integer\\(kind=4\\), integer\\(kind=4\\), integer\\(kind=4\\)\\)"
|
||||
|
||||
gdb_test "ptype fun_ptr" \
|
||||
- "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\) \\(REF TO -> \\( integer\\(kind=4\\) \\)\\) \\)"
|
||||
+ "type = PTR TO -> \\( integer\\(kind=4\\) \\(\\) \\(REF TO -> \\( integer\\(kind=4\\)\\)\\)\\)"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-func.exp b/gdb/testsuite/gdb.fortran/vla-func.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
@ -42,7 +61,7 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "func1-vla-passed"
|
||||
+gdb_test "print vla" " = \\( *\\( *22, *22, *22,\[()22, .\]*\\)" \
|
||||
+ "print vla (func1)"
|
||||
+gdb_test "ptype vla" "type = integer\\\(kind=4\\\) \\\(10,10\\\)" \
|
||||
+gdb_test "ptype vla" "type = integer\\\(kind=4\\\), allocatable \\\(10,10\\\)" \
|
||||
+ "ptype vla (func1)"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "func1-vla-modified"]
|
||||
|
@ -69,7 +88,7 @@ new file mode 100644
|
|||
+gdb_continue_to_breakpoint "func2-returned"
|
||||
+gdb_test "print vla3" " = \\\(1, 2, 44, 4, 44, 44, 44, 8, 44, 44\\\)" \
|
||||
+ "print vla3 (after func2)"
|
||||
+gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \
|
||||
+gdb_test "ptype vla3" "type = integer\\\(kind=4\\\), allocatable \\\(10\\\)" \
|
||||
+ "ptype vla3 (after func2)"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-func.f90 b/gdb/testsuite/gdb.fortran/vla-func.f90
|
||||
new file mode 100644
|
||||
|
@ -147,6 +166,16 @@ new file mode 100644
|
|||
+
|
||||
+ ret = .TRUE. ! func2-returned
|
||||
+end program vla_func
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
|
||||
--- a/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/vla-ptr-info.exp
|
||||
@@ -28,5 +28,5 @@ if ![runto_main] {
|
||||
# Check the status of a pointer to a dynamic array.
|
||||
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
|
||||
gdb_continue_to_breakpoint "pvla-associated"
|
||||
-gdb_test "print &pvla" " = \\(PTR TO -> \\( real\\(kind=4\\) \\(10,10,10\\) \\)\\) ${hex}" \
|
||||
+gdb_test "print &pvla" " = \\(PTR TO -> \\( real\\(kind=4\\) \\(10,10,10\\)\\)\\) ${hex}" \
|
||||
"print pvla pointer information"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-stringsold.exp b/gdb/testsuite/gdb.fortran/vla-stringsold.exp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
@ -185,11 +214,11 @@ new file mode 100644
|
|||
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-allocated-1"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*10\\)\\) ${hex}" \
|
||||
+ "print var_char after allocated first time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10\\)" \
|
||||
+ "whatis var_char first time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10\\)" \
|
||||
+ "ptype var_char first time"
|
||||
+gdb_test "next" "\\d+.*var_char = 'foo'.*" \
|
||||
+ "next to allocation status of var_char"
|
||||
|
@ -198,13 +227,13 @@ new file mode 100644
|
|||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-1"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-1"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*3 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*3\\)\\) ${hex}" \
|
||||
+ "print var_char after filled first time"
|
||||
+gdb_test "print *var_char" " = 'foo'" \
|
||||
+ "print *var_char after filled first time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*3 \\)" \
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*3\\)" \
|
||||
+ "whatis var_char after filled first time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*3 \\)" \
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*3\\)" \
|
||||
+ "ptype var_char after filled first time"
|
||||
+gdb_test "print var_char(1)" " = 102 'f'" "print var_char(1)"
|
||||
+gdb_test "print var_char(3)" " = 111 'o'" "print var_char(3)"
|
||||
|
@ -212,46 +241,46 @@ new file mode 100644
|
|||
+gdb_breakpoint [gdb_get_line_number "var_char-filled-2"]
|
||||
+gdb_continue_to_breakpoint "var_char-filled-2"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*6 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*6\\)\\) ${hex}" \
|
||||
+ "print var_char after allocated second time"
|
||||
+gdb_test "print *var_char" " = 'foobar'" \
|
||||
+ "print *var_char after allocated second time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*6 \\)" \
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*6\\)" \
|
||||
+ "whatis var_char second time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*6 \\)" \
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*6\\)" \
|
||||
+ "ptype var_char second time"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-empty"]
|
||||
+gdb_continue_to_breakpoint "var_char-empty"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*0 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*0\\)\\) ${hex}" \
|
||||
+ "print var_char after set empty"
|
||||
+gdb_test "print *var_char" " = \"\"" "print *var_char after set empty"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*0 \\)" \
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*0\\)" \
|
||||
+ "whatis var_char after set empty"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*0 \\)" \
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*0\\)" \
|
||||
+ "ptype var_char after set empty"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char-allocated-3"]
|
||||
+gdb_continue_to_breakpoint "var_char-allocated-3"
|
||||
+gdb_test "print var_char" \
|
||||
+ " = \\(PTR TO -> \\( character\\*21 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*21\\)\\) ${hex}" \
|
||||
+ "print var_char after allocated third time"
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*21 \\)" \
|
||||
+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*21\\)" \
|
||||
+ "whatis var_char after allocated third time"
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*21 \\)" \
|
||||
+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*21\\)" \
|
||||
+ "ptype var_char after allocated third time"
|
||||
+
|
||||
+gdb_breakpoint [gdb_get_line_number "var_char_p-associated"]
|
||||
+gdb_continue_to_breakpoint "var_char_p-associated"
|
||||
+gdb_test "print var_char_p" \
|
||||
+ " = \\(PTR TO -> \\( character\\*7 \\)\\) ${hex}" \
|
||||
+ " = \\(PTR TO -> \\( character\\*7\\)\\) ${hex}" \
|
||||
+ "print var_char_p after associated"
|
||||
+gdb_test "print *var_char_p" " = 'johndoe'" \
|
||||
+ "print *var_char_ after associated"
|
||||
+gdb_test "whatis var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
|
||||
+gdb_test "whatis var_char_p" "type = PTR TO -> \\( character\\*7\\)" \
|
||||
+ "whatis var_char_p after associated"
|
||||
+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \
|
||||
+gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7\\)" \
|
||||
+ "ptype var_char_p after associated"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/vla-stringsold.f90 b/gdb/testsuite/gdb.fortran/vla-stringsold.f90
|
||||
new file mode 100644
|
||||
|
@ -298,3 +327,21 @@ new file mode 100644
|
|||
+ var_char_p => null()
|
||||
+ l = associated(var_char_p) ! var_char_p-not-associated
|
||||
+end program vla_strings
|
||||
diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp
|
||||
--- a/gdb/testsuite/gdb.fortran/whatis_type.exp
|
||||
+++ b/gdb/testsuite/gdb.fortran/whatis_type.exp
|
||||
@@ -44,7 +44,7 @@ gdb_test "whatis t2" "type = Type t2"
|
||||
gdb_test "whatis t2v" "type = Type t2"
|
||||
gdb_test "whatis t3" "type = Type t3"
|
||||
gdb_test "whatis t3v" "type = Type t3"
|
||||
-gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3 \\)"
|
||||
+gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3\\)"
|
||||
|
||||
gdb_test "ptype t1" \
|
||||
[multi_line "type = Type t1" \
|
||||
@@ -75,4 +75,4 @@ gdb_test "ptype t3p" \
|
||||
[multi_line "type = PTR TO -> \\( Type t3" \
|
||||
" $int :: t3_i" \
|
||||
" Type t2 :: t2_n" \
|
||||
- "End Type t3 \\)"]
|
||||
+ "End Type t3\\)"]
|
||||
|
|
|
@ -1,123 +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-x86_64-i386-syscall-restart.patch
|
||||
|
||||
;; Fix syscall restarts for amd64->i386 biarch.
|
||||
;;=push+jan
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2009-11/msg00592.html
|
||||
Subject: [patch] Fix syscall restarts for amd64->i386 biarch
|
||||
|
||||
Hi,
|
||||
|
||||
tested only on recent Linux kernels, it should apply also on vanilla ones.
|
||||
There were various changes of the kernels behavior in the past.
|
||||
|
||||
FSF GDB HEAD state:
|
||||
kernel debugger inferior state
|
||||
x86_64 x86_64 x86_64 PASS
|
||||
x86_64 x86_64 i386 FAIL without this patch, PASS with this patch
|
||||
x86_64 i386 i386 PASS on recent kernels
|
||||
(FAIL: kernel-2.6.31.5-127.fc12.x86_64 - Fedora 12)
|
||||
(PASS: kernel-2.6.32-0.55.rc8.git1.fc13.x86_64)
|
||||
i386 i386 i386 PASS
|
||||
|
||||
Currently gdb.base/interrupt.exp fails on amd64 host running under
|
||||
--target_board unix/-m32 with:
|
||||
continue
|
||||
Continuing.
|
||||
Unknown error 512
|
||||
|
||||
<linux/errno.h>:
|
||||
/*
|
||||
* These should never be seen by user programs. To return one of ERESTART*
|
||||
* codes, signal_pending() MUST be set. Note that ptrace can observe these
|
||||
* at syscall exit tracing, but they will never be left for the debugged user
|
||||
* process to see.
|
||||
*/
|
||||
|
||||
"Unknown error 512" printed above is printed by the inferior itself, not by GDB.
|
||||
|
||||
It is because GDB reads it as 0xfffffffffffffe00 but writes it back as
|
||||
0xfffffe00.
|
||||
+ /* Sign-extend %eax as during return from a syscall it is being checked
|
||||
+ for -ERESTART* values -512 being above 0xfffffffffffffe00; tested by
|
||||
+ interrupt.exp. */
|
||||
|
||||
Quote of Roland McGrath from IRC:
|
||||
|
||||
roland: in the user_regset model, there are 64-bit user_regset flavors and
|
||||
32-bit user_regset flavors, so at the kabi level the (kernel) caller can say
|
||||
what it means: calls on the 32-bit user_regset flavor will behave as if on
|
||||
a 32-bit kernel/userland. in ptrace, there is no way for x86_64 ptrace calls
|
||||
to say "i think of the inferior as being 32 bits, so act accordingly" (tho ppc
|
||||
and/or sparc have ptr
|
||||
roland: ace requests that do that iirc)
|
||||
roland: ergo 64-bit ptrace callers must either save/restore full 64-bits so
|
||||
the kernel's sign-extension choices are preserved, or else grok magic ways to
|
||||
expand stored 32-bit register contents to 64-bit values to stuff via 64-bit
|
||||
ptrace
|
||||
[...]
|
||||
roland: there is a "32-bit-flavored task", but it's not really true that it
|
||||
has 32-bit registers. there is no 32-bit-only userland condition. any task
|
||||
can always ljmp to the 64-bit code segment and run 64-bit insns including
|
||||
a 64-bit syscall
|
||||
roland: so a 64-bit debugger should see and be able to fiddle the full
|
||||
registers. it can even change cs via ptrace to force the inferior into
|
||||
running 32 or 64 bit code.
|
||||
|
||||
Saving whole 64bits for i386 targets on x86_64 hosts does not much match the
|
||||
GDB architecture as `struct type' for these registers still should be 32bit
|
||||
etc. Therefore provided just this exception.
|
||||
|
||||
The problem is reproducible only if one does an inferior call during the
|
||||
interruption to do full inferior save/restore from GDB regcache.
|
||||
|
||||
Regression tested on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
gdb/
|
||||
2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* amd64-nat.c (amd64_collect_native_gregset): Do not pre-clear %eax.
|
||||
Sign extend it afterwards.
|
||||
|
||||
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
|
||||
--- a/gdb/amd64-nat.c
|
||||
+++ b/gdb/amd64-nat.c
|
||||
@@ -135,9 +135,9 @@ amd64_collect_native_gregset (const struct regcache *regcache,
|
||||
{
|
||||
num_regs = amd64_native_gregset32_num_regs;
|
||||
|
||||
- /* Make sure %eax, %ebx, %ecx, %edx, %esi, %edi, %ebp, %esp and
|
||||
+ /* Make sure %ebx, %ecx, %edx, %esi, %edi, %ebp, %esp and
|
||||
%eip get zero-extended to 64 bits. */
|
||||
- for (i = 0; i <= I386_EIP_REGNUM; i++)
|
||||
+ for (i = I386_ECX_REGNUM; i <= I386_EIP_REGNUM; i++)
|
||||
{
|
||||
if (regnum == -1 || regnum == i)
|
||||
memset (regs + amd64_native_gregset_reg_offset (gdbarch, i), 0, 8);
|
||||
@@ -163,4 +163,20 @@ amd64_collect_native_gregset (const struct regcache *regcache,
|
||||
regcache->raw_collect (i, regs + offset);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
|
||||
+ {
|
||||
+ /* Sign-extend %eax as during return from a syscall it is being checked
|
||||
+ for -ERESTART* values -512 being above 0xfffffffffffffe00; tested by
|
||||
+ interrupt.exp. */
|
||||
+
|
||||
+ int k = I386_EAX_REGNUM;
|
||||
+
|
||||
+ if (regnum == -1 || regnum == i)
|
||||
+ {
|
||||
+ void *ptr = regs + amd64_native_gregset_reg_offset (gdbarch, k);
|
||||
+
|
||||
+ *(int64_t *) ptr = *(int32_t *) ptr;
|
||||
+ }
|
||||
+ }
|
||||
}
|
249
gdb.spec
249
gdb.spec
|
@ -19,10 +19,15 @@
|
|||
%global _root_libdir %{_libdir}
|
||||
}
|
||||
|
||||
# If we're on Fedora, we will build the gdb-minimal package.
|
||||
%if 0%{?fedora}
|
||||
%global _build_minimal 1
|
||||
%endif
|
||||
|
||||
Name: %{?scl_prefix}gdb
|
||||
|
||||
# Freeze it when GDB gets branched
|
||||
%global snapsrc 20190321
|
||||
%global snapsrc 20190501
|
||||
# See timestamp of source gnulib installed into gdb/gnulib/ .
|
||||
%global snapgnulib 20161115
|
||||
%global tarname gdb-%{version}
|
||||
|
@ -30,7 +35,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.0.riscv64%{?dist}
|
||||
Release: 11.0.riscv64%{?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.
|
||||
|
@ -42,6 +47,9 @@ URL: http://gnu.org/software/gdb/
|
|||
# For our convenience
|
||||
%global gdb_src %{tarname}
|
||||
%global gdb_build build-%{_target_platform}
|
||||
%if 0%{?_build_minimal}
|
||||
%global gdb_build_minimal %{gdb_build}-minimal
|
||||
%endif # 0%{?_build_minimal}
|
||||
|
||||
# error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/gdb-gdb.py
|
||||
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/PBOJDOFMWTRV3ZOKNV5HN7IBX5EPHDHF/
|
||||
|
@ -367,6 +375,22 @@ Java, and other languages, by executing them in a controlled fashion
|
|||
and printing their data.
|
||||
%endif
|
||||
|
||||
%if 0%{?_build_minimal}
|
||||
%package minimal
|
||||
Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages (minimal version)
|
||||
# gdb-add-index is shared with gdb-headless and it must be from same version
|
||||
Conflicts: %{name}-headless < %{version}-%{release}
|
||||
Conflicts: %{name}-headless > %{version}-%{release}
|
||||
|
||||
%description minimal
|
||||
GDB, the GNU debugger, allows you to debug programs written in C, C++,
|
||||
Java, and other languages, by executing them in a controlled fashion
|
||||
and printing their data.
|
||||
|
||||
This package provides a minimal version of GDB, tailored to be used by
|
||||
the Fedora buildroot. It should probably not be used by end users.
|
||||
%endif # 0%{?_build_minimal}
|
||||
|
||||
%package gdbserver
|
||||
Summary: A standalone server for GDB (the GNU source-level debugger)
|
||||
|
||||
|
@ -482,6 +506,52 @@ test -e %{_root_libdir}/librpm.so.%{librpmver}
|
|||
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
|
||||
%endif
|
||||
|
||||
# A set of common GDB configure flags, which are used for both minimal
|
||||
# and non-minimal compilations.
|
||||
COMMON_GDB_CONFIGURE_FLAGS="\
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--with-system-gdbinit=%{_sysconfdir}/gdbinit \
|
||||
--with-gdb-datadir=%{_datadir}/gdb \
|
||||
--enable-gdb-build-warnings=,-Wno-unused \
|
||||
--enable-build-with-cxx \
|
||||
%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64
|
||||
--disable-werror \
|
||||
%else
|
||||
--enable-werror \
|
||||
%endif
|
||||
--with-separate-debug-dir=/usr/lib/debug \
|
||||
--disable-sim \
|
||||
--disable-rpath \
|
||||
--without-stage1-ldflags \
|
||||
--disable-libmcheck \
|
||||
--without-guile \
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-system-readline \
|
||||
%else
|
||||
--without-system-readline \
|
||||
%endif
|
||||
--without-libunwind \
|
||||
%ifarch sparc sparcv9 sparc64
|
||||
--without-mmap \
|
||||
%endif
|
||||
--enable-64-bit-bfd \
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-mpfr \
|
||||
%else
|
||||
--without-mpfr \
|
||||
%endif
|
||||
--with-system-zlib \
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-lzma \
|
||||
%else
|
||||
--without-lzma \
|
||||
%endif
|
||||
"
|
||||
|
||||
# Identify the build directory with the version of gdb as well as the
|
||||
# architecture, to allow for mutliple versions to be installed and
|
||||
# built.
|
||||
|
@ -490,6 +560,50 @@ test -e %{_root_libdir}/librpm.so.%{librpmver}
|
|||
for fprofile in %{?_with_profile:-fprofile} ""
|
||||
do
|
||||
|
||||
# We will first build the minimal version of GDB.
|
||||
%if 0%{?_build_minimal}
|
||||
mkdir %{gdb_build_minimal}$fprofile
|
||||
cd %{gdb_build_minimal}$fprofile
|
||||
|
||||
# The configure flags we will use when building gdb-minimal.
|
||||
GDB_MINIMAL_CONFIGURE_FLAGS="\
|
||||
--without-babeltrace \
|
||||
--without-expat \
|
||||
--disable-tui \
|
||||
--without-python \
|
||||
--disable-inprocess-agent \
|
||||
--without-intel-pt \
|
||||
--disable-unit-tests \
|
||||
--disable-source-highlight"
|
||||
|
||||
export CFLAGS="$RPM_OPT_FLAGS %{?_with_asan:-fsanitize=address}"
|
||||
export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}"
|
||||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
|
||||
../configure \
|
||||
${COMMON_GDB_CONFIGURE_FLAGS} \
|
||||
${GDB_MINIMAL_CONFIGURE_FLAGS} \
|
||||
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
|
||||
--with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
|
||||
%ifarch sparc sparcv9
|
||||
sparc-%{_vendor}-%{_target_os}%{?_gnu}
|
||||
%else
|
||||
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \
|
||||
%{_target_platform}
|
||||
%endif
|
||||
|
||||
# Prepare gdb/config.h first.
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 maybe-configure-gdb
|
||||
perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config.status
|
||||
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1
|
||||
|
||||
cd ..
|
||||
%endif # 0%{?_build_minimal}
|
||||
|
||||
# Now we build the full GDB.
|
||||
mkdir %{gdb_build}$fprofile
|
||||
cd %{gdb_build}$fprofile
|
||||
|
||||
|
@ -545,37 +659,12 @@ LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}"
|
|||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
|
||||
../configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--with-system-gdbinit=%{_sysconfdir}/gdbinit \
|
||||
--with-gdb-datadir=%{_datadir}/gdb \
|
||||
--enable-gdb-build-warnings=,-Wno-unused \
|
||||
--enable-build-with-cxx \
|
||||
%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64 riscv64
|
||||
--disable-werror \
|
||||
%else
|
||||
--enable-werror \
|
||||
%endif
|
||||
--with-separate-debug-dir=/usr/lib/debug \
|
||||
--disable-sim \
|
||||
--disable-rpath \
|
||||
--without-stage1-ldflags \
|
||||
--disable-libmcheck \
|
||||
--without-guile \
|
||||
# The configure flags we will use when building the full GDB.
|
||||
GDB_FULL_CONFIGURE_FLAGS="\
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 7
|
||||
--with-babeltrace \
|
||||
%else
|
||||
--without-babeltrace \
|
||||
%endif
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-system-readline \
|
||||
%else
|
||||
--without-system-readline \
|
||||
%endif
|
||||
--with-expat \
|
||||
$(: ppc64 host build crashes on ppc variant of libexpat.so ) \
|
||||
|
@ -586,40 +675,29 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
|
|||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
--with-rpm=librpm.so.%{librpmver} \
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-lzma \
|
||||
%else
|
||||
--without-lzma \
|
||||
%endif
|
||||
--without-libunwind \
|
||||
%ifarch sparc sparcv9 sparc64
|
||||
--without-mmap \
|
||||
%endif
|
||||
--enable-64-bit-bfd \
|
||||
%if %{have_inproctrace}
|
||||
--enable-inprocess-agent \
|
||||
%else
|
||||
--disable-inprocess-agent \
|
||||
%endif
|
||||
--with-system-zlib \
|
||||
%if %{have_libipt}
|
||||
--with-intel-pt \
|
||||
%else
|
||||
--without-intel-pt \
|
||||
%endif
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
--with-mpfr \
|
||||
%else
|
||||
--without-mpfr \
|
||||
%endif
|
||||
--enable-unit-tests \
|
||||
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
|
||||
--with-rpm=librpm.so.%{librpmver} \
|
||||
--enable-unit-tests"
|
||||
|
||||
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
|
||||
../configure \
|
||||
${COMMON_GDB_CONFIGURE_FLAGS} \
|
||||
${GDB_FULL_CONFIGURE_FLAGS} \
|
||||
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
|
||||
--with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
|
||||
%ifarch sparc sparcv9
|
||||
sparc-%{_vendor}-%{_target_os}%{?_gnu}
|
||||
%else
|
||||
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \
|
||||
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu,riscv64-linux-gnu \
|
||||
%{_target_platform}
|
||||
%endif
|
||||
|
||||
|
@ -643,12 +721,12 @@ elif [ -z "%{!?_with_profile:no}" ]
|
|||
then
|
||||
FPROFILE_CFLAGS='-fprofile-use'
|
||||
# We cannot use -fprofile-dir as the bare filenames clash.
|
||||
(cd ../%{gdb_build}-fprofile;
|
||||
(cd ../${builddir}-fprofile;
|
||||
# It was 333 on x86_64.
|
||||
test $(find -name "*.gcda"|wc -l) -gt 300
|
||||
find -name "*.gcda" | while read -r i
|
||||
do
|
||||
ln $i ../%{gdb_build}/$i
|
||||
ln $i ../${builddir}/$i
|
||||
done
|
||||
)
|
||||
else
|
||||
|
@ -774,9 +852,31 @@ echo ====================TESTING END=====================
|
|||
|
||||
%install
|
||||
# Initially we're in the %{gdb_src} directory.
|
||||
cd %{gdb_build}
|
||||
%if 0%{?_build_minimal}
|
||||
cd %{gdb_build_minimal}
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# Delete everything except the 'gdb' binary, and then rename it to
|
||||
# 'gdb.minimal'.
|
||||
rm -rfv $RPM_BUILD_ROOT%{_prefix}/{include,lib*,share}
|
||||
rm -fv $RPM_BUILD_ROOT%{_bindir}/{gcore,gdbserver,gstack,gdb-add-index}
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_bindir}/gdb.minimal
|
||||
|
||||
cd ..
|
||||
%endif # 0%{?_build_minimal}
|
||||
|
||||
# Install the full build.
|
||||
|
||||
cd %{gdb_build}
|
||||
|
||||
# We must remove the $RPM_BUILD_ROOT directory ourselves if we're not
|
||||
# building gdb-minimal.
|
||||
%if 0%{!?_build_minimal}
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%endif # 0%{!?_build_minimal}
|
||||
|
||||
%if 0%{?el6:1}
|
||||
# GDB C++11 requires devtoolset gcc.
|
||||
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
|
||||
|
@ -970,6 +1070,12 @@ rm $RPM_BUILD_ROOT%{_mandir}/*/gdbserver.1*
|
|||
|
||||
# don't include the files in include, they are part of binutils
|
||||
|
||||
%if 0%{?_build_minimal}
|
||||
%files minimal
|
||||
%{_bindir}/gdb.minimal
|
||||
%{_bindir}/gdb-add-index
|
||||
%endif # 0%{?_build_minimal}
|
||||
|
||||
%ifnarch sparc sparcv9 riscv64
|
||||
%files gdbserver
|
||||
%{_bindir}/gdbserver
|
||||
|
@ -1030,9 +1136,46 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Apr 12 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 8.3.50.20190321-4.0.riscv64
|
||||
* Sun May 05 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 8.3.50.20190501-11.0.riscv64
|
||||
- Add support for RISC-V (riscv64)
|
||||
|
||||
* Wed May 1 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190501-11
|
||||
- Rebase to FSF GDB 8.3.50.20190501 (8.4pre).
|
||||
- Adjust VLA testcases.
|
||||
- Fix "gcore does not support COREFILTER_ELF_HEADERS" (RH BZ 1371380,
|
||||
Sergio Durigan Junior).
|
||||
|
||||
* Mon Apr 29 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190425-10
|
||||
- Share '/usr/bin/gdb-add-index' between gdb-minimal and gdb-headless
|
||||
(Igor Gnatenko, RHBZ 1695015).
|
||||
|
||||
* Mon Apr 29 2019 Sergio Durigan Junior <sergiodj@fedoraproject.org> - 8.3.50.20190425-9
|
||||
- Provide 'gdb-minimal' package, specific for the buildroot (RHBZ 1695015).
|
||||
- Adjust 'gdb-libexec-add-index.patch' for the gdb-minimal case.
|
||||
|
||||
* Thu Apr 25 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190425-8
|
||||
- Rebase to FSF GDB 8.3.50.20190425 (8.4pre), and fix build breakage.
|
||||
|
||||
* Wed Apr 24 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190424-7
|
||||
- Rebase to FSF GDB 8.3.50.20190424 (8.4pre).
|
||||
|
||||
* Fri Apr 12 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.3.50.20190412-6
|
||||
- Remove 'gdb-x86_64-i386-syscall-restart.patch'.
|
||||
|
||||
* 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.20190501.tar.xz) = 9f24f1e357f8779bcbf6931ad1afbc47caacd1382d6330b0afa9d36624fcef04ec34ca9260844cd65e672a474a6aef2f37597dbd3a92d3af47651e8fef1da80e
|
||||
|
|
Loading…
Reference in New Issue