diff --git a/.gitignore b/.gitignore index 75c5201..96985c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz /v1.6.1.tar.gz /gdb-8.1.tar.xz +/gdb-8.1.50.20180522.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 78d5ec5..3ee5fa4 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -115,197 +115,189 @@ Patch028: gdb-6.6-bz230000-power6-disassembly-test.patch #=fedoratest Patch029: gdb-6.6-bz229517-gcore-without-terminal.patch -# Notify user of a child forked process being detached (BZ 235197). -#=push+jan: This is more about discussion if/what should be printed. -Patch030: gdb-6.6-bz235197-fork-detach-info.patch - # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". #=fedoratest -Patch031: gdb-6.6-testsuite-timeouts.patch +Patch030: gdb-6.6-testsuite-timeouts.patch # Support for stepping over PPC atomic instruction sequences (BZ 237572). #=fedoratest -Patch032: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch031: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch # Make upstream `set scheduler-locking step' as default. #=push+jan: How much is scheduler-locking relevant after non-stop? -Patch033: gdb-6.6-scheduler_locking-step-is-default.patch +Patch032: gdb-6.6-scheduler_locking-step-is-default.patch # Test kernel VDSO decoding while attaching to an i386 process. #=fedoratest -Patch034: gdb-6.3-attach-see-vdso-test.patch +Patch033: gdb-6.3-attach-see-vdso-test.patch # Test leftover zombie process (BZ 243845). #=fedoratest -Patch035: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch034: gdb-6.5-bz243845-stale-testing-zombie-test.patch # New locating of the matching binaries from the pure core file (build-id). #=push+jan -Patch036: gdb-6.6-buildid-locate.patch +Patch035: gdb-6.6-buildid-locate.patch # Fix loading of core files without build-ids but with build-ids in executables. # Load strictly build-id-checked core files only if no executable is specified # (Jan Kratochvil, RH BZ 1339862). #=push+jan -Patch037: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch036: gdb-6.6-buildid-locate-solib-missing-ids.patch #=push+jan -Patch038: gdb-6.6-buildid-locate-rpm.patch +Patch037: gdb-6.6-buildid-locate-rpm.patch # Fix displaying of numeric char arrays as strings (BZ 224128). #=fedoratest: But it is failing anyway, one should check the behavior more. -Patch039: gdb-6.7-charsign-test.patch +Patch038: gdb-6.7-charsign-test.patch # Test PPC hiding of call-volatile parameter register. #=fedoratest -Patch040: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch039: gdb-6.7-ppc-clobbered-registers-O2-test.patch # Testsuite fixes for more stable/comparable results. #=fedoratest -Patch041: gdb-6.7-testsuite-stable-results.patch +Patch040: gdb-6.7-testsuite-stable-results.patch # Test ia64 memory leaks of the code using libunwind. #=fedoratest -Patch042: gdb-6.5-ia64-libunwind-leak-test.patch +Patch041: gdb-6.5-ia64-libunwind-leak-test.patch # Test hiding unexpected breakpoints on intentional step commands. #=fedoratest -Patch043: gdb-6.5-missed-trap-on-step-test.patch +Patch042: gdb-6.5-missed-trap-on-step-test.patch # Test gcore memory and time requirements for large inferiors. #=fedoratest -Patch044: gdb-6.5-gcore-buffer-limit-test.patch +Patch043: gdb-6.5-gcore-buffer-limit-test.patch # Test GCORE for shmid 0 shared memory mappings. #=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. -Patch045: gdb-6.3-mapping-zero-inode-test.patch +Patch044: gdb-6.3-mapping-zero-inode-test.patch # Test a crash on `focus cmd', `focus prev' commands. #=fedoratest -Patch046: gdb-6.3-focus-cmd-prev-test.patch +Patch045: gdb-6.3-focus-cmd-prev-test.patch # Test various forms of threads tracking across exec() (BZ 442765). #=fedoratest -Patch047: gdb-6.8-bz442765-threaded-exec-test.patch +Patch046: gdb-6.8-bz442765-threaded-exec-test.patch # Silence memcpy check which returns false positive (sparc64) #=push: But it is just a GCC workaround, look up the existing GCC PR for it. -Patch048: gdb-6.8-sparc64-silence-memcpy-check.patch +Patch047: gdb-6.8-sparc64-silence-memcpy-check.patch # Test a crash on libraries missing the .text section. #=fedoratest -Patch049: gdb-6.5-section-num-fixup-test.patch +Patch048: gdb-6.5-section-num-fixup-test.patch # Fix register assignments with no GDB stack frames (BZ 436037). #=push+jan: This fix is incorrect. -Patch050: gdb-6.8-bz436037-reg-no-longer-active.patch +Patch049: gdb-6.8-bz436037-reg-no-longer-active.patch # Test the watchpoints conditionals works. #=fedoratest -Patch051: gdb-6.8-watchpoint-conditionals-test.patch +Patch050: gdb-6.8-watchpoint-conditionals-test.patch # Fix resolving of variables at locations lists in prelinked libs (BZ 466901). #=fedoratest -Patch052: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch051: gdb-6.8-bz466901-backtrace-full-prelinked.patch # New test for step-resume breakpoint placed in multiple threads at once. #=fedoratest -Patch053: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch052: gdb-simultaneous-step-resume-breakpoint-test.patch # Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. # Fix regression of undisplayed missing shared libraries caused by a fix for. #=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> -Patch054: gdb-core-open-vdso-warning.patch +Patch053: gdb-core-open-vdso-warning.patch # Fix syscall restarts for amd64->i386 biarch. #=push+jan -Patch055: gdb-x86_64-i386-syscall-restart.patch +Patch054: gdb-x86_64-i386-syscall-restart.patch # Fix stepping with OMP parallel Fortran sections (BZ 533176). #=push+jan: It requires some better DWARF annotations. -Patch056: gdb-bz533176-fortran-omp-step.patch +Patch055: gdb-bz533176-fortran-omp-step.patch # Fix regression by python on ia64 due to stale current frame. #=push+jan -Patch057: gdb-follow-child-stale-parent.patch +Patch056: gdb-follow-child-stale-parent.patch # Workaround ccache making lineno non-zero for command-line definitions. #=fedoratest: ccache is rarely used and it is even fixed now. -Patch058: gdb-ccache-workaround.patch +Patch057: gdb-ccache-workaround.patch #=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. -Patch059: gdb-archer-pie-addons.patch +Patch058: gdb-archer-pie-addons.patch #=push+jan: Breakpoints disabling matching should not be based on address. -Patch060: gdb-archer-pie-addons-keep-disabled.patch +Patch059: gdb-archer-pie-addons-keep-disabled.patch # Testcase for "Do not make up line information" fix by Daniel Jacobowitz. #=fedoratest -Patch061: gdb-lineno-makeup-test.patch +Patch060: gdb-lineno-makeup-test.patch # Test power7 ppc disassembly. #=fedoratest -Patch062: gdb-ppc-power7-test.patch +Patch061: 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. -Patch063: gdb-bz541866-rwatch-before-run.patch +Patch062: gdb-bz541866-rwatch-before-run.patch # Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623). #=push+jan: Currently it is still not fully safe. -Patch064: gdb-moribund-utrace-workaround.patch +Patch063: gdb-moribund-utrace-workaround.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). #=fedoratest -Patch065: gdb-archer-next-over-throw-cxx-exec.patch +Patch064: gdb-archer-next-over-throw-cxx-exec.patch # Backport DWARF-4 support (BZ 601887, Tom Tromey). #=fedoratest -Patch066: gdb-bz601887-dwarf4-rh-test.patch +Patch065: gdb-bz601887-dwarf4-rh-test.patch #=push+jan -Patch067: gdb-6.6-buildid-locate-core-as-arg.patch +Patch066: gdb-6.6-buildid-locate-core-as-arg.patch # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). #=push+jan -Patch068: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch067: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). #=fedoratest -Patch069: gdb-test-bt-cfi-without-die.patch - -# Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey). -#=push: Re-check against the upstream version. -Patch070: gdb-gdb-add-index-script.patch +Patch068: 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. -Patch071: gdb-bz568248-oom-is-error.patch +Patch069: gdb-bz568248-oom-is-error.patch # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). #=fedoratest -Patch072: gdb-bz634108-solib_address.patch +Patch070: gdb-bz634108-solib_address.patch # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). #=fedoratest -Patch073: gdb-test-pid0-core.patch +Patch071: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch074: gdb-test-dw2-aranges.patch +Patch072: gdb-test-dw2-aranges.patch # [archer-keiths-expr-cumulative+upstream] Import C++ testcases. #=fedoratest -Patch075: gdb-test-expr-cumulative-archer.patch +Patch073: gdb-test-expr-cumulative-archer.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch076: gdb-physname-pr11734-test.patch +Patch074: gdb-physname-pr11734-test.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch077: gdb-physname-pr12273-test.patch +Patch075: gdb-physname-pr12273-test.patch # Toolchain on sparc is slightly broken and debuginfo files are generated # with non 64bit aligned tables/offsets. @@ -319,214 +311,200 @@ Patch077: gdb-physname-pr12273-test.patch # While we figure out what's wrong in the toolchain and do a full archive # rebuild to fix it, we need to be able to use gdb :) #=push -Patch078: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +Patch076: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). #=fedoratest -Patch079: gdb-test-ivy-bridge.patch +Patch077: gdb-test-ivy-bridge.patch # Hack for proper PIE run of the testsuite. #=fedoratest -Patch080: gdb-runtest-pie-override.patch +Patch078: gdb-runtest-pie-override.patch # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). #=push+jan -Patch081: gdb-attach-fail-reasons-5of5.patch +Patch079: gdb-attach-fail-reasons-5of5.patch # Workaround crashes from stale frame_info pointer (BZ 804256). #=push+jan -Patch082: gdb-stale-frame_info.patch +Patch080: gdb-stale-frame_info.patch # Workaround PR libc/14166 for inferior calls of strstr. #=fedora: Compatibility with RHELs (unchecked which ones). -Patch083: gdb-glibc-strstr-workaround.patch +Patch081: gdb-glibc-strstr-workaround.patch # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). #=fedoratest -Patch084: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch082: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). #=fedoratest -Patch085: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch083: 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 -Patch086: gdb-rhbz795424-bitpos-20of25.patch +Patch084: gdb-rhbz795424-bitpos-20of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch087: gdb-rhbz795424-bitpos-21of25.patch +Patch085: gdb-rhbz795424-bitpos-21of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch088: gdb-rhbz795424-bitpos-22of25.patch +Patch086: gdb-rhbz795424-bitpos-22of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch089: gdb-rhbz795424-bitpos-23of25.patch +Patch087: gdb-rhbz795424-bitpos-23of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch090: gdb-rhbz795424-bitpos-25of25.patch +Patch088: gdb-rhbz795424-bitpos-25of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch091: gdb-rhbz795424-bitpos-25of25-test.patch +Patch089: gdb-rhbz795424-bitpos-25of25-test.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch092: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch090: gdb-rhbz795424-bitpos-lazyvalue.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 -Patch093: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch091: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). #=push+jan -Patch094: gdb-gnat-dwarf-crash-3of3.patch +Patch092: gdb-gnat-dwarf-crash-3of3.patch # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) #=fedoratest -Patch095: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch093: 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 -Patch096: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch094: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch #=fedoratest -Patch097: gdb-archer-vla-tests.patch +Patch095: gdb-archer-vla-tests.patch #=fedoratest -Patch098: gdb-vla-intel-tests.patch +Patch096: gdb-vla-intel-tests.patch # Continue backtrace even if a frame filter throws an exception (Phil Muldoon). #=push -Patch099: gdb-btrobust.patch +Patch097: gdb-btrobust.patch # Display Fortran strings in backtraces. #=fedoratest -Patch100: gdb-fortran-frame-string.patch +Patch098: gdb-fortran-frame-string.patch # Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). #=push -Patch101: gdb-python-gil.patch +Patch099: gdb-python-gil.patch # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # crash.' (RH BZ 1156192). #=fedoratest -Patch102: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch100: gdb-rhbz1156192-recursive-dlopen-test.patch # Fix jit-reader.h for multi-lib. #=push+jan -Patch103: gdb-jit-reader-multilib.patch +Patch101: gdb-jit-reader-multilib.patch # Fix '`catch syscall' doesn't work for parent after `fork' is called' # (Philippe Waroquiers, RH BZ 1149205). #=fedoratest -Patch104: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch102: 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 -Patch105: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch103: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch # Test 'info type-printers' Python error (RH BZ 1350436). #=fedoratest -Patch106: gdb-rhbz1350436-type-printers-error.patch +Patch104: gdb-rhbz1350436-type-printers-error.patch # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Kratochvil, RH BZ 1084404). #=fedoratest -Patch107: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch105: 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 -Patch108: gdb-bz1219747-attach-kills.patch +Patch106: gdb-bz1219747-attach-kills.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). #=push+jan -Patch109: gdb-fedora-libncursesw.patch +Patch107: gdb-fedora-libncursesw.patch # Test clflushopt instruction decode (for RH BZ 1262471). #=fedoratest -Patch110: gdb-opcodes-clflushopt-test.patch +Patch108: gdb-opcodes-clflushopt-test.patch # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). #=fedora -Patch111: gdb-dts-rhel6-python-compat.patch +Patch109: gdb-dts-rhel6-python-compat.patch # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). #=push+jan -Patch112: gdb-6.6-buildid-locate-rpm-scl.patch +Patch110: gdb-6.6-buildid-locate-rpm-scl.patch # Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131). #=fedora -Patch113: gdb-readline62-ask-more-rh.patch - -# [RHEL5,RHEL6] Fix attaching to stopped processes. -# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). -#=fedora -Patch114: gdb-6.8-attach-signalled-detach-stopped.patch +Patch111: 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 . -Patch115: gdb-6.8-quit-never-aborts.patch +Patch112: gdb-6.8-quit-never-aborts.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=fedoratest -Patch116: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch113: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). #=fedora -Patch117: gdb-container-rh-pkg.patch +Patch114: gdb-container-rh-pkg.patch # New test for Python "Cannot locate object file for block" (for RH BZ 1325795). #=fedoratest -Patch118: gdb-rhbz1325795-framefilters-test.patch +Patch115: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). #=fedora -Patch119: gdb-linux_perf-bundle.patch +Patch116: gdb-linux_perf-bundle.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). #=fedora -Patch120: gdb-libexec-add-index.patch +Patch117: gdb-libexec-add-index.patch # New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). #=fedoratest -Patch121: gdb-rhbz1398387-tab-crash-test.patch +Patch118: gdb-rhbz1398387-tab-crash-test.patch # [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). #=fedoratest -Patch122: gdb-testsuite-readline63-sigint.patch +Patch119: gdb-testsuite-readline63-sigint.patch # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher #=push -Patch123: gdb-archer.patch +Patch120: gdb-archer.patch # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd -Patch124: gdb-vla-intel-fix-print-char-array.patch - -# Fix -D_GLIBCXX_DEBUG gdb-add-index regression (RH BZ 1540559). -Patch125: gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch - -# Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare. -Patch126: gdb-ppc64-stwux-tautological-compare.patch +Patch121: gdb-vla-intel-fix-print-char-array.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch127: gdb-rhbz1553104-s390x-arch12-test.patch - -# [aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993). -Patch128: gdb-rhbz1347993-aarch64-hw-watchpoint.patch +Patch122: gdb-rhbz1553104-s390x-arch12-test.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index aa4fb19..131cf93 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -120,9 +120,3 @@ %patch120 -p1 %patch121 -p1 %patch122 -p1 -%patch123 -p1 -%patch124 -p1 -%patch125 -p1 -%patch126 -p1 -%patch127 -p1 -%patch128 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index b9863e0..e853d25 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -b755db3c98137baaff8a154d936d326d9a9c72a7 +75d74ccace05f6166a45dbaa352abf753891d3be diff --git a/_patch_order b/_patch_order index 866bcc4..aaec704 100644 --- a/_patch_order +++ b/_patch_order @@ -27,7 +27,6 @@ gdb-6.3-bz140532-ppc-unwinding-test.patch gdb-6.3-bz202689-exec-from-pthread-test.patch gdb-6.6-bz230000-power6-disassembly-test.patch gdb-6.6-bz229517-gcore-without-terminal.patch -gdb-6.6-bz235197-fork-detach-info.patch gdb-6.6-testsuite-timeouts.patch gdb-6.6-bz237572-ppc-atomic-sequence-test.patch gdb-6.6-scheduler_locking-step-is-default.patch @@ -67,7 +66,6 @@ gdb-bz601887-dwarf4-rh-test.patch gdb-6.6-buildid-locate-core-as-arg.patch gdb-6.6-buildid-locate-rpm-librpm-workaround.patch gdb-test-bt-cfi-without-die.patch -gdb-gdb-add-index-script.patch gdb-bz568248-oom-is-error.patch gdb-bz634108-solib_address.patch gdb-test-pid0-core.patch @@ -111,7 +109,6 @@ gdb-opcodes-clflushopt-test.patch gdb-dts-rhel6-python-compat.patch gdb-6.6-buildid-locate-rpm-scl.patch gdb-readline62-ask-more-rh.patch -gdb-6.8-attach-signalled-detach-stopped.patch gdb-6.8-quit-never-aborts.patch gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch gdb-container-rh-pkg.patch @@ -122,7 +119,4 @@ gdb-rhbz1398387-tab-crash-test.patch gdb-testsuite-readline63-sigint.patch gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch -gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch -gdb-ppc64-stwux-tautological-compare.patch gdb-rhbz1553104-s390x-arch12-test.patch -gdb-rhbz1347993-aarch64-hw-watchpoint.patch diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index 95c72d9..449b7db 100644 --- a/gdb-6.3-gstack-20050411.patch +++ b/gdb-6.3-gstack-20050411.patch @@ -16,10 +16,10 @@ FileName: gdb-6.3-gstack-20050411.patch * gstack.sh, gstack.1: New files. diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index 17b71c6e7c..e77d6a5c03 100644 +index 09a2ad2ca3..1ea7a36c69 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1744,7 +1744,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force +@@ -1727,7 +1727,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -28,7 +28,7 @@ index 17b71c6e7c..e77d6a5c03 100644 transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1784,7 +1784,25 @@ install-guile: +@@ -1776,7 +1776,25 @@ install-guile: install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -55,7 +55,7 @@ index 17b71c6e7c..e77d6a5c03 100644 transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -1799,6 +1817,18 @@ uninstall: force $(CONFIG_UNINSTALL) fi @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do diff --git a/gdb-6.3-ppc64displaysymbol-20041124.patch b/gdb-6.3-ppc64displaysymbol-20041124.patch index b39fb8c..7e5a4fd 100644 --- a/gdb-6.3-ppc64displaysymbol-20041124.patch +++ b/gdb-6.3-ppc64displaysymbol-20041124.patch @@ -15,10 +15,10 @@ FileName: gdb-6.3-ppc64displaysymbol-20041124.patch address. diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index 6256f35baa..c52e39f7fc 100644 +index 0dfea34753..82fe1db9a7 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -602,6 +602,14 @@ build_address_symbolic (struct gdbarch *gdbarch, +@@ -600,6 +600,14 @@ build_address_symbolic (struct gdbarch *gdbarch, addr = overlay_mapped_address (addr, section); } } diff --git a/gdb-6.3-ppc64syscall-20040622.patch b/gdb-6.3-ppc64syscall-20040622.patch index 8feaa0c..1bdc4b8 100644 --- a/gdb-6.3-ppc64syscall-20040622.patch +++ b/gdb-6.3-ppc64syscall-20040622.patch @@ -17,7 +17,7 @@ FileName: gdb-6.3-ppc64syscall-20040622.patch "func_start". diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c -index e5a265dbcb..23d0db3b8f 100644 +index c5b49c5f46..4d1a241cdf 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -134,6 +134,7 @@ static const char *powerpc_vector_abi_string = "auto"; @@ -28,7 +28,7 @@ index e5a265dbcb..23d0db3b8f 100644 int offset; /* total size of frame --- the distance by which we decrement sp to allocate the frame */ -@@ -1577,7 +1578,6 @@ static CORE_ADDR +@@ -1610,7 +1611,6 @@ static CORE_ADDR skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { @@ -36,7 +36,7 @@ index e5a265dbcb..23d0db3b8f 100644 CORE_ADDR last_prologue_pc = pc; CORE_ADDR li_found_pc = 0; gdb_byte buf[4]; -@@ -1595,12 +1595,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, +@@ -1629,12 +1629,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, int minimal_toc_loaded = 0; int prev_insn_was_prologue_insn = 1; int num_skip_non_prologue_insns = 0; @@ -51,7 +51,7 @@ index e5a265dbcb..23d0db3b8f 100644 fdata->saved_gpr = -1; fdata->saved_fpr = -1; fdata->saved_vr = -1; -@@ -1634,6 +1636,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, +@@ -1668,6 +1670,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, break; op = extract_unsigned_integer (buf, 4, byte_order); @@ -107,7 +107,7 @@ index e5a265dbcb..23d0db3b8f 100644 if ((op & 0xfc1fffff) == 0x7c0802a6) { /* mflr Rx */ /* Since shared library / PIC code, which needs to get its -@@ -1825,9 +1876,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, +@@ -1857,9 +1908,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, we have no line table information or the line info tells us that the subroutine call is not part of the line associated with the prologue. */ diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index 3d3a99f..bb7c408 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -24,15 +24,15 @@ FileName: gdb-6.3-readnever-20050907.patch Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html diff --git a/gdb/gcore.in b/gdb/gcore.in -index b7f57cd341..c7e0dec574 100644 +index 233c00d366..009e4181dd 100644 --- a/gdb/gcore.in +++ b/gdb/gcore.in -@@ -97,7 +97,7 @@ for pid in $* +@@ -97,7 +97,7 @@ for pid in "$@" do # ` DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index c52e39f7fc..ad80b1bebf 100644 +index 82fe1db9a7..c921022a59 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -1210,6 +1210,10 @@ print_command_1 (const char *exp, int voidprint) +@@ -1203,6 +1203,10 @@ print_command_1 (const char *exp, int voidprint) if (exp && *exp) { diff --git a/gdb-6.5-bz203661-emit-relocs.patch b/gdb-6.5-bz203661-emit-relocs.patch index df02401..dd2db52 100644 --- a/gdb-6.5-bz203661-emit-relocs.patch +++ b/gdb-6.5-bz203661-emit-relocs.patch @@ -9,10 +9,10 @@ FileName: gdb-6.5-bz203661-emit-relocs.patch ;;=push+jan: There was some mail thread about it, this patch may be a hack. diff --git a/gdb/symfile.c b/gdb/symfile.c -index f7f75b05d3..7cda615e74 100644 +index 7bc03fbb8f..661125dec5 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c -@@ -3629,6 +3629,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp, +@@ -3492,6 +3492,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp, DWO file. */ bfd *abfd = sectp->owner; diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index f238022..d98cdcb 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -128,10 +128,10 @@ index 2bd3d31b75..2623bae42d 100644 set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc); diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c -index 7b2851f0a6..7c70792b3f 100644 +index d555465c2f..186690af30 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -2595,6 +2595,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2597,6 +2597,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -139,7 +139,7 @@ index 7b2851f0a6..7c70792b3f 100644 if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2603,6 +2604,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2605,6 +2606,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, if (cache->base == 0) return UNWIND_OUTERMOST; @@ -150,7 +150,7 @@ index 7b2851f0a6..7c70792b3f 100644 return UNWIND_NO_REASON; } -@@ -2737,6 +2742,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2739,6 +2744,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_sigtramp_frame_cache (this_frame, this_cache); @@ -158,7 +158,7 @@ index 7b2851f0a6..7c70792b3f 100644 if (!cache->base_p) (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); -@@ -2745,6 +2751,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2747,6 +2753,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, /* This marks the outermost frame. */ return; } @@ -171,10 +171,10 @@ index 7b2851f0a6..7c70792b3f 100644 (*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame)); } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c -index 9ce329eb20..d1b461b538 100644 +index 646f305edc..a0e872c01f 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8401,6 +8401,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -8428,6 +8428,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->xsave_xcr0_offset = -1; @@ -183,9 +183,9 @@ index 9ce329eb20..d1b461b538 100644 + tdep->record_regmap = i386_record_regmap; - set_gdbarch_long_long_align_bit (gdbarch, 32); + set_gdbarch_type_align (gdbarch, i386_type_align); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h -index a71c103a88..5ee336b8cb 100644 +index 81a93f11af..461ae06258 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -251,6 +251,9 @@ struct gdbarch_tdep diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch index 75eac7a..fc5ca9a 100644 --- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch @@ -11,10 +11,10 @@ FileName: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 diff --git a/gdb/symtab.c b/gdb/symtab.c -index 81f4fc9ec5..a7e8431cfe 100644 +index e1f033d1d8..1d9e0b9180 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c -@@ -3166,6 +3166,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) +@@ -3165,6 +3165,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) SYMBOL_LINKAGE_NAME (msymbol)); */ ; /* fall through */ diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index 7e11279..b9c8788 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -78,18 +78,18 @@ index 15c85e28ab..9fe2375bce 100644 NR_ERRORS }; diff --git a/gdb/exec.c b/gdb/exec.c -index c8c32ecc27..b329e2b834 100644 +index 3023ff7e5a..8308ec3d6f 100644 --- a/gdb/exec.c +++ b/gdb/exec.c -@@ -35,6 +35,7 @@ - #include "progspace.h" +@@ -36,6 +36,7 @@ #include "gdb_bfd.h" #include "gcore.h" + #include "source.h" +#include "exceptions.h" #include #include "readline/readline.h" -@@ -346,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty) +@@ -357,12 +358,27 @@ exec_file_attach (const char *filename, int from_tty) if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -121,10 +121,10 @@ index c8c32ecc27..b329e2b834 100644 if (build_section_table (exec_bfd, §ions, §ions_end)) diff --git a/gdb/main.c b/gdb/main.c -index 3c98787edb..17d35f4a8a 100644 +index 189266f90e..4caefe2011 100644 --- a/gdb/main.c +++ b/gdb/main.c -@@ -446,6 +446,37 @@ struct cmdarg +@@ -447,6 +447,37 @@ struct cmdarg char *string; }; @@ -162,7 +162,7 @@ index 3c98787edb..17d35f4a8a 100644 static void captured_main_1 (struct captured_main_args *context) { -@@ -882,6 +913,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -883,6 +914,8 @@ captured_main_1 (struct captured_main_args *context) { symarg = argv[optind]; execarg = argv[optind]; @@ -171,7 +171,7 @@ index 3c98787edb..17d35f4a8a 100644 optind++; } -@@ -1032,11 +1065,25 @@ captured_main_1 (struct captured_main_args *context) +@@ -1033,11 +1066,25 @@ captured_main_1 (struct captured_main_args *context) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch index 33d06f4..543a3ba 100644 --- a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +++ b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch @@ -28,10 +28,10 @@ Comments by Sergio Durigan Junior : valid and doesn't print the necessary warning ("Try: yum install ..."). diff --git a/gdb/build-id.c b/gdb/build-id.c -index 409a5b8c54..e2c1e81266 100644 +index 4e1477e950..5af9d66899 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -592,7 +592,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, +@@ -581,7 +581,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, do_cleanups (inner); if (abfd == NULL) diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index 066305e..89dd35d 100644 --- a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +++ b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -9,10 +9,10 @@ FileName: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch ;;=push+jan diff --git a/gdb/build-id.c b/gdb/build-id.c -index d60cf622dc..409a5b8c54 100644 +index 39e741cf58..4e1477e950 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -678,6 +678,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -652,6 +652,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) #include #endif diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index c25ee1b..dc6da5f 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -12,10 +12,10 @@ warning: Skipping deprecated .gdb_index section https://bugzilla.redhat.com/show_bug.cgi?id=953585 diff --git a/gdb/build-id.c b/gdb/build-id.c -index e2c1e81266..1b75530f91 100644 +index 5af9d66899..2ff93191c7 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -715,7 +715,11 @@ static int missing_rpm_list_entries; +@@ -689,7 +689,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -27,7 +27,7 @@ index e2c1e81266..1b75530f91 100644 { static int rpm_init_done = 0; rpmts ts; -@@ -822,7 +826,11 @@ missing_rpm_enlist (const char *filename) +@@ -796,7 +800,11 @@ missing_rpm_enlist (const char *filename) mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -39,7 +39,7 @@ index e2c1e81266..1b75530f91 100644 { Header h; char *debuginfo, **slot, *s, *s2; -@@ -940,6 +948,37 @@ missing_rpm_enlist (const char *filename) +@@ -914,6 +922,37 @@ missing_rpm_enlist (const char *filename) xfree (debuginfo); count++; } @@ -77,7 +77,7 @@ index e2c1e81266..1b75530f91 100644 rpmdbFreeIterator_p (mi); } -@@ -950,6 +989,21 @@ missing_rpm_enlist (const char *filename) +@@ -924,6 +963,21 @@ missing_rpm_enlist (const char *filename) } static int @@ -100,10 +100,10 @@ index e2c1e81266..1b75530f91 100644 { return strcoll (*ap, *bp); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 2c972d5e74..64329af71e 100644 +index 328a07df82..45c22450b1 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -3725,6 +3725,16 @@ read_index_from_section (struct objfile *objfile, +@@ -3478,6 +3478,16 @@ read_index_from_section (struct objfile *objfile, "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { @@ -120,7 +120,7 @@ index 2c972d5e74..64329af71e 100644 static int warning_printed = 0; if (!warning_printed) { -@@ -3736,6 +3746,10 @@ to use the section anyway."), +@@ -3489,6 +3499,10 @@ to use the section anyway."), warning_printed = 1; } return 0; diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 680c773..da8f81d 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -234,7 +234,7 @@ index e0d38ea267..da5ac313e3 100644 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. diff --git a/gdb/build-id.c b/gdb/build-id.c -index 5740628386..d60cf622dc 100644 +index 7b9cbca14e..39e741cf58 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -35,6 +35,8 @@ @@ -246,7 +246,7 @@ index 5740628386..d60cf622dc 100644 #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -666,8 +668,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -640,8 +642,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) return result; } @@ -614,7 +614,7 @@ index 5740628386..d60cf622dc 100644 avoidance. */ struct missing_filepair -@@ -721,11 +1081,17 @@ missing_filepair_change (void) +@@ -695,11 +1055,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -632,7 +632,7 @@ index 5740628386..d60cf622dc 100644 missing_filepair_change (); } -@@ -792,14 +1158,39 @@ debug_print_missing (const char *binary, const char *debug) +@@ -766,14 +1132,39 @@ debug_print_missing (const char *binary, const char *debug) *slot = missing_filepair; @@ -680,7 +680,7 @@ index 5740628386..d60cf622dc 100644 /* See build-id.h. */ diff --git a/gdb/config.in b/gdb/config.in -index 1d11a97080..edd7028f76 100644 +index aa46f07410..404e0bbddc 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -33,6 +33,9 @@ @@ -693,7 +693,7 @@ index 1d11a97080..edd7028f76 100644 /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -264,6 +267,9 @@ +@@ -270,6 +273,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -704,7 +704,7 @@ index 1d11a97080..edd7028f76 100644 #undef HAVE_LIBUNWIND_IA64_H diff --git a/gdb/configure b/gdb/configure -index 092893d757..1cecdbc3b5 100755 +index 4186f7e160..30a6e86ff8 100755 --- a/gdb/configure +++ b/gdb/configure @@ -716,6 +716,11 @@ PKGVERSION @@ -762,7 +762,7 @@ index 092893d757..1cecdbc3b5 100755 YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. -@@ -6486,6 +6506,494 @@ _ACEOF +@@ -6492,6 +6512,494 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -1258,7 +1258,7 @@ index 092893d757..1cecdbc3b5 100755 subdirs="$subdirs testsuite" diff --git a/gdb/configure.ac b/gdb/configure.ac -index d4133ea71e..e232c1adcb 100644 +index e1f630cd38..39a777f647 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -167,6 +167,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, @@ -1462,10 +1462,10 @@ index d4133ea71e..e232c1adcb 100644 # Check whether to support alternative target configurations diff --git a/gdb/corelow.c b/gdb/corelow.c -index c5b642db81..6e027c12e2 100644 +index 76945950b9..4481128156 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c -@@ -309,7 +309,7 @@ build_id_locate_exec (int from_tty) +@@ -368,7 +368,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else @@ -1475,7 +1475,7 @@ index c5b642db81..6e027c12e2 100644 do_cleanups (back_to); diff --git a/gdb/event-top.c b/gdb/event-top.c -index 0c1528e5eb..0d668f35e0 100644 +index 5852089f09..d9379b42c5 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -40,6 +40,7 @@ @@ -1508,10 +1508,10 @@ index 0c1528e5eb..0d668f35e0 100644 } diff --git a/gdb/symfile.h b/gdb/symfile.h -index 0d51f46d78..82c76431e1 100644 +index dbd0370cf9..adcf1fdaae 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -546,6 +546,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, +@@ -538,6 +538,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, /* build-id support. */ extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); extern void debug_print_missing (const char *binary, const char *debug); diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index 78aa93c..40b4071 100644 --- a/gdb-6.6-buildid-locate-solib-missing-ids.patch +++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -14,22 +14,22 @@ gdb returns an incorrect back trace when applying a debuginfo https://bugzilla.redhat.com/show_bug.cgi?id=1339862 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c -index a3399ad8f7..d7eeb6350d 100644 +index aa95bc1ce6..9a7ef10963 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c -@@ -1387,14 +1387,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1358,14 +1358,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, } { - struct bfd_build_id *build_id; + struct bfd_build_id *build_id = NULL; - strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); + strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; /* May get overwritten below. */ strcpy (newobj->so_name, newobj->so_original_name); -- build_id = build_id_addr_get (newobj->lm_info->l_ld); +- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld); + /* In the case the main executable was found according to its build-id + (from a core file) prevent loading a different build of a library + with accidentally the same SO_NAME. @@ -47,7 +47,7 @@ index a3399ad8f7..d7eeb6350d 100644 if (build_id != NULL) { char *name, *build_id_filename; -@@ -1409,23 +1422,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1380,23 +1393,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, xfree (name); } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index cb02312..c2b4209 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -9,7 +9,7 @@ FileName: gdb-6.6-buildid-locate.patch ;;=push+jan diff --git a/gdb/build-id.c b/gdb/build-id.c -index 945da4f3cf..5740628386 100644 +index c8eacbd1e8..7b9cbca14e 100644 --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -26,11 +26,67 @@ @@ -19,7 +19,7 @@ index 945da4f3cf..5740628386 100644 +#include "libbfd.h" +#include "gdbcore.h" +#include "gdbcmd.h" -+#include "observer.h" ++#include "observable.h" +#include "elf/external.h" +#include "elf/internal.h" +#include "elf/common.h" @@ -439,7 +439,7 @@ index 945da4f3cf..5740628386 100644 if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), -@@ -65,23 +463,54 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) +@@ -65,11 +463,50 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) return retval; } @@ -484,84 +484,80 @@ index 945da4f3cf..5740628386 100644 +build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, + char **link_return, int add_debug_suffix) { -- char *link, *debugdir; -+ char *link, *debugdir, *link_all = NULL; - VEC (char_ptr) *debugdir_vec; - struct cleanup *back_to; - int ix; ++ char *debugdir; ++ std::string link, link_all; ++ struct cleanup *back_to; ++ int ix; gdb_bfd_ref_ptr abfd; -- int alloc_len; - - /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */ -- alloc_len = (strlen (debug_file_directory) -- + (sizeof "/.build-id/" - 1) + 1 -- + 2 * build_id_len + (sizeof ".debug" - 1) + 1); -- link = (char *) alloca (alloc_len); -+ link = (char *) xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50); /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will - cause "/.build-id/..." lookups. */ -@@ -94,9 +523,12 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) - size_t debugdir_len = strlen (debugdir); +@@ -82,63 +519,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) + { const gdb_byte *data = build_id; size_t size = build_id_len; -- char *s; - char *filename = NULL; - struct cleanup *inner; ++ char *filename = NULL; ++ struct cleanup *inner; + unsigned seqno; + struct stat statbuf_trash; -+ /* Initialize it just to avoid a GCC false warning. */ -+ char *s, *link0 = NULL, *link0_resolved; ++ std::string link0; - memcpy (link, debugdir, debugdir_len); - s = &link[debugdir_len]; -@@ -110,52 +542,299 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) - *s++ = '/'; +- std::string link = debugdir.get (); ++ link = debugdir.get (); + link += "/.build-id/"; + + if (size > 0) + { + size--; +- string_appendf (link, "%02x/", (unsigned) *data++); ++ string_appendf (link, "%02x", (unsigned) *data++); + } +- ++ if (size > 0) ++ link += "/"; while (size-- > 0) - s += sprintf (s, "%02x", (unsigned) *data++); -- strcpy (s, ".debug"); + string_appendf (link, "%02x", (unsigned) *data++); +- link += ".debug"; +- if (separate_debug_file_debug) - printf_unfiltered (_(" Trying %s\n"), link); + printf_unfiltered (_(" Trying %s\n"), link.c_str ()); - /* lrealpath() is expensive even for the usually non-existent files. */ -- if (access (link, F_OK) == 0) -- filename = lrealpath (link); +- gdb::unique_xmalloc_ptr filename; +- if (access (link.c_str (), F_OK) == 0) +- filename.reset (lrealpath (link.c_str ())); +- +- if (filename == NULL) +- continue; + for (seqno = 0;; seqno++) + { -+ char *s2; -+ + if (seqno) + { + /* There can be multiple build-id symlinks pointing to real files + with the same build-id (such as hard links). Some of the real + files may not be installed. */ + -+ s2 = s + sprintf (s, ".%u", seqno); ++ string_appendf (link, ".%u", seqno); + } -+ else -+ s2 = s; + + if (add_debug_suffix) -+ strcpy (s2, ".debug"); -+ else -+ *s2 = 0; ++ link += ".debug"; + + if (!seqno) + { + /* If none of the real files is found report as missing file + always the non-.%u-suffixed file. */ -+ link0 = xstrdup (link); ++ link0 = link; + } + + /* `access' automatically dereferences LINK. */ -+ if (lstat (link, &statbuf_trash) != 0) ++ if (lstat (link.c_str (), &statbuf_trash) != 0) + { + /* Stop increasing SEQNO. */ + break; + } + -+ filename = lrealpath (link); ++ filename = lrealpath (link.c_str ()); + if (filename == NULL) + continue; + @@ -581,65 +577,46 @@ index 945da4f3cf..5740628386 100644 + filename = NULL; + } -- if (filename == NULL) -- continue; +- /* We expect to be silent on the non-existing files. */ +- abfd = gdb_bfd_open (filename.get (), gnutarget, -1); + if (filename != NULL) + { + /* LINK_ALL is not used below in this non-NULL FILENAME case. */ -+ xfree (link0); + break; + } -- /* We expect to be silent on the non-existing files. */ -- inner = make_cleanup (xfree, filename); -- abfd = gdb_bfd_open (filename, gnutarget, -1); -- do_cleanups (inner); +- if (abfd == NULL) +- continue; + /* 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 */ -+ link0_resolved = link_resolve (link0, 0); -+ xfree (link0); - -- if (abfd == NULL) -- continue; -+ if (link_all == NULL) -+ link_all = link0_resolved; -+ else -+ { -+ size_t len_orig = strlen (link_all); ++ std::string link0_resolved (link_resolve (link0.c_str (), 0)); - if (build_id_verify (abfd.get(), build_id_len, build_id)) - break; -+ link_all = (char *) xrealloc (link_all, -+ len_orig + 1 + strlen (link0_resolved) + 1); - -- abfd.release (); ++ if (link_all.empty ()) ++ link_all = link0_resolved; ++ else ++ { + /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with + its possible use as an argument for installation command. */ -+ link_all[len_orig] = ' '; -+ -+ strcpy (&link_all[len_orig + 1], link0_resolved); -+ xfree (link0_resolved); ++ link_all += " " + link0_resolved; + } + } -+ + +- abfd.release (); + if (link_return != NULL) + { + if (abfd != NULL) + { -+ *link_return = link; -+ link = NULL; ++ *link_return = xstrdup (link.c_str ()); + } + else + { -+ *link_return = link_all; -+ link_all = NULL; ++ *link_return = xstrdup (link_all.c_str ()); + } } -+ xfree (link); -+ xfree (link_all); - do_cleanups (back_to); return abfd; } @@ -796,7 +773,7 @@ index 945da4f3cf..5740628386 100644 + /* See build-id.h. */ - char * + std::string -find_separate_debug_file_by_buildid (struct objfile *objfile) +find_separate_debug_file_by_buildid (struct objfile *objfile, + gdb::unique_xmalloc_ptr *build_id_filename_return) @@ -833,9 +810,9 @@ index 945da4f3cf..5740628386 100644 /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd.get ()), -@@ -167,3 +846,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) - } - return NULL; +@@ -151,3 +821,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) + + return std::string (); } + +extern void _initialize_build_id (void); @@ -853,10 +830,10 @@ index 945da4f3cf..5740628386 100644 + show_build_id_verbose, + &setlist, &showlist); + -+ observer_attach_executable_changed (debug_print_executable_changed); ++ gdb::observers::executable_changed.attach (debug_print_executable_changed); +} diff --git a/gdb/build-id.h b/gdb/build-id.h -index 0f13c7d4cf..2d105dba88 100644 +index 15fb609409..1f62db0239 100644 --- a/gdb/build-id.h +++ b/gdb/build-id.h @@ -22,9 +22,10 @@ @@ -872,7 +849,7 @@ index 0f13c7d4cf..2d105dba88 100644 /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. Otherwise, issue a warning and return false. */ -@@ -38,13 +39,19 @@ extern int build_id_verify (bfd *abfd, +@@ -38,13 +39,18 @@ extern int build_id_verify (bfd *abfd, the caller. */ extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len, @@ -885,30 +862,31 @@ index 0f13c7d4cf..2d105dba88 100644 + char **link_return); /* Find the separate debug file for OBJFILE, by using the build-id - associated with OBJFILE's BFD. If successful, returns a malloc'd - file name for the separate debug file. The caller must free this. - Otherwise, returns NULL. */ + associated with OBJFILE's BFD. If successful, returns the file name for the + separate debug file, otherwise, return an empty string. */ --extern char *find_separate_debug_file_by_buildid (struct objfile *objfile); -+extern char *find_separate_debug_file_by_buildid (struct objfile *objfile, +-extern std::string find_separate_debug_file_by_buildid +- (struct objfile *objfile); ++extern std::string find_separate_debug_file_by_buildid (struct objfile *objfile, + gdb::unique_xmalloc_ptr *build_id_filename_return); #endif /* BUILD_ID_H */ diff --git a/gdb/coffread.c b/gdb/coffread.c -index fbbbb68f71..9698ec2191 100644 +index f24ec0713a..5c1c3e61ea 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -735,7 +735,7 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -733,7 +733,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) + /* Try to add separate debug file if no symbols table found. */ + if (!objfile_has_partial_symbols (objfile)) { - char *debugfile; +- std::string debugfile = find_separate_debug_file_by_buildid (objfile); ++ std::string debugfile = find_separate_debug_file_by_buildid (objfile, ++ NULL); -- debugfile = find_separate_debug_file_by_buildid (objfile); -+ debugfile = find_separate_debug_file_by_buildid (objfile, NULL); - - if (debugfile == NULL) + if (debugfile.empty ()) debugfile = find_separate_debug_file_by_debuglink (objfile); diff --git a/gdb/corelow.c b/gdb/corelow.c -index 3a5256cb17..c5b642db81 100644 +index c6175279da..76945950b9 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -45,6 +45,10 @@ @@ -922,7 +900,7 @@ index 3a5256cb17..c5b642db81 100644 #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -264,6 +268,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg) +@@ -323,6 +327,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg) inferior_ptid = ptid; /* Yes, make it current. */ } @@ -940,7 +918,7 @@ index 3a5256cb17..c5b642db81 100644 + if (exec_bfd != NULL || symfile_objfile != NULL) + return; + -+ if (target_auxv_search (¤t_target, AT_ENTRY, &at_entry) <= 0) ++ if (target_auxv_search (target_stack, AT_ENTRY, &at_entry) <= 0) + return; + + build_id = build_id_addr_get (at_entry); @@ -974,10 +952,10 @@ index 3a5256cb17..c5b642db81 100644 + /* No automatic SOLIB_ADD as the libraries would get read twice. */ +} + - /* This routine opens and sets up the core file bfd. */ + /* Issue a message saying we have no core to debug, if FROM_TTY. */ static void -@@ -391,6 +443,14 @@ core_open (const char *arg, int from_tty) +@@ -466,6 +518,14 @@ core_target_open (const char *arg, int from_tty) switch_to_thread (thread->ptid); } @@ -989,13 +967,13 @@ index 3a5256cb17..c5b642db81 100644 + if (build_id_core_loads != 0) + build_id_locate_exec (from_tty); + - post_create_inferior (&core_ops, from_tty); + post_create_inferior (target, from_tty); /* Now go through the target stack looking for threads since there -@@ -1040,4 +1100,11 @@ _initialize_corelow (void) - init_core_ops (); - - add_target_with_completer (&core_ops, filename_completer); +@@ -1068,4 +1128,11 @@ void + _initialize_corelow (void) + { + add_target (core_target_info, core_target_open, filename_completer); + + add_setshow_boolean_cmd ("build-id-core-loads", class_files, + &build_id_core_loads, _("\ @@ -1005,10 +983,10 @@ index 3a5256cb17..c5b642db81 100644 + &setlist, &showlist); } diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index 8bdafb0ba4..2f2cbd3dea 100644 +index 28f083f96e..403f5ca658 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -19447,6 +19447,27 @@ information files. +@@ -19558,6 +19558,27 @@ information files. @end table @@ -1037,10 +1015,10 @@ index 8bdafb0ba4..2f2cbd3dea 100644 @cindex debug link sections A debug link is a special section of the executable file named diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 98e7d842f0..c8db955f2f 100644 +index 4006f4a48f..266740f74c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2907,7 +2907,7 @@ dwarf2_get_dwz_file (void) +@@ -2690,7 +2690,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) } if (dwz_bfd == NULL) @@ -1050,22 +1028,22 @@ index 98e7d842f0..c8db955f2f 100644 if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), diff --git a/gdb/elfread.c b/gdb/elfread.c -index 103b2144c3..fb32e03af5 100644 +index b4b4a1b24c..0824e37bf1 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c -@@ -1259,8 +1259,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1290,7 +1290,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { +- std::string debugfile = find_separate_debug_file_by_buildid (objfile); + gdb::unique_xmalloc_ptr build_id_filename; - gdb::unique_xmalloc_ptr debugfile -- (find_separate_debug_file_by_buildid (objfile)); -+ (find_separate_debug_file_by_buildid (objfile, &build_id_filename)); ++ std::string debugfile ++ = find_separate_debug_file_by_buildid (objfile, &build_id_filename); - if (debugfile == NULL) - debugfile.reset (find_separate_debug_file_by_debuglink (objfile)); -@@ -1272,6 +1273,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) - symbol_file_add_separate (abfd.get (), debugfile.get (), + if (debugfile.empty ()) + debugfile = find_separate_debug_file_by_debuglink (objfile); +@@ -1302,6 +1304,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) + symbol_file_add_separate (abfd.get (), debugfile.c_str (), symfile_flags, objfile); } + /* Check if any separate debug info has been extracted out. */ @@ -1113,7 +1091,7 @@ index c2b40ff535..112cbf6560 100644 continue; if (objfpy_build_id_matches (obfd_build_id, build_id)) diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c -index 4973cc2f25..a3399ad8f7 100644 +index f9936b36de..aa95bc1ce6 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -45,6 +45,7 @@ @@ -1124,22 +1102,22 @@ index 4973cc2f25..a3399ad8f7 100644 static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1385,9 +1386,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1356,9 +1357,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, continue; } -- strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); +- strncpy (newobj->so_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); - newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; - strcpy (newobj->so_original_name, newobj->so_name); + { + struct bfd_build_id *build_id; + -+ strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1); ++ strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1); + newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; + /* May get overwritten below. */ + strcpy (newobj->so_name, newobj->so_original_name); + -+ build_id = build_id_addr_get (newobj->lm_info->l_ld); ++ build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld); + if (build_id != NULL) + { + char *name, *build_id_filename; @@ -1176,15 +1154,14 @@ index 4973cc2f25..a3399ad8f7 100644 + xfree (build_id); + } + } -+ - xfree (buffer); /* If this entry has no name, or its name matches the name + for the main executable, don't include it in the list. */ diff --git a/gdb/symfile.h b/gdb/symfile.h -index 7c3fd8240a..0d51f46d78 100644 +index d9185092ee..dbd0370cf9 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -543,6 +543,10 @@ void expand_symtabs_matching +@@ -535,6 +535,10 @@ void expand_symtabs_matching void map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname); @@ -1246,7 +1223,7 @@ index a6dc14e3c9..54a10df155 100644 append options " -ex \"b $bpline\"" append options " -ex \"run\"" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index 7702d9c238..a165bf0938 100644 +index 0f05d043f2..becda6a001 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1694,6 +1694,16 @@ proc default_gdb_start { } { @@ -1267,7 +1244,7 @@ index 7702d9c238..a165bf0938 100644 } diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp -index 2846da74e4..004c3e6c1c 100644 +index 851e490f4d..469ca592ab 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } { diff --git a/gdb-6.6-bz235197-fork-detach-info.patch b/gdb-6.6-bz235197-fork-detach-info.patch deleted file mode 100644 index b985654..0000000 --- a/gdb-6.6-bz235197-fork-detach-info.patch +++ /dev/null @@ -1,153 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.6-bz235197-fork-detach-info.patch - -FileName: gdb-6.6-bz235197-fork-detach-info.patch - -;; Notify user of a child forked process being detached (BZ 235197). -;;=push+jan: This is more about discussion if/what should be printed. - -2008-03-01 Jan Kratochvil - - Port to GDB-6.8pre. - Remove the `[' character from the GDB-6.8 default message. - -diff --git a/gdb/infrun.c b/gdb/infrun.c -index e1d11234e0..23439979b5 100644 ---- a/gdb/infrun.c -+++ b/gdb/infrun.c -@@ -461,7 +461,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \ - remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); - } - -- if (info_verbose || debug_infrun) -+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun) - { - /* Ensure that we have a process ptid. */ - ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid)); -diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp -index 2a8bf27e5c..20fa041155 100644 ---- a/gdb/testsuite/gdb.base/catch-syscall.exp -+++ b/gdb/testsuite/gdb.base/catch-syscall.exp -@@ -179,7 +179,7 @@ proc check_for_program_end {} { - # Deleting the catchpoints - delete_breakpoints - -- gdb_continue_to_end -+ gdb_continue_to_end "" continue 1 - } - - proc test_catch_syscall_without_args {} { -@@ -250,7 +250,7 @@ proc test_catch_syscall_with_wrong_args {} { - # If it doesn't, everything is right (since we don't have - # a syscall named "mlock" in it). Otherwise, this is a failure. - set thistest "catch syscall with unused syscall ($syscall_name)" -- gdb_continue_to_end $thistest -+ gdb_continue_to_end $thistest continue 1 - } - } - -diff --git a/gdb/testsuite/gdb.base/fork-detach.c b/gdb/testsuite/gdb.base/fork-detach.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/fork-detach.c -@@ -0,0 +1,57 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2007 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 2 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, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@prep.ai.mit.edu */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+static void func (void) -+{ -+} -+ -+int main (void) -+{ -+ pid_t child; -+ -+ child = fork (); -+ switch (child) -+ { -+ case -1: -+ abort (); -+ case 0: -+ func (); -+ break; -+ default: -+ { -+/* We do not test the switching to the other fork by GDB `fork 1'. */ -+#if 0 -+ pid_t got; -+ -+ got = waitpid (child, NULL, 0); -+ assert (got == child); -+#endif -+ break; -+ } -+ } -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.base/fork-detach.exp b/gdb/testsuite/gdb.base/fork-detach.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/fork-detach.exp -@@ -0,0 +1,36 @@ -+# Copyright 2007 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 2 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, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+set testfile fork-detach -+set srcfile ${testfile}.c -+set binfile [standard_output_file ${testfile}] -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { -+ untested "Couldn't compile test program" -+ return -1 -+} -+ -+# Get things started. -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+gdb_run_cmd -+# `Starting program: .*' prefix is available since gdb-6.7. -+gdb_test "" \ -+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \ -+ "Info message caught" diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index c0cdc89..47d73d0 100644 --- a/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/gdb-6.6-scheduler_locking-step-is-default.patch @@ -9,7 +9,7 @@ FileName: gdb-6.6-scheduler_locking-step-is-default.patch ;;=push+jan: How much is scheduler-locking relevant after non-stop? diff --git a/gdb/infrun.c b/gdb/infrun.c -index 23439979b5..1d0f731954 100644 +index df19478ef3..78ffc10b23 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2202,7 +2202,7 @@ static const char *const scheduler_enums[] = { diff --git a/gdb-6.8-attach-signalled-detach-stopped.patch b/gdb-6.8-attach-signalled-detach-stopped.patch deleted file mode 100644 index be75a1f..0000000 --- a/gdb-6.8-attach-signalled-detach-stopped.patch +++ /dev/null @@ -1,191 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.8-attach-signalled-detach-stopped.patch - -FileName: gdb-6.8-attach-signalled-detach-stopped.patch - -;; [RHEL5,RHEL6] Fix attaching to stopped processes. -;; [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). -;;=fedora - -diff --git a/gdb/infrun.c b/gdb/infrun.c -index b468d02fd6..16561dd119 100644 ---- a/gdb/infrun.c -+++ b/gdb/infrun.c -@@ -606,6 +606,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ - target_pid_to_str (process_ptid)); - } - -+#ifdef NEED_DETACH_SIGSTOP -+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly. -+ In this point of code it cannot be 1 as we would not get FORK -+ executed without CONTINUE first which resets PID_WAS_STOPPED. -+ We would have to first TARGET_STOP and WAITPID it as with running -+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */ -+#endif - target_detach (NULL, 0); - } - -diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c -index 1570a2bcb6..a101fbbe33 100644 ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -194,6 +194,11 @@ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN; - static struct target_ops *linux_ops; - static struct target_ops linux_ops_saved; - -+#ifdef NEED_DETACH_SIGSTOP -+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */ -+static pid_t pid_was_stopped; -+ -+#endif - /* The method to call, if any, when a new thread is attached. */ - static void (*linux_nat_new_thread) (struct lwp_info *); - -@@ -1065,6 +1070,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) - if (debug_linux_nat) - fprintf_unfiltered (gdb_stdlog, - "LNPAW: Attaching to a stopped process\n"); -+#ifdef NEED_DETACH_SIGSTOP -+ pid_was_stopped = ptid_get_pid (ptid); -+#endif - - /* The process is definitely stopped. It is in a job control - stop, unless the kernel predates the TASK_STOPPED / -@@ -1420,6 +1428,25 @@ get_detach_signal (struct lwp_info *lp) - return gdb_signal_to_host (signo); - } - -+#ifdef NEED_DETACH_SIGSTOP -+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that -+ many TIDs are left unstopped). See RH Bug 496732. */ -+ if (ptid_get_pid (lp->ptid) == pid_was_stopped) -+ { -+ int err; -+ -+ errno = 0; -+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP); -+ if (debug_linux_nat) -+ { -+ fprintf_unfiltered (gdb_stdlog, -+ "SC: lwp kill %d %s\n", -+ err, -+ errno ? safe_strerror (errno) : "ERRNO-OK"); -+ } -+ } -+ -+#endif - return 0; - } - -@@ -1578,6 +1605,10 @@ linux_nat_detach (struct target_ops *ops, const char *args, int from_tty) - detach_one_lwp (main_lwp, &signo); - - inf_ptrace_detach_success (ops); -+ -+#ifdef NEED_DETACH_SIGSTOP -+ pid_was_stopped = 0; -+#endif - } - } - -@@ -1838,6 +1869,16 @@ linux_nat_resume (struct target_ops *ops, - return; - } - -+#ifdef NEED_DETACH_SIGSTOP -+ /* At this point, we are going to resume the inferior and if we -+ have attached to a stopped process, we no longer should leave -+ it as stopped if the user detaches. PTID variable has PID set to LWP -+ while we need to check the real PID here. */ -+ -+ if (!step && lp && pid_was_stopped == ptid_get_pid (lp->ptid)) -+ pid_was_stopped = 0; -+ -+#endif - if (resume_many) - iterate_over_lwps (ptid, linux_nat_resume_callback, lp); - -@@ -3830,6 +3871,10 @@ linux_nat_mourn_inferior (struct target_ops *ops) - - /* Let the arch-specific native code know this process is gone. */ - linux_nat_forget_process (pid); -+#ifdef NEED_DETACH_SIGSTOP -+ -+ pid_was_stopped = 0; -+#endif - } - - /* Convert a native/host siginfo object, into/from the siginfo in the -diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp -index 6c8c8bf10e..c953a9c60d 100644 ---- a/gdb/testsuite/gdb.threads/attach-stopped.exp -+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp -@@ -56,7 +56,65 @@ proc corefunc { threadtype } { - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${binfile} - -- # Verify that we can attach to the stopped process. -+ # Verify that we can attach to the process by first giving its -+ # executable name via the file command, and using attach with the -+ # process ID. -+ -+ set test "$threadtype: set file, before attach1 to stopped process" -+ gdb_test_multiple "file $binfile" "$test" { -+ -re "Load new symbol table from.*y or n. $" { -+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \ -+ "$test (re-read)" -+ } -+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" { -+ pass "$test" -+ } -+ } -+ -+ set test "$threadtype: attach1 to stopped, after setting file" -+ gdb_test_multiple "attach $testpid" "$test" { -+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" { -+ pass "$test" -+ } -+ } -+ -+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there. -+ if {[string equal $threadtype threaded]} { -+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt" -+ } else { -+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt" -+ } -+ -+ # Exit and detach the process. -+ -+ gdb_exit -+ -+ # Avoid some race: -+ sleep 2 -+ -+ if [catch {open /proc/${testpid}/status r} fileid] { -+ set line2 "NOTFOUND" -+ } else { -+ gets $fileid line1; -+ gets $fileid line2; -+ close $fileid; -+ } -+ -+ set test "$threadtype: attach1, exit leaves process stopped" -+ if {[string match "*(stopped)*" $line2]} { -+ pass $test -+ } else { -+ fail $test -+ } -+ -+ # At this point, the process should still be stopped -+ -+ gdb_start -+ gdb_reinitialize_dir $srcdir/$subdir -+ gdb_load ${binfile} -+ -+ # Verify that we can attach to the process just by giving the -+ # process ID. - - set test "$threadtype: attach2 to stopped, after setting file" - gdb_test_multiple "attach $testpid" "$test" { diff --git a/gdb-6.8-bz436037-reg-no-longer-active.patch b/gdb-6.8-bz436037-reg-no-longer-active.patch index 01edd16..9326314 100644 --- a/gdb-6.8-bz436037-reg-no-longer-active.patch +++ b/gdb-6.8-bz436037-reg-no-longer-active.patch @@ -9,10 +9,10 @@ FileName: gdb-6.8-bz436037-reg-no-longer-active.patch ;;=push+jan: This fix is incorrect. diff --git a/gdb/valops.c b/gdb/valops.c -index 9b25980090..7aacd17d70 100644 +index 9b6600b538..cdc5c8014c 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -1103,6 +1103,8 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1104,6 +1104,8 @@ value_assign (struct value *toval, struct value *fromval) struct gdbarch *gdbarch; int value_reg; @@ -21,7 +21,7 @@ index 9b25980090..7aacd17d70 100644 /* Figure out which frame this is in currently. We use VALUE_FRAME_ID for obtaining the value's frame id instead of -@@ -1112,8 +1114,14 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1113,8 +1115,14 @@ value_assign (struct value *toval, struct value *fromval) frame. */ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index 8fbe6f0..647ca40 100644 --- a/gdb-6.8-quit-never-aborts.patch +++ b/gdb-6.8-quit-never-aborts.patch @@ -16,7 +16,7 @@ should have been detached with SIGSTOP (as they are accidentally left running on the debugger termination). diff --git a/gdb/defs.h b/gdb/defs.h -index 0c156d56c3..9a7f4d52b0 100644 +index ce5fee3ba3..8b16aca2a0 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -168,6 +168,10 @@ extern void default_quit_handler (void); @@ -31,10 +31,10 @@ index 0c156d56c3..9a7f4d52b0 100644 /* Helper for the QUIT macro. */ diff --git a/gdb/extension.c b/gdb/extension.c -index a1ee3510a6..229d702270 100644 +index e5c014667a..1c54f03272 100644 --- a/gdb/extension.c +++ b/gdb/extension.c -@@ -830,6 +830,11 @@ check_quit_flag (void) +@@ -820,6 +820,11 @@ check_quit_flag (void) int i, result = 0; const struct extension_language_defn *extlang; @@ -47,11 +47,11 @@ index a1ee3510a6..229d702270 100644 { if (extlang->ops->check_quit_flag != NULL) diff --git a/gdb/top.c b/gdb/top.c -index 4749cf561d..e2665c8e22 100644 +index 07b386dacb..e6c595505f 100644 --- a/gdb/top.c +++ b/gdb/top.c -@@ -1580,7 +1580,13 @@ quit_force (int *exit_arg, int from_tty) - qt.args = NULL; +@@ -1604,7 +1604,13 @@ quit_force (int *exit_arg, int from_tty) + qt.from_tty = from_tty; +#ifndef NEED_DETACH_SIGSTOP @@ -65,10 +65,10 @@ index 4749cf561d..e2665c8e22 100644 /* Get out of tfind mode, and kill or detach all inferiors. */ TRY diff --git a/gdb/utils.c b/gdb/utils.c -index 6f0abc98a2..58c0380d17 100644 +index c816e2f897..db1c534560 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -107,6 +107,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; +@@ -108,6 +108,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; static int debug_timestamp = 0; diff --git a/gdb-6.8-sparc64-silence-memcpy-check.patch b/gdb-6.8-sparc64-silence-memcpy-check.patch index bef469f..07cf3fd 100644 --- a/gdb-6.8-sparc64-silence-memcpy-check.patch +++ b/gdb-6.8-sparc64-silence-memcpy-check.patch @@ -9,10 +9,10 @@ FileName: gdb-6.8-sparc64-silence-memcpy-check.patch ;;=push: But it is just a GCC workaround, look up the existing GCC PR for it. diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c -index 12fd5b9e64..e304ba8dbc 100644 +index 7300080d8d..9860e12729 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c -@@ -1444,6 +1444,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache, +@@ -1462,6 +1462,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache, if (sparc_floating_p (type) || sparc_complex_floating_p (type)) { /* Floating return values. */ diff --git a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch b/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch index d981bc1..caefb72 100644 --- a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +++ b/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch @@ -19,7 +19,7 @@ FileName: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch ;;=push diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c -index 80ddd427af..3e4d3e4444 100644 +index 8fedeb438d..057f5e1ae9 100644 --- a/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c @@ -24,12 +24,14 @@ diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index e75d50d..c29cb68 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -8,10 +8,10 @@ FileName: gdb-archer-pie-addons-keep-disabled.patch ;;=push+jan: Breakpoints disabling matching should not be based on address. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index 2b5eebbbee..814802a0a1 100644 +index 721afd2c04..a04b1183b7 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15590,6 +15590,50 @@ initialize_breakpoint_ops (void) +@@ -15511,6 +15511,50 @@ initialize_breakpoint_ops (void) static struct cmd_list_element *enablebreaklist = NULL; @@ -63,10 +63,10 @@ index 2b5eebbbee..814802a0a1 100644 _initialize_breakpoint (void) { diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h -index 8bb81d8d17..3fddbaa713 100644 +index 4223158fbc..407cc531db 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h -@@ -1656,6 +1656,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg); +@@ -1683,6 +1683,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg); UIOUT iff debugging multiple threads. */ extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout); @@ -77,10 +77,10 @@ index 8bb81d8d17..3fddbaa713 100644 extern void print_breakpoint (breakpoint *bp); diff --git a/gdb/objfiles.c b/gdb/objfiles.c -index 7adaef119d..2f061b47f7 100644 +index f57f4f58b0..d31c0d6f56 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c -@@ -879,6 +879,11 @@ objfile_relocate1 (struct objfile *objfile, +@@ -875,6 +875,11 @@ objfile_relocate1 (struct objfile *objfile, obj_section_addr (s)); } diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index f469b6e..590fdb8 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -8,10 +8,10 @@ FileName: gdb-archer-pie-addons.patch ;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 179238ce82..5597038357 100644 +index 878c8b0302..cf1346161d 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -453,6 +453,7 @@ enum field_loc_kind +@@ -505,6 +505,7 @@ enum field_loc_kind { FIELD_LOC_KIND_BITPOS, /**< bitpos */ FIELD_LOC_KIND_ENUMVAL, /**< enumval */ @@ -19,7 +19,7 @@ index 179238ce82..5597038357 100644 FIELD_LOC_KIND_PHYSADDR, /**< physaddr */ FIELD_LOC_KIND_PHYSNAME, /**< physname */ FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */ -@@ -504,6 +505,7 @@ union field_location +@@ -556,6 +557,7 @@ union field_location field. Otherwise, physname is the mangled label of the static field. */ @@ -27,7 +27,7 @@ index 179238ce82..5597038357 100644 CORE_ADDR physaddr; const char *physname; -@@ -1362,6 +1364,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1453,6 +1455,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) @@ -35,7 +35,7 @@ index 179238ce82..5597038357 100644 #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #define SET_FIELD_BITPOS(thisfld, bitpos) \ -@@ -1373,6 +1376,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1464,6 +1467,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)) @@ -43,7 +43,7 @@ index 179238ce82..5597038357 100644 #define SET_FIELD_PHYSADDR(thisfld, addr) \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ FIELD_STATIC_PHYSADDR (thisfld) = (addr)) -@@ -1389,6 +1393,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1480,6 +1484,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)) @@ -52,10 +52,10 @@ index 179238ce82..5597038357 100644 #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n)) diff --git a/gdb/value.c b/gdb/value.c -index d4b4673f66..558d0bbd7a 100644 +index aa6ca43b41..98c060c65f 100644 --- a/gdb/value.c +++ b/gdb/value.c -@@ -2966,7 +2966,8 @@ value_static_field (struct type *type, int fieldno) +@@ -2830,7 +2830,8 @@ value_static_field (struct type *type, int fieldno) { case FIELD_LOC_KIND_PHYSADDR: retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), diff --git a/gdb-archer-vla-tests.patch b/gdb-archer-vla-tests.patch index 6427604..7c3a64c 100644 --- a/gdb-archer-vla-tests.patch +++ b/gdb-archer-vla-tests.patch @@ -3692,7 +3692,7 @@ new file mode 100644 + writeln(s); { set breakpoint 2 here } +end. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index a165bf0938..a13aaf7869 100644 +index becda6a001..067be70c7a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -169,6 +169,11 @@ proc gdb_unload {} { diff --git a/gdb-archer.patch b/gdb-archer.patch index e6ca2f2..c92d1ad 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -17,10 +17,10 @@ commit 718a1618b2f691a7f407213bb50f100ac59f91c3 tromey/python diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index 3142ad6af1..28d8664236 100644 +index 1ea7a36c69..b767caa735 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -2110,6 +2110,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -2094,6 +2094,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -56,7 +56,7 @@ index 5c7c0b4c2e..2014607e9e 100644 gdb/printer/bound_registers.py diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index 7b99ae1551..dea17fd5a7 100644 +index 403f5ca658..4788dd9f0d 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1245,6 +1245,16 @@ for remote debugging. @@ -77,7 +77,7 @@ index 7b99ae1551..dea17fd5a7 100644 @item -tui @cindex @code{--tui} diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi -index ccf011e35e..461e900f77 100644 +index fb074faf43..8d8fbfeaa9 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -88,8 +88,6 @@ containing @code{end}. For example: @@ -110,7 +110,7 @@ index 05a38b2670..9801fdff67 100644 set variable $gdb_init_done = 1 diff --git a/gdb/main.c b/gdb/main.c -index b079e79c93..b150af4e70 100644 +index 84e6126ad4..80d84ea246 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -33,6 +33,7 @@ @@ -121,7 +121,7 @@ index b079e79c93..b150af4e70 100644 #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) +@@ -479,7 +480,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) } static void @@ -130,7 +130,7 @@ index b079e79c93..b150af4e70 100644 { int argc = context->argc; char **argv = context->argv; -@@ -694,10 +695,14 @@ captured_main_1 (struct captured_main_args *context) +@@ -695,10 +696,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}, @@ -146,7 +146,7 @@ index b079e79c93..b150af4e70 100644 { int option_index; -@@ -715,6 +720,9 @@ captured_main_1 (struct captured_main_args *context) +@@ -716,6 +721,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -156,7 +156,7 @@ index b079e79c93..b150af4e70 100644 case OPT_SE: symarg = optarg; execarg = optarg; -@@ -889,7 +897,31 @@ captured_main_1 (struct captured_main_args *context) +@@ -890,7 +898,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. */ @@ -189,7 +189,7 @@ index b079e79c93..b150af4e70 100644 { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1179,7 +1211,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -1180,7 +1212,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -199,7 +199,7 @@ index b079e79c93..b150af4e70 100644 if (batch_flag) { -@@ -1192,24 +1225,37 @@ static void +@@ -1193,24 +1226,37 @@ static void captured_main (void *data) { struct captured_main_args *context = (struct captured_main_args *) data; @@ -250,7 +250,7 @@ index b079e79c93..b150af4e70 100644 } /* No exit -- exit is through quit_command. */ } -@@ -1252,6 +1298,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1253,6 +1299,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\ @@ -263,7 +263,7 @@ index b079e79c93..b150af4e70 100644 gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1297,6 +1349,13 @@ Output and user interface control:\n\n\ +@@ -1298,6 +1350,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -458,10 +458,10 @@ new file mode 100644 + +InScope () diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h -index 89bbc6987b..69dbb69c06 100644 +index b8e2d9049d..deb87c6a71 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h -@@ -657,6 +657,9 @@ class gdbpy_enter_varobj : public gdbpy_enter +@@ -641,6 +641,9 @@ class gdbpy_enter_varobj : public gdbpy_enter }; @@ -472,7 +472,7 @@ index 89bbc6987b..69dbb69c06 100644 extern const struct language_defn *python_language; diff --git a/gdb/python/python.c b/gdb/python/python.c -index 610dda828c..de5ffbd70b 100644 +index 4233b37fa8..cc4b710df7 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python = @@ -484,7 +484,7 @@ index 610dda828c..de5ffbd70b 100644 #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -242,6 +244,29 @@ gdbpy_enter::~gdbpy_enter () +@@ -237,6 +239,29 @@ gdbpy_enter::~gdbpy_enter () restore_active_ext_lang (m_previous_active); } @@ -514,7 +514,7 @@ index 610dda828c..de5ffbd70b 100644 /* Set the quit flag. */ static void -@@ -1356,6 +1381,92 @@ gdbpy_print_stack (void) +@@ -1367,6 +1392,92 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -607,7 +607,7 @@ index 610dda828c..de5ffbd70b 100644 static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -2034,6 +2145,8 @@ PyMethodDef python_GdbMethods[] = +@@ -2045,6 +2156,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." }, @@ -669,10 +669,10 @@ index eb82a7776f..3069a5c6d7 100644 # Test either C or C++ values. diff --git a/gdb/varobj.c b/gdb/varobj.c -index 01dabef37c..c198731d0b 100644 +index a0df485ae9..ab8248a781 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c -@@ -217,6 +217,14 @@ is_root_p (const struct varobj *var) +@@ -218,6 +218,14 @@ is_root_p (const struct varobj *var) } #ifdef HAVE_PYTHON @@ -688,10 +688,10 @@ index 01dabef37c..c198731d0b 100644 /* See python-internal.h. */ gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var) diff --git a/gdb/varobj.h b/gdb/varobj.h -index 6e80d1b89e..677547996f 100644 +index 3aba0cda67..42dfad83f8 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h -@@ -327,6 +327,8 @@ extern bool varobj_has_more (const struct varobj *var, int to); +@@ -328,6 +328,8 @@ extern bool varobj_has_more (const struct varobj *var, int to); extern bool varobj_is_dynamic_p (const struct varobj *var); diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 8e5dfa6..443baa4 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -45,10 +45,10 @@ gdb/gdbserver/ direct ptrace. diff --git a/gdb/config.in b/gdb/config.in -index edd7028f76..4de3e842d1 100644 +index 404e0bbddc..97d2f7f518 100644 --- a/gdb/config.in +++ b/gdb/config.in -@@ -270,6 +270,9 @@ +@@ -276,6 +276,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -58,7 +58,7 @@ index edd7028f76..4de3e842d1 100644 /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -393,6 +396,9 @@ +@@ -399,6 +402,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -69,10 +69,10 @@ index edd7028f76..4de3e842d1 100644 #undef HAVE_SETLOCALE diff --git a/gdb/configure b/gdb/configure -index 1cecdbc3b5..904cc453ad 100755 +index 30a6e86ff8..3b604feb11 100755 --- a/gdb/configure +++ b/gdb/configure -@@ -15681,6 +15681,64 @@ cat >>confdefs.h <<_ACEOF +@@ -15747,6 +15747,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -138,10 +138,10 @@ index 1cecdbc3b5..904cc453ad 100755 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # except that the argument to --with-sysroot is optional. diff --git a/gdb/configure.ac b/gdb/configure.ac -index e232c1adcb..1557760ed8 100644 +index 39a777f647..c707e7b152 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -2043,6 +2043,10 @@ case $host_os in +@@ -2048,6 +2048,10 @@ case $host_os in esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -177,10 +177,10 @@ index dda7c1f150..b2a34b92ce 100644 #undef HAVE_SETNS diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure -index 340ca7a19e..6d7c9b2326 100755 +index b2e2e8f955..3269bbe553 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure -@@ -8455,6 +8455,64 @@ if $want_ipa ; then +@@ -8465,6 +8465,64 @@ if $want_ipa ; then fi fi @@ -246,7 +246,7 @@ index 340ca7a19e..6d7c9b2326 100755 diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac -index 6727959e61..7c0f508275 100644 +index 99801681ff..56f28797ca 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -488,6 +488,10 @@ if $want_ipa ; then @@ -261,25 +261,20 @@ index 6727959e61..7c0f508275 100644 AC_SUBST(GDBSERVER_LIBS) AC_SUBST(srv_xmlbuiltin) diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c -index cfb2b56a08..0faac80625 100644 +index e64949504d..6bcaf3700f 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c -@@ -963,7 +963,21 @@ linux_ptrace_fun () +@@ -966,7 +966,16 @@ linux_ptrace_fun () { if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) < 0) - trace_start_error_with_name ("ptrace"); + { + int save_errno = errno; -+ struct buffer buffer; + -+ buffer_init (&buffer); -+ linux_ptrace_create_warnings (&buffer); -+ buffer_grow_str0 (&buffer, ""); ++ std::string msg (linux_ptrace_create_warnings ()); + -+ std::string msg -+ = string_printf (_("%sCannot trace created process"), -+ buffer_finish (&buffer)); ++ msg += _("Cannot trace created process"); + + errno = save_errno; + trace_start_error_with_name (msg.c_str ()); @@ -288,45 +283,33 @@ index cfb2b56a08..0faac80625 100644 if (setpgid (0, 0) < 0) trace_start_error_with_name ("setpgid"); diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c -index c41ea391a0..1570a2bcb6 100644 +index 445b59fa4a..05344316a7 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -1127,7 +1127,29 @@ linux_nat_create_inferior (struct target_ops *ops, +@@ -1088,7 +1088,17 @@ linux_nat_target::create_inferior (const char *exec_file, /* Make sure we report all signals during startup. */ - linux_nat_pass_signals (ops, 0, NULL); + pass_signals (0, NULL); -- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); -+ volatile struct gdb_exception ex; +- inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty); + TRY + { -+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty); ++ inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty); + } + CATCH (ex, RETURN_MASK_ERROR) + { -+ struct buffer buffer; -+ char *message, *buffer_s; ++ std::string result = linux_ptrace_create_warnings (); + -+ message = xstrdup (ex.message); -+ make_cleanup (xfree, message); -+ -+ buffer_init (&buffer); -+ linux_ptrace_create_warnings (&buffer); -+ -+ buffer_grow_str0 (&buffer, ""); -+ buffer_s = buffer_finish (&buffer); -+ make_cleanup (xfree, buffer_s); -+ -+ throw_error (ex.error, "%s%s", buffer_s, message); ++ throw_error (ex.error, "%s%s", result.c_str (), ex.message); + } + END_CATCH } /* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c -index ac6ba72390..be51e2449b 100644 +index 1f21ef03a3..53c9a0de17 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c -@@ -27,6 +27,10 @@ +@@ -25,6 +25,10 @@ #include #endif @@ -337,47 +320,50 @@ index ac6ba72390..be51e2449b 100644 /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ -@@ -51,6 +55,8 @@ linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer) - buffer_xml_printf (buffer, _("process %d is a zombie " - "- the process has already terminated"), - (int) pid); +@@ -50,6 +54,8 @@ linux_ptrace_attach_fail_reason (pid_t pid) + "terminated"), + (int) pid); + ++ result += linux_ptrace_create_warnings (); + -+ linux_ptrace_create_warnings (buffer); + return result; } - /* See linux-ptrace.h. */ -@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void) +@@ -583,6 +589,25 @@ linux_ptrace_init_warnings (void) linux_ptrace_test_ret_to_nx (); } +/* Print all possible reasons we could fail to create a traced process. */ + -+void -+linux_ptrace_create_warnings (struct buffer *buffer) ++std::string ++linux_ptrace_create_warnings () +{ ++ std::string result; ++ +#ifdef HAVE_LIBSELINUX + /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is + forbidden. */ + if (security_get_boolean_active ("deny_ptrace") == 1) -+ buffer_xml_printf (buffer, -+ _("the SELinux boolean 'deny_ptrace' is enabled, " -+ "you can disable this process attach protection by: " -+ "(gdb) shell sudo setsebool deny_ptrace=0")); ++ string_appendf (result, ++ _("the SELinux boolean 'deny_ptrace' is enabled, " ++ "you can disable this process attach protection by: " ++ "(gdb) shell sudo setsebool deny_ptrace=0\n")); +#endif /* HAVE_LIBSELINUX */ ++ return result; +} + /* Extract extended ptrace event from wait status. */ int diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h -index 1f960ed132..84912f909c 100644 +index dc180fbf82..32e3d33bc8 100644 --- a/gdb/nat/linux-ptrace.h +++ b/gdb/nat/linux-ptrace.h -@@ -190,6 +190,7 @@ extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer); - extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); +@@ -189,6 +189,7 @@ extern std::string linux_ptrace_attach_fail_reason (pid_t pid); + extern std::string linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); extern void linux_ptrace_init_warnings (void); -+extern void linux_ptrace_create_warnings (struct buffer *buffer); ++extern std::string linux_ptrace_create_warnings (); extern void linux_check_ptrace_features (void); extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_disable_event_reporting (pid_t pid); diff --git a/gdb-btrobust.patch b/gdb-btrobust.patch index 9983e99..2b1044d 100644 --- a/gdb-btrobust.patch +++ b/gdb-btrobust.patch @@ -14,10 +14,10 @@ printed, but a default backtrace will occur in this case. -- diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c -index e887849c36..a8e4f49eb5 100644 +index 4edefd48f9..af5fcae654 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c -@@ -1388,6 +1388,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1151,6 +1151,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, htab_eq_pointer, NULL)); @@ -25,19 +25,23 @@ index e887849c36..a8e4f49eb5 100644 while (true) { gdbpy_ref<> item (PyIter_Next (iterable.get ())); -@@ -1397,7 +1398,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1159,8 +1160,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, + { if (PyErr_Occurred ()) { - gdbpy_print_stack (); +- throw_quit_or_print_exception (); - return EXT_LANG_BT_ERROR; ++ gdbpy_print_stack (); + return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS; } break; } -@@ -1409,6 +1410,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1193,7 +1194,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) - gdbpy_print_stack (); +- throw_quit_or_print_exception (); ++ gdbpy_print_stack (); + count_printed++; } diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 846f490..66a0b3b 100644 --- a/gdb-bz1219747-attach-kills.patch +++ b/gdb-bz1219747-attach-kills.patch @@ -80,10 +80,10 @@ gdb/testsuite/ChangeLog * gdb.base/attach-kills.exp: New. diff --git a/gdb/main.c b/gdb/main.c -index 17d35f4a8a..b079e79c93 100644 +index 4caefe2011..84e6126ad4 100644 --- a/gdb/main.c +++ b/gdb/main.c -@@ -1114,7 +1114,10 @@ captured_main_1 (struct captured_main_args *context) +@@ -1115,7 +1115,10 @@ captured_main_1 (struct captured_main_args *context) if (isdigit (pid_or_core_arg[0])) { if (catch_command_errors (attach_command, pid_or_core_arg, diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index 2064baf..86479cd 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -30,10 +30,10 @@ threads need to get synchronized at some point. This is a more general debugging problem of GOMP outside of the scope of this Bug. diff --git a/gdb/infrun.c b/gdb/infrun.c -index 1d0f731954..dcf022bd50 100644 +index 78ffc10b23..443e2123f0 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -6690,6 +6690,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6699,6 +6699,16 @@ process_event_stop_test (struct execution_control_state *ecs) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { @@ -50,7 +50,7 @@ index 1d0f731954..dcf022bd50 100644 /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -6723,6 +6733,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6732,6 +6742,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index e92a775..e740c71 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -10,10 +10,10 @@ FileName: gdb-bz541866-rwatch-before-run.patch ;;=push+jan: It should be fixed properly instead. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index 814802a0a1..5a99de75e1 100644 +index a04b1183b7..305bb3f6c0 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -8864,7 +8864,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, +@@ -8808,7 +8808,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, int enabled, int internal, unsigned flags, int display_canonical) { @@ -22,7 +22,7 @@ index 814802a0a1..5a99de75e1 100644 if (type == bp_hardware_breakpoint) { -@@ -14425,7 +14425,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, +@@ -14345,7 +14345,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, if (bpt->type == bp_hardware_breakpoint) { @@ -98,7 +98,7 @@ new file mode 100644 + +#endif /* NM_LINUX64_H */ diff --git a/gdb/configure.nat b/gdb/configure.nat -index 8e14892722..6dbb072054 100644 +index 6b0f44fede..dd0c63c256 100644 --- a/gdb/configure.nat +++ b/gdb/configure.nat @@ -237,6 +237,7 @@ case ${gdb_host} in @@ -118,16 +118,16 @@ index 8e14892722..6dbb072054 100644 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \ x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o" diff --git a/gdb/target.h b/gdb/target.h -index 4781fbc59c..e3a2882fe5 100644 +index e2d1e61cdc..6e13809397 100644 --- a/gdb/target.h +++ b/gdb/target.h -@@ -1915,9 +1915,11 @@ extern struct thread_info *target_thread_handle_to_thread_info +@@ -1908,9 +1908,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_target.to_can_use_hw_breakpoint) (¤t_target, \ + (target_stack->can_use_hw_breakpoint) ( \ TYPE, CNT, OTHERTYPE) +#endif diff --git a/gdb-bz568248-oom-is-error.patch b/gdb-bz568248-oom-is-error.patch index e0d5f2f..161d621 100644 --- a/gdb-bz568248-oom-is-error.patch +++ b/gdb-bz568248-oom-is-error.patch @@ -53,10 +53,10 @@ gdb/ * utils.c (nomem): Change internal_error to error. diff --git a/gdb/utils.c b/gdb/utils.c -index c531748fe4..0066bfcc4b 100644 +index 9c5bf68e5a..7813df1436 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -774,13 +774,11 @@ malloc_failure (long size) +@@ -746,13 +746,11 @@ malloc_failure (long size) { if (size > 0) { diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch index 2f7fedc..99efe00 100644 --- a/gdb-container-rh-pkg.patch +++ b/gdb-container-rh-pkg.patch @@ -9,10 +9,10 @@ FileName: gdb-container-rh-pkg.patch ;;=fedora diff --git a/gdb/remote.c b/gdb/remote.c -index 86777f1e5e..fc003c0736 100644 +index 635cb266e8..a683df4a83 100644 --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -13437,7 +13437,17 @@ remote_pid_to_exec_file (struct target_ops *self, int pid) +@@ -13667,7 +13667,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/gdb-fedora-libncursesw.patch b/gdb-fedora-libncursesw.patch index bc1c8d0..1bd195b 100644 --- a/gdb-fedora-libncursesw.patch +++ b/gdb-fedora-libncursesw.patch @@ -12,10 +12,10 @@ Fedora: Force libncursesw over libncurses to match the includes. https://bugzilla.redhat.com/show_bug.cgi?id=1270534 diff --git a/gdb/configure b/gdb/configure -index 6fb5b5b509..db849572b5 100755 +index 9f236ae26a..a2d480c1e5 100755 --- a/gdb/configure +++ b/gdb/configure -@@ -9238,6 +9238,7 @@ if test x"$prefer_curses" = xyes; then +@@ -9304,6 +9304,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. @@ -23,7 +23,7 @@ index 6fb5b5b509..db849572b5 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 $as_echo_n "checking for library containing waddstr... " >&6; } if test "${ac_cv_search_waddstr+set}" = set; then : -@@ -9262,7 +9263,7 @@ return waddstr (); +@@ -9328,7 +9329,7 @@ return waddstr (); return 0; } _ACEOF @@ -32,7 +32,7 @@ index 6fb5b5b509..db849572b5 100755 if test -z "$ac_lib"; then ac_res="none required" else -@@ -9336,6 +9337,7 @@ case $host_os in +@@ -9402,6 +9403,7 @@ case $host_os in esac # These are the libraries checked by Readline. @@ -40,7 +40,7 @@ index 6fb5b5b509..db849572b5 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if test "${ac_cv_search_tgetent+set}" = set; then : -@@ -9360,7 +9362,7 @@ return tgetent (); +@@ -9426,7 +9428,7 @@ return tgetent (); return 0; } _ACEOF @@ -50,10 +50,10 @@ index 6fb5b5b509..db849572b5 100755 ac_res="none required" else diff --git a/gdb/configure.ac b/gdb/configure.ac -index d891c7bccc..4412e25450 100644 +index dc0acd035b..57ebcaeb08 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -755,7 +755,8 @@ if test x"$prefer_curses" = xyes; then +@@ -760,7 +760,8 @@ 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. @@ -63,7 +63,7 @@ index d891c7bccc..4412e25450 100644 if test "$ac_cv_search_waddstr" != no; then curses_found=yes -@@ -797,7 +798,8 @@ case $host_os in +@@ -802,7 +803,8 @@ case $host_os in esac # These are the libraries checked by Readline. diff --git a/gdb-follow-child-stale-parent.patch b/gdb-follow-child-stale-parent.patch index fa95113..09b4042 100644 --- a/gdb-follow-child-stale-parent.patch +++ b/gdb-follow-child-stale-parent.patch @@ -24,10 +24,10 @@ unwinders try to access it, breaking: +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish diff --git a/gdb/infrun.c b/gdb/infrun.c -index dcf022bd50..b468d02fd6 100644 +index 443e2123f0..16ee1c2e31 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -749,6 +749,9 @@ follow_fork (void) +@@ -752,6 +752,9 @@ follow_fork (void) } else { diff --git a/gdb-gdb-add-index-script.patch b/gdb-gdb-add-index-script.patch deleted file mode 100644 index 3d3da92..0000000 --- a/gdb-gdb-add-index-script.patch +++ /dev/null @@ -1,171 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: RFC: add DWARF index support - -FileName: gdb-gdb-add-index-script.patch - -;; Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey). -;;=push: Re-check against the upstream version. - -http://sourceware.org/ml/gdb-patches/2010-07/msg00184.html - -Jan Kratochvil: Fixed $d -> $dir. -Jan Kratochvil: Remove /dev/null redirection. - ->>>>> "Tom" == Tom Tromey writes: - -Tom> This patch series adds support for a DWARF index to gdb. - -Roland suggested we wrap up the index-creation code into a helper -script. - -I'm not sure if this is something people would want in gdb proper, but I -figured I would send it here just in case. - -Tom - -2010-07-09 Tom Tromey - - * Makefile.in (install-only): Install gdb-add-index. - * gdb-add-index: New file. - -2010-07-09 Tom Tromey - - * gdb.texinfo (Index Files): Mention gdb-add-index. - ->From 30714fe719e61baea03d0dc5793eb0d564faebb7 Mon Sep 17 00:00:00 2001 -From: Tom Tromey -Date: Fri, 9 Jul 2010 11:17:54 -0600 -Subject: [PATCH 4/4] add gdb-add-index -Subject: [PATCH 4/4] add gdb-add-index - -diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index e77d6a5c03..3142ad6af1 100644 ---- a/gdb/Makefile.in -+++ b/gdb/Makefile.in -@@ -1770,6 +1770,15 @@ install-only: install-gstack $(CONFIG_INSTALL) - $(INSTALL_SCRIPT) gcore \ - $(DESTDIR)$(bindir)/$$transformed_name; \ - fi -+ transformed_name=`t='$(program_transform_name)'; \ -+ echo gdb-add-index | sed -e "$$t"` ; \ -+ if test "x$$transformed_name" = x; then \ -+ transformed_name=gdb-add-index ; \ -+ else \ -+ true ; \ -+ fi ; \ -+ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \ -+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) - @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do - - install-strip: -diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in -index eafadee899..0323bc4ecb 100644 ---- a/gdb/doc/Makefile.in -+++ b/gdb/doc/Makefile.in -@@ -174,7 +174,7 @@ POD2MAN5 = pod2man --center="GNU Development Tools" \ - --release="gdb-`sed q version.subst`" --section=5 - - # List of man pages generated from gdb.texi --MAN1S = gdb.1 gdbserver.1 gcore.1 -+MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1 - MAN5S = gdbinit.5 - MANS = $(MAN1S) $(MAN5S) - -@@ -633,6 +633,13 @@ gcore.1: $(GDB_DOC_FILES) - mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - rm -f gcore.pod - -+gdb-add-index.1: $(GDB_DOC_FILES) -+ touch $@ -+ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod -+ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ -+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) -+ rm -f gdb-add-index.pod -+ - gdbinit.5: $(GDB_DOC_FILES) - touch $@ - -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod -diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index 2f2cbd3dea..7b99ae1551 100644 ---- a/gdb/doc/gdb.texinfo -+++ b/gdb/doc/gdb.texinfo -@@ -19796,6 +19796,14 @@ There are currently some limitation on indices. They only work when - for DWARF debugging information, not stabs. And, they do not - currently work for programs using Ada. - -+@value{GDBN} comes with a program, @command{gdb-add-index}, which can -+be used to add the index to a symbol file. It takes the symbol file -+as its only argument: -+ -+@smallexample -+$ gdb-add-index symfile -+@end smallexample -+ - @node Symbol Errors - @section Errors Reading Symbol Files - -@@ -42759,6 +42767,7 @@ switch (die->tag) - * gdbserver man:: Remote Server for the GNU Debugger man page - * gcore man:: Generate a core file of a running program - * gdbinit man:: gdbinit scripts -+* gdb-add-index man:: Add index files to speed up GDB - @end menu - - @node gdb man -@@ -43435,6 +43444,54 @@ Richard M. Stallman and Roland H. Pesch, July 1991. - @end ifset - @c man end - -+@node gdb-add-index man -+@heading gdb-add-index -+ -+@c man title gdb-add-index Add index files to speed up GDB -+ -+@c man begin SYNOPSIS gdb-add-index -+gdb-add-index @var{filename} -+@c man end -+ -+@c man begin DESCRIPTION gdb-add-index -+When GDB finds a symbol file, it scans the symbols in the file in order -+to construct an internal symbol table. This lets most GDB operations -+work quickly--at the cost of a delay early on. For large programs, -+this delay can be quite lengthy, so GDB provides a way to build an -+index, which speeds up startup. -+ -+To determine whether a file contains such an index, use the command -+@command{readelf -S filename}: the index is stored in a section named -+@code{.gdb_index}. Note that the index is never generated for files that do -+not contain DWARF debug information (sections named @code{.debug_*}). -+ -+See more in -+@ifset man -+the @value{GDBN} manual in node @code{Index Files} -+-- shell command @code{info -f gdb -n 'Index Files'}. -+@end ifset -+@ifclear man -+@ref{Index Files}. -+@end ifclear -+@c man end -+ -+@c man begin SEEALSO gdb-add-index -+@ifset man -+The full documentation for @value{GDBN} is maintained as a Texinfo manual. -+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo -+documentation are properly installed at your site, the command -+ -+@smallexample -+info gdb -+@end smallexample -+ -+should give you access to the complete manual. -+ -+@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, -+Richard M. Stallman and Roland H. Pesch, July 1991. -+@end ifset -+@c man end -+ - @include gpl.texi - - @node GNU Free Documentation License diff --git a/gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch index ca6117a..dec6245 100644 --- a/gdb-glibc-strstr-workaround.patch +++ b/gdb-glibc-strstr-workaround.patch @@ -9,10 +9,10 @@ FileName: gdb-glibc-strstr-workaround.patch ;;=fedora: Compatibility with RHELs (unchecked which ones). diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index c8db955f2f..6ebe00f542 100644 +index 266740f74c..d69f154af3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -21328,6 +21328,26 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu, +@@ -21376,6 +21376,26 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, /* Cache this symbol's name and the name's demangled form (if any). */ SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack); linkagename = dwarf2_physname (name, die, cu); diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch index f75d144..5763a6c 100644 --- a/gdb-gnat-dwarf-crash-3of3.patch +++ b/gdb-gnat-dwarf-crash-3of3.patch @@ -42,21 +42,202 @@ gdb/ * dwarf2read.c (process_die): Change gdb_assert to complaint. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index fbaa0af64f..2c972d5e74 100644 +index 420c3e6bd5..328a07df82 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -10612,6 +10612,14 @@ private: +@@ -10516,6 +10516,14 @@ private: static void process_die (struct die_info *die, struct dwarf2_cu *cu) { + if (die->in_process) + { + complaint (&symfile_complaints, -+ _("DIE at 0x%x attempted to be processed twice"), -+ to_underlying (die->sect_off)); ++ _("DIE at 0x%s attempted to be processed twice"), ++ sect_offset_str (die->sect_off)); + return; + } + process_die_scope scope (die, cu); switch (die->tag) +diff --git a/gdb/infrun.c b/gdb/infrun.c +index 16ee1c2e31..82b9cedc90 100644 +--- a/gdb/infrun.c ++++ b/gdb/infrun.c +@@ -609,6 +609,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ + target_pid_to_str (process_ptid)); + } + ++#ifdef NEED_DETACH_SIGSTOP ++ /* We should check PID_WAS_STOPPED and detach it stopped accordingly. ++ In this point of code it cannot be 1 as we would not get FORK ++ executed without CONTINUE first which resets PID_WAS_STOPPED. ++ We would have to first TARGET_STOP and WAITPID it as with running ++ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */ ++#endif + target_detach (parent_inf, 0); + } + +diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c +index 05344316a7..30a94b47c9 100644 +--- a/gdb/linux-nat.c ++++ b/gdb/linux-nat.c +@@ -191,6 +191,12 @@ struct linux_nat_target *linux_target; + /* Does the current host support PTRACE_GETREGSET? */ + enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN; + ++#ifdef NEED_DETACH_SIGSTOP ++/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */ ++static pid_t pid_was_stopped; ++ ++#endif ++ + /* The saved to_close method, inherited from inf-ptrace.c. + Called by our to_close. */ + static void (*super_close) (struct target_ops *); +@@ -1026,6 +1032,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) + if (debug_linux_nat) + fprintf_unfiltered (gdb_stdlog, + "LNPAW: Attaching to a stopped process\n"); ++#ifdef NEED_DETACH_SIGSTOP ++ pid_was_stopped = ptid_get_pid (ptid); ++#endif + + /* The process is definitely stopped. It is in a job control + stop, unless the kernel predates the TASK_STOPPED / +@@ -1359,6 +1368,25 @@ get_detach_signal (struct lwp_info *lp) + return gdb_signal_to_host (signo); + } + ++#ifdef NEED_DETACH_SIGSTOP ++ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that ++ many TIDs are left unstopped). See RH Bug 496732. */ ++ if (ptid_get_pid (lp->ptid) == pid_was_stopped) ++ { ++ int err; ++ ++ errno = 0; ++ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP); ++ if (debug_linux_nat) ++ { ++ fprintf_unfiltered (gdb_stdlog, ++ "SC: lwp kill %d %s\n", ++ err, ++ errno ? safe_strerror (errno) : "ERRNO-OK"); ++ } ++ } ++ ++#endif + return 0; + } + +@@ -1507,6 +1535,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) + detach_one_lwp (main_lwp, &signo); + + detach_success (inf); ++ ++#ifdef NEED_DETACH_SIGSTOP ++ pid_was_stopped = 0; ++#endif + } + } + +@@ -1765,6 +1797,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) + return; + } + ++#ifdef NEED_DETACH_SIGSTOP ++ /* At this point, we are going to resume the inferior and if we ++ have attached to a stopped process, we no longer should leave ++ it as stopped if the user detaches. PTID variable has PID set to LWP ++ while we need to check the real PID here. */ ++ ++ if (!step && lp && pid_was_stopped == ptid_get_pid (lp->ptid)) ++ pid_was_stopped = 0; ++ ++#endif + if (resume_many) + iterate_over_lwps (ptid, linux_nat_resume_callback, lp); + +@@ -3754,6 +3796,10 @@ linux_nat_target::mourn_inferior () + + /* Let the arch-specific native code know this process is gone. */ + linux_target->low_forget_process (pid); ++#ifdef NEED_DETACH_SIGSTOP ++ ++ pid_was_stopped = 0; ++#endif + } + + /* Convert a native/host siginfo object, into/from the siginfo in the +diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp +index a3916c6354..9f004b4179 100644 +--- a/gdb/testsuite/gdb.threads/attach-stopped.exp ++++ b/gdb/testsuite/gdb.threads/attach-stopped.exp +@@ -56,7 +56,65 @@ proc corefunc { threadtype } { + gdb_reinitialize_dir $srcdir/$subdir + gdb_load ${binfile} + +- # Verify that we can attach to the stopped process. ++ # Verify that we can attach to the process by first giving its ++ # executable name via the file command, and using attach with the ++ # process ID. ++ ++ set test "$threadtype: set file, before attach1 to stopped process" ++ gdb_test_multiple "file $binfile" "$test" { ++ -re "Load new symbol table from.*y or n. $" { ++ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \ ++ "$test (re-read)" ++ } ++ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" { ++ pass "$test" ++ } ++ } ++ ++ set test "$threadtype: attach1 to stopped, after setting file" ++ gdb_test_multiple "attach $testpid" "$test" { ++ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" { ++ pass "$test" ++ } ++ } ++ ++ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there. ++ if {[string equal $threadtype threaded]} { ++ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt" ++ } else { ++ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt" ++ } ++ ++ # Exit and detach the process. ++ ++ gdb_exit ++ ++ # Avoid some race: ++ sleep 2 ++ ++ if [catch {open /proc/${testpid}/status r} fileid] { ++ set line2 "NOTFOUND" ++ } else { ++ gets $fileid line1; ++ gets $fileid line2; ++ close $fileid; ++ } ++ ++ set test "$threadtype: attach1, exit leaves process stopped" ++ if {[string match "*(stopped)*" $line2]} { ++ pass $test ++ } else { ++ fail $test ++ } ++ ++ # At this point, the process should still be stopped ++ ++ gdb_start ++ gdb_reinitialize_dir $srcdir/$subdir ++ gdb_load ${binfile} ++ ++ # Verify that we can attach to the process just by giving the ++ # process ID. + + set test "$threadtype: attach2 to stopped, after setting file" + gdb_test_multiple "attach $testpid" "$test" { diff --git a/gdb-jit-reader-multilib.patch b/gdb-jit-reader-multilib.patch index f9ccfd1..6ac9589 100644 --- a/gdb-jit-reader-multilib.patch +++ b/gdb-jit-reader-multilib.patch @@ -9,10 +9,10 @@ FileName: gdb-jit-reader-multilib.patch ;;=push+jan diff --git a/gdb/configure b/gdb/configure -index 904cc453ad..6fb5b5b509 100755 +index 3b604feb11..9f236ae26a 100755 --- a/gdb/configure +++ b/gdb/configure -@@ -9528,10 +9528,12 @@ _ACEOF +@@ -9594,10 +9594,12 @@ _ACEOF @@ -29,10 +29,10 @@ index 904cc453ad..6fb5b5b509 100755 TARGET_PTR="unsigned __int128" else diff --git a/gdb/configure.ac b/gdb/configure.ac -index 1557760ed8..d891c7bccc 100644 +index c707e7b152..dc0acd035b 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -832,10 +832,12 @@ AC_CHECK_SIZEOF(unsigned long long) +@@ -837,10 +837,12 @@ AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned __int128) diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch index b1ab85b..e18947b 100644 --- a/gdb-linux_perf-bundle.patch +++ b/gdb-linux_perf-bundle.patch @@ -9,10 +9,10 @@ FileName: gdb-linux_perf-bundle.patch ;;=fedora diff --git a/gdb/configure b/gdb/configure -index db849572b5..7720c00f4b 100755 +index a2d480c1e5..4f102c3ede 100755 --- a/gdb/configure +++ b/gdb/configure -@@ -11907,7 +11907,7 @@ else +@@ -11973,7 +11973,7 @@ else #include #ifndef PERF_ATTR_SIZE_VER5 @@ -22,10 +22,10 @@ index db849572b5..7720c00f4b 100755 _ACEOF diff --git a/gdb/configure.ac b/gdb/configure.ac -index 4412e25450..e64b0e806f 100644 +index 57ebcaeb08..1840f91651 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -1466,7 +1466,7 @@ else +@@ -1471,7 +1471,7 @@ else AC_PREPROC_IFELSE(AC_LANG_SOURCE([[ #include #ifndef PERF_ATTR_SIZE_VER5 @@ -59,7 +59,7 @@ index b97500e579..151545105c 100644 args.argc = argc; args.argv = argv; diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h -index 31a8d9e67b..72faf23c5f 100644 +index 118030190d..ba4e618b11 100644 --- a/gdb/nat/linux-btrace.h +++ b/gdb/nat/linux-btrace.h @@ -28,6 +28,177 @@ diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch index 3331f4d..a999619 100644 --- a/gdb-moribund-utrace-workaround.patch +++ b/gdb-moribund-utrace-workaround.patch @@ -14,10 +14,10 @@ http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593 Bug in FSF GDB exploited by the ptrace-on-utrace interaction. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index 5a99de75e1..6a0c15b239 100644 +index 305bb3f6c0..0106ce8dd5 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -12089,6 +12089,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) +@@ -12017,6 +12017,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); diff --git a/gdb-ppc64-stwux-tautological-compare.patch b/gdb-ppc64-stwux-tautological-compare.patch deleted file mode 100644 index 4325e17..0000000 --- a/gdb-ppc64-stwux-tautological-compare.patch +++ /dev/null @@ -1,50 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Sun, 4 Feb 2018 21:42:18 +0100 -Subject: gdb-ppc64-stwux-tautological-compare.patch - -FileName: gdb-ppc64-stwux-tautological-compare.patch - -;; Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare. - -[patch] ppc64: Fix stwux encoding -https://sourceware.org/ml/gdb-patches/2018-02/msg00058.html - -with gcc-8.0.1-0.9.fc28.x86_64 I get: - -../../gdb/rs6000-tdep.c: In function 'CORE_ADDR skip_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, rs6000_framedata*)': -../../gdb/rs6000-tdep.c:1911:34: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] - else if ((op & 0xfc1f016a) == 0x7c01016e) - ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ - -The code is there since: - commit 98f08d3d9b69b344bb8b0cd2a4bda1cf4d966e20 - Author: Kevin Buettner - Date: Thu May 29 19:47:14 2003 +0000 - From Jimi X : - * rs6000-tdep.c (skip_prologue): Improve support for 64-bit code. -So I do not think we can find the original author. - -https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.alangref/idalangref_stwux_stux_instrs.htm -says - bit 21 - 30 = 183 - Those are bits 1..10 in normal bit order: 183<<1 = 0x16e - -gdb/ChangeLog -2018-02-04 Jan Kratochvil - - * rs6000-tdep.c (skip_prologue): Fix stwux encoding. - -diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c -index 23d0db3b8f..5275ff5b91 100644 ---- a/gdb/rs6000-tdep.c -+++ b/gdb/rs6000-tdep.c -@@ -1908,7 +1908,7 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, - offset = fdata->offset; - continue; - } -- else if ((op & 0xfc1f016a) == 0x7c01016e) -+ else if ((op & 0xfc1f016e) == 0x7c01016e) - { /* stwux rX,r1,rY */ - /* No way to figure out what r1 is going to be. */ - fdata->frameless = 0; diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch index 72e9302..9ba2b09 100644 --- a/gdb-python-gil.patch +++ b/gdb-python-gil.patch @@ -9,7 +9,7 @@ FileName: gdb-python-gil.patch ;;=push diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi -index ebd48fffe7..ccf011e35e 100644 +index 4182b60ca3..fb074faf43 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -232,6 +232,14 @@ returned as a string. The default is @code{False}, in which case the @@ -28,7 +28,7 @@ index ebd48fffe7..ccf011e35e 100644 @findex gdb.breakpoints diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h -index c110588f76..89bbc6987b 100644 +index 26400f4fba..b8e2d9049d 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -148,6 +148,8 @@ typedef int Py_ssize_t; @@ -41,10 +41,10 @@ index c110588f76..89bbc6987b 100644 #endif diff --git a/gdb/python/python.c b/gdb/python/python.c -index 4844c86c54..610dda828c 100644 +index db37331dc4..4233b37fa8 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c -@@ -554,12 +554,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) +@@ -556,12 +556,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) { const char *arg; PyObject *from_tty_obj = NULL, *to_string_obj = NULL; @@ -65,7 +65,7 @@ index 4844c86c54..610dda828c 100644 return NULL; from_tty = 0; -@@ -580,12 +584,28 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) +@@ -582,6 +586,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) to_string = cmp; } @@ -81,8 +81,9 @@ index 4844c86c54..610dda828c 100644 std::string to_string_res; TRY - { - struct interp *interp; +@@ -602,6 +615,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) + + counted_command_line lines = read_command_lines_1 (reader, 1, nullptr); + /* In the case of long running GDB commands, allow the user to + release the Python GIL acquired by Python. Restore the GIL @@ -94,10 +95,10 @@ index 4844c86c54..610dda828c 100644 scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); scoped_restore save_uiout = make_scoped_restore (¤t_uiout); -@@ -600,10 +620,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - to_string_res = execute_command_to_string (arg, from_tty); +@@ -617,10 +637,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) + from_tty); else - execute_command (arg, from_tty); + execute_control_commands (lines.get (), from_tty); + + /* Reacquire the GIL if it was released earlier. */ + if (release_gil) diff --git a/gdb-readline62-ask-more-rh.patch b/gdb-readline62-ask-more-rh.patch index caf3d33..a1f7e97 100644 --- a/gdb-readline62-ask-more-rh.patch +++ b/gdb-readline62-ask-more-rh.patch @@ -9,7 +9,7 @@ FileName: gdb-readline62-ask-more-rh.patch ;;=fedora diff --git a/gdb/event-top.c b/gdb/event-top.c -index 0d668f35e0..4aa26125f9 100644 +index d9379b42c5..44d9a8c4e6 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing) diff --git a/gdb-rhbz1347993-aarch64-hw-watchpoint.patch b/gdb-rhbz1347993-aarch64-hw-watchpoint.patch deleted file mode 100644 index b76a403..0000000 --- a/gdb-rhbz1347993-aarch64-hw-watchpoint.patch +++ /dev/null @@ -1,1229 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Sergio Durigan Junior -Date: Thu, 17 May 2018 15:09:02 -0400 -Subject: Fix missed unaligned hardware watchpoints (RH BZ 1347993). - -FileName: gdb-rhbz1347993-aarch64-hw-watchpoint.patch - -;; [aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993). - -commit a3b60e4588606354b93508a0008a5ca04b68fad8 -Author: Jan Kratochvil -Date: Fri May 4 22:22:04 2018 +0200 - -aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones - -Some unaligned watchpoints were currently missed. - -On old kernels as specified in - kernel RFE: aarch64: ptrace: BAS: Support any contiguous range (edit) - https://sourceware.org/bugzilla/show_bug.cgi?id=20207 -after this patch some other unaligned watchpoints will get reported as false -positives. - -With new kernels all the watchpoints should work exactly. - -There may be a regresion that it now less merges watchpoints so that with -multiple overlapping watchpoints it may run out of the 4 hardware watchpoint -registers. But as discussed in the original thread GDB needs some generic -watchpoints merging framework to be used by all the target specific code. -Even current FSF GDB code does not merge it perfectly. Also with the more -precise watchpoints one can technically merge them less. And I do not think -it matters too much to improve mergeability only for old kernels. -Still even on new kernels some better merging logic would make sense. - -There remains one issue: - kernel-4.15.14-300.fc27.armv7hl - FAIL: gdb.base/watchpoint-unaligned.exp: continue - FAIL: gdb.base/watchpoint-unaligned.exp: continue - (gdb) continue - Continuing. - Unexpected error setting watchpoint: Invalid argument. - (gdb) FAIL: gdb.base/watchpoint-unaligned.exp: continue -But that looks as a kernel bug to me. -(1) It is not a regression by this patch. -(2) It is unrelated to this patch. - -gdb/ChangeLog -2018-05-04 Jan Kratochvil - Pedro Alves - - PR breakpoints/19806 and support for PR external/20207. - * NEWS: Mention Aarch64 watchpoint improvements. - * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed - watchpoints and PR external/20207 watchpoints. - * nat/aarch64-linux-hw-point.c - (kernel_supports_any_contiguous_range): New. - (aarch64_watchpoint_offset): New. - (aarch64_watchpoint_length): Support PR external/20207 watchpoints. - (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts. - (aarch64_point_is_aligned): Support PR external/20207 watchpoints. - (aarch64_align_watchpoint): New parameters aligned_offset_p and - next_addr_orig_p. Support PR external/20207 watchpoints. - (aarch64_downgrade_regs): New. - (aarch64_dr_state_insert_one_point): New parameters offset and - addr_orig. - (aarch64_dr_state_remove_one_point): Likewise. - (aarch64_handle_breakpoint): Update caller. - (aarch64_handle_aligned_watchpoint): Likewise. - (aarch64_handle_unaligned_watchpoint): Support addr_orig and - aligned_offset. - (aarch64_linux_set_debug_regs): Remove const from state. Call - aarch64_downgrade_regs. - (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp. - * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ... - (DR_CONTROL_MASK): ... this. - (struct aarch64_debug_reg_state): New field dr_addr_orig_wp. - (unsigned int aarch64_watchpoint_offset): New prototype. - (aarch64_linux_set_debug_regs): Remove const from state. - * utils.c (align_up, align_down): Move to ... - * common/common-utils.c (align_up, align_down): ... here. - * utils.h (align_up, align_down): Move to ... - * common/common-utils.h (align_up, align_down): ... here. - -gdb/gdbserver/ChangeLog -2018-05-04 Jan Kratochvil - Pedro Alves - - * linux-aarch64-low.c (aarch64_stopped_data_address): - Likewise. - -gdb/testsuite/ChangeLog -2018-05-04 Jan Kratochvil - Pedro Alves - - PR breakpoints/19806 and support for PR external/20207. - * gdb.base/watchpoint-unaligned.c: New file. - * gdb.base/watchpoint-unaligned.exp: New file. - -diff --git a/gdb/NEWS b/gdb/NEWS -index f40eb6c390..b7a3bc2635 100644 ---- a/gdb/NEWS -+++ b/gdb/NEWS -@@ -1,6 +1,18 @@ - What has changed in GDB? - (Organized release by release) - -+*** Changes since GDB 8.1 -+ -+* Aarch64/Linux hardware watchpoints improvements -+ -+ Hardware watchpoints on unaligned addresses are now properly -+ supported when running Linux kernel 4.10 or higher: read and access -+ watchpoints are no longer spuriously missed, and all watchpoints -+ lengths between 1 and 8 bytes are supported. On older kernels, -+ watchpoints set on unaligned addresses are no longer missed, with -+ the tradeoff that there is a possibility of false hits being -+ reported. -+ - *** Changes in GDB 8.1 - - * Fortran: Support pointers to dynamic types. -diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c -index f08bf039e4..aa3b9a7800 100644 ---- a/gdb/aarch64-linux-nat.c -+++ b/gdb/aarch64-linux-nat.c -@@ -735,17 +735,39 @@ aarch64_linux_stopped_data_address (struct target_ops *target, - state = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid)); - for (i = aarch64_num_wp_regs - 1; i >= 0; --i) - { -+ const unsigned int offset -+ = aarch64_watchpoint_offset (state->dr_ctrl_wp[i]); - const unsigned int len = aarch64_watchpoint_length (state->dr_ctrl_wp[i]); - const CORE_ADDR addr_trap = (CORE_ADDR) siginfo.si_addr; -- const CORE_ADDR addr_watch = state->dr_addr_wp[i]; -+ const CORE_ADDR addr_watch = state->dr_addr_wp[i] + offset; -+ const CORE_ADDR addr_watch_aligned = align_down (state->dr_addr_wp[i], 8); -+ const CORE_ADDR addr_orig = state->dr_addr_orig_wp[i]; - - if (state->dr_ref_count_wp[i] - && DR_CONTROL_ENABLED (state->dr_ctrl_wp[i]) -- && addr_trap >= addr_watch -+ && addr_trap >= addr_watch_aligned - && addr_trap < addr_watch + len) - { -- *addr_p = addr_trap; -- return 1; -+ /* ADDR_TRAP reports the first address of the memory range -+ accessed by the CPU, regardless of what was the memory -+ range watched. Thus, a large CPU access that straddles -+ the ADDR_WATCH..ADDR_WATCH+LEN range may result in an -+ ADDR_TRAP that is lower than the -+ ADDR_WATCH..ADDR_WATCH+LEN range. E.g.: -+ -+ addr: | 4 | 5 | 6 | 7 | 8 | -+ |---- range watched ----| -+ |----------- range accessed ------------| -+ -+ In this case, ADDR_TRAP will be 4. -+ -+ To match a watchpoint known to GDB core, we must never -+ report *ADDR_P outside of any ADDR_WATCH..ADDR_WATCH+LEN -+ range. ADDR_WATCH <= ADDR_TRAP < ADDR_ORIG is a false -+ positive on kernels older than 4.10. See PR -+ external/20207. */ -+ *addr_p = addr_orig; -+ return true; - } - } - -diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c -index ae2dd9db2b..24b3936f3d 100644 ---- a/gdb/common/common-utils.c -+++ b/gdb/common/common-utils.c -@@ -408,3 +408,23 @@ stringify_argv (const std::vector &args) - - return ret; - } -+ -+/* See common/common-utils.h. */ -+ -+ULONGEST -+align_up (ULONGEST v, int n) -+{ -+ /* Check that N is really a power of two. */ -+ gdb_assert (n && (n & (n-1)) == 0); -+ return (v + n - 1) & -n; -+} -+ -+/* See common/common-utils.h. */ -+ -+ULONGEST -+align_down (ULONGEST v, int n) -+{ -+ /* Check that N is really a power of two. */ -+ gdb_assert (n && (n & (n-1)) == 0); -+ return (v & -n); -+} -diff --git a/gdb/common/common-utils.h b/gdb/common/common-utils.h -index 2320318de7..a961514fd6 100644 ---- a/gdb/common/common-utils.h -+++ b/gdb/common/common-utils.h -@@ -146,4 +146,36 @@ in_inclusive_range (T value, T low, T high) - return value >= low && value <= high; - } - -+/* Ensure that V is aligned to an N byte boundary (B's assumed to be a -+ power of 2). Round up/down when necessary. Examples of correct -+ use include: -+ -+ addr = align_up (addr, 8); -- VALUE needs 8 byte alignment -+ write_memory (addr, value, len); -+ addr += len; -+ -+ and: -+ -+ sp = align_down (sp - len, 16); -- Keep SP 16 byte aligned -+ write_memory (sp, value, len); -+ -+ Note that uses such as: -+ -+ write_memory (addr, value, len); -+ addr += align_up (len, 8); -+ -+ and: -+ -+ sp -= align_up (len, 8); -+ write_memory (sp, value, len); -+ -+ are typically not correct as they don't ensure that the address (SP -+ or ADDR) is correctly aligned (relying on previous alignment to -+ keep things right). This is also why the methods are called -+ "align_..." instead of "round_..." as the latter reads better with -+ this incorrect coding style. */ -+ -+extern ULONGEST align_up (ULONGEST v, int n); -+extern ULONGEST align_down (ULONGEST v, int n); -+ - #endif -diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c -index eccac4da13..7ea24c2363 100644 ---- a/gdb/gdbserver/linux-aarch64-low.c -+++ b/gdb/gdbserver/linux-aarch64-low.c -@@ -360,14 +360,39 @@ aarch64_stopped_data_address (void) - state = aarch64_get_debug_reg_state (pid_of (current_thread)); - for (i = aarch64_num_wp_regs - 1; i >= 0; --i) - { -+ const unsigned int offset -+ = aarch64_watchpoint_offset (state->dr_ctrl_wp[i]); - const unsigned int len = aarch64_watchpoint_length (state->dr_ctrl_wp[i]); - const CORE_ADDR addr_trap = (CORE_ADDR) siginfo.si_addr; -- const CORE_ADDR addr_watch = state->dr_addr_wp[i]; -+ const CORE_ADDR addr_watch = state->dr_addr_wp[i] + offset; -+ const CORE_ADDR addr_watch_aligned = align_down (state->dr_addr_wp[i], 8); -+ const CORE_ADDR addr_orig = state->dr_addr_orig_wp[i]; -+ - if (state->dr_ref_count_wp[i] - && DR_CONTROL_ENABLED (state->dr_ctrl_wp[i]) -- && addr_trap >= addr_watch -+ && addr_trap >= addr_watch_aligned - && addr_trap < addr_watch + len) -- return addr_trap; -+ { -+ /* ADDR_TRAP reports the first address of the memory range -+ accessed by the CPU, regardless of what was the memory -+ range watched. Thus, a large CPU access that straddles -+ the ADDR_WATCH..ADDR_WATCH+LEN range may result in an -+ ADDR_TRAP that is lower than the -+ ADDR_WATCH..ADDR_WATCH+LEN range. E.g.: -+ -+ addr: | 4 | 5 | 6 | 7 | 8 | -+ |---- range watched ----| -+ |----------- range accessed ------------| -+ -+ In this case, ADDR_TRAP will be 4. -+ -+ To match a watchpoint known to GDB core, we must never -+ report *ADDR_P outside of any ADDR_WATCH..ADDR_WATCH+LEN -+ range. ADDR_WATCH <= ADDR_TRAP < ADDR_ORIG is a false -+ positive on kernels older than 4.10. See PR -+ external/20207. */ -+ return addr_orig; -+ } - } - - return (CORE_ADDR) 0; -diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c -index e9ebc5fba8..10cbf3e4df 100644 ---- a/gdb/nat/aarch64-linux-hw-point.c -+++ b/gdb/nat/aarch64-linux-hw-point.c -@@ -34,29 +34,52 @@ - int aarch64_num_bp_regs; - int aarch64_num_wp_regs; - -+/* True if this kernel does not have the bug described by PR -+ external/20207 (Linux >= 4.10). A fixed kernel supports any -+ contiguous range of bits in 8-bit byte DR_CONTROL_MASK. A buggy -+ kernel supports only 0x01, 0x03, 0x0f and 0xff. We start by -+ assuming the bug is fixed, and then detect the bug at -+ PTRACE_SETREGSET time. */ -+static bool kernel_supports_any_contiguous_range = true; -+ -+/* Return starting byte 0..7 incl. of a watchpoint encoded by CTRL. */ -+ -+unsigned int -+aarch64_watchpoint_offset (unsigned int ctrl) -+{ -+ uint8_t mask = DR_CONTROL_MASK (ctrl); -+ unsigned retval; -+ -+ /* Shift out bottom zeros. */ -+ for (retval = 0; mask && (mask & 1) == 0; ++retval) -+ mask >>= 1; -+ -+ return retval; -+} -+ - /* Utility function that returns the length in bytes of a watchpoint - according to the content of a hardware debug control register CTRL. -- Note that the kernel currently only supports the following Byte -- Address Select (BAS) values: 0x1, 0x3, 0xf and 0xff, which means -- that for a hardware watchpoint, its valid length can only be 1 -- byte, 2 bytes, 4 bytes or 8 bytes. */ -+ Any contiguous range of bytes in CTRL is supported. The returned -+ value can be between 0..8 (inclusive). */ - - unsigned int - aarch64_watchpoint_length (unsigned int ctrl) - { -- switch (DR_CONTROL_LENGTH (ctrl)) -- { -- case 0x01: -- return 1; -- case 0x03: -- return 2; -- case 0x0f: -- return 4; -- case 0xff: -- return 8; -- default: -- return 0; -- } -+ uint8_t mask = DR_CONTROL_MASK (ctrl); -+ unsigned retval; -+ -+ /* Shift out bottom zeros. */ -+ mask >>= aarch64_watchpoint_offset (ctrl); -+ -+ /* Count bottom ones. */ -+ for (retval = 0; (mask & 1) != 0; ++retval) -+ mask >>= 1; -+ -+ if (mask != 0) -+ error (_("Unexpected hardware watchpoint length register value 0x%x"), -+ DR_CONTROL_MASK (ctrl)); -+ -+ return retval; - } - - /* Given the hardware breakpoint or watchpoint type TYPE and its -@@ -64,10 +87,13 @@ aarch64_watchpoint_length (unsigned int ctrl) - breakpoint/watchpoint control register. */ - - static unsigned int --aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len) -+aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int offset, int len) - { - unsigned int ctrl, ttype; - -+ gdb_assert (offset == 0 || kernel_supports_any_contiguous_range); -+ gdb_assert (offset + len <= AARCH64_HWP_MAX_LEN_PER_REG); -+ - /* type */ - switch (type) - { -@@ -89,8 +115,8 @@ aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len) - - ctrl = ttype << 3; - -- /* length bitmask */ -- ctrl |= ((1 << len) - 1) << 5; -+ /* offset and length bitmask */ -+ ctrl |= ((1 << len) - 1) << (5 + offset); - /* enabled at el0 */ - ctrl |= (2 << 1) | 1; - -@@ -134,59 +160,65 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len) - if (addr & (alignment - 1)) - return 0; - -- if (len != 8 && len != 4 && len != 2 && len != 1) -+ if ((!kernel_supports_any_contiguous_range -+ && len != 8 && len != 4 && len != 2 && len != 1) -+ || (kernel_supports_any_contiguous_range -+ && (len < 1 || len > 8))) - return 0; - - return 1; - } - - /* Given the (potentially unaligned) watchpoint address in ADDR and -- length in LEN, return the aligned address and aligned length in -- *ALIGNED_ADDR_P and *ALIGNED_LEN_P, respectively. The returned -- aligned address and length will be valid values to write to the -- hardware watchpoint value and control registers. -+ length in LEN, return the aligned address, offset from that base -+ address, and aligned length in *ALIGNED_ADDR_P, *ALIGNED_OFFSET_P -+ and *ALIGNED_LEN_P, respectively. The returned values will be -+ valid values to write to the hardware watchpoint value and control -+ registers. - - The given watchpoint may get truncated if more than one hardware - register is needed to cover the watched region. *NEXT_ADDR_P - and *NEXT_LEN_P, if non-NULL, will return the address and length - of the remaining part of the watchpoint (which can be processed -- by calling this routine again to generate another aligned address -- and length pair. -+ by calling this routine again to generate another aligned address, -+ offset and length tuple. - - Essentially, unaligned watchpoint is achieved by minimally - enlarging the watched area to meet the alignment requirement, and - if necessary, splitting the watchpoint over several hardware -- watchpoint registers. The trade-off is that there will be -- false-positive hits for the read-type or the access-type hardware -- watchpoints; for the write type, which is more commonly used, there -- will be no such issues, as the higher-level breakpoint management -- in gdb always examines the exact watched region for any content -- change, and transparently resumes a thread from a watchpoint trap -- if there is no change to the watched region. -+ watchpoint registers. -+ -+ On kernels that predate the support for Byte Address Select (BAS) -+ in the hardware watchpoint control register, the offset from the -+ base address is always zero, and so in that case the trade-off is -+ that there will be false-positive hits for the read-type or the -+ access-type hardware watchpoints; for the write type, which is more -+ commonly used, there will be no such issues, as the higher-level -+ breakpoint management in gdb always examines the exact watched -+ region for any content change, and transparently resumes a thread -+ from a watchpoint trap if there is no change to the watched region. - - Another limitation is that because the watched region is enlarged, -- the watchpoint fault address returned by -+ the watchpoint fault address discovered by - aarch64_stopped_data_address may be outside of the original watched - region, especially when the triggering instruction is accessing a - larger region. When the fault address is not within any known - range, watchpoints_triggered in gdb will get confused, as the - higher-level watchpoint management is only aware of original - watched regions, and will think that some unknown watchpoint has -- been triggered. In such a case, gdb may stop without displaying -- any detailed information. -- -- Once the kernel provides the full support for Byte Address Select -- (BAS) in the hardware watchpoint control register, these -- limitations can be largely relaxed with some further work. */ -+ been triggered. To prevent such a case, -+ aarch64_stopped_data_address implementations in gdb and gdbserver -+ try to match the trapped address with a watched region, and return -+ an address within the latter. */ - - static void --aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, -- CORE_ADDR *aligned_addr_p, -- int *aligned_len_p, CORE_ADDR *next_addr_p, -- LONGEST *next_len_p) -+aarch64_align_watchpoint (CORE_ADDR addr, int 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_orig_p) - { - int aligned_len; -- unsigned int offset; -+ unsigned int offset, aligned_offset; - CORE_ADDR aligned_addr; - const unsigned int alignment = AARCH64_HWP_ALIGNMENT; - const unsigned int max_wp_len = AARCH64_HWP_MAX_LEN_PER_REG; -@@ -197,10 +229,12 @@ aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, - if (len <= 0) - return; - -- /* Address to be put into the hardware watchpoint value register -- must be aligned. */ -+ /* The address put into the hardware watchpoint value register must -+ be aligned. */ - offset = addr & (alignment - 1); - aligned_addr = addr - offset; -+ aligned_offset -+ = kernel_supports_any_contiguous_range ? addr & (alignment - 1) : 0; - - gdb_assert (offset >= 0 && offset < alignment); - gdb_assert (aligned_addr >= 0 && aligned_addr <= addr); -@@ -208,9 +242,10 @@ aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, - - if (offset + len >= max_wp_len) - { -- /* Need more than one watchpoint registers; truncate it at the -+ /* Need more than one watchpoint register; truncate at the - alignment boundary. */ -- aligned_len = max_wp_len; -+ aligned_len -+ = max_wp_len - (kernel_supports_any_contiguous_range ? offset : 0); - len -= (max_wp_len - offset); - addr += (max_wp_len - offset); - gdb_assert ((addr & (alignment - 1)) == 0); -@@ -223,19 +258,24 @@ aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, - aligned_len_array[AARCH64_HWP_MAX_LEN_PER_REG] = - { 1, 2, 4, 4, 8, 8, 8, 8 }; - -- aligned_len = aligned_len_array[offset + len - 1]; -+ aligned_len = (kernel_supports_any_contiguous_range -+ ? len : aligned_len_array[offset + len - 1]); - addr += len; - len = 0; - } - - if (aligned_addr_p) - *aligned_addr_p = aligned_addr; -+ if (aligned_offset_p) -+ *aligned_offset_p = aligned_offset; - if (aligned_len_p) - *aligned_len_p = aligned_len; - if (next_addr_p) - *next_addr_p = addr; - if (next_len_p) - *next_len_p = len; -+ if (next_addr_orig_p) -+ *next_addr_orig_p = align_down (*next_addr_orig_p + alignment, alignment); - } - - struct aarch64_dr_update_callback_param -@@ -325,17 +365,73 @@ aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state, - iterate_over_lwps (pid_ptid, debug_reg_change_callback, (void *) ¶m); - } - -+/* Reconfigure STATE to be compatible with Linux kernels with the PR -+ external/20207 bug. This is called when -+ KERNEL_SUPPORTS_ANY_CONTIGUOUS_RANGE transitions to false. Note we -+ don't try to support combining watchpoints with matching (and thus -+ shared) masks, as it's too late when we get here. On buggy -+ kernels, GDB will try to first setup the perfect matching ranges, -+ which will run out of registers before this function can merge -+ them. It doesn't look like worth the effort to improve that, given -+ eventually buggy kernels will be phased out. */ -+ -+static void -+aarch64_downgrade_regs (struct aarch64_debug_reg_state *state) -+{ -+ for (int i = 0; i < aarch64_num_wp_regs; ++i) -+ if ((state->dr_ctrl_wp[i] & 1) != 0) -+ { -+ gdb_assert (state->dr_ref_count_wp[i] != 0); -+ uint8_t mask_orig = (state->dr_ctrl_wp[i] >> 5) & 0xff; -+ gdb_assert (mask_orig != 0); -+ static const uint8_t old_valid[] = { 0x01, 0x03, 0x0f, 0xff }; -+ uint8_t mask = 0; -+ for (const uint8_t old_mask : old_valid) -+ if (mask_orig <= old_mask) -+ { -+ mask = old_mask; -+ break; -+ } -+ gdb_assert (mask != 0); -+ -+ /* No update needed for this watchpoint? */ -+ if (mask == mask_orig) -+ continue; -+ state->dr_ctrl_wp[i] |= mask << 5; -+ state->dr_addr_wp[i] -+ = align_down (state->dr_addr_wp[i], AARCH64_HWP_ALIGNMENT); -+ -+ /* Try to match duplicate entries. */ -+ for (int j = 0; j < i; ++j) -+ if ((state->dr_ctrl_wp[j] & 1) != 0 -+ && state->dr_addr_wp[j] == state->dr_addr_wp[i] -+ && state->dr_addr_orig_wp[j] == state->dr_addr_orig_wp[i] -+ && state->dr_ctrl_wp[j] == state->dr_ctrl_wp[i]) -+ { -+ state->dr_ref_count_wp[j] += state->dr_ref_count_wp[i]; -+ state->dr_ref_count_wp[i] = 0; -+ state->dr_addr_wp[i] = 0; -+ state->dr_addr_orig_wp[i] = 0; -+ state->dr_ctrl_wp[i] &= ~1; -+ break; -+ } -+ -+ aarch64_notify_debug_reg_change (state, 1 /* is_watchpoint */, i); -+ } -+} -+ - /* Record the insertion of one breakpoint/watchpoint, as represented - by ADDR and CTRL, in the process' arch-specific data area *STATE. */ - - static int - aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - enum target_hw_bp_type type, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, int offset, int len, -+ CORE_ADDR addr_orig) - { - int i, idx, num_regs, is_watchpoint; - unsigned int ctrl, *dr_ctrl_p, *dr_ref_count; -- CORE_ADDR *dr_addr_p; -+ CORE_ADDR *dr_addr_p, *dr_addr_orig_p; - - /* Set up state pointers. */ - is_watchpoint = (type != hw_execute); -@@ -344,6 +440,7 @@ aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - { - num_regs = aarch64_num_wp_regs; - dr_addr_p = state->dr_addr_wp; -+ dr_addr_orig_p = state->dr_addr_orig_wp; - dr_ctrl_p = state->dr_ctrl_wp; - dr_ref_count = state->dr_ref_count_wp; - } -@@ -351,11 +448,12 @@ aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - { - num_regs = aarch64_num_bp_regs; - dr_addr_p = state->dr_addr_bp; -+ dr_addr_orig_p = nullptr; - dr_ctrl_p = state->dr_ctrl_bp; - dr_ref_count = state->dr_ref_count_bp; - } - -- ctrl = aarch64_point_encode_ctrl_reg (type, len); -+ ctrl = aarch64_point_encode_ctrl_reg (type, offset, len); - - /* Find an existing or free register in our cache. */ - idx = -1; -@@ -367,7 +465,9 @@ aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - idx = i; - /* no break; continue hunting for an exising one. */ - } -- else if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl) -+ else if (dr_addr_p[i] == addr -+ && (dr_addr_orig_p == nullptr || dr_addr_orig_p[i] == addr_orig) -+ && dr_ctrl_p[i] == ctrl) - { - gdb_assert (dr_ref_count[i] != 0); - idx = i; -@@ -384,6 +484,8 @@ aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - { - /* new entry */ - dr_addr_p[idx] = addr; -+ if (dr_addr_orig_p != nullptr) -+ dr_addr_orig_p[idx] = addr_orig; - dr_ctrl_p[idx] = ctrl; - dr_ref_count[idx] = 1; - /* Notify the change. */ -@@ -404,11 +506,12 @@ aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, - static int - aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state, - enum target_hw_bp_type type, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, int offset, int len, -+ CORE_ADDR addr_orig) - { - int i, num_regs, is_watchpoint; - unsigned int ctrl, *dr_ctrl_p, *dr_ref_count; -- CORE_ADDR *dr_addr_p; -+ CORE_ADDR *dr_addr_p, *dr_addr_orig_p; - - /* Set up state pointers. */ - is_watchpoint = (type != hw_execute); -@@ -416,6 +519,7 @@ aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state, - { - num_regs = aarch64_num_wp_regs; - dr_addr_p = state->dr_addr_wp; -+ dr_addr_orig_p = state->dr_addr_orig_wp; - dr_ctrl_p = state->dr_ctrl_wp; - dr_ref_count = state->dr_ref_count_wp; - } -@@ -423,15 +527,18 @@ aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state, - { - num_regs = aarch64_num_bp_regs; - dr_addr_p = state->dr_addr_bp; -+ dr_addr_orig_p = nullptr; - dr_ctrl_p = state->dr_ctrl_bp; - dr_ref_count = state->dr_ref_count_bp; - } - -- ctrl = aarch64_point_encode_ctrl_reg (type, len); -+ ctrl = aarch64_point_encode_ctrl_reg (type, offset, len); - - /* Find the entry that matches the ADDR and CTRL. */ - for (i = 0; i < num_regs; ++i) -- if (dr_addr_p[i] == addr && dr_ctrl_p[i] == ctrl) -+ if (dr_addr_p[i] == addr -+ && (dr_addr_orig_p == nullptr || dr_addr_orig_p[i] == addr_orig) -+ && dr_ctrl_p[i] == ctrl) - { - gdb_assert (dr_ref_count[i] != 0); - break; -@@ -447,6 +554,8 @@ aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state, - /* Clear the enable bit. */ - ctrl &= ~1; - dr_addr_p[i] = 0; -+ if (dr_addr_orig_p != nullptr) -+ dr_addr_orig_p[i] = 0; - dr_ctrl_p[i] = ctrl; - /* Notify the change. */ - aarch64_notify_debug_reg_change (state, is_watchpoint, i); -@@ -473,10 +582,10 @@ aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, - if (!aarch64_point_is_aligned (0 /* is_watchpoint */ , addr, len)) - return -1; - -- return aarch64_dr_state_insert_one_point (state, type, addr, len); -+ return aarch64_dr_state_insert_one_point (state, type, addr, 0, len, -1); - } - else -- return aarch64_dr_state_remove_one_point (state, type, addr, len); -+ return aarch64_dr_state_remove_one_point (state, type, addr, 0, len, -1); - } - - /* This is essentially the same as aarch64_handle_breakpoint, apart -@@ -488,9 +597,9 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, - struct aarch64_debug_reg_state *state) - { - if (is_insert) -- return aarch64_dr_state_insert_one_point (state, type, addr, len); -+ return aarch64_dr_state_insert_one_point (state, type, addr, 0, len, addr); - else -- return aarch64_dr_state_remove_one_point (state, type, addr, len); -+ return aarch64_dr_state_remove_one_point (state, type, addr, 0, len, addr); - } - - /* Insert/remove unaligned watchpoint by calling -@@ -502,32 +611,45 @@ 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, LONGEST len, int is_insert, -+ CORE_ADDR addr, int len, int is_insert, - struct aarch64_debug_reg_state *state) - { -+ CORE_ADDR addr_orig = addr; -+ - while (len > 0) - { - CORE_ADDR aligned_addr; -- int aligned_len, ret; -+ int aligned_offset, aligned_len, ret; -+ CORE_ADDR addr_orig_next = addr_orig; - -- aarch64_align_watchpoint (addr, len, &aligned_addr, &aligned_len, -- &addr, &len); -+ aarch64_align_watchpoint (addr, len, &aligned_addr, &aligned_offset, -+ &aligned_len, &addr, &len, &addr_orig_next); - - if (is_insert) - ret = aarch64_dr_state_insert_one_point (state, type, aligned_addr, -- aligned_len); -+ aligned_offset, -+ aligned_len, addr_orig); - else - ret = aarch64_dr_state_remove_one_point (state, type, aligned_addr, -- aligned_len); -+ aligned_offset, -+ aligned_len, addr_orig); - - if (show_debug_regs) - debug_printf ("handle_unaligned_watchpoint: is_insert: %d\n" - " " - "aligned_addr: %s, aligned_len: %d\n" - " " -- "next_addr: %s, next_len: %s\n", -+ "addr_orig: %s\n" -+ " " -+ "next_addr: %s, next_len: %d\n" -+ " " -+ "addr_orig_next: %s\n", - is_insert, core_addr_to_string_nz (aligned_addr), -- aligned_len, core_addr_to_string_nz (addr), plongest (len)); -+ aligned_len, core_addr_to_string_nz (addr_orig), -+ core_addr_to_string_nz (addr), len, -+ core_addr_to_string_nz (addr_orig_next)); -+ -+ addr_orig = addr_orig_next; - - if (ret != 0) - return ret; -@@ -553,7 +675,7 @@ aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, - registers with data from *STATE. */ - - void --aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, -+aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, - int tid, int watchpoint) - { - int i, count; -@@ -581,7 +703,18 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, - if (ptrace (PTRACE_SETREGSET, tid, - watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK, - (void *) &iov)) -- error (_("Unexpected error setting hardware debug registers")); -+ { -+ /* Handle Linux kernels with the PR external/20207 bug. */ -+ if (watchpoint && errno == EINVAL -+ && kernel_supports_any_contiguous_range) -+ { -+ kernel_supports_any_contiguous_range = false; -+ aarch64_downgrade_regs (state); -+ aarch64_linux_set_debug_regs (state, tid, watchpoint); -+ return; -+ } -+ error (_("Unexpected error setting hardware debug registers")); -+ } - } - - /* Print the values of the cached breakpoint/watchpoint registers. */ -@@ -612,8 +745,9 @@ aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, - - debug_printf ("\tWATCHPOINTs:\n"); - for (i = 0; i < aarch64_num_wp_regs; i++) -- debug_printf ("\tWP%d: addr=%s, ctrl=0x%08x, ref.count=%d\n", -+ debug_printf ("\tWP%d: addr=%s (orig=%s), ctrl=0x%08x, ref.count=%d\n", - i, core_addr_to_string_nz (state->dr_addr_wp[i]), -+ core_addr_to_string_nz (state->dr_addr_orig_wp[i]), - state->dr_ctrl_wp[i], state->dr_ref_count_wp[i]); - } - -diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h -index e1d4fc8dbc..b5ba6415c0 100644 ---- a/gdb/nat/aarch64-linux-hw-point.h -+++ b/gdb/nat/aarch64-linux-hw-point.h -@@ -77,13 +77,13 @@ - - 31 13 5 3 1 0 - +--------------------------------+----------+------+------+----+ -- | RESERVED (SBZ) | LENGTH | TYPE | PRIV | EN | -+ | RESERVED (SBZ) | MASK | TYPE | PRIV | EN | - +--------------------------------+----------+------+------+----+ - - The TYPE field is ignored for breakpoints. */ - - #define DR_CONTROL_ENABLED(ctrl) (((ctrl) & 0x1) == 1) --#define DR_CONTROL_LENGTH(ctrl) (((ctrl) >> 5) & 0xff) -+#define DR_CONTROL_MASK(ctrl) (((ctrl) >> 5) & 0xff) - - /* Each bit of a variable of this type is used to indicate whether a - hardware breakpoint or watchpoint setting has been changed since -@@ -147,7 +147,10 @@ struct aarch64_debug_reg_state - unsigned int dr_ref_count_bp[AARCH64_HBP_MAX_NUM]; - - /* hardware watchpoint */ -+ /* Address aligned down to AARCH64_HWP_ALIGNMENT. */ - CORE_ADDR dr_addr_wp[AARCH64_HWP_MAX_NUM]; -+ /* Address as entered by user without any forced alignment. */ -+ CORE_ADDR dr_addr_orig_wp[AARCH64_HWP_MAX_NUM]; - unsigned int dr_ctrl_wp[AARCH64_HWP_MAX_NUM]; - unsigned int dr_ref_count_wp[AARCH64_HWP_MAX_NUM]; - }; -@@ -166,6 +169,7 @@ struct arch_lwp_info - extern int aarch64_num_bp_regs; - extern int aarch64_num_wp_regs; - -+unsigned int aarch64_watchpoint_offset (unsigned int ctrl); - unsigned int aarch64_watchpoint_length (unsigned int ctrl); - - int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, -@@ -175,7 +179,7 @@ int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, - LONGEST len, int is_insert, - struct aarch64_debug_reg_state *state); - --void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, -+void aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, - int tid, int watchpoint); - - void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, -diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.c b/gdb/testsuite/gdb.base/watchpoint-unaligned.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.c -@@ -0,0 +1,96 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2017-2018 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 . */ -+ -+#include -+#include -+ -+static int again; -+ -+static volatile struct -+{ -+ uint64_t alignment; -+ union -+ { -+ uint64_t size8[1]; -+ uint32_t size4[2]; -+ uint16_t size2[4]; -+ uint8_t size1[8]; -+ uint64_t size8twice[2]; -+ } -+ u; -+} data; -+ -+static int size = 0; -+static int offset; -+ -+static void -+write_size8twice (void) -+{ -+ static const uint64_t first = 1; -+ static const uint64_t second = 2; -+ -+#ifdef __aarch64__ -+ asm volatile ("stp %1, %2, [%0]" -+ : /* output */ -+ : "r" (data.u.size8twice), "r" (first), "r" (second) /* input */ -+ : "memory" /* clobber */); -+#else -+ data.u.size8twice[0] = first; -+ data.u.size8twice[1] = second; -+#endif -+} -+ -+int -+main (void) -+{ -+ volatile uint64_t local; -+ -+ assert (sizeof (data) == 8 + 2 * 8); -+ -+ write_size8twice (); -+ -+ while (size) -+ { -+ switch (size) -+ { -+/* __s390x__ also defines __s390__ */ -+#ifdef __s390__ -+# define ACCESS(var) var = ~var -+#else -+# define ACCESS(var) local = var -+#endif -+ case 8: -+ ACCESS (data.u.size8[offset]); -+ break; -+ case 4: -+ ACCESS (data.u.size4[offset]); -+ break; -+ case 2: -+ ACCESS (data.u.size2[offset]); -+ break; -+ case 1: -+ ACCESS (data.u.size1[offset]); -+ break; -+#undef ACCESS -+ default: -+ assert (0); -+ } -+ size = 0; -+ size = size; /* start_again */ -+ } -+ return 0; /* final_return */ -+} -diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp -@@ -0,0 +1,184 @@ -+# Copyright 2017-2018 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 . -+# -+# This file is part of the gdb testsuite. -+ -+# Test inserting read watchpoints on unaligned addresses. -+ -+standard_testfile -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { -+ return -1 -+} -+ -+if ![runto_main] { -+ untested "could not run to main" -+ return -1 -+} -+ -+gdb_breakpoint [gdb_get_line_number "start_again"] "Breakpoint $decimal at $hex" "start_again" -+ -+set sizes {1 2 4 8} -+array set alignedend {1 1 2 2 3 4 4 4 5 8 6 8 7 8 8 8} -+ -+set rwatch "rwatch" -+set rwatch_exp "Hardware read watchpoint" -+if {[istarget "s390*-*-*"]} { -+ # Target does not support this type of hardware watchpoint." -+ set rwatch "watch" -+ set rwatch_exp "Hardware watchpoint" -+} -+ -+foreach wpsize $sizes { -+ for {set wpoffset 0} {$wpoffset < 8 / $wpsize} {incr wpoffset} { -+ set wpstart [expr $wpoffset * $wpsize] -+ set wpend [expr ($wpoffset + 1) * $wpsize] -+ set wpendaligned $alignedend($wpend) -+ foreach rdsize $sizes { -+ for {set rdoffset 0} {$rdoffset < 8 / $rdsize} {incr rdoffset} { -+ set rdstart [expr $rdoffset * $rdsize] -+ set rdend [expr ($rdoffset + 1) * $rdsize] -+ set expect_hit [expr max ($wpstart, $rdstart) < min ($wpend, $rdend)] -+ set test "$rwatch data.u.size$wpsize\[$wpoffset\]" -+ set wpnum "" -+ gdb_test_multiple $test $test { -+ -re "$rwatch_exp (\[0-9\]+): .*\r\n$gdb_prompt $" { -+ set wpnum $expect_out(1,string) -+ } -+ -re "Expression cannot be implemented with read/access watchpoint.\r\n$gdb_prompt $" { -+ if {$wpsize == 8 && [istarget "arm*-*-*"]} { -+ untested $test -+ continue -+ } -+ fail $test -+ } -+ } -+ gdb_test_no_output "set variable size = $rdsize" "" -+ gdb_test_no_output "set variable offset = $rdoffset" "" -+ set test "continue" -+ set got_hit 0 -+ gdb_test_multiple $test $test { -+ -re "$rwatch_exp $wpnum:.*alue = .*\r\n$gdb_prompt $" { -+ set got_hit 1 -+ send_gdb "continue\n" -+ exp_continue -+ } -+ -re " start_again .*\r\n$gdb_prompt $" { -+ } -+ } -+ gdb_test_no_output "delete $wpnum" "" -+ set test "wp(size=$wpsize offset=$wpoffset) rd(size=$rdsize offset=$rdoffset) expect=$expect_hit" -+ if {$expect_hit == $got_hit} { -+ pass $test -+ } else { -+ # We do not know if we run on a fixed Linux kernel -+ # or not. Report XFAIL only in the FAIL case. -+ if {$expect_hit == 0 && $rdstart < $wpendaligned} { -+ setup_xfail external/20207 "aarch64*-*-linux*" -+ } -+ if {!$expect_hit && [expr max ($wpstart / 8, $rdstart / 8) < min (($wpend + 7) / 8, ($rdend + 7) / 8)]} { -+ setup_xfail breakpoints/23131 "powerpc*-*-*" -+ } -+ fail $test -+ } -+ } -+ } -+ } -+} -+ -+foreach wpcount {4 7} { -+ array set wpoffset_to_wpnum {} -+ for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} { -+ set test "$rwatch data.u.size1\[$wpoffset\]" -+ set wpnum "" -+ gdb_test_multiple $test $test { -+ -re "$rwatch_exp (\[0-9\]+): .*\r\n$gdb_prompt $" { -+ set wpoffset_to_wpnum($wpoffset) $expect_out(1,string) -+ } -+ -re "There are not enough available hardware resources for this watchpoint.\r\n$gdb_prompt $" { -+ if {$wpoffset > 1} { -+ setup_xfail breakpoints/23131 "powerpc*-*-*" -+ setup_xfail breakpoints/23131 "arm*-*-*" -+ } -+ fail $test -+ set wpoffset_to_wpnum($wpoffset) 0 -+ } -+ } -+ } -+ gdb_test_no_output "set variable size = 1" "" -+ gdb_test_no_output "set variable offset = 1" "" -+ set test "continue" -+ set got_hit 0 -+ gdb_test_multiple $test $test { -+ -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" { -+ } -+ -re "$rwatch_exp $wpoffset_to_wpnum(1):.*alue = .*\r\n$gdb_prompt $" { -+ set got_hit 1 -+ send_gdb "continue\n" -+ exp_continue -+ } -+ -re " start_again .*\r\n$gdb_prompt $" { -+ } -+ } -+ for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} { -+ if {$wpoffset_to_wpnum($wpoffset)} { -+ gdb_test_no_output "delete $wpoffset_to_wpnum($wpoffset)" "" -+ } -+ } -+ set test "wpcount($wpcount)" -+ if {!$wpoffset_to_wpnum([expr $wpcount - 1])} { -+ untested $test -+ continue -+ } -+ if {$wpcount > 4} { -+ if {![istarget "s390*-*-*"]} { -+ setup_kfail tdep/22389 *-*-* -+ } -+ } -+ gdb_assert $got_hit $test -+} -+ -+if ![runto_main] { -+ return -1 -+} -+gdb_breakpoint [gdb_get_line_number "final_return"] "Breakpoint $decimal at $hex" "final_return" -+set test {watch data.u.size8twice[1]} -+set wpnum "" -+gdb_test_multiple $test $test { -+ -re "Hardware watchpoint (\[0-9\]+): .*\r\n$gdb_prompt $" { -+ set wpnum $expect_out(1,string) -+ } -+ -re "Watchpoint (\[0-9\]+): .*\r\n$gdb_prompt $" { -+ if {[istarget "arm*-*-*"]} { -+ untested $test -+ set wpnum 0 -+ } -+ } -+} -+if {$wpnum} { -+ set test "continue" -+ set got_hit 0 -+ gdb_test_multiple $test $test { -+ -re "\r\nCould not insert hardware watchpoint .*\r\n$gdb_prompt $" { -+ } -+ -re "Hardware watchpoint $wpnum:.*New value = .*\r\n$gdb_prompt $" { -+ set got_hit 1 -+ send_gdb "continue\n" -+ exp_continue -+ } -+ -re " final_return .*\r\n$gdb_prompt $" { -+ } -+ } -+ gdb_assert $got_hit "size8twice write" -+} -diff --git a/gdb/utils.c b/gdb/utils.c -index 58c0380d17..26ec9f1ee8 100644 ---- a/gdb/utils.c -+++ b/gdb/utils.c -@@ -3010,22 +3010,6 @@ gdb_abspath (const char *path) - path, (char *) NULL)); - } - --ULONGEST --align_up (ULONGEST v, int n) --{ -- /* Check that N is really a power of two. */ -- gdb_assert (n && (n & (n-1)) == 0); -- return (v + n - 1) & -n; --} -- --ULONGEST --align_down (ULONGEST v, int n) --{ -- /* Check that N is really a power of two. */ -- gdb_assert (n && (n & (n-1)) == 0); -- return (v & -n); --} -- - /* Allocation function for the libiberty hash table which uses an - obstack. The obstack is passed as DATA. */ - -diff --git a/gdb/utils.h b/gdb/utils.h -index b234762929..d01d283baa 100644 ---- a/gdb/utils.h -+++ b/gdb/utils.h -@@ -498,38 +498,6 @@ extern pid_t wait_to_die_with_timeout (pid_t pid, int *status, int timeout); - - extern int myread (int, char *, int); - --/* Ensure that V is aligned to an N byte boundary (B's assumed to be a -- power of 2). Round up/down when necessary. Examples of correct -- use include: -- -- addr = align_up (addr, 8); -- VALUE needs 8 byte alignment -- write_memory (addr, value, len); -- addr += len; -- -- and: -- -- sp = align_down (sp - len, 16); -- Keep SP 16 byte aligned -- write_memory (sp, value, len); -- -- Note that uses such as: -- -- write_memory (addr, value, len); -- addr += align_up (len, 8); -- -- and: -- -- sp -= align_up (len, 8); -- write_memory (sp, value, len); -- -- are typically not correct as they don't ensure that the address (SP -- or ADDR) is correctly aligned (relying on previous alignment to -- keep things right). This is also why the methods are called -- "align_..." instead of "round_..." as the latter reads better with -- this incorrect coding style. */ -- --extern ULONGEST align_up (ULONGEST v, int n); --extern ULONGEST align_down (ULONGEST v, int n); -- - /* Resource limits used by getrlimit and setrlimit. */ - - enum resource_limit_kind diff --git a/gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch b/gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch deleted file mode 100644 index 2f71894..0000000 --- a/gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch +++ /dev/null @@ -1,129 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jan Kratochvil -Date: Sun, 4 Feb 2018 20:55:04 +0100 -Subject: gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch - -FileName: gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch - -;; Fix -D_GLIBCXX_DEBUG gdb-add-index regression (RH BZ 1540559). - -gdb: Out-of-bounds vector access while running gdb-add-index -https://bugzilla.redhat.com/show_bug.cgi?id=1540559 - -Fedora Rawhide started to use -D_GLIBCXX_DEBUG which made gdb-add-index -failing. - -/usr/include/c++/7/debug/safe_iterator.h:270: -Error: attempt to dereference a past-the-end iterator. -Objects involved in the operation: - iterator "this" @ 0x0x7fffffffcb90 { - type = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator > > >, std::__debug::vector > > > (mutable iterator); - state = past-the-end; - references sequence with type 'std::__debug::vector > >' @ 0x0x7fffffffcc50 - } - -/usr/include/c++/7/debug/vector:417: -Error: attempt to subscript container with out-of-bounds index 556, but -container only holds 556 elements. -Objects involved in the operation: - sequence "this" @ 0x0x2e87af8 { - type = std::__debug::vector >; - } - -I do not know if anyone regression-tests GDB with -D_GLIBCXX_DEBUG, -I have just checked -D_GLIBCXX_DEBUG run against gdb-add-index. - -The two -D_GLIBCXX_DEBUG regressions were made by: - -commit bc8f2430e08cc2a520db49a42686e0529be4a3bc -Author: Jan Kratochvil -Date: Mon Jun 12 16:29:53 2017 +0100 - Code cleanup: C++ify .gdb_index producer - -commit af5bf4ada48ff65b6658be1fab8f9c8f8ab5f319 -Author: Simon Marchi -Date: Sat Oct 14 08:06:29 2017 -0400 - Replace psymbol_allocation_list with std::vector - -gdb/ChangeLog -2018-02-04 Jan Kratochvil - - * dwarf2read.c (data_buf::grow) (write_one_signatured_type) - (recursively_write_psymbols) (debug_names::recursively_write_psymbols) - (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG - regression. - -diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 64329af71e..3c9b9dc188 100644 ---- a/gdb/dwarf2read.c -+++ b/gdb/dwarf2read.c -@@ -25696,7 +25696,7 @@ private: - gdb_byte *grow (size_t size) - { - m_vec.resize (m_vec.size () + size); -- return &*m_vec.end () - size; -+ return &*(m_vec.end () - size); - } - - gdb::byte_vector m_vec; -@@ -26130,12 +26130,14 @@ write_one_signatured_type (void **slot, void *d) - - write_psymbols (info->symtab, - info->psyms_seen, -- &info->objfile->global_psymbols[psymtab->globals_offset], -+ (info->objfile->global_psymbols.data() -+ + psymtab->globals_offset), - psymtab->n_global_syms, info->cu_index, - 0); - write_psymbols (info->symtab, - info->psyms_seen, -- &info->objfile->static_psymbols[psymtab->statics_offset], -+ (info->objfile->static_psymbols.data() -+ + psymtab->statics_offset), - psymtab->n_static_syms, info->cu_index, - 1); - -@@ -26185,12 +26187,12 @@ recursively_write_psymbols (struct objfile *objfile, - - write_psymbols (symtab, - psyms_seen, -- &objfile->global_psymbols[psymtab->globals_offset], -+ objfile->global_psymbols.data() + psymtab->globals_offset, - psymtab->n_global_syms, cu_index, - 0); - write_psymbols (symtab, - psyms_seen, -- &objfile->static_psymbols[psymtab->statics_offset], -+ objfile->static_psymbols.data() + psymtab->statics_offset, - psymtab->n_static_syms, cu_index, - 1); - } -@@ -26379,10 +26381,10 @@ public: - psyms_seen, cu_index); - - write_psymbols (psyms_seen, -- &objfile->global_psymbols[psymtab->globals_offset], -+ objfile->global_psymbols.data() + psymtab->globals_offset, - psymtab->n_global_syms, cu_index, false, unit_kind::cu); - write_psymbols (psyms_seen, -- &objfile->static_psymbols[psymtab->statics_offset], -+ objfile->static_psymbols.data() + psymtab->statics_offset, - psymtab->n_static_syms, cu_index, true, unit_kind::cu); - } - -@@ -26738,11 +26740,13 @@ private: - struct partial_symtab *psymtab = entry->per_cu.v.psymtab; - - write_psymbols (info->psyms_seen, -- &info->objfile->global_psymbols[psymtab->globals_offset], -+ (info->objfile->global_psymbols.data() -+ + psymtab->globals_offset), - psymtab->n_global_syms, info->cu_index, false, - unit_kind::tu); - write_psymbols (info->psyms_seen, -- &info->objfile->static_psymbols[psymtab->statics_offset], -+ (info->objfile->static_psymbols.data() -+ + psymtab->statics_offset), - psymtab->n_static_syms, info->cu_index, true, - unit_kind::tu); - diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index cae72d6..8aad2e2 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -473,20 +473,20 @@ Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-main.patch diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c -index 9385659f14..08e6f4d4fd 100644 +index 908b83a49a..dd69f50785 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c -@@ -708,7 +708,7 @@ aarch64_linux_remove_watchpoint (struct target_ops *self, +@@ -743,7 +743,7 @@ aarch64_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len, + /* Implement the "region_ok_for_hw_watchpoint" target_ops method. */ - static int - aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-aarch64_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++aarch64_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { return aarch64_linux_region_ok_for_watchpoint (addr, len); } diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c -index 6395184956..8d25fdb4c6 100644 +index eaf30585f5..1962e4f07e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -78,7 +78,7 @@ static struct type *desc_bounds_type (struct type *); @@ -550,9 +550,9 @@ index 6395184956..8d25fdb4c6 100644 +static int find_struct_field (const char *, struct type *, LONGEST, + struct type **, LONGEST *, int *, int *, int *); - static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR, - struct value *); -@@ -237,7 +238,7 @@ static int ada_is_direct_array_type (struct type *); + static int ada_resolve_function (struct block_symbol *, int, + struct value **, int, const char *, +@@ -234,7 +235,7 @@ static int ada_is_direct_array_type (struct type *); static void ada_language_arch_info (struct gdbarch *, struct language_arch_info *); @@ -561,7 +561,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *); static struct value *assign_aggregate (struct value *, struct value *, -@@ -700,7 +701,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type) +@@ -697,7 +698,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type) } static const gdb_byte * @@ -570,7 +570,7 @@ index 6395184956..8d25fdb4c6 100644 { if (valaddr == NULL) return NULL; -@@ -709,7 +710,7 @@ cond_offset_host (const gdb_byte *valaddr, long offset) +@@ -706,7 +707,7 @@ cond_offset_host (const gdb_byte *valaddr, long offset) } static CORE_ADDR @@ -579,7 +579,7 @@ index 6395184956..8d25fdb4c6 100644 { if (address == 0) return 0; -@@ -1747,7 +1748,7 @@ desc_bounds (struct value *arr) +@@ -1743,7 +1744,7 @@ desc_bounds (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the bounds data. */ @@ -588,7 +588,7 @@ index 6395184956..8d25fdb4c6 100644 fat_pntr_bounds_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 1); -@@ -1813,7 +1814,7 @@ desc_data (struct value *arr) +@@ -1809,7 +1810,7 @@ desc_data (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the data. */ @@ -597,7 +597,7 @@ index 6395184956..8d25fdb4c6 100644 fat_pntr_data_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 0); -@@ -1848,7 +1849,7 @@ desc_one_bound (struct value *bounds, int i, int which) +@@ -1844,7 +1845,7 @@ desc_one_bound (struct value *bounds, int i, int which) of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper bound, if WHICH is 1. The first bound is I=1. */ @@ -606,7 +606,7 @@ index 6395184956..8d25fdb4c6 100644 desc_bound_bitpos (struct type *type, int i, int which) { return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2); -@@ -2038,7 +2039,7 @@ ada_type_of_array (struct value *arr, int bounds) +@@ -2034,7 +2035,7 @@ ada_type_of_array (struct value *arr, int bounds) zero, and does not need to be recomputed. */ if (lo < hi) { @@ -615,7 +615,7 @@ index 6395184956..8d25fdb4c6 100644 (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2198,7 +2199,7 @@ decode_packed_array_bitsize (struct type *type) +@@ -2194,7 +2195,7 @@ decode_packed_array_bitsize (struct type *type) the length is arbitrary. */ static struct type * @@ -624,7 +624,7 @@ index 6395184956..8d25fdb4c6 100644 { struct type *new_elt_type; struct type *new_type; -@@ -2252,7 +2253,7 @@ decode_constrained_packed_array_type (struct type *type) +@@ -2248,7 +2249,7 @@ decode_constrained_packed_array_type (struct type *type) char *name; const char *tail; struct type *shadow_type; @@ -633,7 +633,7 @@ index 6395184956..8d25fdb4c6 100644 if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); -@@ -2323,7 +2324,8 @@ decode_constrained_packed_array (struct value *arr) +@@ -2319,7 +2320,8 @@ decode_constrained_packed_array (struct value *arr) array with no wrapper. In order to interpret the value through the (left-justified) packed array type we just built, we must first left-justify it. */ @@ -643,7 +643,7 @@ index 6395184956..8d25fdb4c6 100644 ULONGEST mod; mod = ada_modulus (value_type (arr)) - 1; -@@ -2551,7 +2553,7 @@ ada_unpack_from_contents (const gdb_byte *src, int bit_offset, int bit_size, +@@ -2547,7 +2549,7 @@ ada_unpack_from_contents (const gdb_byte *src, int bit_offset, int bit_size, struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, @@ -652,7 +652,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *type) { struct value *v; -@@ -2621,7 +2623,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, +@@ -2617,7 +2619,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, if (obj != NULL) { @@ -661,7 +661,7 @@ index 6395184956..8d25fdb4c6 100644 set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2667,7 +2669,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, +@@ -2663,7 +2665,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -670,7 +670,7 @@ index 6395184956..8d25fdb4c6 100644 { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2757,7 +2759,7 @@ ada_value_assign (struct value *toval, struct value *fromval) +@@ -2753,7 +2755,7 @@ ada_value_assign (struct value *toval, struct value *fromval) { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -679,7 +679,7 @@ index 6395184956..8d25fdb4c6 100644 gdb_byte *buffer = (gdb_byte *) alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2808,7 +2810,7 @@ value_assign_to_component (struct value *container, struct value *component, +@@ -2804,7 +2806,7 @@ value_assign_to_component (struct value *container, struct value *component, (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -688,7 +688,7 @@ index 6395184956..8d25fdb4c6 100644 val = value_cast (value_type (component), val); -@@ -4476,7 +4478,7 @@ ensure_lval (struct value *val) +@@ -4468,7 +4470,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -697,7 +697,7 @@ index 6395184956..8d25fdb4c6 100644 const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4560,7 +4562,7 @@ static CORE_ADDR +@@ -4552,7 +4554,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -706,7 +706,7 @@ index 6395184956..8d25fdb4c6 100644 gdb_byte *buf = (gdb_byte *) alloca (len); CORE_ADDR addr; -@@ -6718,7 +6720,7 @@ value_tag_from_contents_and_address (struct type *type, +@@ -6685,7 +6687,7 @@ value_tag_from_contents_and_address (struct type *type, const gdb_byte *valaddr, CORE_ADDR address) { @@ -715,7 +715,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -7211,7 +7213,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) +@@ -7178,7 +7180,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) only in that it can handle packed values of arbitrary type. */ static struct value * @@ -724,7 +724,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *arg_type) { struct type *type; -@@ -7223,7 +7225,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7190,7 +7192,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -733,7 +733,7 @@ index 6395184956..8d25fdb4c6 100644 int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7300,9 +7302,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7267,9 +7269,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, Returns 1 if found, 0 otherwise. */ static int @@ -745,7 +745,7 @@ index 6395184956..8d25fdb4c6 100644 int *index_p) { int i; -@@ -7321,8 +7323,8 @@ find_struct_field (const char *name, struct type *type, int offset, +@@ -7288,8 +7290,8 @@ find_struct_field (const char *name, struct type *type, int offset, for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -756,7 +756,7 @@ index 6395184956..8d25fdb4c6 100644 const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -7424,7 +7426,7 @@ num_visible_fields (struct type *type) +@@ -7391,7 +7393,7 @@ num_visible_fields (struct type *type) long explanation in find_struct_field's function documentation. */ static struct value * @@ -765,7 +765,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *type) { int i; -@@ -7472,7 +7474,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7439,7 +7441,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -774,7 +774,7 @@ index 6395184956..8d25fdb4c6 100644 for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7504,8 +7506,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7471,8 +7473,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, return NULL; } @@ -785,7 +785,7 @@ index 6395184956..8d25fdb4c6 100644 /* Return field #INDEX in ARG, where the index is that returned by -@@ -7514,7 +7516,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, +@@ -7481,7 +7483,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, * If found, return value, else return NULL. */ static struct value * @@ -794,7 +794,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7526,7 +7528,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, +@@ -7493,7 +7495,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, * *INDEX_P. */ static struct value * @@ -803,7 +803,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *type) { int i; -@@ -7616,7 +7618,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) +@@ -7583,7 +7585,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) v = ada_search_struct_field (name, arg, 0, t); else { @@ -813,7 +813,7 @@ index 6395184956..8d25fdb4c6 100644 struct type *field_type; CORE_ADDR address; -@@ -7960,8 +7963,8 @@ ada_coerce_ref (struct value *val0) +@@ -7927,8 +7930,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -824,7 +824,7 @@ index 6395184956..8d25fdb4c6 100644 { return (off + alignment - 1) & ~(alignment - 1); } -@@ -8355,10 +8358,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8322,10 +8325,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -837,7 +837,7 @@ index 6395184956..8d25fdb4c6 100644 int f; /* Compute the number of fields in this record type that are going -@@ -8436,7 +8438,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8403,7 +8405,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -846,7 +846,7 @@ index 6395184956..8d25fdb4c6 100644 field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8572,11 +8574,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8539,11 +8541,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -862,7 +862,7 @@ index 6395184956..8d25fdb4c6 100644 } else { -@@ -9042,7 +9044,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, +@@ -9009,7 +9011,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -873,7 +873,7 @@ index 6395184956..8d25fdb4c6 100644 TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h -index bac6c06e40..784e4935a3 100644 +index a4192fc8a5..5a84ca8a35 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -175,7 +175,7 @@ extern void ada_print_type (struct type *, const char *, struct ui_file *, int, @@ -929,7 +929,7 @@ index 47ce897d01..9ef9b3c2f9 100644 case TYPE_CODE_ENUM: if (show < 0) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c -index c5efdf1c1c..5912c6d016 100644 +index a4869198a4..da5a9327e1 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -34,11 +34,11 @@ @@ -946,7 +946,7 @@ index c5efdf1c1c..5912c6d016 100644 const struct language_defn *); -@@ -280,7 +280,7 @@ ada_emit_char (int c, struct type *type, struct ui_file *stream, +@@ -316,7 +316,7 @@ ada_emit_char (int c, struct type *type, struct ui_file *stream, of a character. */ static int @@ -955,7 +955,7 @@ index c5efdf1c1c..5912c6d016 100644 enum bfd_endian byte_order) { if (type_len == 1) -@@ -440,11 +440,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) +@@ -476,11 +476,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) static void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, @@ -969,7 +969,7 @@ index c5efdf1c1c..5912c6d016 100644 unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -459,9 +459,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -495,9 +495,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, { /* Position of the character we are examining to see whether it is repeated. */ @@ -981,7 +981,7 @@ index c5efdf1c1c..5912c6d016 100644 QUIT; -@@ -492,7 +492,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -528,7 +528,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); @@ -991,7 +991,7 @@ index c5efdf1c1c..5912c6d016 100644 i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -@@ -520,7 +521,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -556,7 +557,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, void ada_printstr (struct ui_file *stream, struct type *type, @@ -1000,7 +1000,7 @@ index c5efdf1c1c..5912c6d016 100644 const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -530,12 +531,12 @@ ada_printstr (struct ui_file *stream, struct type *type, +@@ -566,12 +567,12 @@ ada_printstr (struct ui_file *stream, struct type *type, static int print_variant_part (struct type *type, int field_num, @@ -1015,7 +1015,7 @@ index c5efdf1c1c..5912c6d016 100644 const struct language_defn *language) { struct type *var_type = TYPE_FIELD_TYPE (type, field_num); -@@ -571,11 +572,11 @@ print_variant_part (struct type *type, int field_num, +@@ -607,11 +608,11 @@ print_variant_part (struct type *type, int field_num, static int print_field_values (struct type *type, const gdb_byte *valaddr, @@ -1029,7 +1029,7 @@ index c5efdf1c1c..5912c6d016 100644 const struct language_defn *language) { int i, len; -@@ -641,7 +642,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr, +@@ -677,7 +678,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr, else { struct value *v; @@ -1038,7 +1038,7 @@ index c5efdf1c1c..5912c6d016 100644 int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -@@ -686,8 +687,8 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, +@@ -722,8 +723,8 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); struct type *elttype = TYPE_TARGET_TYPE (type); @@ -1049,7 +1049,7 @@ index c5efdf1c1c..5912c6d016 100644 /* We know that ELTTYPE cannot possibly be null, because we assume that we're called only when TYPE is a string-like type. -@@ -706,7 +707,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, +@@ -742,7 +743,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, elements up to it. */ if (options->stop_print_at_null) { @@ -1058,7 +1058,7 @@ index c5efdf1c1c..5912c6d016 100644 /* Look for a NULL char. */ for (temp_len = 0; -@@ -1079,7 +1080,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, +@@ -1115,7 +1116,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, static void ada_val_print_1 (struct type *type, @@ -1067,7 +1067,7 @@ index c5efdf1c1c..5912c6d016 100644 struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, -@@ -1163,7 +1164,7 @@ ada_val_print_1 (struct type *type, +@@ -1199,7 +1200,7 @@ ada_val_print_1 (struct type *type, void ada_val_print (struct type *type, @@ -1077,10 +1077,10 @@ index c5efdf1c1c..5912c6d016 100644 struct value *val, const struct value_print_options *options) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c -index 7c70792b3f..651794a41f 100644 +index 186690af30..338a0f2c87 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -727,7 +727,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -729,7 +729,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class theclass[2]; @@ -1089,7 +1089,7 @@ index 7c70792b3f..651794a41f 100644 static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -843,11 +843,13 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -845,11 +845,13 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, gdb_assert (regnum != -1); @@ -1106,7 +1106,7 @@ index 7c70792b3f..651794a41f 100644 } diff --git a/gdb/annotate.c b/gdb/annotate.c -index 0c70ff9553..6d169bfdae 100644 +index 495aa2dba6..45e486ae64 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -531,21 +531,21 @@ annotate_frame_end (void) @@ -1151,7 +1151,7 @@ index 1b9d9dd034..d79ccc56ed 100644 extern void annotate_elt (void); extern void annotate_array_section_end (void); diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c -index 693d7e3dc8..b701010019 100644 +index e3cce491ee..d3117bdaa1 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -228,7 +228,7 @@ legacy_virtual_frame_pointer (struct gdbarch *gdbarch, @@ -1164,7 +1164,7 @@ index 693d7e3dc8..b701010019 100644 const struct floatformat **format = NULL; diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h -index b51a4ec1ee..2d344e7b93 100644 +index 77ee9af2bf..e0bd701d5e 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -131,7 +131,7 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer; @@ -1177,15 +1177,15 @@ index b51a4ec1ee..2d344e7b93 100644 extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc); diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c -index 484bd4e4c4..3b7aa40db8 100644 +index 30030b4eb0..8e2abfb70c 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c -@@ -1067,7 +1067,7 @@ arm_linux_remove_hw_breakpoint (struct target_ops *self, +@@ -1104,7 +1104,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, + /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ - static int - arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-arm_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++arm_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); CORE_ADDR max_wp_length, aligned_addr; @@ -1316,10 +1316,10 @@ index 6066b77076..d1c9d35030 100644 /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or aop_if_goto). We assume we don't know the target offset yet, diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c -index 6a0c15b239..05d7ed3ea1 100644 +index 0106ce8dd5..fe3a2d1350 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -2064,9 +2064,9 @@ should_be_inserted (struct bp_location *bl) +@@ -2053,9 +2053,9 @@ should_be_inserted (struct bp_location *bl) { fprintf_unfiltered (gdb_stdlog, "infrun: stepping past non-steppable watchpoint. " @@ -1331,7 +1331,7 @@ index 6a0c15b239..05d7ed3ea1 100644 } return 0; } -@@ -6851,7 +6851,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, +@@ -6814,7 +6814,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, static int breakpoint_address_match_range (const address_space *aspace1, CORE_ADDR addr1, @@ -1340,7 +1340,7 @@ index 6a0c15b239..05d7ed3ea1 100644 CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -10978,7 +10978,7 @@ can_use_hardware_watchpoint (struct value *v) +@@ -10906,7 +10906,7 @@ can_use_hardware_watchpoint (const std::vector &vals) && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1350,10 +1350,10 @@ index 6a0c15b239..05d7ed3ea1 100644 len = (target_exact_watchpoints diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h -index 3fddbaa713..08463d4e5b 100644 +index 407cc531db..bc833e57eb 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h -@@ -252,7 +252,7 @@ struct bp_target_info +@@ -251,7 +251,7 @@ struct bp_target_info /* If this is a ranged breakpoint, then this field contains the length of the range that will be watched for execution. */ @@ -1362,7 +1362,7 @@ index 3fddbaa713..08463d4e5b 100644 /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -429,7 +429,7 @@ public: +@@ -428,7 +428,7 @@ public: /* For hardware watchpoints, the size of the memory region being watched. For hardware ranged breakpoints, the size of the breakpoint range. */ @@ -1372,7 +1372,7 @@ index 3fddbaa713..08463d4e5b 100644 /* Type of hardware watchpoint. */ target_hw_bp_type watchpoint_type {}; diff --git a/gdb/c-lang.c b/gdb/c-lang.c -index a0b553e741..0616208d1d 100644 +index 15e633f8c8..2bbfd9b721 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -184,7 +184,7 @@ c_printchar (int c, struct type *type, struct ui_file *stream) @@ -1425,10 +1425,10 @@ index 18dedcc1fa..8afd3ee784 100644 int force_ellipses, const struct value_print_options *options); diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c -index 2e9ed1bc28..256b9c19e6 100644 +index cb793f0770..fad41891e2 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c -@@ -933,7 +933,8 @@ c_print_type_union_field_offset (struct type *type, unsigned int field_idx, +@@ -934,7 +934,8 @@ c_print_type_union_field_offset (struct type *type, unsigned int field_idx, { struct type *ftype = check_typedef (TYPE_FIELD_TYPE (type, field_idx)); @@ -1437,8 +1437,8 @@ index 2e9ed1bc28..256b9c19e6 100644 + pulongest (TYPE_LENGTH (ftype))); } - /* Print information about field at index FIELD_IDX of the struct type -@@ -1507,8 +1508,8 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, + /* Helper function for ptype/o implementation that prints information +@@ -1530,8 +1531,8 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, print_spaces_filtered_with_print_options (level + 4, stream, flags); @@ -1492,7 +1492,7 @@ index 3904fab260..a3b8e2551b 100644 struct value *original_value, const struct value_print_options *options) diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c -index 006d3f811c..accd9a54b2 100644 +index e694648288..43ed5a375a 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -307,11 +307,11 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, @@ -1585,7 +1585,7 @@ index 8f2e4d9a66..86490a2c46 100644 struct type *type, struct ui_file *stream); diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c -index 486653f13f..db3ff338d1 100644 +index e019a60791..25f1512857 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -335,7 +335,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, @@ -1611,7 +1611,7 @@ index 391ea8665b..a8e72ae506 100644 struct value *val, const struct value_print_options *options); diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c -index e2d8431362..5143f75c06 100644 +index 579d3c8c91..9dd430b2bc 100644 --- a/gdb/d-valprint.c +++ b/gdb/d-valprint.c @@ -73,7 +73,7 @@ dynamic_array_type (struct type *type, @@ -1624,7 +1624,7 @@ index e2d8431362..5143f75c06 100644 struct value *val, const struct value_print_options *options) diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 5486e4dc12..1fe45f6069 100644 +index cfca1c2751..d91d69155d 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1817,7 +1817,7 @@ rw_pieced_value (struct value *v, struct value *from) @@ -1688,10 +1688,10 @@ index 5486e4dc12..1fe45f6069 100644 if (subobj_byte_offset + len > max) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 6ebe00f542..fbaa0af64f 100644 +index d69f154af3..420c3e6bd5 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2268,12 +2268,12 @@ dwarf2_complex_location_expr_complaint (void) +@@ -2024,12 +2024,12 @@ dwarf2_complex_location_expr_complaint (void) } static void @@ -1708,7 +1708,7 @@ index 6ebe00f542..fbaa0af64f 100644 } static void -@@ -15084,8 +15084,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, +@@ -15004,8 +15004,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1720,10 +1720,10 @@ index 6ebe00f542..fbaa0af64f 100644 attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) diff --git a/gdb/eval.c b/gdb/eval.c -index d9bca2791d..b42f14a406 100644 +index 50dde3ed4f..44259cd964 100644 --- a/gdb/eval.c +++ b/gdb/eval.c -@@ -302,7 +302,8 @@ evaluate_struct_tuple (struct value *struct_val, +@@ -295,7 +295,8 @@ evaluate_struct_tuple (struct value *struct_val, while (--nargs >= 0) { struct value *val = NULL; @@ -1733,7 +1733,7 @@ index d9bca2791d..b42f14a406 100644 bfd_byte *addr; fieldno++; -@@ -363,7 +364,7 @@ init_array_element (struct value *array, struct value *element, +@@ -356,7 +357,7 @@ init_array_element (struct value *array, struct value *element, enum noside noside, LONGEST low_bound, LONGEST high_bound) { LONGEST index; @@ -1742,7 +1742,7 @@ index d9bca2791d..b42f14a406 100644 if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -807,11 +808,11 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch, +@@ -800,11 +801,11 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch, /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1757,7 +1757,7 @@ index d9bca2791d..b42f14a406 100644 int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -1548,7 +1549,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1546,7 +1547,7 @@ evaluate_subexp_standard (struct type *expect_type, struct value **argvec; int code; int ix; @@ -1766,7 +1766,7 @@ index d9bca2791d..b42f14a406 100644 struct type **arg_types; pc = (*pos)++; -@@ -1731,7 +1732,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1729,7 +1730,7 @@ evaluate_subexp_standard (struct type *expect_type, struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1776,7 +1776,7 @@ index d9bca2791d..b42f14a406 100644 if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) diff --git a/gdb/f-lang.c b/gdb/f-lang.c -index 74f5622b6e..55fb97ceab 100644 +index 81922f73fb..9d19c114e2 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -101,7 +101,7 @@ f_printchar (int c, struct type *type, struct ui_file *stream) @@ -1862,7 +1862,7 @@ index b4067a8460..0772f359f0 100644 struct value *original_value, const struct value_print_options *options) diff --git a/gdb/findvar.c b/gdb/findvar.c -index ee8f57159d..fb4dfeca17 100644 +index 8ad5e25cb2..fcd0a0cdc9 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -821,7 +821,7 @@ struct value * @@ -1893,10 +1893,10 @@ index ee8f57159d..fb4dfeca17 100644 /* If the register length is larger than the number of bytes remaining to copy, then only copy the appropriate bytes. */ diff --git a/gdb/frame.c b/gdb/frame.c -index 1384ecca4f..db52eb5780 100644 +index 07fa2bc77d..b5a2c50ec9 100644 --- a/gdb/frame.c +++ b/gdb/frame.c -@@ -1386,7 +1386,7 @@ deprecated_frame_register_read (struct frame_info *frame, int regnum, +@@ -1382,7 +1382,7 @@ deprecated_frame_register_read (struct frame_info *frame, int regnum, int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -1905,7 +1905,7 @@ index 1384ecca4f..db52eb5780 100644 int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1415,7 +1415,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, +@@ -1411,7 +1411,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, } if (len > maxsize) error (_("Bad debug information detected: " @@ -1915,7 +1915,7 @@ index 1384ecca4f..db52eb5780 100644 /* Copy the data. */ while (len > 0) diff --git a/gdb/frame.h b/gdb/frame.h -index 8293a49ec2..a176873865 100644 +index d5800b78c2..ec70d94b58 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -601,7 +601,7 @@ extern void put_frame_register (struct frame_info *frame, int regnum, @@ -1928,10 +1928,10 @@ index 8293a49ec2..a176873865 100644 int *optimizedp, int *unavailablep); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c -index fe3c12e295..f0cfb053b0 100644 +index c430ebe52a..6196bf8541 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c -@@ -1811,7 +1811,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, +@@ -1795,7 +1795,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, } const struct floatformat ** @@ -1941,10 +1941,10 @@ index fe3c12e295..f0cfb053b0 100644 gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->floatformat_for_type != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h -index 5664c4dc58..62b83974a1 100644 +index 09edcd5eb2..ccb3cf87b8 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h -@@ -198,8 +198,8 @@ extern void set_gdbarch_wchar_signed (struct gdbarch *gdbarch, int wchar_signed) +@@ -193,8 +193,8 @@ extern void set_gdbarch_wchar_signed (struct gdbarch *gdbarch, int wchar_signed) NAME, if non-NULL, is the type name, which may be used to distinguish different target formats of the same length. */ @@ -1956,10 +1956,10 @@ index 5664c4dc58..62b83974a1 100644 /* For most targets, a pointer on the target and its representation as an diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh -index a929e13b81..cc1def6a3d 100755 +index 7330430937..9258e61843 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh -@@ -388,7 +388,7 @@ v;int;wchar_signed;;;1;-1;1 +@@ -385,7 +385,7 @@ v;int;wchar_signed;;;1;-1;1 # Returns the floating-point format to be used for values of length LENGTH. # NAME, if non-NULL, is the type name, which may be used to distinguish # different target formats of the same length. @@ -1969,10 +1969,10 @@ index a929e13b81..cc1def6a3d 100755 # For most targets, a pointer on the target and its representation as an # address in GDB have the same size and "look the same". For such a diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index cb5524023f..7c2ae72cfc 100644 +index 2aa5253100..06f48d3629 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -2920,7 +2920,7 @@ floatformat_from_type (const struct type *type) +@@ -2925,7 +2925,7 @@ floatformat_from_type (const struct type *type) least as long as OBJFILE. */ struct type * @@ -1981,7 +1981,7 @@ index cb5524023f..7c2ae72cfc 100644 const char *name) { struct type *type; -@@ -3252,8 +3252,8 @@ is_public_ancestor (struct type *base, struct type *dclass) +@@ -3379,8 +3379,8 @@ is_public_ancestor (struct type *base, struct type *dclass) static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -1992,7 +1992,7 @@ index cb5524023f..7c2ae72cfc 100644 CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -3264,7 +3264,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3391,7 +3391,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2001,7 +2001,7 @@ index cb5524023f..7c2ae72cfc 100644 iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -3305,7 +3305,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3432,7 +3432,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, int is_unique_ancestor (struct type *base, struct value *val) { @@ -2010,7 +2010,7 @@ index cb5524023f..7c2ae72cfc 100644 return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4550,7 +4550,7 @@ recursive_dump_type (struct type *type, int spaces) +@@ -4677,7 +4677,7 @@ recursive_dump_type (struct type *type, int spaces) break; } puts_filtered ("\n"); @@ -2019,7 +2019,7 @@ index cb5524023f..7c2ae72cfc 100644 if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -4991,7 +4991,7 @@ copy_type (const struct type *type) +@@ -5122,7 +5122,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2029,10 +2029,10 @@ index cb5524023f..7c2ae72cfc 100644 struct type *type; diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 5597038357..f6e0c3e8c1 100644 +index cf1346161d..330e14d831 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -805,7 +805,7 @@ struct type +@@ -876,7 +876,7 @@ struct type type_length_units function should be used in order to get the length expressed in target addressable memory units. */ @@ -2041,7 +2041,7 @@ index 5597038357..f6e0c3e8c1 100644 /* * Core type, shared by a group of qualified types. */ -@@ -1707,7 +1707,7 @@ extern unsigned int type_length_units (struct type *type); +@@ -1798,7 +1798,7 @@ extern unsigned int type_length_units (struct type *type); /* * Helper function to construct objfile-owned types. */ @@ -2050,7 +2050,7 @@ index 5597038357..f6e0c3e8c1 100644 const char *); extern struct type *init_integer_type (struct objfile *, int, int, const char *); -@@ -1724,7 +1724,7 @@ extern struct type *init_pointer_type (struct objfile *, int, const char *, +@@ -1815,7 +1815,7 @@ extern struct type *init_pointer_type (struct objfile *, int, const char *, struct type *); /* Helper functions to construct architecture-owned types. */ @@ -2101,7 +2101,7 @@ index 8a64157c55..ef1f851a91 100644 embedded_offset, address, val); diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c -index 0965846ce6..d443c29443 100644 +index ddbec13891..9334837c89 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -109,7 +109,7 @@ build_gdb_vtable_type (struct gdbarch *arch) @@ -2122,7 +2122,7 @@ index 0965846ce6..d443c29443 100644 vtable_address_point_offset (struct gdbarch *gdbarch) { struct type *vtable_type -@@ -408,7 +408,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gdbarch, struct value *container, +@@ -409,7 +409,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gdbarch, struct value *container, static struct value * gnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, @@ -2131,7 +2131,7 @@ index 0965846ce6..d443c29443 100644 { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -438,7 +438,7 @@ gnuv3_virtual_fn_field (struct value **value_p, +@@ -439,7 +439,7 @@ gnuv3_virtual_fn_field (struct value **value_p, -1 is returned on error. */ @@ -2140,7 +2140,7 @@ index 0965846ce6..d443c29443 100644 gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val) -@@ -447,7 +447,7 @@ gnuv3_baseclass_offset (struct type *type, int index, +@@ -448,7 +448,7 @@ gnuv3_baseclass_offset (struct type *type, int index, struct type *ptr_type; struct value *vtable; struct value *vbase_array; @@ -2149,7 +2149,7 @@ index 0965846ce6..d443c29443 100644 /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -470,7 +470,7 @@ gnuv3_baseclass_offset (struct type *type, int index, +@@ -471,7 +471,7 @@ gnuv3_baseclass_offset (struct type *type, int index, cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) error (_("Misaligned vbase offset.")); @@ -2158,7 +2158,7 @@ index 0965846ce6..d443c29443 100644 vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -514,7 +514,7 @@ gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset, +@@ -515,7 +515,7 @@ gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset, we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2194,10 +2194,10 @@ index eccf9a8181..4cca802e59 100644 struct value *val, const struct value_print_options *options) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c -index d1b461b538..af4942ab2e 100644 +index a0e872c01f..d67e2e40c5 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8175,7 +8175,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, +@@ -8177,7 +8177,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, const struct floatformat ** i386_floatformat_for_type (struct gdbarch *gdbarch, @@ -2207,7 +2207,7 @@ index d1b461b538..af4942ab2e 100644 if (len == 128 && name) if (strcmp (name, "__float128") == 0 diff --git a/gdb/language.c b/gdb/language.c -index 0d8604b826..7dca669b40 100644 +index 22199e0c0d..5b7c4871b2 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -773,7 +773,7 @@ unk_lang_printchar (int c, struct type *type, struct ui_file *stream) @@ -2229,7 +2229,7 @@ index 0d8604b826..7dca669b40 100644 struct value *val, const struct value_print_options *options) diff --git a/gdb/language.h b/gdb/language.h -index 06b42aeb5c..9e794f13a3 100644 +index 029de4a7ab..2c0308fa93 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -188,7 +188,7 @@ struct language_defn @@ -2251,7 +2251,7 @@ index 06b42aeb5c..9e794f13a3 100644 struct value *val, const struct value_print_options *options); diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c -index 11ccab30c8..9081d01987 100644 +index 6e6434b846..9595d379f3 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -103,10 +103,10 @@ m2_printchar (int c, struct type *type, struct ui_file *stream) @@ -2441,20 +2441,20 @@ index 46088ade53..038cd2f92c 100644 /* Returns true if ADDR is in RANGE. */ diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c -index 68fd1f83c3..ebb59dcc90 100644 +index a9f0b79076..36887b35cb 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c -@@ -579,7 +579,7 @@ mips_linux_stopped_data_address (struct target_ops *t, CORE_ADDR *paddr) +@@ -622,7 +622,7 @@ mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr) + the specified region can be covered by the watch registers. */ - static int - mips_linux_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { struct pt_watch_regs dummy_regs; int i; diff --git a/gdb/nat/x86-dregs.c b/gdb/nat/x86-dregs.c -index c816473628..05f3868759 100644 +index 7604a36342..1ea4a3b107 100644 --- a/gdb/nat/x86-dregs.c +++ b/gdb/nat/x86-dregs.c @@ -380,7 +380,7 @@ x86_remove_aligned_watchpoint (struct x86_debug_reg_state *state, @@ -2476,7 +2476,7 @@ index c816473628..05f3868759 100644 int nregs; diff --git a/gdb/nat/x86-dregs.h b/gdb/nat/x86-dregs.h -index dd6242eda9..6508af93b3 100644 +index e86e83aea0..4ce1a979a3 100644 --- a/gdb/nat/x86-dregs.h +++ b/gdb/nat/x86-dregs.h @@ -116,7 +116,7 @@ extern int x86_dr_remove_watchpoint (struct x86_debug_reg_state *state, @@ -2489,7 +2489,7 @@ index dd6242eda9..6508af93b3 100644 /* If the inferior has some break/watchpoint that triggered, set the address associated with that break/watchpoint and return true. diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c -index 268c3c5c37..91f4d8412a 100644 +index 8af63f7620..62b8d4777b 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -76,11 +76,11 @@ builtin_opencl_type (struct gdbarch *gdbarch) @@ -2561,7 +2561,7 @@ index 268c3c5c37..91f4d8412a 100644 if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, diff --git a/gdb/p-lang.c b/gdb/p-lang.c -index 03db2df2e5..9c9810e226 100644 +index 3ff7f5694f..b3684d93fa 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -93,8 +93,8 @@ pascal_main_name (void) @@ -2665,23 +2665,23 @@ index 933dbfb6c4..e5c1b07040 100644 CORE_ADDR addr; int want_space = 0; diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c -index 8418e4d35d..4a82434c0d 100644 +index 1423339339..b70f168106 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c -@@ -1445,7 +1445,7 @@ ppc_linux_can_use_hw_breakpoint (struct target_ops *self, +@@ -1496,7 +1496,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot) + } - static int - ppc_linux_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { /* Handle sub-8-byte quantities. */ if (len <= 0) diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c -index 286c02a26d..7242c7f89a 100644 +index 6d3a64c4f0..3ace6096dd 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c -@@ -1620,7 +1620,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, +@@ -1637,7 +1637,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, const struct floatformat ** ppc_floatformat_for_type (struct gdbarch *gdbarch, @@ -2691,10 +2691,10 @@ index 286c02a26d..7242c7f89a 100644 if (len == 128 && name) { diff --git a/gdb/printcmd.c b/gdb/printcmd.c -index ad80b1bebf..a126a0f8b9 100644 +index c921022a59..f34b1535af 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -277,7 +277,7 @@ print_formatted (struct value *val, int size, +@@ -275,7 +275,7 @@ print_formatted (struct value *val, int size, struct ui_file *stream) { struct type *type = check_typedef (value_type (val)); @@ -2703,7 +2703,7 @@ index ad80b1bebf..a126a0f8b9 100644 if (VALUE_LVAL (val) == lval_memory) next_address = value_address (val) + len; -@@ -353,7 +353,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type, +@@ -351,7 +351,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type, int size, struct ui_file *stream) { struct gdbarch *gdbarch = get_type_arch (type); @@ -2713,32 +2713,41 @@ index ad80b1bebf..a126a0f8b9 100644 /* String printing should go through val_print_scalar_formatted. */ diff --git a/gdb/procfs.c b/gdb/procfs.c -index a939dedb00..887f1201fe 100644 +index 70619f1c15..ca7cc221f9 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -3399,7 +3399,7 @@ procfs_remove_watchpoint (struct target_ops *self, +@@ -3358,7 +3358,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, + } - static int - procfs_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-procfs_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++procfs_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { /* The man page for proc(4) on Solaris 2.6 and up says that the system can support "thousands" of hardware watchpoints, but gives diff --git a/gdb/regcache.c b/gdb/regcache.c -index fb6a904dec..3694616069 100644 +index 83bcbd22a3..f810752102 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c -@@ -897,7 +897,7 @@ typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum, - const void *buf); +@@ -846,7 +846,7 @@ regcache::cooked_write (int regnum, const gdb_byte *buf) + operation. */ enum register_status --regcache::xfer_part (int regnum, int offset, int len, void *in, -+regcache::xfer_part (int regnum, LONGEST offset, LONGEST len, void *in, +-readable_regcache::read_part (int regnum, int offset, int len, void *in, ++readable_regcache::read_part (int regnum, LONGEST offset, LONGEST len, void *in, + bool is_raw) + { + struct gdbarch *gdbarch = arch (); +@@ -875,7 +875,7 @@ readable_regcache::read_part (int regnum, int offset, int len, void *in, + } + + enum register_status +-regcache::write_part (int regnum, int offset, int len, ++regcache::write_part (int regnum, LONGEST offset, LONGEST len, const void *out, bool is_raw) { struct gdbarch *gdbarch = arch (); -@@ -941,13 +941,13 @@ regcache::xfer_part (int regnum, int offset, int len, void *in, +@@ -913,13 +913,14 @@ regcache::write_part (int regnum, int offset, int len, enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -2749,12 +2758,13 @@ index fb6a904dec..3694616069 100644 } enum register_status --regcache::raw_read_part (int regnum, int offset, int len, gdb_byte *buf) -+regcache::raw_read_part (int regnum, int offset, LONGEST len, gdb_byte *buf) +-readable_regcache::raw_read_part (int regnum, int offset, int len, gdb_byte *buf) ++readable_regcache::raw_read_part (int regnum, int offset, LONGEST len, ++ gdb_byte *buf) { assert_regnum (regnum); - return xfer_part (regnum, offset, len, buf, NULL, true); -@@ -955,13 +955,13 @@ regcache::raw_read_part (int regnum, int offset, int len, gdb_byte *buf) + return read_part (regnum, offset, len, buf, true); +@@ -927,13 +928,13 @@ readable_regcache::raw_read_part (int regnum, int offset, int len, gdb_byte *buf void regcache_raw_write_part (struct regcache *regcache, int regnum, @@ -2770,7 +2780,7 @@ index fb6a904dec..3694616069 100644 const gdb_byte *buf) { assert_regnum (regnum); -@@ -970,14 +970,15 @@ regcache::raw_write_part (int regnum, int offset, int len, +@@ -942,14 +943,14 @@ regcache::raw_write_part (int regnum, int offset, int len, enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, @@ -2782,13 +2792,12 @@ index fb6a904dec..3694616069 100644 enum register_status --regcache::cooked_read_part (int regnum, int offset, int len, gdb_byte *buf) -+regcache::cooked_read_part (int regnum, LONGEST offset, LONGEST len, -+ gdb_byte *buf) +-readable_regcache::cooked_read_part (int regnum, int offset, int len, ++readable_regcache::cooked_read_part (int regnum, LONGEST offset, LONGEST len, + gdb_byte *buf) { gdb_assert (regnum >= 0 && regnum < m_descr->nr_cooked_registers); - return xfer_part (regnum, offset, len, buf, NULL, false); -@@ -985,13 +986,13 @@ regcache::cooked_read_part (int regnum, int offset, int len, gdb_byte *buf) +@@ -958,13 +959,13 @@ readable_regcache::cooked_read_part (int regnum, int offset, int len, void regcache_cooked_write_part (struct regcache *regcache, int regnum, @@ -2805,10 +2814,10 @@ index fb6a904dec..3694616069 100644 { gdb_assert (regnum >= 0 && regnum < m_descr->nr_cooked_registers); diff --git a/gdb/regcache.h b/gdb/regcache.h -index 9e3da8c3fc..a803b58516 100644 +index d7bb8b5c93..06f878ab01 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h -@@ -82,9 +82,9 @@ extern void regcache_raw_set_cached_value +@@ -74,9 +74,9 @@ extern LONGEST regcache_raw_get_signed (struct regcache *regcache, extern enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -2820,7 +2829,7 @@ index 9e3da8c3fc..a803b58516 100644 void regcache_invalidate (struct regcache *regcache, int regnum); -@@ -121,10 +121,11 @@ extern void regcache_cooked_write_unsigned (struct regcache *regcache, +@@ -113,10 +113,11 @@ extern void regcache_cooked_write_unsigned (struct regcache *regcache, write style operations. */ enum register_status regcache_cooked_read_part (struct regcache *regcache, @@ -2835,55 +2844,91 @@ index 9e3da8c3fc..a803b58516 100644 /* Special routines to read/write the PC. */ -@@ -302,15 +303,15 @@ public: - - void invalidate (int regnum); +@@ -259,8 +260,8 @@ public: + template> + enum register_status raw_read (int regnum, T *val); - enum register_status raw_read_part (int regnum, int offset, int len, -+ enum register_status raw_read_part (int regnum, int offset, LONGEST len, - gdb_byte *buf); +- gdb_byte *buf); ++ enum register_status raw_read_part (int regnum, int offset, ++ LONGEST len, gdb_byte *buf); -- void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf); -+ void raw_write_part (int regnum, int offset, LONGEST len, const gdb_byte *buf); + virtual void raw_update (int regnum) = 0; + +@@ -268,14 +269,14 @@ public: + template> + enum register_status cooked_read (int regnum, T *val); - enum register_status cooked_read_part (int regnum, int offset, int len, -+ enum register_status cooked_read_part (int regnum, LONGEST offset, LONGEST len, - gdb_byte *buf); +- gdb_byte *buf); ++ enum register_status cooked_read_part (int regnum, LONGEST offset, ++ LONGEST len, gdb_byte *buf); + + struct value *cooked_read_value (int regnum); + + protected: +- enum register_status read_part (int regnum, int offset, int len, void *in, +- bool is_raw); ++ enum register_status read_part (int regnum, LONGEST offset, LONGEST len, ++ void *in, bool is_raw); + }; + + /* Buffer of registers, can be read and written. */ +@@ -345,9 +346,10 @@ public: + void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len, + bool is_signed) const; + +- void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf); ++ void raw_write_part (int regnum, int offset, LONGEST len, ++ const gdb_byte *buf); - void cooked_write_part (int regnum, int offset, int len, + void cooked_write_part (int regnum, LONGEST offset, LONGEST len, const gdb_byte *buf); void supply_regset (const struct regset *regset, -@@ -349,8 +350,8 @@ private: - - void restore (struct regcache *src); - -- enum register_status xfer_part (int regnum, int offset, int len, void *in, -- const void *out, bool is_raw); -+ enum register_status xfer_part (int regnum, LONGEST offset, LONGEST len, -+ void *in, const void *out, bool is_raw); +@@ -377,13 +379,12 @@ protected: + static std::forward_list current_regcache; + private: +- void transfer_regset (const struct regset *regset, struct regcache *out_regcache, + int regnum, const void *in_buf, + void *out_buf, size_t size) const; + +- enum register_status write_part (int regnum, int offset, int len, ++ enum register_status write_part (int regnum, LONGEST offset, LONGEST len, + const void *out, bool is_raw); + + diff --git a/gdb/remote.c b/gdb/remote.c -index a426508723..94d5594175 100644 +index 58ed9e4f4d..ce67d76195 100644 --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -9969,7 +9969,7 @@ int remote_hw_breakpoint_limit = -1; +@@ -146,7 +146,7 @@ public: - static int - remote_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + 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; +@@ -10216,7 +10216,7 @@ int remote_hw_watchpoint_length_limit = -1; + int remote_hw_breakpoint_limit = -1; + + int +-remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { if (remote_hw_watchpoint_length_limit == 0) return 0; diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c -index cb924e084d..c18f2d0ed5 100644 +index 4be112b7a3..77d145549d 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c -@@ -472,7 +472,7 @@ rust_printchar (int c, struct type *type, struct ui_file *stream) +@@ -286,7 +286,7 @@ rust_printchar (int c, struct type *type, struct ui_file *stream) static void rust_printstr (struct ui_file *stream, struct type *type, @@ -2892,7 +2937,7 @@ index cb924e084d..c18f2d0ed5 100644 const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -618,7 +618,7 @@ static const struct generic_val_print_decorations rust_decorations = +@@ -495,7 +495,7 @@ static const struct generic_val_print_decorations rust_decorations = /* la_val_print implementation for Rust. */ static void @@ -2902,33 +2947,43 @@ index cb924e084d..c18f2d0ed5 100644 struct value *val, const struct value_print_options *options) diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c -index 8a3fcff9b6..a8b7d63938 100644 +index 3c65c5eaa5..d7c683e968 100644 --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c -@@ -921,7 +921,7 @@ s390_remove_hw_breakpoint (struct target_ops *self, +@@ -952,7 +952,8 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, + } - static int - s390_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int cnt) -+ CORE_ADDR addr, LONGEST cnt) + int +-s390_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt) ++s390_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, ++ LONGEST cnt) { return 1; } diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c -index 7152ddabbd..1cfa7780af 100644 +index 5da5e4e7fc..29db0e8ea6 100644 --- a/gdb/spu-multiarch.c +++ b/gdb/spu-multiarch.c -@@ -128,7 +128,7 @@ spu_thread_architecture (struct target_ops *ops, ptid_t ptid) +@@ -66,7 +66,7 @@ struct spu_multiarch_target final : public target_ops + const gdb_byte *pattern, ULONGEST pattern_len, + CORE_ADDR *found_addrp) override; + +- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; ++ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; + + struct gdbarch *thread_architecture (ptid_t) override; + }; +@@ -164,7 +164,7 @@ spu_multiarch_target::thread_architecture (ptid_t ptid) /* Override the to_region_ok_for_hw_watchpoint routine. */ - static int - spu_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + + int +-spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { - struct target_ops *ops_beneath = find_target_beneath (self); + struct target_ops *ops_beneath = find_target_beneath (this); diff --git a/gdb/stack.c b/gdb/stack.c -index 9993ae654a..6e1336da02 100644 +index 74c92537da..10f246ecd1 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -190,7 +190,7 @@ print_stack_frame (struct frame_info *frame, int print_level, @@ -2970,10 +3025,10 @@ index 9993ae654a..6e1336da02 100644 if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); diff --git a/gdb/symmisc.c b/gdb/symmisc.c -index 9adde044cd..2bd1464a01 100644 +index 91ddc578a8..addf9b873d 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c -@@ -585,11 +585,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, +@@ -586,11 +586,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, case LOC_CONST_BYTES: { @@ -2989,40 +3044,64 @@ index 9adde044cd..2bd1464a01 100644 fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c -index aaf11d81b8..2b449cbf01 100644 +index da74347122..ed625ed030 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c -@@ -760,14 +760,14 @@ debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, COR +@@ -39,7 +39,7 @@ struct dummy_target : public target_ops + bool have_continuable_watchpoint () override; + bool stopped_data_address (CORE_ADDR *arg0) override; + bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; +- int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) 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; + int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; + int can_do_single_step () override; +@@ -207,7 +207,7 @@ struct debug_target : public target_ops + bool have_continuable_watchpoint () override; + bool stopped_data_address (CORE_ADDR *arg0) override; + bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; +- int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) 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; + int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; + int can_do_single_step () override; +@@ -1098,19 +1098,19 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int } - static int --delegate_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2) -+delegate_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2) + int +-target_ops::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) ++target_ops::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) { - self = self->beneath; - return self->to_region_ok_for_hw_watchpoint (self, arg1, arg2); + return this->beneath->region_ok_for_hw_watchpoint (arg0, arg1); } - static int --debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2) -+debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2) + int +-dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) ++dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) + { + return default_region_ok_for_hw_watchpoint (this, arg0, arg1); + } + + int +-debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) ++debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) { int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->to_region_ok_for_hw_watchpoint (...)\n", debug_target.to_shortname); -@@ -777,7 +777,7 @@ debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int + fprintf_unfiltered (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath->shortname ()); +@@ -1118,7 +1118,7 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) + fprintf_unfiltered (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath->shortname ()); + target_debug_print_CORE_ADDR (arg0); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_CORE_ADDR (arg1); - fputs_unfiltered (", ", gdb_stdlog); -- target_debug_print_int (arg2); -+ target_debug_print_LONGEST (arg2); +- target_debug_print_int (arg1); ++ target_debug_print_LONGEST (arg1); fputs_unfiltered (") = ", gdb_stdlog); target_debug_print_int (result); fputs_unfiltered ("\n", gdb_stdlog); diff --git a/gdb/target.c b/gdb/target.c -index 748d5bb7a2..a1ac6d0697 100644 +index d96cdec418..7d0da32ec6 100644 --- a/gdb/target.c +++ b/gdb/target.c -@@ -56,7 +56,7 @@ static int default_watchpoint_addr_within_range (struct target_ops *, +@@ -59,7 +59,7 @@ static int default_watchpoint_addr_within_range (struct target_ops *, CORE_ADDR, CORE_ADDR, int); static int default_region_ok_for_hw_watchpoint (struct target_ops *, @@ -3031,7 +3110,7 @@ index 748d5bb7a2..a1ac6d0697 100644 static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3112,7 +3112,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) +@@ -3197,7 +3197,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3041,23 +3120,23 @@ index 748d5bb7a2..a1ac6d0697 100644 return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } diff --git a/gdb/target.h b/gdb/target.h -index e3a2882fe5..7a70c3f6da 100644 +index 6e13809397..aaed35f690 100644 --- a/gdb/target.h +++ b/gdb/target.h -@@ -541,7 +541,7 @@ struct target_ops +@@ -557,7 +557,7 @@ struct target_ops + /* Documentation of this routine is provided with the corresponding target_* macro. */ - int (*to_region_ok_for_hw_watchpoint) (struct target_ops *, -- CORE_ADDR, int) -+ CORE_ADDR, LONGEST) +- virtual int region_ok_for_hw_watchpoint (CORE_ADDR, int) ++ virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); - int (*to_can_accel_watchpoint_condition) (struct target_ops *, + virtual bool can_accel_watchpoint_condition (CORE_ADDR, int, int, diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c -index b0f855a6f4..23033fa9de 100644 +index 369f07581f..e7bcaa293f 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c -@@ -852,10 +852,10 @@ collection_list::add_register (unsigned int regno) +@@ -829,10 +829,10 @@ collection_list::add_register (unsigned int regno) void collection_list::add_memrange (struct gdbarch *gdbarch, int type, bfd_signed_vma base, @@ -3070,7 +3149,7 @@ index b0f855a6f4..23033fa9de 100644 /* type: memrange_absolute == memory, other n == basereg */ /* base: addr if memory, offset if reg relative. */ -@@ -875,7 +875,7 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -852,7 +852,7 @@ collection_list::collect_symbol (struct symbol *sym, CORE_ADDR scope, int trace_string) { @@ -3079,7 +3158,7 @@ index b0f855a6f4..23033fa9de 100644 unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -896,8 +896,8 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -873,8 +873,8 @@ collection_list::collect_symbol (struct symbol *sym, offset = SYMBOL_VALUE_ADDRESS (sym); if (info_verbose) { @@ -3090,7 +3169,7 @@ index b0f855a6f4..23033fa9de 100644 paddress (gdbarch, offset)); } /* A struct may be a C++ class with static fields, go to general -@@ -929,9 +929,9 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -906,9 +906,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3102,7 +3181,7 @@ index b0f855a6f4..23033fa9de 100644 paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len); -@@ -941,9 +941,9 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -918,9 +918,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = 0; if (info_verbose) { @@ -3114,7 +3193,7 @@ index b0f855a6f4..23033fa9de 100644 paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len); -@@ -953,9 +953,9 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -930,9 +930,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3126,7 +3205,7 @@ index b0f855a6f4..23033fa9de 100644 paddress (gdbarch, offset), reg); } add_memrange (gdbarch, reg, offset, len); -@@ -2500,7 +2500,8 @@ info_scope_command (const char *args_in, int from_tty) +@@ -2475,7 +2475,8 @@ info_scope_command (const char *args_in, int from_tty) const char *symname; const char *save_args = args_in; struct block_iterator iter; @@ -3136,7 +3215,7 @@ index b0f855a6f4..23033fa9de 100644 struct gdbarch *gdbarch; int regno; const char *args = args_in; -@@ -2644,8 +2645,11 @@ info_scope_command (const char *args_in, int from_tty) +@@ -2619,8 +2620,11 @@ info_scope_command (const char *args_in, int from_tty) } } if (SYMBOL_TYPE (sym)) @@ -3151,10 +3230,10 @@ index b0f855a6f4..23033fa9de 100644 if (BLOCK_FUNCTION (block)) break; diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h -index 9f4596ecd1..8554cad3ba 100644 +index 42e413018a..978074cbc8 100644 --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h -@@ -255,7 +255,7 @@ public: +@@ -265,7 +265,7 @@ public: void add_register (unsigned int regno); void add_memrange (struct gdbarch *gdbarch, int type, bfd_signed_vma base, @@ -3210,10 +3289,10 @@ index 035def5466..67bd7cf03a 100644 for (i = 0; i < len; i++) { diff --git a/gdb/valops.c b/gdb/valops.c -index 7aacd17d70..fdcb7e49e6 100644 +index cdc5c8014c..96b922dbef 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -80,7 +80,7 @@ oload_classification classify_oload_match (struct badness_vector *, +@@ -81,7 +81,7 @@ oload_classification classify_oload_match (struct badness_vector *, int, int); static struct value *value_struct_elt_for_reference (struct type *, @@ -3222,7 +3301,7 @@ index 7aacd17d70..fdcb7e49e6 100644 const char *, struct type *, int, enum noside); -@@ -182,7 +182,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p) +@@ -183,7 +183,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p) space. */ struct value * @@ -3231,7 +3310,7 @@ index 7aacd17d70..fdcb7e49e6 100644 { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -397,12 +397,12 @@ value_cast (struct type *type, struct value *arg2) +@@ -398,12 +398,12 @@ value_cast (struct type *type, struct value *arg2) if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3246,7 +3325,7 @@ index 7aacd17d70..fdcb7e49e6 100644 LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -1054,7 +1054,7 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1055,7 +1055,7 @@ value_assign (struct value *toval, struct value *fromval) { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3255,7 +3334,7 @@ index 7aacd17d70..fdcb7e49e6 100644 gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -3325,7 +3325,7 @@ compare_parameters (struct type *t1, struct type *t2, int skip_artificial) +@@ -3357,7 +3357,7 @@ compare_parameters (struct type *t1, struct type *t2, int skip_artificial) the form "DOMAIN::NAME". */ static struct value * @@ -3264,7 +3343,7 @@ index 7aacd17d70..fdcb7e49e6 100644 struct type *curtype, const char *name, struct type *intype, int want_address, -@@ -3359,7 +3359,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, +@@ -3391,7 +3391,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3273,7 +3352,7 @@ index 7aacd17d70..fdcb7e49e6 100644 else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3532,7 +3532,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, +@@ -3564,7 +3564,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3282,7 +3361,7 @@ index 7aacd17d70..fdcb7e49e6 100644 if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3681,7 +3681,7 @@ value_rtti_indirect_type (struct value *v, int *full, +@@ -3713,7 +3713,7 @@ value_rtti_indirect_type (struct value *v, int *full, struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3292,10 +3371,10 @@ index 7aacd17d70..fdcb7e49e6 100644 { struct type *real_type; diff --git a/gdb/valprint.c b/gdb/valprint.c -index d01d02fc09..e2d87c05bc 100644 +index 2537d77c19..be4ba05c91 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c -@@ -882,7 +882,7 @@ generic_val_print_complex (struct type *type, +@@ -879,7 +879,7 @@ generic_val_print_complex (struct type *type, void generic_val_print (struct type *type, @@ -3304,7 +3383,7 @@ index d01d02fc09..e2d87c05bc 100644 struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, -@@ -1776,7 +1776,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, +@@ -1773,7 +1773,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3313,7 +3392,7 @@ index d01d02fc09..e2d87c05bc 100644 bool zero_pad) { const gdb_byte *p; -@@ -1929,17 +1929,17 @@ val_print_array_elements (struct type *type, +@@ -1926,17 +1926,17 @@ val_print_array_elements (struct type *type, int recurse, struct value *val, const struct value_print_options *options, @@ -3336,7 +3415,7 @@ index d01d02fc09..e2d87c05bc 100644 LONGEST low_bound, high_bound; LONGEST low_pos, high_pos; -@@ -2029,7 +2029,7 @@ val_print_array_elements (struct type *type, +@@ -2026,7 +2026,7 @@ val_print_array_elements (struct type *type, address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3345,7 +3424,7 @@ index d01d02fc09..e2d87c05bc 100644 annotate_elt_rep_end (); i = rep1 - 1; -@@ -2675,7 +2675,7 @@ print_converted_chars_to_obstack (struct obstack *obstack, +@@ -2672,7 +2672,7 @@ print_converted_chars_to_obstack (struct obstack *obstack, void generic_printstr (struct ui_file *stream, struct type *type, @@ -3355,7 +3434,7 @@ index d01d02fc09..e2d87c05bc 100644 int quote_char, int c_style_terminator, const struct value_print_options *options) diff --git a/gdb/valprint.h b/gdb/valprint.h -index f005c31f87..6ffb58c04e 100644 +index 1f62039be5..00e3cc5714 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -119,7 +119,7 @@ extern void val_print_array_elements (struct type *, LONGEST, @@ -3395,10 +3474,10 @@ index f005c31f87..6ffb58c04e 100644 int quote_char, int c_style_terminator, const struct value_print_options *options); diff --git a/gdb/value.c b/gdb/value.c -index 558d0bbd7a..b6406fedc9 100644 +index 98c060c65f..569281dbbd 100644 --- a/gdb/value.c +++ b/gdb/value.c -@@ -363,7 +363,8 @@ value_bytes_available (const struct value *value, +@@ -384,7 +384,8 @@ value_bytes_available (const struct value *value, } int @@ -3408,7 +3487,7 @@ index 558d0bbd7a..b6406fedc9 100644 { gdb_assert (!value->lazy); -@@ -809,8 +810,8 @@ find_first_range_overlap_and_match (struct ranges_and_idx *rp1, +@@ -832,8 +833,8 @@ find_first_range_overlap_and_match (struct ranges_and_idx *rp1, Return true if the available bits match. */ static bool @@ -3419,7 +3498,7 @@ index 558d0bbd7a..b6406fedc9 100644 int length) { /* Each array element corresponds to a ranges source (unavailable, -@@ -1445,7 +1446,8 @@ value_optimized_out (struct value *value) +@@ -1424,7 +1425,8 @@ value_optimized_out (struct value *value) the following LENGTH bytes. */ void @@ -3430,10 +3509,10 @@ index 558d0bbd7a..b6406fedc9 100644 mark_value_bits_optimized_out (value, offset * TARGET_CHAR_BIT, diff --git a/gdb/value.h b/gdb/value.h -index 03ca06448f..9c73464cf0 100644 +index e838fd580e..776e833fff 100644 --- a/gdb/value.h +++ b/gdb/value.h -@@ -245,7 +245,7 @@ struct lval_funcs +@@ -274,7 +274,7 @@ struct lval_funcs /* If non-NULL, this is used to determine whether the indicated bits of VALUE are a synthetic pointer. */ int (*check_synthetic_pointer) (const struct value *value, @@ -3442,7 +3521,7 @@ index 03ca06448f..9c73464cf0 100644 /* Return a duplicate of VALUE's closure, for use in a new value. This may simply return the same closure, if VALUE's is -@@ -376,7 +376,8 @@ extern int value_optimized_out (struct value *value); +@@ -405,7 +405,8 @@ extern int value_optimized_out (struct value *value); otherwise. */ extern int value_bits_any_optimized_out (const struct value *value, @@ -3452,7 +3531,7 @@ index 03ca06448f..9c73464cf0 100644 /* Like value_optimized_out, but return true iff the whole value is optimized out. */ -@@ -386,7 +387,7 @@ extern int value_entirely_optimized_out (struct value *value); +@@ -415,7 +416,7 @@ extern int value_entirely_optimized_out (struct value *value); LENGTH bytes as optimized out. */ extern void mark_value_bytes_optimized_out (struct value *value, @@ -3461,7 +3540,7 @@ index 03ca06448f..9c73464cf0 100644 /* Mark VALUE's content bits starting at OFFSET and extending for LENGTH bits as optimized out. */ -@@ -820,12 +821,11 @@ extern struct value *value_primitive_field (struct value *arg1, LONGEST offset, +@@ -849,12 +850,11 @@ extern struct value *value_primitive_field (struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type); @@ -3475,7 +3554,7 @@ index 03ca06448f..9c73464cf0 100644 extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -1136,10 +1136,11 @@ extern struct value *value_literal_complex (struct value *, struct value *, +@@ -1147,10 +1147,11 @@ extern struct value *value_literal_complex (struct value *, struct value *, extern struct value *find_function_in_inferior (const char *, struct objfile **); @@ -3490,15 +3569,37 @@ index 03ca06448f..9c73464cf0 100644 /* User function handler. */ diff --git a/gdb/x86-nat.c b/gdb/x86-nat.c -index b126c47c94..825b487a9a 100644 +index cfd293c17f..8886df2d4d 100644 --- a/gdb/x86-nat.c +++ b/gdb/x86-nat.c -@@ -174,7 +174,7 @@ x86_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, +@@ -173,7 +173,7 @@ x86_remove_watchpoint (CORE_ADDR addr, int len, + address ADDR and whose length is LEN bytes. */ - static int - x86_region_ok_for_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) + int +-x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) ++x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { struct x86_debug_reg_state *state = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); +diff --git a/gdb/x86-nat.h b/gdb/x86-nat.h +index cc27fa43b4..bab15def7b 100644 +--- a/gdb/x86-nat.h ++++ b/gdb/x86-nat.h +@@ -49,7 +49,7 @@ extern void x86_forget_process (pid_t pid); + definitions. */ + + extern int x86_can_use_hw_breakpoint (enum bptype type, int cnt, int othertype); +-extern int x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len); ++extern int x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len); + extern int x86_stopped_by_watchpoint (); + extern int x86_stopped_data_address (CORE_ADDR *addr_p); + extern int x86_insert_watchpoint (CORE_ADDR addr, int len, +@@ -82,7 +82,7 @@ struct x86_nat_target : public BaseTarget + int can_use_hw_breakpoint (enum bptype type, int cnt, int othertype) override + { return x86_can_use_hw_breakpoint (type, cnt, othertype); } + +- int region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) override ++ int region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) override + { return x86_region_ok_for_hw_watchpoint (addr, len); } + + int insert_watchpoint (CORE_ADDR addr, int len, diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch index 7e040c6..84f40f8 100644 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ b/gdb-rhbz795424-bitpos-21of25.patch @@ -62,10 +62,10 @@ 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 -index 52a46d96ea..ea53b9ee10 100644 +index 78422faa6c..9b749559a1 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c -@@ -415,6 +415,13 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -413,6 +413,13 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, accumulate_size = 0; else accumulate_size -= sizeof(arg_reg_buffer); @@ -80,7 +80,7 @@ index 52a46d96ea..ea53b9ee10 100644 /* Keep sp aligned to a multiple of 16 as the ABI requires. */ diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c -index db3ff338d1..4d06680239 100644 +index 25f1512857..823ac8fbd6 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -529,6 +529,7 @@ cp_print_value (struct type *type, struct type *real_type, @@ -92,10 +92,10 @@ index db3ff338d1..4d06680239 100644 if (target_read_memory (address + boffset, buf.data (), diff --git a/gdb/defs.h b/gdb/defs.h -index 4fb2129b30..0c156d56c3 100644 +index dc38a288c5..ce5fee3ba3 100644 --- a/gdb/defs.h +++ b/gdb/defs.h -@@ -705,4 +705,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what); +@@ -674,4 +674,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what); #include "utils.h" @@ -115,10 +115,10 @@ index e5c1b07040..06fb3b77c9 100644 base_valaddr = buf.data (); diff --git a/gdb/utils.c b/gdb/utils.c -index 0066bfcc4b..6f0abc98a2 100644 +index 7813df1436..c816e2f897 100644 --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -2836,6 +2836,18 @@ string_to_core_addr (const char *my_string) +@@ -2816,6 +2816,17 @@ string_to_core_addr (const char *my_string) return addr; } @@ -133,15 +133,14 @@ index 0066bfcc4b..6f0abc98a2 100644 + "maximum allowed %s bytes."), pulongest (num), + pulongest (SIZE_MAX / 8)); +} -+ - gdb::unique_xmalloc_ptr - gdb_realpath (const char *filename) - { + #if GDB_SELF_TEST + + static void diff --git a/gdb/valops.c b/gdb/valops.c -index fdcb7e49e6..ddc53f131e 100644 +index 96b922dbef..a7f9be5f4e 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -2087,6 +2087,7 @@ search_struct_method (const char *name, struct value **arg1p, +@@ -2088,6 +2088,7 @@ search_struct_method (const char *name, struct value **arg1p, { CORE_ADDR address; @@ -150,18 +149,18 @@ index fdcb7e49e6..ddc53f131e 100644 address = value_address (*arg1p); diff --git a/gdb/value.c b/gdb/value.c -index b6406fedc9..ac7d07a7b5 100644 +index 569281dbbd..1964cf771c 100644 --- a/gdb/value.c +++ b/gdb/value.c -@@ -926,6 +926,7 @@ allocate_value_lazy (struct type *type) +@@ -934,6 +934,7 @@ allocate_value_lazy (struct type *type) description correctly. */ check_typedef (type); + ulongest_fits_host_or_error (TYPE_LENGTH (type)); - val = XCNEW (struct value); - val->contents = NULL; - val->next = all_values; -@@ -1023,6 +1024,8 @@ check_type_length_before_alloc (const struct type *type) + val = new struct value (type); + + /* Values start out on the all_values chain. */ +@@ -1016,6 +1017,8 @@ check_type_length_before_alloc (const struct type *type) static void allocate_value_contents (struct value *val) { @@ -170,14 +169,14 @@ index b6406fedc9..ac7d07a7b5 100644 if (!val->contents) { check_type_length_before_alloc (val->enclosing_type); -@@ -3015,6 +3018,7 @@ set_value_enclosing_type (struct value *val, struct type *new_encl_type) +@@ -2877,6 +2880,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 - = (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type)); - } + .reset ((gdb_byte *) xrealloc (val->contents.release (), + TYPE_LENGTH (new_encl_type))); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 4c1ab2e73e..bd69fd2f48 100644 --- a/gdb/vax-tdep.c diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index 49f4d39..1f4d982 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -106,36 +106,72 @@ 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 -index 08e6f4d4fd..f08bf039e4 100644 +index dd69f50785..a8e2621eca 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c -@@ -767,7 +767,7 @@ aarch64_linux_stopped_by_watchpoint (struct target_ops *ops) - static int - aarch64_linux_watchpoint_addr_within_range (struct target_ops *target, - CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) +@@ -62,14 +62,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; + +@@ -822,7 +822,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 -index 3b7aa40db8..48dfe22ce1 100644 +index 8e2abfb70c..6e6318013f 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c -@@ -1177,7 +1177,7 @@ arm_linux_stopped_by_watchpoint (struct target_ops *ops) - static int - arm_linux_watchpoint_addr_within_range (struct target_ops *target, - CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) +@@ -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; + +@@ -1213,7 +1213,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 -index ce26f28fad..e9ebc5fba8 100644 +index a3931ea6a9..06dfb83f7f 100644 --- a/gdb/nat/aarch64-linux-hw-point.c +++ b/gdb/nat/aarch64-linux-hw-point.c -@@ -111,7 +111,7 @@ aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len) +@@ -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 @@ -144,20 +180,20 @@ index ce26f28fad..e9ebc5fba8 100644 { unsigned int alignment = 0; -@@ -180,9 +180,10 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) - limitations can be largely relaxed with some further work. */ +@@ -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_len_p, CORE_ADDR *next_addr_p, -- int *next_len_p) -+ LONGEST *next_len_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; - unsigned int offset; -@@ -501,7 +502,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, +@@ -611,7 +612,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, static int aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, @@ -165,20 +201,23 @@ index ce26f28fad..e9ebc5fba8 100644 + CORE_ADDR addr, LONGEST len, int is_insert, struct aarch64_debug_reg_state *state) { - while (len > 0) -@@ -524,9 +525,9 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, - " " - "aligned_addr: %s, aligned_len: %d\n" + CORE_ADDR addr_orig = addr; +@@ -641,12 +642,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, " " -- "next_addr: %s, next_len: %d\n", -+ "next_addr: %s, next_len: %s\n", + "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), len); -+ aligned_len, core_addr_to_string_nz (addr), plongest (len)); + 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)); - if (ret != 0) - return ret; -@@ -537,7 +538,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, + addr_orig = addr_orig_next; +@@ -660,7 +661,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, @@ -187,7 +226,7 @@ index ce26f28fad..e9ebc5fba8 100644 struct aarch64_debug_reg_state *state) { if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) -@@ -588,14 +589,14 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, +@@ -722,14 +723,14 @@ aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, const char *func, CORE_ADDR addr, @@ -205,11 +244,20 @@ index ce26f28fad..e9ebc5fba8 100644 type == hw_write ? "hw-write-watchpoint" : (type == hw_read ? "hw-read-watchpoint" : (type == hw_access ? "hw-access-watchpoint" +@@ -812,7 +813,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 -index 7c42b96d1b..e1d4fc8dbc 100644 +index 1940b06a89..79504a4640 100644 --- a/gdb/nat/aarch64-linux-hw-point.h +++ b/gdb/nat/aarch64-linux-hw-point.h -@@ -172,7 +172,7 @@ int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, +@@ -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, @@ -217,8 +265,8 @@ index 7c42b96d1b..e1d4fc8dbc 100644 + LONGEST len, int is_insert, struct aarch64_debug_reg_state *state); - void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, -@@ -180,7 +180,7 @@ void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, + void aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, +@@ -184,12 +184,12 @@ void aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, const char *func, CORE_ADDR addr, @@ -227,11 +275,38 @@ index 7c42b96d1b..e1d4fc8dbc 100644 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 /* AARCH64_LINUX_HW_POINT_H */ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c -index 4a82434c0d..49a27d8daa 100644 +index b70f168106..a712197618 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c -@@ -1798,11 +1798,11 @@ can_use_watchpoint_cond_accel (void) +@@ -282,7 +282,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; +@@ -300,9 +300,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; +@@ -1847,11 +1847,11 @@ can_use_watchpoint_cond_accel (void) CONDITION_VALUE will hold the value which should be put in the DVC register. */ static void @@ -246,7 +321,7 @@ index 4a82434c0d..49a27d8daa 100644 CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1889,7 +1889,7 @@ num_memory_accesses (struct value *v) +@@ -1939,7 +1939,7 @@ num_memory_accesses (const std::vector &chain) of the constant. */ static int check_condition (CORE_ADDR watch_addr, struct expression *cond, @@ -254,17 +329,18 @@ index 4a82434c0d..49a27d8daa 100644 + CORE_ADDR *data_value, LONGEST *len) { int pc = 1, num_accesses_left, num_accesses_right; - struct value *left_val, *right_val, *left_chain, *right_chain; -@@ -1957,7 +1957,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, + struct value *left_val, *right_val; +@@ -1990,7 +1990,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, + the condition expression, thus only triggering the watchpoint when it is true. */ - static int - ppc_linux_can_accel_watchpoint_condition (struct target_ops *self, -- CORE_ADDR addr, int len, int rw, -+ CORE_ADDR addr, LONGEST len, int rw, - struct expression *cond) + 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) { - CORE_ADDR data_value; -@@ -1974,7 +1974,7 @@ ppc_linux_can_accel_watchpoint_condition (struct target_ops *self, +@@ -2008,7 +2009,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, @@ -273,20 +349,20 @@ index 4a82434c0d..49a27d8daa 100644 struct expression *cond, int insert) { if (len == 1 -@@ -2240,7 +2240,7 @@ ppc_linux_stopped_by_watchpoint (struct target_ops *ops) - static int - ppc_linux_watchpoint_addr_within_range (struct target_ops *target, - CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) +@@ -2274,7 +2275,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 -index 887f1201fe..edd1be632a 100644 +index ca7cc221f9..717a1130fe 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -1563,7 +1563,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) +@@ -1561,7 +1561,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) } static int @@ -295,7 +371,7 @@ index 887f1201fe..edd1be632a 100644 { struct { procfs_ctl_t cmd; -@@ -3250,7 +3250,7 @@ procfs_pid_to_str (struct target_ops *ops, ptid_t ptid) +@@ -3214,7 +3214,7 @@ procfs_target::pid_to_str (ptid_t ptid) /* Insert a watchpoint. */ static int @@ -305,10 +381,19 @@ index 887f1201fe..edd1be632a 100644 { int pflags = 0; diff --git a/gdb/remote.c b/gdb/remote.c -index 94d5594175..86777f1e5e 100644 +index ce67d76195..635cb266e8 100644 --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -9897,7 +9897,7 @@ remote_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, +@@ -138,7 +138,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; + +@@ -10145,7 +10145,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -317,16 +402,16 @@ index 94d5594175..86777f1e5e 100644 putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -9917,7 +9917,7 @@ remote_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, +@@ -10165,7 +10165,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, - static int - remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) + 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); -@@ -9946,7 +9946,7 @@ remote_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, +@@ -10194,7 +10194,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -335,74 +420,116 @@ index 94d5594175..86777f1e5e 100644 putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); +diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c +index d7c683e968..2403d05a18 100644 +--- 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 have_continuable_watchpoint () override { return true; } + bool stopped_by_watchpoint () override; + int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c -index 2b449cbf01..f725215fff 100644 +index ed625ed030..3129ae295f 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c -@@ -733,14 +733,14 @@ debug_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1) +@@ -38,9 +38,9 @@ struct dummy_target : public target_ops + int have_steppable_watchpoint () override; + bool have_continuable_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; +@@ -206,9 +206,9 @@ struct debug_target : public target_ops + int have_steppable_watchpoint () override; + bool have_continuable_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; +@@ -1068,19 +1068,19 @@ debug_target::stopped_data_address (CORE_ADDR *arg0) } - static int --delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) -+delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3) + 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) { - self = self->beneath; - return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3); + return this->beneath->watchpoint_addr_within_range (arg0, arg1, arg2); } - static int --debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) -+debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3) + 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) { - int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->to_watchpoint_addr_within_range (...)\n", debug_target.to_shortname); -@@ -752,7 +752,7 @@ debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, COR - fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_CORE_ADDR (arg2); - fputs_unfiltered (", ", gdb_stdlog); -- target_debug_print_int (arg3); -+ target_debug_print_LONGEST (arg3); - fputs_unfiltered (") = ", gdb_stdlog); - target_debug_print_int (result); - fputs_unfiltered ("\n", gdb_stdlog); -@@ -785,20 +785,20 @@ debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, LONG + return default_watchpoint_addr_within_range (this, arg0, arg1, arg2); } - static int --delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) -+delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4) + 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) { - self = self->beneath; - return self->to_can_accel_watchpoint_condition (self, arg1, arg2, arg3, arg4); - } - - static int --tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) -+tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4) - { - return 0; - } - - static int --debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) -+debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4) - { - int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_accel_watchpoint_condition (...)\n", debug_target.to_shortname); -@@ -808,7 +808,7 @@ debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, i + bool result; + fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath->shortname ()); +@@ -1090,7 +1090,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); +@@ -1126,19 +1126,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 ()); +@@ -1146,7 +1146,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 (arg3); +- 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 -index a1ac6d0697..eb0538cb82 100644 +index 7d0da32ec6..46d120b9d2 100644 --- a/gdb/target.c +++ b/gdb/target.c -@@ -53,7 +53,7 @@ static void generic_tls_error (void) ATTRIBUTE_NORETURN; +@@ -56,7 +56,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 *, @@ -411,7 +538,7 @@ index a1ac6d0697..eb0538cb82 100644 static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -3120,7 +3120,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, +@@ -3205,7 +3205,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, @@ -421,24 +548,24 @@ index a1ac6d0697..eb0538cb82 100644 return addr >= start && addr < start + length; } diff --git a/gdb/target.h b/gdb/target.h -index 7a70c3f6da..35eee91a83 100644 +index aaed35f690..b1943a6d0a 100644 --- a/gdb/target.h +++ b/gdb/target.h -@@ -535,7 +535,7 @@ struct target_ops - int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *) - TARGET_DEFAULT_RETURN (0); - int (*to_watchpoint_addr_within_range) (struct target_ops *, -- CORE_ADDR, CORE_ADDR, int) -+ CORE_ADDR, CORE_ADDR, LONGEST) +@@ -552,7 +552,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 -@@ -545,7 +545,7 @@ struct target_ops +@@ -560,7 +560,7 @@ struct target_ops + virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); - int (*to_can_accel_watchpoint_condition) (struct target_ops *, -- CORE_ADDR, int, int, -+ CORE_ADDR, LONGEST, int, - struct expression *) - TARGET_DEFAULT_RETURN (0); - int (*to_masked_watch_num_registers) (struct target_ops *, +- 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) diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index e42f912..4bd2010 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -147,10 +147,10 @@ Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c -index ea53b9ee10..34dfb661f8 100644 +index 9b749559a1..485db44ae9 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c -@@ -301,17 +301,17 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -299,17 +299,17 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -172,7 +172,7 @@ index ea53b9ee10..34dfb661f8 100644 CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ -@@ -431,8 +431,8 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -429,8 +429,8 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; @@ -183,7 +183,7 @@ index ea53b9ee10..34dfb661f8 100644 /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) -@@ -444,7 +444,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -442,7 +442,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } else { @@ -193,10 +193,10 @@ index ea53b9ee10..34dfb661f8 100644 offset += tlen; contents += tlen; diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c -index 651794a41f..c96790a6af 100644 +index 338a0f2c87..241abcd6d5 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -880,8 +880,8 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -882,8 +882,8 @@ amd64_push_arguments (struct regcache *regcache, int nargs, }; struct value **stack_args = XALLOCAVEC (struct value *, nargs); int num_stack_args = 0; @@ -207,7 +207,7 @@ index 651794a41f..c96790a6af 100644 int integer_reg = 0; int sse_reg = 0; int i; -@@ -893,7 +893,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -895,7 +895,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -216,7 +216,7 @@ index 651794a41f..c96790a6af 100644 enum amd64_reg_class theclass[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -@@ -957,7 +957,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -959,7 +959,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, gdb_assert (regnum != -1); memset (buf, 0, sizeof buf); @@ -239,10 +239,10 @@ index 32ebead05d..2e388f2440 100644 /* See if our value is returned through a register. If it is, then diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c -index bc83326ae7..d38dd4918b 100644 +index 382080a714..885591cbf2 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c -@@ -3477,7 +3477,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) +@@ -3468,7 +3468,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -251,7 +251,7 @@ index bc83326ae7..d38dd4918b 100644 arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3560,7 +3560,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3551,7 +3551,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, } else { @@ -260,7 +260,7 @@ index bc83326ae7..d38dd4918b 100644 unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), -@@ -3583,12 +3583,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3574,12 +3574,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_STRUCT: { @@ -275,7 +275,7 @@ index bc83326ae7..d38dd4918b 100644 if (!field_is_static (&TYPE_FIELD (t, i))) sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -@@ -3612,13 +3612,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3603,13 +3603,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_UNION: { @@ -294,7 +294,7 @@ index bc83326ae7..d38dd4918b 100644 if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3654,7 +3656,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, +@@ -3645,7 +3647,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -303,7 +303,7 @@ index bc83326ae7..d38dd4918b 100644 if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3735,7 +3737,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -3726,7 +3728,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argnum = 0; argnum < nargs; argnum++) { @@ -313,10 +313,10 @@ index bc83326ae7..d38dd4918b 100644 struct type *target_type; enum type_code typecode; diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c -index aa65a76e07..f74b927854 100644 +index 5aa61ba2d9..96de319da5 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c -@@ -1191,13 +1191,13 @@ avr_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) +@@ -1192,13 +1192,13 @@ avr_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) struct stack_item { @@ -332,7 +332,7 @@ index aa65a76e07..f74b927854 100644 { struct stack_item *si; si = XNEW (struct stack_item); -@@ -1285,12 +1285,12 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -1286,12 +1286,12 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = 0; i < nargs; i++) { @@ -349,7 +349,7 @@ index aa65a76e07..f74b927854 100644 /* Calculate the potential last register needed. E.g. For length 2, registers regnum and regnum-1 (say 25 and 24) diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c -index d87fd4d896..f8b02daf29 100644 +index 63fbf6209e..864530bf05 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, @@ -409,7 +409,7 @@ index 5fa79ef2cf..1c99356746 100644 /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c -index 809a647984..6c7059fff4 100644 +index 55e77b6bb6..1317a0a3a7 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -637,7 +637,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, @@ -445,10 +445,10 @@ index 809a647984..6c7059fff4 100644 for (offset = 0; offset < padded_len; offset += wordsize) { diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c -index 513f0e0391..0872d5e809 100644 +index 9692b33e09..3cca3fb6c1 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c -@@ -989,7 +989,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -986,7 +986,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { struct value *arg = args[i]; struct type *type = value_type (arg); @@ -457,7 +457,7 @@ index 513f0e0391..0872d5e809 100644 const bfd_byte *valbuf; bfd_byte fptrbuf[8]; int regnum; -@@ -1184,7 +1184,7 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -1181,7 +1181,7 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -480,10 +480,10 @@ index 7ee2f4cf2a..b811296b0d 100644 if (struct_return) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c -index af4942ab2e..6b1586a9e3 100644 +index d67e2e40c5..dfff555493 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -2677,7 +2677,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -2678,7 +2678,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, gdb_byte buf[4]; int i; int write_pass; @@ -492,7 +492,7 @@ index af4942ab2e..6b1586a9e3 100644 /* BND registers can be in arbitrary values at the moment of the inferior call. This can cause boundary violations that are not -@@ -2692,7 +2692,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -2693,7 +2693,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (write_pass = 0; write_pass < 2; write_pass++) { @@ -501,7 +501,7 @@ index af4942ab2e..6b1586a9e3 100644 if (struct_return) { -@@ -2709,7 +2709,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -2710,7 +2710,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = 0; i < nargs; i++) { @@ -510,7 +510,7 @@ index af4942ab2e..6b1586a9e3 100644 if (write_pass) { -@@ -2916,7 +2916,7 @@ i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) +@@ -2917,7 +2917,7 @@ i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -519,7 +519,7 @@ index af4942ab2e..6b1586a9e3 100644 gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3738,7 +3738,7 @@ static int +@@ -3727,7 +3727,7 @@ static int i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -528,7 +528,7 @@ index af4942ab2e..6b1586a9e3 100644 /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3771,7 +3771,7 @@ i386_register_to_value (struct frame_info *frame, int regnum, +@@ -3760,7 +3760,7 @@ i386_register_to_value (struct frame_info *frame, int regnum, int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -537,7 +537,7 @@ index af4942ab2e..6b1586a9e3 100644 if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3807,7 +3807,7 @@ static void +@@ -3796,7 +3796,7 @@ static void i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -563,10 +563,10 @@ index f8e2f234e0..b703c2cae4 100644 CORE_ADDR struct_ptr; diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c -index 0fe6754412..9a27740691 100644 +index fd79f3f4cd..941c897070 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c -@@ -679,7 +679,7 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -671,7 +671,7 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function, CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[M32R_ARG_REGISTER_SIZE]; @@ -601,42 +601,11 @@ index b9fa5e6d4c..2320e61a69 100644 /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c -index 6a50126548..5a3a67a06a 100644 ---- a/gdb/m88k-tdep.c -+++ b/gdb/m88k-tdep.c -@@ -254,13 +254,13 @@ m88k_store_arguments (struct regcache *regcache, int nargs, - { - struct gdbarch *gdbarch = regcache->arch (); - int num_register_words = 0; -- int num_stack_words = 0; -+ LONGEST num_stack_words = 0; - int i; - - for (i = 0; i < nargs; i++) - { - struct type *type = value_type (args[i]); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - if (m88k_integral_or_pointer_p (type) && len < 4) - { -@@ -302,8 +302,8 @@ m88k_store_arguments (struct regcache *regcache, int nargs, - { - const bfd_byte *valbuf = value_contents (args[i]); - struct type *type = value_type (args[i]); -- int len = TYPE_LENGTH (type); -- int stack_word = num_stack_words; -+ LONGEST len = TYPE_LENGTH (type); -+ LONGEST stack_word = num_stack_words; - - if (m88k_in_register_p (type)) - { diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c -index ecfd4f36db..0cc4574425 100644 +index 0e8c3f97e2..f60a49b90b 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c -@@ -2253,7 +2253,7 @@ push_large_arguments (CORE_ADDR sp, int argc, struct value **argv, +@@ -2241,7 +2241,7 @@ push_large_arguments (CORE_ADDR sp, int argc, struct value **argv, for (i = 0; i < argc; i++) { @@ -646,7 +615,7 @@ index ecfd4f36db..0cc4574425 100644 if (arg_len > MEP_GPR_SIZE) { diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c -index 981959ad4b..9572f92f65 100644 +index cc67cd3bdd..2980604968 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -477,7 +477,7 @@ static void @@ -795,10 +764,10 @@ index 981959ad4b..9572f92f65 100644 val = value_contents (arg); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c -index 93c02d67b4..17ce536a90 100644 +index e12e01df03..93cc78eb51 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c -@@ -1212,7 +1212,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch, +@@ -1198,7 +1198,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; @@ -807,22 +776,6 @@ index 93c02d67b4..17ce536a90 100644 int stack_offset = 0; int argnum; const gdb_byte *val; -diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c -index a4ad0c65f1..953002a7c6 100644 ---- a/gdb/mt-tdep.c -+++ b/gdb/mt-tdep.c -@@ -789,9 +789,9 @@ mt_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - gdb_byte buf[MT_MAX_STRUCT_SIZE]; - int argreg = MT_1ST_ARGREG; - int split_param_len = 0; -- int stack_dest = sp; -+ LONGEST stack_dest = sp; - int slacklen; -- int typelen; -+ LONGEST typelen; - int i, j; - - /* First handle however many args we can fit into MT_1ST_ARGREG thru diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index a6ba5d0ffd..184b7d6261 100644 --- a/gdb/ppc-sysv-tdep.c @@ -918,10 +871,10 @@ index a6ba5d0ffd..184b7d6261 100644 if (writebuf != NULL) regcache_cooked_write_part (regcache, regnum, diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c -index 3db72a1e96..0f4172d553 100644 +index af6a089608..be10f0a3c0 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c -@@ -1347,8 +1347,8 @@ rl78_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -1346,8 +1346,8 @@ rl78_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -933,7 +886,7 @@ index 3db72a1e96..0f4172d553 100644 sp -= container_len; write_memory (rl78_make_data_address (sp), diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c -index 38c86d4cd8..f6d4816401 100644 +index e3e086c210..76f553bebf 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -187,9 +187,9 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function, @@ -957,37 +910,6 @@ index 38c86d4cd8..f6d4816401 100644 if (argbytes) { -diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c -index bdde5c34c8..975b072b39 100644 ---- a/gdb/s390-linux-tdep.c -+++ b/gdb/s390-linux-tdep.c -@@ -3132,7 +3132,7 @@ s390_function_arg_vector (struct type *type) - /* Determine whether N is a power of two. */ - - static int --is_power_of_two (unsigned int n) -+is_power_of_two (ULONGEST n) - { - return n && ((n & (n - 1)) == 0); - } -@@ -3189,7 +3189,7 @@ s390_handle_arg (struct s390_arg_state *as, struct value *arg, - enum bfd_endian byte_order, int is_unnamed) - { - struct type *type = check_typedef (value_type (arg)); -- unsigned int length = TYPE_LENGTH (type); -+ LONGEST length = TYPE_LENGTH (type); - int write_mode = as->regcache != NULL; - - if (s390_function_arg_float (type)) -@@ -3452,7 +3452,7 @@ s390_register_return_value (struct gdbarch *gdbarch, struct type *type, - { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int word_size = gdbarch_ptr_bit (gdbarch) / 8; -- int length = TYPE_LENGTH (type); -+ LONGEST length = TYPE_LENGTH (type); - int code = TYPE_CODE (type); - - if (code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT) diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index a167932327..4674eb7900 100644 --- a/gdb/score-tdep.c @@ -1002,10 +924,10 @@ index a167932327..4674eb7900 100644 CORE_ADDR addr = 0; diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c -index fbc5c9f1d0..1f6052fa97 100644 +index edf7e94b2e..3ab10e8401 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c -@@ -813,7 +813,7 @@ sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) +@@ -812,7 +812,7 @@ sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) static int sh_use_struct_convention (int renesas_abi, struct type *type) { @@ -1014,7 +936,7 @@ index fbc5c9f1d0..1f6052fa97 100644 int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ -@@ -915,7 +915,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) +@@ -914,7 +914,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) /* Helper function to justify value in register according to endianess. */ static const gdb_byte * @@ -1023,7 +945,7 @@ index fbc5c9f1d0..1f6052fa97 100644 { static gdb_byte valbuf[4]; -@@ -1075,7 +1075,8 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, +@@ -1074,7 +1074,8 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -1033,7 +955,7 @@ index fbc5c9f1d0..1f6052fa97 100644 int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; -@@ -1216,7 +1217,8 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, +@@ -1215,7 +1216,8 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -1043,30 +965,8 @@ index fbc5c9f1d0..1f6052fa97 100644 int pass_on_stack = 0; int last_reg_arg = INT_MAX; -diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c -index ad533c9d79..7700e68402 100644 ---- a/gdb/sh64-tdep.c -+++ b/gdb/sh64-tdep.c -@@ -1079,7 +1079,7 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, - CORE_ADDR struct_addr) - { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); -- int stack_offset, stack_alloc; -+ LONGEST stack_offset, stack_alloc; - int int_argreg; - int float_arg_index = 0; - int double_arg_index = 0; -@@ -1088,7 +1088,7 @@ sh64_push_dummy_call (struct gdbarch *gdbarch, - CORE_ADDR regval; - const gdb_byte *val; - gdb_byte valbuf[8]; -- int len; -+ LONGEST len; - int argreg_size; - int fp_args[12]; - diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c -index 7400c24fc5..39db22947c 100644 +index 9fd6a66199..56b72ea505 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1205,7 +1205,7 @@ sparc64_16_byte_align_p (struct type *type) @@ -1124,10 +1024,10 @@ index 7400c24fc5..39db22947c 100644 gdb_byte buf[16]; diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c -index b82bb0ebc3..f87e6f57e1 100644 +index 2567c240d4..46b6d6243e 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c -@@ -1430,7 +1430,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -1431,7 +1431,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1136,7 +1036,7 @@ index b82bb0ebc3..f87e6f57e1 100644 /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1462,7 +1462,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -1463,7 +1463,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1260,10 +1160,10 @@ index 31650ac3a9..91b088251c 100644 gdb_byte buf[xstormy16_pc_size]; diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index e09592a94e..95133a5871 100644 +index 01f96165dc..066081c3f9 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c -@@ -1628,8 +1628,7 @@ xtensa_store_return_value (struct type *type, +@@ -1627,8 +1627,7 @@ xtensa_store_return_value (struct type *type, if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1273,7 +1173,7 @@ index e09592a94e..95133a5871 100644 areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1703,18 +1702,18 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1702,18 +1701,18 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1295,7 +1195,7 @@ index e09592a94e..95133a5871 100644 int regno; /* regno if in register. */ } u; }; -@@ -1738,9 +1737,10 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1737,9 +1736,10 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1309,7 +1209,7 @@ index e09592a94e..95133a5871 100644 switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1810,8 +1810,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1809,8 +1809,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1319,7 +1219,7 @@ index e09592a94e..95133a5871 100644 /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1856,7 +1856,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1855,7 +1855,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, if (info->onstack) { @@ -1328,7 +1228,7 @@ index e09592a94e..95133a5871 100644 CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1872,7 +1872,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1871,7 +1871,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, } else { diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index d01bfec..0f5cbcf 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -37,10 +37,10 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922 23 files changed, 1242 insertions(+), 183 deletions(-) diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 51f133f1b5..5105c8d23a 100644 +index 6ecc5a9be6..fa9ff30721 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -2601,11 +2601,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, +@@ -2600,11 +2600,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, /* See dwarf2loc.h. */ int @@ -57,7 +57,7 @@ index 51f133f1b5..5105c8d23a 100644 if (prop == NULL) return 0; -@@ -2629,7 +2632,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2628,7 +2631,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, *value = value_as_address (val); } @@ -66,7 +66,7 @@ index 51f133f1b5..5105c8d23a 100644 } } break; -@@ -2651,7 +2654,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2650,7 +2653,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, if (!value_optimized_out (val)) { *value = value_as_address (val); @@ -75,7 +75,7 @@ index 51f133f1b5..5105c8d23a 100644 } } } -@@ -2659,8 +2662,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2658,8 +2661,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, case PROP_CONST: *value = prop->data.const_val; @@ -86,7 +86,7 @@ index 51f133f1b5..5105c8d23a 100644 case PROP_ADDR_OFFSET: { struct dwarf2_property_baton *baton -@@ -2681,11 +2684,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2680,11 +2683,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); @@ -145,10 +145,10 @@ index f82e7b2d11..74f0597359 100644 property to C code. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 58da0fc1f9..8fc1f7ec45 100644 +index 49ce83ff20..a28d0a029e 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17551,7 +17551,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17635,7 +17635,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; @@ -157,7 +157,7 @@ index 58da0fc1f9..8fc1f7ec45 100644 int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -17571,7 +17571,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17655,7 +17655,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -167,7 +167,7 @@ index 58da0fc1f9..8fc1f7ec45 100644 /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -17604,6 +17606,13 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17688,6 +17690,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -175,13 +175,14 @@ index 58da0fc1f9..8fc1f7ec45 100644 + if (attr) + if (!attr_to_dynamic_prop (attr, die, cu, &stride)) + complaint (&symfile_complaints, _("Missing DW_AT_byte_stride " -+ "- DIE at 0x%x [in module %s]"), -+ to_underlying (die->sect_off), objfile_name (cu->objfile)); ++ "- DIE at 0x%s [in module %s]"), ++ sect_offset_str (die->sect_off), ++ objfile_name (cu->per_cu->dwarf2_per_objfile->objfile)); + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -17680,7 +17689,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17765,7 +17775,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; @@ -191,10 +192,10 @@ index 58da0fc1f9..8fc1f7ec45 100644 if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; diff --git a/gdb/eval.c b/gdb/eval.c -index 6f74c41b9f..d9bca2791d 100644 +index 5bd6e2cbfe..50dde3ed4f 100644 --- a/gdb/eval.c +++ b/gdb/eval.c -@@ -384,29 +384,325 @@ init_array_element (struct value *array, struct value *element, +@@ -377,29 +377,325 @@ init_array_element (struct value *array, struct value *element, return index; } @@ -538,7 +539,7 @@ index 6f74c41b9f..d9bca2791d 100644 } -@@ -1928,19 +2224,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1926,19 +2222,8 @@ evaluate_subexp_standard (struct type *expect_type, switch (code) { case TYPE_CODE_ARRAY: @@ -559,7 +560,7 @@ index 6f74c41b9f..d9bca2791d 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2336,49 +2621,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2334,49 +2619,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -609,7 +610,7 @@ index 6f74c41b9f..d9bca2791d 100644 case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -3282,6 +3524,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3293,6 +3535,9 @@ calc_f77_array_dims (struct type *array_type) int ndimen = 1; struct type *tmp_type; @@ -620,15 +621,22 @@ index 6f74c41b9f..d9bca2791d 100644 error (_("Can't get dimensions for a non-array type")); diff --git a/gdb/expprint.c b/gdb/expprint.c -index ac5ae0fea1..41bb357a27 100644 +index 70d355d369..1dfc7943da 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c -@@ -581,12 +581,10 @@ print_subexp_standard (struct expression *exp, int *pos, +@@ -578,17 +578,14 @@ print_subexp_standard (struct expression *exp, int *pos, + longest_to_int (exp->elts[pc + 1].longconst); *pos += 2; +- if (range_type == NONE_BOUND_DEFAULT_EXCLUSIVE +- || range_type == LOW_BOUND_DEFAULT_EXCLUSIVE) ++ if ((range_type & SUBARRAY_HIGH_BOUND_EXCLUSIVE) ++ == SUBARRAY_HIGH_BOUND_EXCLUSIVE) + fputs_filtered ("EXCLUSIVE_", stream); fputs_filtered ("RANGE(", stream); - if (range_type == HIGH_BOUND_DEFAULT -- || range_type == NONE_BOUND_DEFAULT) +- || range_type == NONE_BOUND_DEFAULT +- || range_type == NONE_BOUND_DEFAULT_EXCLUSIVE) + if ((range_type & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND) print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered ("..", stream); @@ -638,7 +646,7 @@ index ac5ae0fea1..41bb357a27 100644 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered (")", stream); return; -@@ -1094,16 +1092,16 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1098,22 +1095,24 @@ dump_subexp_body_standard (struct expression *exp, switch (range_type) { @@ -650,16 +658,28 @@ index ac5ae0fea1..41bb357a27 100644 + case SUBARRAY_HIGH_BOUND: fputs_filtered ("Range '..EXP'", stream); break; +- case LOW_BOUND_DEFAULT_EXCLUSIVE: +- fputs_filtered ("ExclusiveRange '..EXP'", stream); +- break; - case HIGH_BOUND_DEFAULT: + case SUBARRAY_LOW_BOUND: fputs_filtered ("Range 'EXP..'", stream); break; - case NONE_BOUND_DEFAULT: ++ case (SUBARRAY_LOW_BOUND ++ | SUBARRAY_HIGH_BOUND ++ | SUBARRAY_HIGH_BOUND_EXCLUSIVE): ++ fputs_filtered ("ExclusiveRange '..EXP'", stream); ++ break; + case (SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND): fputs_filtered ("Range 'EXP..EXP'", stream); break; +- case NONE_BOUND_DEFAULT_EXCLUSIVE: ++ case (SUBARRAY_HIGH_BOUND | SUBARRAY_HIGH_BOUND_EXCLUSIVE): + fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream); + break; default: -@@ -1111,11 +1109,9 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1121,11 +1120,9 @@ dump_subexp_body_standard (struct expression *exp, break; } @@ -674,38 +694,60 @@ index ac5ae0fea1..41bb357a27 100644 } break; diff --git a/gdb/expression.h b/gdb/expression.h -index a783ea5fef..be24792eb6 100644 +index 9f26bb8d60..2cc0d2c1e3 100644 --- a/gdb/expression.h +++ b/gdb/expression.h -@@ -153,17 +153,17 @@ extern void dump_raw_expression (struct expression *, +@@ -148,28 +148,27 @@ extern void dump_raw_expression (struct expression *, struct ui_file *, const char *); extern void dump_prefix_expression (struct expression *, struct ui_file *); -/* In an OP_RANGE expression, either bound could be empty, indicating - that its value is by default that of the corresponding bound of the -- array or string. So we have four sorts of subrange. This -- enumeration type is to identify this. */ -- -+/* In an OP_RANGE expression, either bound can be provided by the user, or not. -+ In addition to this, the user can also specify a stride value to indicated -+ only certain elements of the array. This enumeration type is to identify -+ this. */ -+ +- array or string. Also, the upper end of the range can be exclusive +- or inclusive. So we have six sorts of subrange. This enumeration +- type is to identify this. */ ++/* In an OP_RANGE expression, either bound can be provided by the ++ user, or not. In addition to this, the user can also specify a ++ stride value to indicated only certain elements of the array. ++ Also, the upper end of the range can be exclusive or inclusive. ++ This enumeration type is to identify this. */ + enum range_type - { -- BOTH_BOUND_DEFAULT, /* "(:)" */ -- LOW_BOUND_DEFAULT, /* "(:high)" */ -- HIGH_BOUND_DEFAULT, /* "(low:)" */ -- NONE_BOUND_DEFAULT /* "(low:high)" */ +-{ +- /* Neither the low nor the high bound was given -- so this refers to +- the entire available range. */ +- BOTH_BOUND_DEFAULT, +- /* The low bound was not given and the high bound is inclusive. */ +- LOW_BOUND_DEFAULT, +- /* The high bound was not given and the low bound in inclusive. */ +- HIGH_BOUND_DEFAULT, +- /* Both bounds were given and both are inclusive. */ +- NONE_BOUND_DEFAULT, +- /* The low bound was not given and the high bound is exclusive. */ +- NONE_BOUND_DEFAULT_EXCLUSIVE, +- /* Both bounds were given. The low bound is inclusive and the high +- bound is exclusive. */ +- LOW_BOUND_DEFAULT_EXCLUSIVE, +-}; ++ { + SUBARRAY_NONE_BOUND = 0x0, /* "( : )" */ + SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */ + SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" */ -+ SUBARRAY_STRIDE = 0x4 /* "(::stride)" */ - }; ++ SUBARRAY_STRIDE = 0x4, /* "(::stride)" */ ++ /* The low bound was not given and the high bound is exclusive. ++ In this case we always use (SUBARRAY_HIGH_BOUND | ++ SUBARRAY_HIGH_BOUND_EXCLUSIVE). */ ++ SUBARRAY_HIGH_BOUND_EXCLUSIVE = 0x8, ++ /* Both bounds were given. The low bound is inclusive and the high ++ bound is exclusive. In this case, we use (SUBARRAY_LOW_BOUND | ++ SUBARRAY_HIGH_BOUND | SUBARRAY_HIGH_BOUND_EXCLUSIVE). */ ++ // SUBARRAY_LOW_BOUND_EXCLUSIVE = (SUBARRAY_LOW_BOUND ++ // | SUBARRAY_HIGH_BOUND_EXCLUSIVE), ++ }; #endif /* !defined (EXPRESSION_H) */ diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index 6495e03cc5..cd89bb7ca2 100644 +index e39f68417c..7d03e54a18 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -257,31 +257,63 @@ arglist : subrange @@ -798,7 +840,7 @@ index 903f2af638..b4067a8460 100644 for (i = lowerbound; (i < upperbound + 1 && (*elts) < options->print_max); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index 43fe56e487..a72e2b3e0a 100644 +index 6d70006081..64711e8cfb 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -902,7 +902,8 @@ operator== (const range_bounds &l, const range_bounds &r) @@ -863,7 +905,7 @@ index 43fe56e487..a72e2b3e0a 100644 else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1992,12 +2002,12 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1996,12 +2006,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; @@ -878,7 +920,7 @@ index 43fe56e487..a72e2b3e0a 100644 { low_bound.kind = PROP_CONST; low_bound.data.const_val = value; -@@ -2009,7 +2019,7 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2013,7 +2023,7 @@ resolve_dynamic_range (struct type *dyn_range_type, } prop = &TYPE_RANGE_DATA (dyn_range_type)->high; @@ -887,7 +929,7 @@ index 43fe56e487..a72e2b3e0a 100644 { high_bound.kind = PROP_CONST; high_bound.data.const_val = value; -@@ -2024,12 +2034,20 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2028,12 +2038,20 @@ resolve_dynamic_range (struct type *dyn_range_type, high_bound.data.const_val = 0; } @@ -910,10 +952,10 @@ index 43fe56e487..a72e2b3e0a 100644 return static_range_type; } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 92ca85c295..179238ce82 100644 +index 5f614e573a..878c8b0302 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -560,6 +560,10 @@ struct range_bounds +@@ -612,6 +612,10 @@ struct range_bounds struct dynamic_prop high; @@ -924,7 +966,7 @@ index 92ca85c295..179238ce82 100644 /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -731,7 +735,6 @@ struct main_type +@@ -790,7 +794,6 @@ struct main_type /* * Union member used for range types. */ struct range_bounds *bounds; @@ -932,7 +974,7 @@ index 92ca85c295..179238ce82 100644 } flds_bnds; /* * Slot to point to additional language-specific fields of this -@@ -1253,6 +1256,15 @@ extern void allocate_gnat_aux_type (struct type *); +@@ -1344,6 +1347,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 @@ -948,7 +990,7 @@ index 92ca85c295..179238ce82 100644 /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1287,6 +1299,9 @@ extern void allocate_gnat_aux_type (struct type *); +@@ -1378,6 +1390,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)) @@ -958,7 +1000,7 @@ index 92ca85c295..179238ce82 100644 #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1818,6 +1833,7 @@ extern struct type *create_array_type_with_stride +@@ -1909,6 +1924,7 @@ extern struct type *create_array_type_with_stride struct dynamic_prop *, unsigned int); extern struct type *create_range_type (struct type *, struct type *, @@ -967,10 +1009,10 @@ index 92ca85c295..179238ce82 100644 const struct dynamic_prop *); diff --git a/gdb/parse.c b/gdb/parse.c -index 8b2bb22c76..e1bf3edbe2 100644 +index 193abe853f..ea0d027bb0 100644 --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -984,22 +984,20 @@ operator_length_standard (const struct expression *expr, int endpos, +@@ -989,24 +989,20 @@ operator_length_standard (const struct expression *expr, int endpos, case OP_RANGE: oplen = 3; @@ -981,6 +1023,7 @@ index 8b2bb22c76..e1bf3edbe2 100644 - switch (range_type) - { - case LOW_BOUND_DEFAULT: +- case LOW_BOUND_DEFAULT_EXCLUSIVE: - case HIGH_BOUND_DEFAULT: - args = 1; - break; @@ -988,6 +1031,7 @@ index 8b2bb22c76..e1bf3edbe2 100644 - args = 0; - break; - case NONE_BOUND_DEFAULT: +- case NONE_BOUND_DEFAULT_EXCLUSIVE: - args = 2; - break; - } @@ -1005,10 +1049,10 @@ index 8b2bb22c76..e1bf3edbe2 100644 break; diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y -index 199e87671e..397a92dfdb 100644 +index 9f21498d4c..5d0f24f4e1 100644 --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y -@@ -2448,23 +2448,17 @@ convert_ast_to_expression (struct parser_state *state, +@@ -2477,24 +2477,28 @@ convert_ast_to_expression (struct parser_state *state, case OP_RANGE: { @@ -1025,33 +1069,48 @@ index 199e87671e..397a92dfdb 100644 { convert_ast_to_expression (state, operation->right.op, top); - if (kind == BOTH_BOUND_DEFAULT) -- kind = LOW_BOUND_DEFAULT; -- else -- { +- kind = (operation->inclusive +- ? LOW_BOUND_DEFAULT : LOW_BOUND_DEFAULT_EXCLUSIVE); ++ if (kind == SUBARRAY_NONE_BOUND) ++ { ++ kind = (range_type) SUBARRAY_HIGH_BOUND; ++ if (!operation->inclusive) ++ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND_EXCLUSIVE); ++ } + else + { - gdb_assert (kind == HIGH_BOUND_DEFAULT); -- kind = NONE_BOUND_DEFAULT; -- } -+ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND); +- kind = (operation->inclusive +- ? NONE_BOUND_DEFAULT : NONE_BOUND_DEFAULT_EXCLUSIVE); ++ gdb_assert (kind == SUBARRAY_LOW_BOUND); ++ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND); ++ if (!operation->inclusive) ++ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND_EXCLUSIVE); + } } - write_exp_elt_opcode (state, OP_RANGE); - write_exp_elt_longcst (state, kind); + else diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c -index f7bec33a42..cb924e084d 100644 +index ed0394592f..4be112b7a3 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c -@@ -1366,9 +1366,9 @@ rust_range (struct expression *exp, int *pos, enum noside noside) +@@ -1106,13 +1106,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; -- if (kind == HIGH_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT) +- if (kind == HIGH_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT +- || kind == NONE_BOUND_DEFAULT_EXCLUSIVE) + if ((kind & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND) low = evaluate_subexp (NULL_TYPE, exp, pos, noside); -- if (kind == LOW_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT) +- if (kind == LOW_BOUND_DEFAULT || kind == LOW_BOUND_DEFAULT_EXCLUSIVE +- || kind == NONE_BOUND_DEFAULT || kind == NONE_BOUND_DEFAULT_EXCLUSIVE) + if ((kind & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND) high = evaluate_subexp (NULL_TYPE, exp, pos, noside); +- bool inclusive = (kind == NONE_BOUND_DEFAULT || kind == LOW_BOUND_DEFAULT); ++ bool inclusive = (!((kind & SUBARRAY_HIGH_BOUND_EXCLUSIVE) == SUBARRAY_HIGH_BOUND_EXCLUSIVE)); if (noside == EVAL_SKIP) -@@ -1457,7 +1457,7 @@ rust_compute_range (struct type *type, struct value *range, + return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1); +@@ -1201,7 +1199,7 @@ rust_compute_range (struct type *type, struct value *range, *low = 0; *high = 0; @@ -1060,7 +1119,7 @@ index f7bec33a42..cb924e084d 100644 if (TYPE_NFIELDS (type) == 0) return; -@@ -1465,15 +1465,14 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1209,15 +1207,14 @@ rust_compute_range (struct type *type, struct value *range, i = 0; if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0) { @@ -1076,9 +1135,9 @@ index f7bec33a42..cb924e084d 100644 - ? LOW_BOUND_DEFAULT : NONE_BOUND_DEFAULT); + *kind = (range_type) (*kind | SUBARRAY_HIGH_BOUND); *high = value_as_long (value_field (range, i)); - } - } -@@ -1488,7 +1487,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, + + if (rust_inclusive_range_type_p (type)) +@@ -1235,7 +1232,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, struct type *rhstype; LONGEST low, high_bound; /* Initialized to appease the compiler. */ @@ -1087,7 +1146,7 @@ index f7bec33a42..cb924e084d 100644 LONGEST high = 0; int want_slice = 0; -@@ -1586,7 +1585,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1333,7 +1330,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, error (_("Cannot subscript non-array type")); if (want_slice @@ -1096,7 +1155,7 @@ index f7bec33a42..cb924e084d 100644 low = low_bound; if (low < 0) error (_("Index less than zero")); -@@ -1604,7 +1603,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1351,7 +1348,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, CORE_ADDR addr; struct value *addrval, *tem; @@ -1741,10 +1800,10 @@ index 58e3a09c37..035def5466 100644 if (type_not_associated (array_type)) error (_("no such vector element (vector not associated)")); diff --git a/gdb/valops.c b/gdb/valops.c -index 9525dc8499..4cd4fd96ae 100644 +index 62a86c06a3..5c35d7a091 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -3776,56 +3776,195 @@ value_of_this_silent (const struct language_defn *lang) +@@ -3808,56 +3808,195 @@ value_of_this_silent (const struct language_defn *lang) struct value * value_slice (struct value *array, int lowbound, int length) @@ -1971,10 +2030,10 @@ index 9525dc8499..4cd4fd96ae 100644 /* Create a value for a FORTRAN complex number. Currently most of the diff --git a/gdb/value.h b/gdb/value.h -index 7dc67dc721..03ca06448f 100644 +index 4d75c966ed..e838fd580e 100644 --- a/gdb/value.h +++ b/gdb/value.h -@@ -1128,6 +1128,8 @@ extern struct value *varying_to_slice (struct value *); +@@ -1139,6 +1139,8 @@ extern struct value *varying_to_slice (struct value *); extern struct value *value_slice (struct value *, int, int); diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index c33d9f9..4d2a16a 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -33,10 +33,10 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings 20 files changed, 827 insertions(+), 110 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS -index 6c9a2ecefd..f40eb6c390 100644 +index cef558039e..fa4c0382dc 100644 --- a/gdb/NEWS +++ b/gdb/NEWS -@@ -3,6 +3,8 @@ +@@ -59,6 +59,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -79,10 +79,10 @@ index c4c0918e26..3904fab260 100644 type_print (value_type (val), "", stream, -1); fprintf_filtered (stream, ") "); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 8fc1f7ec45..98e7d842f0 100644 +index a28d0a029e..4006f4a48f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2077,7 +2077,8 @@ static void read_signatured_type (struct signatured_type *); +@@ -1789,7 +1789,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, @@ -92,7 +92,7 @@ index 8fc1f7ec45..98e7d842f0 100644 /* memory allocation interface */ -@@ -13745,7 +13746,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13681,7 +13682,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -101,7 +101,7 @@ index 8fc1f7ec45..98e7d842f0 100644 } cu->list_in_scope = &local_symbols; -@@ -16327,7 +16328,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -16385,7 +16386,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); @@ -111,7 +111,7 @@ index 8fc1f7ec45..98e7d842f0 100644 if (!stride_ok) { complaint (&symfile_complaints, -@@ -17075,29 +17077,94 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17156,29 +17158,94 @@ 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; @@ -217,7 +217,7 @@ index 8fc1f7ec45..98e7d842f0 100644 char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -17446,7 +17513,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17529,7 +17596,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, @@ -226,8 +226,8 @@ index 8fc1f7ec45..98e7d842f0 100644 + const gdb_byte *additional_data, int additional_data_size) { struct dwarf2_property_baton *baton; - struct obstack *obstack = &cu->objfile->objfile_obstack; -@@ -17456,14 +17524,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, + struct obstack *obstack +@@ -17540,14 +17608,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, if (attr_form_is_block (attr)) { @@ -243,7 +243,7 @@ index 8fc1f7ec45..98e7d842f0 100644 + gdb_byte *data; + + data = (gdb_byte *) obstack_alloc( -+ &cu->objfile->objfile_obstack, ++ &cu->per_cu->dwarf2_per_objfile->objfile->objfile_obstack, + DW_BLOCK (attr)->size + additional_data_size); + memcpy (data, DW_BLOCK (attr)->data, DW_BLOCK (attr)->size); + memcpy (data + DW_BLOCK (attr)->size, additional_data, @@ -265,7 +265,7 @@ index 8fc1f7ec45..98e7d842f0 100644 } else if (attr_form_is_ref (attr)) { -@@ -17496,8 +17583,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17580,8 +17667,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; @@ -276,7 +276,7 @@ index 8fc1f7ec45..98e7d842f0 100644 + { + gdb_byte *data; + -+ data = (gdb_byte *) obstack_alloc (&cu->objfile->objfile_obstack, ++ data = (gdb_byte *) obstack_alloc (&cu->per_cu->dwarf2_per_objfile->objfile->objfile_obstack, + DW_BLOCK (target_attr)->size + additional_data_size); + memcpy (data, DW_BLOCK (target_attr)->data, + DW_BLOCK (target_attr)->size); @@ -296,15 +296,16 @@ index 8fc1f7ec45..98e7d842f0 100644 prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -17608,24 +17715,24 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17692,7 +17799,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) - if (!attr_to_dynamic_prop (attr, die, cu, &stride)) + if (!attr_to_dynamic_prop (attr, die, cu, &stride, NULL, 0)) complaint (&symfile_complaints, _("Missing DW_AT_byte_stride " - "- DIE at 0x%x [in module %s]"), - to_underlying (die->sect_off), objfile_name (cu->objfile)); + "- DIE at 0x%s [in module %s]"), + sect_offset_str (die->sect_off), +@@ -17700,7 +17807,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -312,8 +313,9 @@ index 8fc1f7ec45..98e7d842f0 100644 + attr_to_dynamic_prop (attr, die, cu, &low, NULL, 0); else if (!low_default_is_valid) complaint (&symfile_complaints, _("Missing DW_AT_lower_bound " - "- DIE at 0x%x [in module %s]"), - to_underlying (die->sect_off), objfile_name (cu->objfile)); + "- DIE at %s [in module %s]"), +@@ -17708,10 +17815,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) + objfile_name (cu->per_cu->dwarf2_per_objfile->objfile)); attr = dwarf2_attr (die, DW_AT_upper_bound, cu); - if (!attr_to_dynamic_prop (attr, die, cu, &high)) @@ -325,31 +327,31 @@ index 8fc1f7ec45..98e7d842f0 100644 { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -25223,7 +25330,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25255,7 +25362,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)) { - if (attr_to_dynamic_prop (attr, die, cu, &prop)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) - add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile); + add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25238,7 +25345,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25270,7 +25377,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)) { - if (attr_to_dynamic_prop (attr, die, cu, &prop)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) - add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile); + add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25251,7 +25358,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25283,7 +25390,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); - if (attr_to_dynamic_prop (attr, die, cu, &prop)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) - add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile); + add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type); if (dwarf2_per_objfile->die_type_hash == NULL) diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c @@ -506,10 +508,10 @@ index f14f1811f4..4f6a0ed09a 100644 } fprintfi_filtered (level, stream, "End Type "); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index a72e2b3e0a..cb5524023f 100644 +index 64711e8cfb..2aa5253100 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -1915,7 +1915,8 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1919,7 +1919,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. */ @@ -519,7 +521,7 @@ index a72e2b3e0a..cb5524023f 100644 type = check_typedef (TYPE_TARGET_TYPE (type)); /* Types that have a dynamic TYPE_DATA_LOCATION are considered -@@ -1949,6 +1950,7 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1953,6 +1954,7 @@ is_dynamic_type_internal (struct type *type, int top_level) } case TYPE_CODE_ARRAY: @@ -527,7 +529,7 @@ index a72e2b3e0a..cb5524023f 100644 { gdb_assert (TYPE_NFIELDS (type) == 1); -@@ -2067,7 +2069,8 @@ resolve_dynamic_array (struct type *type, +@@ -2071,7 +2073,8 @@ resolve_dynamic_array (struct type *type, struct dynamic_prop *prop; unsigned int bit_stride = 0; @@ -537,7 +539,7 @@ index a72e2b3e0a..cb5524023f 100644 type = copy_type (type); -@@ -2092,11 +2095,15 @@ resolve_dynamic_array (struct type *type, +@@ -2096,11 +2099,15 @@ resolve_dynamic_array (struct type *type, ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -554,7 +556,7 @@ index a72e2b3e0a..cb5524023f 100644 prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type); if (prop != NULL) { -@@ -2251,6 +2258,28 @@ resolve_dynamic_struct (struct type *type, +@@ -2255,6 +2262,28 @@ resolve_dynamic_struct (struct type *type, return resolved_type; } @@ -583,7 +585,7 @@ index a72e2b3e0a..cb5524023f 100644 /* Worker for resolved_dynamic_type. */ static struct type * -@@ -2299,7 +2328,12 @@ resolve_dynamic_type_internal (struct type *type, +@@ -2303,7 +2332,12 @@ resolve_dynamic_type_internal (struct type *type, break; } @@ -1290,10 +1292,10 @@ index b6e777235c..14b611f7b5 100644 mi_gdb_test "582-var-show-format pvla2_not_associated" \ "582\\^done,format=\"natural\"" \ diff --git a/gdb/typeprint.c b/gdb/typeprint.c -index c098a3f426..319fbaf94e 100644 +index 222fc0a06b..37021e8d0d 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c -@@ -538,6 +538,25 @@ whatis_exp (const char *exp, int show) +@@ -464,6 +464,25 @@ whatis_exp (const char *exp, int show) printf_filtered (" */\n"); } @@ -1318,12 +1320,12 @@ index c098a3f426..319fbaf94e 100644 + LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags); printf_filtered ("\n"); - + } diff --git a/gdb/valops.c b/gdb/valops.c -index 4cd4fd96ae..9b25980090 100644 +index 5c35d7a091..9b6600b538 100644 --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -1564,6 +1564,19 @@ value_ind (struct value *arg1) +@@ -1565,6 +1565,19 @@ value_ind (struct value *arg1) if (TYPE_CODE (base_type) == TYPE_CODE_PTR) { struct type *enc_type; @@ -1343,7 +1345,7 @@ index 4cd4fd96ae..9b25980090 100644 /* We may be pointing to something embedded in a larger object. Get the real type of the enclosing object. */ -@@ -1579,8 +1592,7 @@ value_ind (struct value *arg1) +@@ -1580,8 +1593,7 @@ value_ind (struct value *arg1) else /* Retrieve the enclosing object pointed to. */ arg2 = value_at_lazy (enc_type, @@ -1354,10 +1356,10 @@ index 4cd4fd96ae..9b25980090 100644 enc_type = value_type (arg2); return readjust_indirect_value_type (arg2, enc_type, base_type, arg1); diff --git a/gdb/valprint.c b/gdb/valprint.c -index b19123f23e..d01d02fc09 100644 +index bed2cecf2c..2537d77c19 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c -@@ -1111,12 +1111,6 @@ value_check_printable (struct value *val, struct ui_file *stream, +@@ -1108,12 +1108,6 @@ value_check_printable (struct value *val, struct ui_file *stream, return 0; } diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index 1931154..78e1d87 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -31,7 +31,7 @@ Thanks, Jan diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 5105c8d23a..5486e4dc12 100644 +index fa9ff30721..cfca1c2751 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -42,6 +42,7 @@ diff --git a/gdb.spec b/gdb.spec index e258001..8a0c0bb 100644 --- a/gdb.spec +++ b/gdb.spec @@ -18,22 +18,22 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20180109 +%global snapsrc 20180522 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} -Version: 8.1 +Version: 8.1.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: 14%{?dist} +Release: 15%{?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 Group: Development/Debuggers # Do not provide URL for snapshots as the file lasts there only for 2 days. # ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz -#Source: % {tarname}.tar.xz -Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz +Source: %{tarname}.tar.xz +#Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gnu.org/software/gdb/ @@ -1026,6 +1026,9 @@ then fi %changelog +* Wed May 30 2018 Sergio Durigan Junior - 8.1.50.20180522-15.fc28 +- Rebase to FSF GDB 8.1.50.20180522 (8.2pre). + * Mon Apr 2 2018 Jan Kratochvil - 8.1-14.fc28 - Revert 'Fix PDF build on Rawhide/F-29', rm -rf texinfo/ (from RH BZ 1562580). diff --git a/sources b/sources index 5cb0e7a..37748c2 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz) = 3d540b99581ffa4cf2810bec979c9a01a1f8ce782b7c8efb46b40dd2421d60cdb0e52b53c5477c3e86a57957a2a14489f5c29dc53868738a1ef79e79cf76d0a1 SHA512 (v1.6.1.tar.gz) = c7c9c8ba78021fff3fde12a216f5729c6031114e5a727f49b7ff1a31c53b5ddba24d1b3aee252d8278ecd1fafe78a44ed059c12b9eb29eca33093e0720673468 -SHA512 (gdb-8.1.tar.xz) = ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357 +SHA512 (gdb-8.1.50.20180522.tar.xz) = 27a6b106cc1f21a74acf31be45d623115a18818a9f5008ac7748dbe745685f41f055fe8acf736ee5f0d6716d47b2a4307197db8899a3a4e220bed72b1e126d97