Rebase to FSF GDB 8.1.50.20180522 (8.2pre).

This commit is contained in:
Sergio Durigan Junior 2018-05-31 14:47:56 -04:00
parent b7dc57f2a9
commit 2bcd68d7bf
62 changed files with 1521 additions and 3137 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz /gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz
/v1.6.1.tar.gz /v1.6.1.tar.gz
/gdb-8.1.tar.xz /gdb-8.1.tar.xz
/gdb-8.1.50.20180522.tar.xz

View File

@ -115,197 +115,189 @@ Patch028: gdb-6.6-bz230000-power6-disassembly-test.patch
#=fedoratest #=fedoratest
Patch029: gdb-6.6-bz229517-gcore-without-terminal.patch 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". # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
#=fedoratest #=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). # Support for stepping over PPC atomic instruction sequences (BZ 237572).
#=fedoratest #=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. # Make upstream `set scheduler-locking step' as default.
#=push+jan: How much is scheduler-locking relevant after non-stop? #=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. # Test kernel VDSO decoding while attaching to an i386 process.
#=fedoratest #=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). # Test leftover zombie process (BZ 243845).
#=fedoratest #=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). # New locating of the matching binaries from the pure core file (build-id).
#=push+jan #=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. # 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 # Load strictly build-id-checked core files only if no executable is specified
# (Jan Kratochvil, RH BZ 1339862). # (Jan Kratochvil, RH BZ 1339862).
#=push+jan #=push+jan
Patch037: gdb-6.6-buildid-locate-solib-missing-ids.patch Patch036: gdb-6.6-buildid-locate-solib-missing-ids.patch
#=push+jan #=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). # Fix displaying of numeric char arrays as strings (BZ 224128).
#=fedoratest: But it is failing anyway, one should check the behavior more. #=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. # Test PPC hiding of call-volatile parameter register.
#=fedoratest #=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. # Testsuite fixes for more stable/comparable results.
#=fedoratest #=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. # Test ia64 memory leaks of the code using libunwind.
#=fedoratest #=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. # Test hiding unexpected breakpoints on intentional step commands.
#=fedoratest #=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. # Test gcore memory and time requirements for large inferiors.
#=fedoratest #=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. # Test GCORE for shmid 0 shared memory mappings.
#=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. #=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. # Test a crash on `focus cmd', `focus prev' commands.
#=fedoratest #=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). # Test various forms of threads tracking across exec() (BZ 442765).
#=fedoratest #=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) # Silence memcpy check which returns false positive (sparc64)
#=push: But it is just a GCC workaround, look up the existing GCC PR for it. #=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. # Test a crash on libraries missing the .text section.
#=fedoratest #=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). # Fix register assignments with no GDB stack frames (BZ 436037).
#=push+jan: This fix is incorrect. #=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. # Test the watchpoints conditionals works.
#=fedoratest #=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). # Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
#=fedoratest #=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. # New test for step-resume breakpoint placed in multiple threads at once.
#=fedoratest #=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 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. # Fix regression of undisplayed missing shared libraries caused by a fix for.
#=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> #=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. # Fix syscall restarts for amd64->i386 biarch.
#=push+jan #=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). # Fix stepping with OMP parallel Fortran sections (BZ 533176).
#=push+jan: It requires some better DWARF annotations. #=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. # Fix regression by python on ia64 due to stale current frame.
#=push+jan #=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. # Workaround ccache making lineno non-zero for command-line definitions.
#=fedoratest: ccache is rarely used and it is even fixed now. #=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. #=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. #=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. # Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
#=fedoratest #=fedoratest
Patch061: gdb-lineno-makeup-test.patch Patch060: gdb-lineno-makeup-test.patch
# Test power7 ppc disassembly. # Test power7 ppc disassembly.
#=fedoratest #=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+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). # Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
#=push+jan: It should be fixed properly instead. #=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). # Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
#=push+jan: Currently it is still not fully safe. #=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). # Fix follow-exec for C++ programs (bugreported by Martin Stransky).
#=fedoratest #=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). # Backport DWARF-4 support (BZ 601887, Tom Tromey).
#=fedoratest #=fedoratest
Patch066: gdb-bz601887-dwarf4-rh-test.patch Patch065: gdb-bz601887-dwarf4-rh-test.patch
#=push+jan #=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). # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
#=push+jan #=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). # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
#=fedoratest #=fedoratest
Patch069: gdb-test-bt-cfi-without-die.patch Patch068: 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
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248). # 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. #=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). # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest #=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). # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
#=fedoratest #=fedoratest
Patch073: gdb-test-pid0-core.patch Patch071: gdb-test-pid0-core.patch
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
#=fedoratest #=fedoratest
Patch074: gdb-test-dw2-aranges.patch Patch072: gdb-test-dw2-aranges.patch
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases. # [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
#=fedoratest #=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). # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest #=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). # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest #=fedoratest
Patch077: gdb-physname-pr12273-test.patch Patch075: gdb-physname-pr12273-test.patch
# Toolchain on sparc is slightly broken and debuginfo files are generated # Toolchain on sparc is slightly broken and debuginfo files are generated
# with non 64bit aligned tables/offsets. # 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 # 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 :) # rebuild to fix it, we need to be able to use gdb :)
#=push #=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). # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
#=fedoratest #=fedoratest
Patch079: gdb-test-ivy-bridge.patch Patch077: gdb-test-ivy-bridge.patch
# Hack for proper PIE run of the testsuite. # Hack for proper PIE run of the testsuite.
#=fedoratest #=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). # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
#=push+jan #=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). # Workaround crashes from stale frame_info pointer (BZ 804256).
#=push+jan #=push+jan
Patch082: gdb-stale-frame_info.patch Patch080: gdb-stale-frame_info.patch
# Workaround PR libc/14166 for inferior calls of strstr. # Workaround PR libc/14166 for inferior calls of strstr.
#=fedora: Compatibility with RHELs (unchecked which ones). #=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). # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
#=fedoratest #=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). # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
#=fedoratest #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=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' # Fix `GDB cannot access struct member whose offset is larger than 256MB'
# (RH BZ 795424). # (RH BZ 795424).
#=push #=push
Patch092: gdb-rhbz795424-bitpos-lazyvalue.patch Patch090: gdb-rhbz795424-bitpos-lazyvalue.patch
# Import regression test for `gdb/findvar.c:417: internal-error: # Import regression test for `gdb/findvar.c:417: internal-error:
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. # read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
#=fedoratest #=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). # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
#=push+jan #=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) # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
#=fedoratest #=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, # Fix 'gdb gives highly misleading error when debuginfo pkg is present,
# but not corresponding binary pkg' (RH BZ 981154). # but not corresponding binary pkg' (RH BZ 981154).
#=push+jan #=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 #=fedoratest
Patch097: gdb-archer-vla-tests.patch Patch095: gdb-archer-vla-tests.patch
#=fedoratest #=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). # Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
#=push #=push
Patch099: gdb-btrobust.patch Patch097: gdb-btrobust.patch
# Display Fortran strings in backtraces. # Display Fortran strings in backtraces.
#=fedoratest #=fedoratest
Patch100: gdb-fortran-frame-string.patch Patch098: gdb-fortran-frame-string.patch
# Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). # Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
#=push #=push
Patch101: gdb-python-gil.patch Patch099: gdb-python-gil.patch
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
# crash.' (RH BZ 1156192). # crash.' (RH BZ 1156192).
#=fedoratest #=fedoratest
Patch102: gdb-rhbz1156192-recursive-dlopen-test.patch Patch100: gdb-rhbz1156192-recursive-dlopen-test.patch
# Fix jit-reader.h for multi-lib. # Fix jit-reader.h for multi-lib.
#=push+jan #=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' # Fix '`catch syscall' doesn't work for parent after `fork' is called'
# (Philippe Waroquiers, RH BZ 1149205). # (Philippe Waroquiers, RH BZ 1149205).
#=fedoratest #=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 # Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
# description: 'C++ (and objc): Internal error on unqualified name # description: 'C++ (and objc): Internal error on unqualified name
# re-set', PR 11657] (RH BZ 1186476). # re-set', PR 11657] (RH BZ 1186476).
#=fedoratest #=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). # Test 'info type-printers' Python error (RH BZ 1350436).
#=fedoratest #=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 # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
# Kratochvil, RH BZ 1084404). # Kratochvil, RH BZ 1084404).
#=fedoratest #=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). # Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
#=push+jan #=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). # Force libncursesw over libncurses to match the includes (RH BZ 1270534).
#=push+jan #=push+jan
Patch109: gdb-fedora-libncursesw.patch Patch107: gdb-fedora-libncursesw.patch
# Test clflushopt instruction decode (for RH BZ 1262471). # Test clflushopt instruction decode (for RH BZ 1262471).
#=fedoratest #=fedoratest
Patch110: gdb-opcodes-clflushopt-test.patch Patch108: gdb-opcodes-clflushopt-test.patch
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
#=fedora #=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). # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
#=push+jan #=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). # Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
#=fedora #=fedora
Patch113: gdb-readline62-ask-more-rh.patch Patch111: 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
# Make the GDB quit processing non-abortable to cleanup everything properly. # 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 . #=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). # [aarch64] Fix hardware watchpoints (RH BZ 1261564).
#=fedoratest #=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). # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
#=fedora #=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). # New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
#=fedoratest #=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). # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
#=fedora #=fedora
Patch119: gdb-linux_perf-bundle.patch Patch116: gdb-linux_perf-bundle.patch
# Fix gdb-headless /usr/bin/ executables (BZ 1390251). # Fix gdb-headless /usr/bin/ executables (BZ 1390251).
#=fedora #=fedora
Patch120: gdb-libexec-add-index.patch Patch117: gdb-libexec-add-index.patch
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387). # New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
#=fedoratest #=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). # [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka).
#=fedoratest #=fedoratest
Patch122: gdb-testsuite-readline63-sigint.patch Patch119: gdb-testsuite-readline63-sigint.patch
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
#=push #=push
Patch123: gdb-archer.patch Patch120: gdb-archer.patch
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
Patch124: gdb-vla-intel-fix-print-char-array.patch Patch121: 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
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
# =fedoratest # =fedoratest
Patch127: gdb-rhbz1553104-s390x-arch12-test.patch Patch122: gdb-rhbz1553104-s390x-arch12-test.patch
# [aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993).
Patch128: gdb-rhbz1347993-aarch64-hw-watchpoint.patch

View File

@ -120,9 +120,3 @@
%patch120 -p1 %patch120 -p1
%patch121 -p1 %patch121 -p1
%patch122 -p1 %patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
%patch128 -p1

View File

@ -1 +1 @@
b755db3c98137baaff8a154d936d326d9a9c72a7 75d74ccace05f6166a45dbaa352abf753891d3be

View File

@ -27,7 +27,6 @@ gdb-6.3-bz140532-ppc-unwinding-test.patch
gdb-6.3-bz202689-exec-from-pthread-test.patch gdb-6.3-bz202689-exec-from-pthread-test.patch
gdb-6.6-bz230000-power6-disassembly-test.patch gdb-6.6-bz230000-power6-disassembly-test.patch
gdb-6.6-bz229517-gcore-without-terminal.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-testsuite-timeouts.patch
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
gdb-6.6-scheduler_locking-step-is-default.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-core-as-arg.patch
gdb-6.6-buildid-locate-rpm-librpm-workaround.patch gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
gdb-test-bt-cfi-without-die.patch gdb-test-bt-cfi-without-die.patch
gdb-gdb-add-index-script.patch
gdb-bz568248-oom-is-error.patch gdb-bz568248-oom-is-error.patch
gdb-bz634108-solib_address.patch gdb-bz634108-solib_address.patch
gdb-test-pid0-core.patch gdb-test-pid0-core.patch
@ -111,7 +109,6 @@ gdb-opcodes-clflushopt-test.patch
gdb-dts-rhel6-python-compat.patch gdb-dts-rhel6-python-compat.patch
gdb-6.6-buildid-locate-rpm-scl.patch gdb-6.6-buildid-locate-rpm-scl.patch
gdb-readline62-ask-more-rh.patch gdb-readline62-ask-more-rh.patch
gdb-6.8-attach-signalled-detach-stopped.patch
gdb-6.8-quit-never-aborts.patch gdb-6.8-quit-never-aborts.patch
gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
gdb-container-rh-pkg.patch gdb-container-rh-pkg.patch
@ -122,7 +119,4 @@ gdb-rhbz1398387-tab-crash-test.patch
gdb-testsuite-readline63-sigint.patch gdb-testsuite-readline63-sigint.patch
gdb-archer.patch gdb-archer.patch
gdb-vla-intel-fix-print-char-array.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-rhbz1553104-s390x-arch12-test.patch
gdb-rhbz1347993-aarch64-hw-watchpoint.patch

View File

@ -16,10 +16,10 @@ FileName: gdb-6.3-gstack-20050411.patch
* gstack.sh, gstack.1: New files. * gstack.sh, gstack.1: New files.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 17b71c6e7c..e77d6a5c03 100644 index 09a2ad2ca3..1ea7a36c69 100644
--- a/gdb/Makefile.in --- a/gdb/Makefile.in
+++ b/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 install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only @$(MAKE) $(FLAGS_TO_PASS) install-only
@ -28,7 +28,7 @@ index 17b71c6e7c..e77d6a5c03 100644
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \ echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1784,7 +1784,25 @@ install-guile: @@ -1776,7 +1776,25 @@ install-guile:
install-python: install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@ -55,7 +55,7 @@ index 17b71c6e7c..e77d6a5c03 100644
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \ echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL) @@ -1799,6 +1817,18 @@ uninstall: force $(CONFIG_UNINSTALL)
fi fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do

View File

@ -15,10 +15,10 @@ FileName: gdb-6.3-ppc64displaysymbol-20041124.patch
address. address.
diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 6256f35baa..c52e39f7fc 100644 index 0dfea34753..82fe1db9a7 100644
--- a/gdb/printcmd.c --- a/gdb/printcmd.c
+++ b/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); addr = overlay_mapped_address (addr, section);
} }
} }

View File

@ -17,7 +17,7 @@ FileName: gdb-6.3-ppc64syscall-20040622.patch
"func_start". "func_start".
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c 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 --- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c
@@ -134,6 +134,7 @@ static const char *powerpc_vector_abi_string = "auto"; @@ -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 int offset; /* total size of frame --- the distance
by which we decrement sp to allocate by which we decrement sp to allocate
the frame */ 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, skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
struct rs6000_framedata *fdata) struct rs6000_framedata *fdata)
{ {
@ -36,7 +36,7 @@ index e5a265dbcb..23d0db3b8f 100644
CORE_ADDR last_prologue_pc = pc; CORE_ADDR last_prologue_pc = pc;
CORE_ADDR li_found_pc = 0; CORE_ADDR li_found_pc = 0;
gdb_byte buf[4]; 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 minimal_toc_loaded = 0;
int prev_insn_was_prologue_insn = 1; int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0; int num_skip_non_prologue_insns = 0;
@ -51,7 +51,7 @@ index e5a265dbcb..23d0db3b8f 100644
fdata->saved_gpr = -1; fdata->saved_gpr = -1;
fdata->saved_fpr = -1; fdata->saved_fpr = -1;
fdata->saved_vr = -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; break;
op = extract_unsigned_integer (buf, 4, byte_order); op = extract_unsigned_integer (buf, 4, byte_order);
@ -107,7 +107,7 @@ index e5a265dbcb..23d0db3b8f 100644
if ((op & 0xfc1fffff) == 0x7c0802a6) if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */ { /* mflr Rx */
/* Since shared library / PIC code, which needs to get its /* 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 we have no line table information or the line info tells
us that the subroutine call is not part of the line us that the subroutine call is not part of the line
associated with the prologue. */ associated with the prologue. */

View File

@ -24,15 +24,15 @@ FileName: gdb-6.3-readnever-20050907.patch
Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html
diff --git a/gdb/gcore.in b/gdb/gcore.in diff --git a/gdb/gcore.in b/gdb/gcore.in
index b7f57cd341..c7e0dec574 100644 index 233c00d366..009e4181dd 100644
--- a/gdb/gcore.in --- a/gdb/gcore.in
+++ b/gdb/gcore.in +++ b/gdb/gcore.in
@@ -97,7 +97,7 @@ for pid in $* @@ -97,7 +97,7 @@ for pid in "$@"
do do
# `</dev/null' to avoid touching interactive terminal if it is # `</dev/null' to avoid touching interactive terminal if it is
# available but not accessible as GDB would get stopped on SIGTTIN. # available but not accessible as GDB would get stopped on SIGTTIN.
- $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch \ - "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null --nx --batch \
+ $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch --readnever \ + "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null --nx --batch --readnever \
-ex "set pagination off" -ex "set height 0" -ex "set width 0" \ -ex "set pagination off" -ex "set height 0" -ex "set width 0" \
"${dump_all_cmds[@]}" \ "${dump_all_cmds[@]}" \
-ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit -ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit

View File

@ -17,7 +17,7 @@ FileName: gdb-6.3-test-self-20050110.patch
* gdb.gdb/observer.exp: Ditto. * gdb.gdb/observer.exp: Ditto.
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 89e2e3f4ef..ea027a6f7d 100644 index f7169e0955..3c06154192 100644
--- a/gdb/testsuite/lib/selftest-support.exp --- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp +++ b/gdb/testsuite/lib/selftest-support.exp
@@ -156,18 +156,18 @@ proc do_self_tests {function body} { @@ -156,18 +156,18 @@ proc do_self_tests {function body} {

View File

@ -108,7 +108,7 @@ new file mode 100644
+gdb_test "list integer" "int integer;\r" +gdb_test "list integer" "int integer;\r"
+gdb_test "ptype integer" "type = int\r" +gdb_test "ptype integer" "type = int\r"
+# Path varies depending on the build location. +# Path varies depending on the build location.
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r" +gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null

View File

@ -44,10 +44,10 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index c52e39f7fc..ad80b1bebf 100644 index 82fe1db9a7..c921022a59 100644
--- a/gdb/printcmd.c --- a/gdb/printcmd.c
+++ b/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) if (exp && *exp)
{ {

View File

@ -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. ;;=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 diff --git a/gdb/symfile.c b/gdb/symfile.c
index f7f75b05d3..7cda615e74 100644 index 7bc03fbb8f..661125dec5 100644
--- a/gdb/symfile.c --- a/gdb/symfile.c
+++ b/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. */ DWO file. */
bfd *abfd = sectp->owner; bfd *abfd = sectp->owner;

View File

@ -128,10 +128,10 @@ index 2bd3d31b75..2623bae42d 100644
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc); set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c 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 --- a/gdb/amd64-tdep.c
+++ b/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 = struct amd64_frame_cache *cache =
amd64_frame_cache (this_frame, this_cache); amd64_frame_cache (this_frame, this_cache);
@ -139,7 +139,7 @@ index 7b2851f0a6..7c70792b3f 100644
if (!cache->base_p) if (!cache->base_p)
return UNWIND_UNAVAILABLE; 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) if (cache->base == 0)
return UNWIND_OUTERMOST; return UNWIND_OUTERMOST;
@ -150,7 +150,7 @@ index 7b2851f0a6..7c70792b3f 100644
return UNWIND_NO_REASON; 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 = struct amd64_frame_cache *cache =
amd64_sigtramp_frame_cache (this_frame, this_cache); amd64_sigtramp_frame_cache (this_frame, this_cache);
@ -158,7 +158,7 @@ index 7b2851f0a6..7c70792b3f 100644
if (!cache->base_p) if (!cache->base_p)
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); (*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. */ /* This marks the outermost frame. */
return; return;
} }
@ -171,10 +171,10 @@ index 7b2851f0a6..7c70792b3f 100644
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame)); (*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 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 --- a/gdb/i386-tdep.c
+++ b/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; tdep->xsave_xcr0_offset = -1;
@ -183,9 +183,9 @@ index 9ce329eb20..d1b461b538 100644
+ +
tdep->record_regmap = i386_record_regmap; 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 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 --- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h
@@ -251,6 +251,9 @@ struct gdbarch_tdep @@ -251,6 +251,9 @@ struct gdbarch_tdep

View File

@ -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 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
diff --git a/gdb/symtab.c b/gdb/symtab.c diff --git a/gdb/symtab.c b/gdb/symtab.c
index 81f4fc9ec5..a7e8431cfe 100644 index e1f033d1d8..1d9e0b9180 100644
--- a/gdb/symtab.c --- a/gdb/symtab.c
+++ b/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)); */ SYMBOL_LINKAGE_NAME (msymbol)); */
; ;
/* fall through */ /* fall through */

View File

@ -78,18 +78,18 @@ index 15c85e28ab..9fe2375bce 100644
NR_ERRORS NR_ERRORS
}; };
diff --git a/gdb/exec.c b/gdb/exec.c diff --git a/gdb/exec.c b/gdb/exec.c
index c8c32ecc27..b329e2b834 100644 index 3023ff7e5a..8308ec3d6f 100644
--- a/gdb/exec.c --- a/gdb/exec.c
+++ b/gdb/exec.c +++ b/gdb/exec.c
@@ -35,6 +35,7 @@ @@ -36,6 +36,7 @@
#include "progspace.h"
#include "gdb_bfd.h" #include "gdb_bfd.h"
#include "gcore.h" #include "gcore.h"
#include "source.h"
+#include "exceptions.h" +#include "exceptions.h"
#include <fcntl.h> #include <fcntl.h>
#include "readline/readline.h" #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)) if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{ {
@ -121,10 +121,10 @@ index c8c32ecc27..b329e2b834 100644
if (build_section_table (exec_bfd, &sections, &sections_end)) if (build_section_table (exec_bfd, &sections, &sections_end))
diff --git a/gdb/main.c b/gdb/main.c diff --git a/gdb/main.c b/gdb/main.c
index 3c98787edb..17d35f4a8a 100644 index 189266f90e..4caefe2011 100644
--- a/gdb/main.c --- a/gdb/main.c
+++ b/gdb/main.c +++ b/gdb/main.c
@@ -446,6 +446,37 @@ struct cmdarg @@ -447,6 +447,37 @@ struct cmdarg
char *string; char *string;
}; };
@ -162,7 +162,7 @@ index 3c98787edb..17d35f4a8a 100644
static void static void
captured_main_1 (struct captured_main_args *context) 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]; symarg = argv[optind];
execarg = argv[optind]; execarg = argv[optind];
@ -171,7 +171,7 @@ index 3c98787edb..17d35f4a8a 100644
optind++; 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 && symarg != NULL
&& strcmp (execarg, symarg) == 0) && strcmp (execarg, symarg) == 0)
{ {

View File

@ -28,10 +28,10 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
valid and doesn't print the necessary warning ("Try: yum install ..."). valid and doesn't print the necessary warning ("Try: yum install ...").
diff --git a/gdb/build-id.c b/gdb/build-id.c 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 --- a/gdb/build-id.c
+++ b/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); do_cleanups (inner);
if (abfd == NULL) if (abfd == NULL)

View File

@ -9,10 +9,10 @@ FileName: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
;;=push+jan ;;=push+jan
diff --git a/gdb/build-id.c b/gdb/build-id.c 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 --- a/gdb/build-id.c
+++ b/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 <dlfcn.h> #include <dlfcn.h>
#endif #endif

View File

@ -12,10 +12,10 @@ warning: Skipping deprecated .gdb_index section
https://bugzilla.redhat.com/show_bug.cgi?id=953585 https://bugzilla.redhat.com/show_bug.cgi?id=953585
diff --git a/gdb/build-id.c b/gdb/build-id.c 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 --- a/gdb/build-id.c
+++ b/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. */ /* Returns the count of newly added rpms. */
static int static int
@ -27,7 +27,7 @@ index e2c1e81266..1b75530f91 100644
{ {
static int rpm_init_done = 0; static int rpm_init_done = 0;
rpmts ts; 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); mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
if (mi != NULL) if (mi != NULL)
{ {
@ -39,7 +39,7 @@ index e2c1e81266..1b75530f91 100644
{ {
Header h; Header h;
char *debuginfo, **slot, *s, *s2; 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); xfree (debuginfo);
count++; count++;
} }
@ -77,7 +77,7 @@ index e2c1e81266..1b75530f91 100644
rpmdbFreeIterator_p (mi); 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 static int
@ -100,10 +100,10 @@ index e2c1e81266..1b75530f91 100644
{ {
return strcoll (*ap, *bp); return strcoll (*ap, *bp);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2c972d5e74..64329af71e 100644 index 328a07df82..45c22450b1 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/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". */ "set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok) if (version < 6 && !deprecated_ok)
{ {
@ -120,7 +120,7 @@ index 2c972d5e74..64329af71e 100644
static int warning_printed = 0; static int warning_printed = 0;
if (!warning_printed) if (!warning_printed)
{ {
@@ -3736,6 +3746,10 @@ to use the section anyway."), @@ -3489,6 +3499,10 @@ to use the section anyway."),
warning_printed = 1; warning_printed = 1;
} }
return 0; return 0;

View File

@ -234,7 +234,7 @@ index e0d38ea267..da5ac313e3 100644
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
diff --git a/gdb/build-id.c b/gdb/build-id.c 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 --- a/gdb/build-id.c
+++ b/gdb/build-id.c +++ b/gdb/build-id.c
@@ -35,6 +35,8 @@ @@ -35,6 +35,8 @@
@ -246,7 +246,7 @@ index 5740628386..d60cf622dc 100644
#define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1 #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; return result;
} }
@ -614,7 +614,7 @@ index 5740628386..d60cf622dc 100644
avoidance. */ avoidance. */
struct missing_filepair 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. */ /* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL; missing_filepair_hash = NULL;
} }
@ -632,7 +632,7 @@ index 5740628386..d60cf622dc 100644
missing_filepair_change (); 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; *slot = missing_filepair;
@ -680,7 +680,7 @@ index 5740628386..d60cf622dc 100644
/* See build-id.h. */ /* See build-id.h. */
diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/config.in b/gdb/config.in
index 1d11a97080..edd7028f76 100644 index aa46f07410..404e0bbddc 100644
--- a/gdb/config.in --- a/gdb/config.in
+++ b/gdb/config.in +++ b/gdb/config.in
@@ -33,6 +33,9 @@ @@ -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 /* Define to 1 if translation of program messages to the user's native
language is requested. */ language is requested. */
#undef ENABLE_NLS #undef ENABLE_NLS
@@ -264,6 +267,9 @@ @@ -270,6 +273,9 @@
/* Define if Python 2.7 is being used. */ /* Define if Python 2.7 is being used. */
#undef HAVE_LIBPYTHON2_7 #undef HAVE_LIBPYTHON2_7
@ -704,7 +704,7 @@ index 1d11a97080..edd7028f76 100644
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
index 092893d757..1cecdbc3b5 100755 index 4186f7e160..30a6e86ff8 100755
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -716,6 +716,11 @@ PKGVERSION @@ -716,6 +716,11 @@ PKGVERSION
@ -762,7 +762,7 @@ index 092893d757..1cecdbc3b5 100755
YACC The `Yet Another C Compiler' implementation to use. Defaults to YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'. the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $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 "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; } $as_echo "$with_auto_load_safe_path" >&6; }
@ -1258,7 +1258,7 @@ index 092893d757..1cecdbc3b5 100755
subdirs="$subdirs testsuite" subdirs="$subdirs testsuite"
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
index d4133ea71e..e232c1adcb 100644 index e1f630cd38..39a777f647 100644
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -167,6 +167,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, @@ -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 # Check whether to support alternative target configurations
diff --git a/gdb/corelow.c b/gdb/corelow.c diff --git a/gdb/corelow.c b/gdb/corelow.c
index c5b642db81..6e027c12e2 100644 index 76945950b9..4481128156 100644
--- a/gdb/corelow.c --- a/gdb/corelow.c
+++ b/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; symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
} }
else else
@ -1475,7 +1475,7 @@ index c5b642db81..6e027c12e2 100644
do_cleanups (back_to); do_cleanups (back_to);
diff --git a/gdb/event-top.c b/gdb/event-top.c 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 --- a/gdb/event-top.c
+++ b/gdb/event-top.c +++ b/gdb/event-top.c
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
@ -1508,10 +1508,10 @@ index 0c1528e5eb..0d668f35e0 100644
} }
diff --git a/gdb/symfile.h b/gdb/symfile.h diff --git a/gdb/symfile.h b/gdb/symfile.h
index 0d51f46d78..82c76431e1 100644 index dbd0370cf9..adcf1fdaae 100644
--- a/gdb/symfile.h --- a/gdb/symfile.h
+++ b/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. */ /* build-id support. */
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
extern void debug_print_missing (const char *binary, const char *debug); extern void debug_print_missing (const char *binary, const char *debug);

View File

@ -14,22 +14,22 @@ gdb returns an incorrect back trace when applying a debuginfo
https://bugzilla.redhat.com/show_bug.cgi?id=1339862 https://bugzilla.redhat.com/show_bug.cgi?id=1339862
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c 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 --- a/gdb/solib-svr4.c
+++ b/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;
+ struct bfd_build_id *build_id = NULL; + 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'; newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
/* May get overwritten below. */ /* May get overwritten below. */
strcpy (newobj->so_name, newobj->so_original_name); 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 + /* 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 + (from a core file) prevent loading a different build of a library
+ with accidentally the same SO_NAME. + with accidentally the same SO_NAME.
@ -47,7 +47,7 @@ index a3399ad8f7..d7eeb6350d 100644
if (build_id != NULL) if (build_id != NULL)
{ {
char *name, *build_id_filename; 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); xfree (name);
} }
else else

View File

@ -9,7 +9,7 @@ FileName: gdb-6.6-buildid-locate.patch
;;=push+jan ;;=push+jan
diff --git a/gdb/build-id.c b/gdb/build-id.c 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 --- a/gdb/build-id.c
+++ b/gdb/build-id.c +++ b/gdb/build-id.c
@@ -26,11 +26,67 @@ @@ -26,11 +26,67 @@
@ -19,7 +19,7 @@ index 945da4f3cf..5740628386 100644
+#include "libbfd.h" +#include "libbfd.h"
+#include "gdbcore.h" +#include "gdbcore.h"
+#include "gdbcmd.h" +#include "gdbcmd.h"
+#include "observer.h" +#include "observable.h"
+#include "elf/external.h" +#include "elf/external.h"
+#include "elf/internal.h" +#include "elf/internal.h"
+#include "elf/common.h" +#include "elf/common.h"
@ -439,7 +439,7 @@ index 945da4f3cf..5740628386 100644
if (found == NULL) if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), 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; 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, +build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
+ char **link_return, int add_debug_suffix) + char **link_return, int add_debug_suffix)
{ {
- char *link, *debugdir; + char *debugdir;
+ char *link, *debugdir, *link_all = NULL; + std::string link, link_all;
VEC (char_ptr) *debugdir_vec; + struct cleanup *back_to;
struct cleanup *back_to; + int ix;
int ix;
gdb_bfd_ref_ptr abfd; 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 /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */ @@ -82,63 +519,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
@@ -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);
const gdb_byte *data = build_id; const gdb_byte *data = build_id;
size_t size = build_id_len; size_t size = build_id_len;
- char *s; + char *filename = NULL;
char *filename = NULL; + struct cleanup *inner;
struct cleanup *inner;
+ unsigned seqno; + unsigned seqno;
+ struct stat statbuf_trash; + struct stat statbuf_trash;
+ /* Initialize it just to avoid a GCC false warning. */ + std::string link0;
+ char *s, *link0 = NULL, *link0_resolved;
memcpy (link, debugdir, debugdir_len); - std::string link = debugdir.get ();
s = &link[debugdir_len]; + link = debugdir.get ();
@@ -110,52 +542,299 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) link += "/.build-id/";
*s++ = '/';
if (size > 0)
{
size--;
- string_appendf (link, "%02x/", (unsigned) *data++);
+ string_appendf (link, "%02x", (unsigned) *data++);
}
-
+ if (size > 0)
+ link += "/";
while (size-- > 0) while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++); string_appendf (link, "%02x", (unsigned) *data++);
- strcpy (s, ".debug");
- link += ".debug";
-
if (separate_debug_file_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. */ - /* lrealpath() is expensive even for the usually non-existent files. */
- if (access (link, F_OK) == 0) - gdb::unique_xmalloc_ptr<char> filename;
- filename = lrealpath (link); - if (access (link.c_str (), F_OK) == 0)
- filename.reset (lrealpath (link.c_str ()));
-
- if (filename == NULL)
- continue;
+ for (seqno = 0;; seqno++) + for (seqno = 0;; seqno++)
+ { + {
+ char *s2;
+
+ if (seqno) + if (seqno)
+ { + {
+ /* There can be multiple build-id symlinks pointing to real files + /* There can be multiple build-id symlinks pointing to real files
+ with the same build-id (such as hard links). Some of the real + with the same build-id (such as hard links). Some of the real
+ files may not be installed. */ + files may not be installed. */
+ +
+ s2 = s + sprintf (s, ".%u", seqno); + string_appendf (link, ".%u", seqno);
+ } + }
+ else
+ s2 = s;
+ +
+ if (add_debug_suffix) + if (add_debug_suffix)
+ strcpy (s2, ".debug"); + link += ".debug";
+ else
+ *s2 = 0;
+ +
+ if (!seqno) + if (!seqno)
+ { + {
+ /* If none of the real files is found report as missing file + /* If none of the real files is found report as missing file
+ always the non-.%u-suffixed file. */ + always the non-.%u-suffixed file. */
+ link0 = xstrdup (link); + link0 = link;
+ } + }
+ +
+ /* `access' automatically dereferences LINK. */ + /* `access' automatically dereferences LINK. */
+ if (lstat (link, &statbuf_trash) != 0) + if (lstat (link.c_str (), &statbuf_trash) != 0)
+ { + {
+ /* Stop increasing SEQNO. */ + /* Stop increasing SEQNO. */
+ break; + break;
+ } + }
+ +
+ filename = lrealpath (link); + filename = lrealpath (link.c_str ());
+ if (filename == NULL) + if (filename == NULL)
+ continue; + continue;
+ +
@ -581,65 +577,46 @@ index 945da4f3cf..5740628386 100644
+ filename = NULL; + filename = NULL;
+ } + }
- if (filename == NULL) - /* We expect to be silent on the non-existing files. */
- continue; - abfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+ if (filename != NULL) + if (filename != NULL)
+ { + {
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */ + /* LINK_ALL is not used below in this non-NULL FILENAME case. */
+ xfree (link0);
+ break; + break;
+ } + }
- /* We expect to be silent on the non-existing files. */ - if (abfd == NULL)
- inner = make_cleanup (xfree, filename); - continue;
- abfd = gdb_bfd_open (filename, gnutarget, -1);
- do_cleanups (inner);
+ /* If the symlink has target request to install the target. + /* If the symlink has target request to install the target.
+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. + BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ + https://bugzilla.redhat.com/show_bug.cgi?id=981154 */
+ link0_resolved = link_resolve (link0, 0); + std::string link0_resolved (link_resolve (link0.c_str (), 0));
+ xfree (link0);
- if (abfd == NULL)
- continue;
+ if (link_all == NULL)
+ link_all = link0_resolved;
+ else
+ {
+ size_t len_orig = strlen (link_all);
- if (build_id_verify (abfd.get(), build_id_len, build_id)) - if (build_id_verify (abfd.get(), build_id_len, build_id))
- break; - break;
+ link_all = (char *) xrealloc (link_all, + if (link_all.empty ())
+ len_orig + 1 + strlen (link0_resolved) + 1); + link_all = link0_resolved;
+ else
- abfd.release (); + {
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with + /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
+ its possible use as an argument for installation command. */ + its possible use as an argument for installation command. */
+ link_all[len_orig] = ' '; + link_all += " " + link0_resolved;
+
+ strcpy (&link_all[len_orig + 1], link0_resolved);
+ xfree (link0_resolved);
+ } + }
+ } + }
+
- abfd.release ();
+ if (link_return != NULL) + if (link_return != NULL)
+ { + {
+ if (abfd != NULL) + if (abfd != NULL)
+ { + {
+ *link_return = link; + *link_return = xstrdup (link.c_str ());
+ link = NULL;
+ } + }
+ else + else
+ { + {
+ *link_return = link_all; + *link_return = xstrdup (link_all.c_str ());
+ link_all = NULL;
+ } + }
} }
+ xfree (link);
+ xfree (link_all);
do_cleanups (back_to);
return abfd; return abfd;
} }
@ -796,7 +773,7 @@ index 945da4f3cf..5740628386 100644
+ +
/* See build-id.h. */ /* 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)
+find_separate_debug_file_by_buildid (struct objfile *objfile, +find_separate_debug_file_by_buildid (struct objfile *objfile,
+ gdb::unique_xmalloc_ptr<char> *build_id_filename_return) + gdb::unique_xmalloc_ptr<char> *build_id_filename_return)
@ -833,9 +810,9 @@ index 945da4f3cf..5740628386 100644
/* Prevent looping on a stripped .debug file. */ /* Prevent looping on a stripped .debug file. */
if (abfd != NULL if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd.get ()), && filename_cmp (bfd_get_filename (abfd.get ()),
@@ -167,3 +846,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) @@ -151,3 +821,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
}
return NULL; return std::string ();
} }
+ +
+extern void _initialize_build_id (void); +extern void _initialize_build_id (void);
@ -853,10 +830,10 @@ index 945da4f3cf..5740628386 100644
+ show_build_id_verbose, + show_build_id_verbose,
+ &setlist, &showlist); + &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 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 --- a/gdb/build-id.h
+++ b/gdb/build-id.h +++ b/gdb/build-id.h
@@ -22,9 +22,10 @@ @@ -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. /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
Otherwise, issue a warning and return false. */ 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. */ the caller. */
extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len, 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); + char **link_return);
/* Find the separate debug file for OBJFILE, by using the build-id /* Find the separate debug file for OBJFILE, by using the build-id
associated with OBJFILE's BFD. If successful, returns a malloc'd associated with OBJFILE's BFD. If successful, returns the file name for the
file name for the separate debug file. The caller must free this. separate debug file, otherwise, return an empty string. */
Otherwise, returns NULL. */
-extern char *find_separate_debug_file_by_buildid (struct objfile *objfile); -extern std::string find_separate_debug_file_by_buildid
+extern char *find_separate_debug_file_by_buildid (struct objfile *objfile, - (struct objfile *objfile);
+extern std::string find_separate_debug_file_by_buildid (struct objfile *objfile,
+ gdb::unique_xmalloc_ptr<char> *build_id_filename_return); + gdb::unique_xmalloc_ptr<char> *build_id_filename_return);
#endif /* BUILD_ID_H */ #endif /* BUILD_ID_H */
diff --git a/gdb/coffread.c b/gdb/coffread.c diff --git a/gdb/coffread.c b/gdb/coffread.c
index fbbbb68f71..9698ec2191 100644 index f24ec0713a..5c1c3e61ea 100644
--- a/gdb/coffread.c --- a/gdb/coffread.c
+++ b/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); if (debugfile.empty ())
+ debugfile = find_separate_debug_file_by_buildid (objfile, NULL);
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile); debugfile = find_separate_debug_file_by_debuglink (objfile);
diff --git a/gdb/corelow.c b/gdb/corelow.c diff --git a/gdb/corelow.c b/gdb/corelow.c
index 3a5256cb17..c5b642db81 100644 index c6175279da..76945950b9 100644
--- a/gdb/corelow.c --- a/gdb/corelow.c
+++ b/gdb/corelow.c +++ b/gdb/corelow.c
@@ -45,6 +45,10 @@ @@ -45,6 +45,10 @@
@ -922,7 +900,7 @@ index 3a5256cb17..c5b642db81 100644
#ifndef O_LARGEFILE #ifndef O_LARGEFILE
#define O_LARGEFILE 0 #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. */ inferior_ptid = ptid; /* Yes, make it current. */
} }
@ -940,7 +918,7 @@ index 3a5256cb17..c5b642db81 100644
+ if (exec_bfd != NULL || symfile_objfile != NULL) + if (exec_bfd != NULL || symfile_objfile != NULL)
+ return; + return;
+ +
+ if (target_auxv_search (&current_target, AT_ENTRY, &at_entry) <= 0) + if (target_auxv_search (target_stack, AT_ENTRY, &at_entry) <= 0)
+ return; + return;
+ +
+ build_id = build_id_addr_get (at_entry); + 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. */ + /* 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 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); switch_to_thread (thread->ptid);
} }
@ -989,13 +967,13 @@ index 3a5256cb17..c5b642db81 100644
+ if (build_id_core_loads != 0) + if (build_id_core_loads != 0)
+ build_id_locate_exec (from_tty); + 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 /* Now go through the target stack looking for threads since there
@@ -1040,4 +1100,11 @@ _initialize_corelow (void) @@ -1068,4 +1128,11 @@ void
init_core_ops (); _initialize_corelow (void)
{
add_target_with_completer (&core_ops, filename_completer); add_target (core_target_info, core_target_open, filename_completer);
+ +
+ add_setshow_boolean_cmd ("build-id-core-loads", class_files, + add_setshow_boolean_cmd ("build-id-core-loads", class_files,
+ &build_id_core_loads, _("\ + &build_id_core_loads, _("\
@ -1005,10 +983,10 @@ index 3a5256cb17..c5b642db81 100644
+ &setlist, &showlist); + &setlist, &showlist);
} }
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo 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 --- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo
@@ -19447,6 +19447,27 @@ information files. @@ -19558,6 +19558,27 @@ information files.
@end table @end table
@ -1037,10 +1015,10 @@ index 8bdafb0ba4..2f2cbd3dea 100644
@cindex debug link sections @cindex debug link sections
A debug link is a special section of the executable file named A debug link is a special section of the executable file named
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 98e7d842f0..c8db955f2f 100644 index 4006f4a48f..266740f74c 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/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) if (dwz_bfd == NULL)
@ -1050,22 +1028,22 @@ index 98e7d842f0..c8db955f2f 100644
if (dwz_bfd == NULL) if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"), error (_("could not find '.gnu_debugaltlink' file for %s"),
diff --git a/gdb/elfread.c b/gdb/elfread.c diff --git a/gdb/elfread.c b/gdb/elfread.c
index 103b2144c3..fb32e03af5 100644 index b4b4a1b24c..0824e37bf1 100644
--- a/gdb/elfread.c --- a/gdb/elfread.c
+++ b/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 == NULL
&& objfile->separate_debug_objfile_backlink == NULL) && objfile->separate_debug_objfile_backlink == NULL)
{ {
- std::string debugfile = find_separate_debug_file_by_buildid (objfile);
+ gdb::unique_xmalloc_ptr<char> build_id_filename; + gdb::unique_xmalloc_ptr<char> build_id_filename;
gdb::unique_xmalloc_ptr<char> debugfile + std::string debugfile
- (find_separate_debug_file_by_buildid (objfile)); + = find_separate_debug_file_by_buildid (objfile, &build_id_filename);
+ (find_separate_debug_file_by_buildid (objfile, &build_id_filename));
if (debugfile == NULL) if (debugfile.empty ())
debugfile.reset (find_separate_debug_file_by_debuglink (objfile)); debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1272,6 +1273,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) @@ -1302,6 +1304,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
symbol_file_add_separate (abfd.get (), debugfile.get (), symbol_file_add_separate (abfd.get (), debugfile.c_str (),
symfile_flags, objfile); symfile_flags, objfile);
} }
+ /* Check if any separate debug info has been extracted out. */ + /* Check if any separate debug info has been extracted out. */
@ -1113,7 +1091,7 @@ index c2b40ff535..112cbf6560 100644
continue; continue;
if (objfpy_build_id_matches (obfd_build_id, build_id)) if (objfpy_build_id_matches (obfd_build_id, build_id))
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c 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 --- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
@ -1124,22 +1102,22 @@ index 4973cc2f25..a3399ad8f7 100644
static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_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; 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'; - newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
- strcpy (newobj->so_original_name, newobj->so_name); - strcpy (newobj->so_original_name, newobj->so_name);
+ { + {
+ struct bfd_build_id *build_id; + 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'; + newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
+ /* May get overwritten below. */ + /* May get overwritten below. */
+ strcpy (newobj->so_name, newobj->so_original_name); + 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) + if (build_id != NULL)
+ { + {
+ char *name, *build_id_filename; + char *name, *build_id_filename;
@ -1176,15 +1154,14 @@ index 4973cc2f25..a3399ad8f7 100644
+ xfree (build_id); + xfree (build_id);
+ } + }
+ } + }
+
xfree (buffer);
/* If this entry has no name, or its name matches the name /* 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 diff --git a/gdb/symfile.h b/gdb/symfile.h
index 7c3fd8240a..0d51f46d78 100644 index d9185092ee..dbd0370cf9 100644
--- a/gdb/symfile.h --- a/gdb/symfile.h
+++ b/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, void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname); int need_fullname);
@ -1246,7 +1223,7 @@ index a6dc14e3c9..54a10df155 100644
append options " -ex \"b $bpline\"" append options " -ex \"b $bpline\""
append options " -ex \"run\"" append options " -ex \"run\""
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp 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 --- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp
@@ -1694,6 +1694,16 @@ proc default_gdb_start { } { @@ -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 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 --- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp
@@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } { @@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } {

View File

@ -1,153 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
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 <jan.kratochvil@redhat.com>
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 <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+
+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"

View File

@ -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? ;;=push+jan: How much is scheduler-locking relevant after non-stop?
diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/infrun.c b/gdb/infrun.c
index 23439979b5..1d0f731954 100644 index df19478ef3..78ffc10b23 100644
--- a/gdb/infrun.c --- a/gdb/infrun.c
+++ b/gdb/infrun.c +++ b/gdb/infrun.c
@@ -2202,7 +2202,7 @@ static const char *const scheduler_enums[] = { @@ -2202,7 +2202,7 @@ static const char *const scheduler_enums[] = {

View File

@ -1,191 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-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" {

View File

@ -9,10 +9,10 @@ FileName: gdb-6.8-bz436037-reg-no-longer-active.patch
;;=push+jan: This fix is incorrect. ;;=push+jan: This fix is incorrect.
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
index 9b25980090..7aacd17d70 100644 index 9b6600b538..cdc5c8014c 100644
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/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; struct gdbarch *gdbarch;
int value_reg; int value_reg;
@ -21,7 +21,7 @@ index 9b25980090..7aacd17d70 100644
/* Figure out which frame this is in currently. /* Figure out which frame this is in currently.
We use VALUE_FRAME_ID for obtaining the value's frame id instead of 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 = frame_find_by_id (VALUE_FRAME_ID (toval)); frame = frame_find_by_id (VALUE_FRAME_ID (toval));

View File

@ -16,7 +16,7 @@ should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination). on the debugger termination).
diff --git a/gdb/defs.h b/gdb/defs.h diff --git a/gdb/defs.h b/gdb/defs.h
index 0c156d56c3..9a7f4d52b0 100644 index ce5fee3ba3..8b16aca2a0 100644
--- a/gdb/defs.h --- a/gdb/defs.h
+++ b/gdb/defs.h +++ b/gdb/defs.h
@@ -168,6 +168,10 @@ extern void default_quit_handler (void); @@ -168,6 +168,10 @@ extern void default_quit_handler (void);
@ -31,10 +31,10 @@ index 0c156d56c3..9a7f4d52b0 100644
/* Helper for the QUIT macro. */ /* Helper for the QUIT macro. */
diff --git a/gdb/extension.c b/gdb/extension.c diff --git a/gdb/extension.c b/gdb/extension.c
index a1ee3510a6..229d702270 100644 index e5c014667a..1c54f03272 100644
--- a/gdb/extension.c --- a/gdb/extension.c
+++ b/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; int i, result = 0;
const struct extension_language_defn *extlang; const struct extension_language_defn *extlang;
@ -47,11 +47,11 @@ index a1ee3510a6..229d702270 100644
{ {
if (extlang->ops->check_quit_flag != NULL) if (extlang->ops->check_quit_flag != NULL)
diff --git a/gdb/top.c b/gdb/top.c diff --git a/gdb/top.c b/gdb/top.c
index 4749cf561d..e2665c8e22 100644 index 07b386dacb..e6c595505f 100644
--- a/gdb/top.c --- a/gdb/top.c
+++ b/gdb/top.c +++ b/gdb/top.c
@@ -1580,7 +1580,13 @@ quit_force (int *exit_arg, int from_tty) @@ -1604,7 +1604,13 @@ quit_force (int *exit_arg, int from_tty)
qt.args = NULL;
qt.from_tty = from_tty; qt.from_tty = from_tty;
+#ifndef NEED_DETACH_SIGSTOP +#ifndef NEED_DETACH_SIGSTOP
@ -65,10 +65,10 @@ index 4749cf561d..e2665c8e22 100644
/* Get out of tfind mode, and kill or detach all inferiors. */ /* Get out of tfind mode, and kill or detach all inferiors. */
TRY TRY
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
index 6f0abc98a2..58c0380d17 100644 index c816e2f897..db1c534560 100644
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/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; static int debug_timestamp = 0;

View File

@ -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. ;;=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 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 --- a/gdb/sparc-tdep.c
+++ b/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)) if (sparc_floating_p (type) || sparc_complex_floating_p (type))
{ {
/* Floating return values. */ /* Floating return values. */

View File

@ -19,7 +19,7 @@ FileName: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
;;=push ;;=push
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c 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 --- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c
@@ -24,12 +24,14 @@ @@ -24,12 +24,14 @@

View File

@ -8,10 +8,10 @@ FileName: gdb-archer-pie-addons-keep-disabled.patch
;;=push+jan: Breakpoints disabling matching should not be based on address. ;;=push+jan: Breakpoints disabling matching should not be based on address.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2b5eebbbee..814802a0a1 100644 index 721afd2c04..a04b1183b7 100644
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/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; static struct cmd_list_element *enablebreaklist = NULL;
@ -63,10 +63,10 @@ index 2b5eebbbee..814802a0a1 100644
_initialize_breakpoint (void) _initialize_breakpoint (void)
{ {
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 8bb81d8d17..3fddbaa713 100644 index 4223158fbc..407cc531db 100644
--- a/gdb/breakpoint.h --- a/gdb/breakpoint.h
+++ b/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. */ UIOUT iff debugging multiple threads. */
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout); 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); extern void print_breakpoint (breakpoint *bp);
diff --git a/gdb/objfiles.c b/gdb/objfiles.c diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 7adaef119d..2f061b47f7 100644 index f57f4f58b0..d31c0d6f56 100644
--- a/gdb/objfiles.c --- a/gdb/objfiles.c
+++ b/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)); obj_section_addr (s));
} }

View File

@ -8,10 +8,10 @@ FileName: gdb-archer-pie-addons.patch
;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. ;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 179238ce82..5597038357 100644 index 878c8b0302..cf1346161d 100644
--- a/gdb/gdbtypes.h --- a/gdb/gdbtypes.h
+++ b/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_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */ FIELD_LOC_KIND_ENUMVAL, /**< enumval */
@ -19,7 +19,7 @@ index 179238ce82..5597038357 100644
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */ FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */ FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */ 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 field. Otherwise, physname is the mangled label of the
static field. */ static field. */
@ -27,7 +27,7 @@ index 179238ce82..5597038357 100644
CORE_ADDR physaddr; CORE_ADDR physaddr;
const char *physname; 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_LVAL(thisfld) ((thisfld).loc.enumval)
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0) #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) #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_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \ #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) \ #define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name)) FIELD_STATIC_PHYSNAME (thisfld) = (name))
@ -43,7 +43,7 @@ index 179238ce82..5597038357 100644
#define SET_FIELD_PHYSADDR(thisfld, addr) \ #define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr)) 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_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (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)) #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_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(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 diff --git a/gdb/value.c b/gdb/value.c
index d4b4673f66..558d0bbd7a 100644 index aa6ca43b41..98c060c65f 100644
--- a/gdb/value.c --- a/gdb/value.c
+++ b/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: case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),

View File

@ -3692,7 +3692,7 @@ new file mode 100644
+ writeln(s); { set breakpoint 2 here } + writeln(s); { set breakpoint 2 here }
+end. +end.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp 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 --- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp
@@ -169,6 +169,11 @@ proc gdb_unload {} { @@ -169,6 +169,11 @@ proc gdb_unload {} {

View File

@ -17,10 +17,10 @@ commit 718a1618b2f691a7f407213bb50f100ac59f91c3
tromey/python tromey/python
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3142ad6af1..28d8664236 100644 index 1ea7a36c69..b767caa735 100644
--- a/gdb/Makefile.in --- a/gdb/Makefile.in
+++ b/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= \ CONFIG_LINKS= \
$(SHELL) config.status $(SHELL) config.status
@ -56,7 +56,7 @@ index 5c7c0b4c2e..2014607e9e 100644
gdb/printer/bound_registers.py gdb/printer/bound_registers.py
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo 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 --- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo
@@ -1245,6 +1245,16 @@ for remote debugging. @@ -1245,6 +1245,16 @@ for remote debugging.
@ -77,7 +77,7 @@ index 7b99ae1551..dea17fd5a7 100644
@item -tui @item -tui
@cindex @code{--tui} @cindex @code{--tui}
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi 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 --- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi +++ b/gdb/doc/python.texi
@@ -88,8 +88,6 @@ containing @code{end}. For example: @@ -88,8 +88,6 @@ containing @code{end}. For example:
@ -110,7 +110,7 @@ index 05a38b2670..9801fdff67 100644
set variable $gdb_init_done = 1 set variable $gdb_init_done = 1
diff --git a/gdb/main.c b/gdb/main.c diff --git a/gdb/main.c b/gdb/main.c
index b079e79c93..b150af4e70 100644 index 84e6126ad4..80d84ea246 100644
--- a/gdb/main.c --- a/gdb/main.c
+++ b/gdb/main.c +++ b/gdb/main.c
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
@ -121,7 +121,7 @@ index b079e79c93..b150af4e70 100644
#include "source.h" #include "source.h"
#include "cli/cli-cmds.h" #include "cli/cli-cmds.h"
#include "objfiles.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 static void
@ -130,7 +130,7 @@ index b079e79c93..b150af4e70 100644
{ {
int argc = context->argc; int argc = context->argc;
char **argv = context->argv; 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}, {"args", no_argument, &set_args, 1},
{"l", required_argument, 0, 'l'}, {"l", required_argument, 0, 'l'},
{"return-child-result", no_argument, &return_child_result, 1}, {"return-child-result", no_argument, &return_child_result, 1},
@ -146,7 +146,7 @@ index b079e79c93..b150af4e70 100644
{ {
int option_index; 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: case 0:
/* Long option that just sets a flag. */ /* Long option that just sets a flag. */
break; break;
@ -156,7 +156,7 @@ index b079e79c93..b150af4e70 100644
case OPT_SE: case OPT_SE:
symarg = optarg; symarg = optarg;
execarg = 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 /* Now that gdb_init has created the initial inferior, we're in
position to set args for that inferior. */ 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 /* The remaining options are the command-line options for the
inferior. The first one is the sym/exec file, and the rest 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 in the old history after all the command files have been
read. */ read. */
@ -199,7 +199,7 @@ index b079e79c93..b150af4e70 100644
if (batch_flag) if (batch_flag)
{ {
@@ -1192,24 +1225,37 @@ static void @@ -1193,24 +1226,37 @@ static void
captured_main (void *data) captured_main (void *data)
{ {
struct captured_main_args *context = (struct captured_main_args *) 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. */ /* 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 (_("\ fputs_unfiltered (_("\
This is the GNU debugger. Usage:\n\n\ This is the GNU debugger. Usage:\n\n\
gdb [options] [executable-file [core-file or process-id]]\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\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream); "), stream);
fputs_unfiltered (_("\ 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 #endif
fputs_unfiltered (_("\ fputs_unfiltered (_("\
--dbx DBX compatibility mode.\n\ --dbx DBX compatibility mode.\n\
@ -458,10 +458,10 @@ new file mode 100644
+ +
+InScope () +InScope ()
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h 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 --- a/gdb/python/python-internal.h
+++ b/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; extern const struct language_defn *python_language;
diff --git a/gdb/python/python.c b/gdb/python/python.c 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 --- a/gdb/python/python.c
+++ b/gdb/python/python.c +++ b/gdb/python/python.c
@@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python = @@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python =
@ -484,7 +484,7 @@ index 610dda828c..de5ffbd70b 100644
#include "target.h" #include "target.h"
#include "gdbthread.h" #include "gdbthread.h"
#include "interps.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); restore_active_ext_lang (m_previous_active);
} }
@ -514,7 +514,7 @@ index 610dda828c..de5ffbd70b 100644
/* Set the quit flag. */ /* Set the quit flag. */
static void static void
@@ -1356,6 +1381,92 @@ gdbpy_print_stack (void) @@ -1367,6 +1392,92 @@ gdbpy_print_stack (void)
/* Return the current Progspace. /* Return the current Progspace.
There always is one. */ There always is one. */
@ -607,7 +607,7 @@ index 610dda828c..de5ffbd70b 100644
static PyObject * static PyObject *
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) 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\ 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\ a Python String containing the output of the command if to_string is\n\
set to True." }, set to True." },
@ -669,10 +669,10 @@ index eb82a7776f..3069a5c6d7 100644
# Test either C or C++ values. # Test either C or C++ values.
diff --git a/gdb/varobj.c b/gdb/varobj.c diff --git a/gdb/varobj.c b/gdb/varobj.c
index 01dabef37c..c198731d0b 100644 index a0df485ae9..ab8248a781 100644
--- a/gdb/varobj.c --- a/gdb/varobj.c
+++ b/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 #ifdef HAVE_PYTHON
@ -688,10 +688,10 @@ index 01dabef37c..c198731d0b 100644
/* See python-internal.h. */ /* See python-internal.h. */
gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var) gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var)
diff --git a/gdb/varobj.h b/gdb/varobj.h diff --git a/gdb/varobj.h b/gdb/varobj.h
index 6e80d1b89e..677547996f 100644 index 3aba0cda67..42dfad83f8 100644
--- a/gdb/varobj.h --- a/gdb/varobj.h
+++ b/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); extern bool varobj_is_dynamic_p (const struct varobj *var);

View File

@ -45,10 +45,10 @@ gdb/gdbserver/
direct ptrace. direct ptrace.
diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/config.in b/gdb/config.in
index edd7028f76..4de3e842d1 100644 index 404e0bbddc..97d2f7f518 100644
--- a/gdb/config.in --- a/gdb/config.in
+++ b/gdb/config.in +++ b/gdb/config.in
@@ -270,6 +270,9 @@ @@ -276,6 +276,9 @@
/* Define if librpm library is being used. */ /* Define if librpm library is being used. */
#undef HAVE_LIBRPM #undef HAVE_LIBRPM
@ -58,7 +58,7 @@ index edd7028f76..4de3e842d1 100644
/* Define to 1 if you have the <libunwind-ia64.h> header file. */ /* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H
@@ -393,6 +396,9 @@ @@ -399,6 +402,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */ /* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB #undef HAVE_SCM_NEW_SMOB
@ -69,10 +69,10 @@ index edd7028f76..4de3e842d1 100644
#undef HAVE_SETLOCALE #undef HAVE_SETLOCALE
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
index 1cecdbc3b5..904cc453ad 100755 index 30a6e86ff8..3b604feb11 100755
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -15681,6 +15681,64 @@ cat >>confdefs.h <<_ACEOF @@ -15747,6 +15747,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
@ -138,10 +138,10 @@ index 1cecdbc3b5..904cc453ad 100755
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional. # except that the argument to --with-sysroot is optional.
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
index e232c1adcb..1557760ed8 100644 index 39a777f647..c707e7b152 100644
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -2043,6 +2043,10 @@ case $host_os in @@ -2048,6 +2048,10 @@ case $host_os in
esac esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -177,10 +177,10 @@ index dda7c1f150..b2a34b92ce 100644
#undef HAVE_SETNS #undef HAVE_SETNS
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 340ca7a19e..6d7c9b2326 100755 index b2e2e8f955..3269bbe553 100755
--- a/gdb/gdbserver/configure --- a/gdb/gdbserver/configure
+++ b/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
fi fi
@ -246,7 +246,7 @@ index 340ca7a19e..6d7c9b2326 100755
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac 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 --- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac
@@ -488,6 +488,10 @@ if $want_ipa ; then @@ -488,6 +488,10 @@ if $want_ipa ; then
@ -261,25 +261,20 @@ index 6727959e61..7c0f508275 100644
AC_SUBST(GDBSERVER_LIBS) AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(srv_xmlbuiltin) AC_SUBST(srv_xmlbuiltin)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c 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 --- a/gdb/gdbserver/linux-low.c
+++ b/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, if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
(PTRACE_TYPE_ARG4) 0) < 0) (PTRACE_TYPE_ARG4) 0) < 0)
- trace_start_error_with_name ("ptrace"); - trace_start_error_with_name ("ptrace");
+ { + {
+ int save_errno = errno; + int save_errno = errno;
+ struct buffer buffer;
+ +
+ buffer_init (&buffer); + std::string msg (linux_ptrace_create_warnings ());
+ linux_ptrace_create_warnings (&buffer);
+ buffer_grow_str0 (&buffer, "");
+ +
+ std::string msg + msg += _("Cannot trace created process");
+ = string_printf (_("%sCannot trace created process"),
+ buffer_finish (&buffer));
+ +
+ errno = save_errno; + errno = save_errno;
+ trace_start_error_with_name (msg.c_str ()); + trace_start_error_with_name (msg.c_str ());
@ -288,45 +283,33 @@ index cfb2b56a08..0faac80625 100644
if (setpgid (0, 0) < 0) if (setpgid (0, 0) < 0)
trace_start_error_with_name ("setpgid"); trace_start_error_with_name ("setpgid");
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c 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 --- a/gdb/linux-nat.c
+++ b/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. */ /* 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); - inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
+ volatile struct gdb_exception ex;
+ TRY + 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) + CATCH (ex, RETURN_MASK_ERROR)
+ { + {
+ struct buffer buffer; + std::string result = linux_ptrace_create_warnings ();
+ char *message, *buffer_s;
+ +
+ message = xstrdup (ex.message); + throw_error (ex.error, "%s%s", result.c_str (), 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);
+ } + }
+ END_CATCH + END_CATCH
} }
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not /* 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 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 --- a/gdb/nat/linux-ptrace.c
+++ b/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c
@@ -27,6 +27,10 @@ @@ -25,6 +25,10 @@
#include <sys/procfs.h> #include <sys/procfs.h>
#endif #endif
@ -337,47 +320,50 @@ index ac6ba72390..be51e2449b 100644
/* Stores the ptrace options supported by the running kernel. /* Stores the ptrace options supported by the running kernel.
A value of -1 means we did not check for features yet. A value A value of -1 means we did not check for features yet. A value
of 0 means there are no supported features. */ of 0 means there are no supported features. */
@@ -51,6 +55,8 @@ linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer) @@ -50,6 +54,8 @@ linux_ptrace_attach_fail_reason (pid_t pid)
buffer_xml_printf (buffer, _("process %d is a zombie " "terminated"),
"- the process has already terminated"), (int) pid);
(int) pid);
+ result += linux_ptrace_create_warnings ();
+ +
+ linux_ptrace_create_warnings (buffer); return result;
} }
/* See linux-ptrace.h. */ @@ -583,6 +589,25 @@ linux_ptrace_init_warnings (void)
@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx (); linux_ptrace_test_ret_to_nx ();
} }
+/* Print all possible reasons we could fail to create a traced process. */ +/* Print all possible reasons we could fail to create a traced process. */
+ +
+void +std::string
+linux_ptrace_create_warnings (struct buffer *buffer) +linux_ptrace_create_warnings ()
+{ +{
+ std::string result;
+
+#ifdef HAVE_LIBSELINUX +#ifdef HAVE_LIBSELINUX
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is + /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
+ forbidden. */ + forbidden. */
+ if (security_get_boolean_active ("deny_ptrace") == 1) + if (security_get_boolean_active ("deny_ptrace") == 1)
+ buffer_xml_printf (buffer, + string_appendf (result,
+ _("the SELinux boolean 'deny_ptrace' is enabled, " + _("the SELinux boolean 'deny_ptrace' is enabled, "
+ "you can disable this process attach protection by: " + "you can disable this process attach protection by: "
+ "(gdb) shell sudo setsebool deny_ptrace=0")); + "(gdb) shell sudo setsebool deny_ptrace=0\n"));
+#endif /* HAVE_LIBSELINUX */ +#endif /* HAVE_LIBSELINUX */
+ return result;
+} +}
+ +
/* Extract extended ptrace event from wait status. */ /* Extract extended ptrace event from wait status. */
int int
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h 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 --- a/gdb/nat/linux-ptrace.h
+++ b/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); @@ -189,6 +189,7 @@ extern std::string linux_ptrace_attach_fail_reason (pid_t pid);
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); 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_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_check_ptrace_features (void);
extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_enable_event_reporting (pid_t pid, int attached);
extern void linux_disable_event_reporting (pid_t pid); extern void linux_disable_event_reporting (pid_t pid);

View File

@ -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 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 --- a/gdb/python/py-framefilter.c
+++ b/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, htab_eq_pointer,
NULL)); NULL));
@ -25,19 +25,23 @@ index e887849c36..a8e4f49eb5 100644
while (true) while (true)
{ {
gdbpy_ref<> item (PyIter_Next (iterable.get ())); 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 ()) if (PyErr_Occurred ())
{ {
gdbpy_print_stack (); - throw_quit_or_print_exception ();
- return EXT_LANG_BT_ERROR; - return EXT_LANG_BT_ERROR;
+ gdbpy_print_stack ();
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS; + return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
} }
break; 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. */ error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR) if (success == EXT_LANG_BT_ERROR)
gdbpy_print_stack (); - throw_quit_or_print_exception ();
+ gdbpy_print_stack ();
+ count_printed++; + count_printed++;
} }

View File

@ -80,10 +80,10 @@ gdb/testsuite/ChangeLog
* gdb.base/attach-kills.exp: New. * gdb.base/attach-kills.exp: New.
diff --git a/gdb/main.c b/gdb/main.c diff --git a/gdb/main.c b/gdb/main.c
index 17d35f4a8a..b079e79c93 100644 index 4caefe2011..84e6126ad4 100644
--- a/gdb/main.c --- a/gdb/main.c
+++ b/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 (isdigit (pid_or_core_arg[0]))
{ {
if (catch_command_errors (attach_command, pid_or_core_arg, if (catch_command_errors (attach_command, pid_or_core_arg,

View File

@ -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. debugging problem of GOMP outside of the scope of this Bug.
diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/infrun.c b/gdb/infrun.c
index 1d0f731954..dcf022bd50 100644 index 78ffc10b23..443e2123f0 100644
--- a/gdb/infrun.c --- a/gdb/infrun.c
+++ b/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) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{ {
@ -50,7 +50,7 @@ index 1d0f731954..dcf022bd50 100644
/* We're doing a "next". /* We're doing a "next".
Normal (forward) execution: set a breakpoint at the 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); keep_going (ecs);
return; return;

View File

@ -10,10 +10,10 @@ FileName: gdb-bz541866-rwatch-before-run.patch
;;=push+jan: It should be fixed properly instead. ;;=push+jan: It should be fixed properly instead.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 814802a0a1..5a99de75e1 100644 index a04b1183b7..305bb3f6c0 100644
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/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 enabled, int internal, unsigned flags,
int display_canonical) int display_canonical)
{ {
@ -22,7 +22,7 @@ index 814802a0a1..5a99de75e1 100644
if (type == bp_hardware_breakpoint) 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) if (bpt->type == bp_hardware_breakpoint)
{ {
@ -98,7 +98,7 @@ new file mode 100644
+ +
+#endif /* NM_LINUX64_H */ +#endif /* NM_LINUX64_H */
diff --git a/gdb/configure.nat b/gdb/configure.nat diff --git a/gdb/configure.nat b/gdb/configure.nat
index 8e14892722..6dbb072054 100644 index 6b0f44fede..dd0c63c256 100644
--- a/gdb/configure.nat --- a/gdb/configure.nat
+++ b/gdb/configure.nat +++ b/gdb/configure.nat
@@ -237,6 +237,7 @@ case ${gdb_host} in @@ -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 \ 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" x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
diff --git a/gdb/target.h b/gdb/target.h diff --git a/gdb/target.h b/gdb/target.h
index 4781fbc59c..e3a2882fe5 100644 index e2d1e61cdc..6e13809397 100644
--- a/gdb/target.h --- a/gdb/target.h
+++ b/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 one. OTHERTYPE is the number of watchpoints of other types than
this one used so far. */ this one used so far. */
+#ifndef target_can_use_hardware_watchpoint +#ifndef target_can_use_hardware_watchpoint
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \ #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
(*current_target.to_can_use_hw_breakpoint) (&current_target, \ (target_stack->can_use_hw_breakpoint) ( \
TYPE, CNT, OTHERTYPE) TYPE, CNT, OTHERTYPE)
+#endif +#endif

View File

@ -53,10 +53,10 @@ gdb/
* utils.c (nomem): Change internal_error to error. * utils.c (nomem): Change internal_error to error.
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
index c531748fe4..0066bfcc4b 100644 index 9c5bf68e5a..7813df1436 100644
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/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) if (size > 0)
{ {

View File

@ -9,10 +9,10 @@ FileName: gdb-container-rh-pkg.patch
;;=fedora ;;=fedora
diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/remote.c b/gdb/remote.c
index 86777f1e5e..fc003c0736 100644 index 635cb266e8..a683df4a83 100644
--- a/gdb/remote.c --- a/gdb/remote.c
+++ b/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; char *annex = NULL;
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)

View File

@ -12,10 +12,10 @@ Fedora: Force libncursesw over libncurses to match the includes.
https://bugzilla.redhat.com/show_bug.cgi?id=1270534 https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
index 6fb5b5b509..db849572b5 100755 index 9f236ae26a..a2d480c1e5 100755
--- a/gdb/configure --- a/gdb/configure
+++ b/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 # search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such # default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation. # 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 "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; } $as_echo_n "checking for library containing waddstr... " >&6; }
if test "${ac_cv_search_waddstr+set}" = set; then : if test "${ac_cv_search_waddstr+set}" = set; then :
@@ -9262,7 +9263,7 @@ return waddstr (); @@ -9328,7 +9329,7 @@ return waddstr ();
return 0; return 0;
} }
_ACEOF _ACEOF
@ -32,7 +32,7 @@ index 6fb5b5b509..db849572b5 100755
if test -z "$ac_lib"; then if test -z "$ac_lib"; then
ac_res="none required" ac_res="none required"
else else
@@ -9336,6 +9337,7 @@ case $host_os in @@ -9402,6 +9403,7 @@ case $host_os in
esac esac
# These are the libraries checked by Readline. # 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 "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; } $as_echo_n "checking for library containing tgetent... " >&6; }
if test "${ac_cv_search_tgetent+set}" = set; then : if test "${ac_cv_search_tgetent+set}" = set; then :
@@ -9360,7 +9362,7 @@ return tgetent (); @@ -9426,7 +9428,7 @@ return tgetent ();
return 0; return 0;
} }
_ACEOF _ACEOF
@ -50,10 +50,10 @@ index 6fb5b5b509..db849572b5 100755
ac_res="none required" ac_res="none required"
else else
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
index d891c7bccc..4412e25450 100644 index dc0acd035b..57ebcaeb08 100644
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/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 # search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such # default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation. # a situation.
@ -63,7 +63,7 @@ index d891c7bccc..4412e25450 100644
if test "$ac_cv_search_waddstr" != no; then if test "$ac_cv_search_waddstr" != no; then
curses_found=yes curses_found=yes
@@ -797,7 +798,8 @@ case $host_os in @@ -802,7 +803,8 @@ case $host_os in
esac esac
# These are the libraries checked by Readline. # These are the libraries checked by Readline.

View File

@ -24,10 +24,10 @@ unwinders try to access it, breaking:
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/infrun.c b/gdb/infrun.c
index dcf022bd50..b468d02fd6 100644 index 443e2123f0..16ee1c2e31 100644
--- a/gdb/infrun.c --- a/gdb/infrun.c
+++ b/gdb/infrun.c +++ b/gdb/infrun.c
@@ -749,6 +749,9 @@ follow_fork (void) @@ -752,6 +752,9 @@ follow_fork (void)
} }
else else
{ {

View File

@ -1,171 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: 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 <tromey@redhat.com> 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 <tromey@redhat.com>
* Makefile.in (install-only): Install gdb-add-index.
* gdb-add-index: New file.
2010-07-09 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Index Files): Mention gdb-add-index.
>From 30714fe719e61baea03d0dc5793eb0d564faebb7 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@redhat.com>
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

View File

@ -9,10 +9,10 @@ FileName: gdb-glibc-strstr-workaround.patch
;;=fedora: Compatibility with RHELs (unchecked which ones). ;;=fedora: Compatibility with RHELs (unchecked which ones).
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index c8db955f2f..6ebe00f542 100644 index 266740f74c..d69f154af3 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/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). */ /* Cache this symbol's name and the name's demangled form (if any). */
SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack); SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
linkagename = dwarf2_physname (name, die, cu); linkagename = dwarf2_physname (name, die, cu);

View File

@ -42,21 +42,202 @@ gdb/
* dwarf2read.c (process_die): Change gdb_assert to complaint. * dwarf2read.c (process_die): Change gdb_assert to complaint.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index fbaa0af64f..2c972d5e74 100644 index 420c3e6bd5..328a07df82 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -10612,6 +10612,14 @@ private: @@ -10516,6 +10516,14 @@ private:
static void static void
process_die (struct die_info *die, struct dwarf2_cu *cu) process_die (struct die_info *die, struct dwarf2_cu *cu)
{ {
+ if (die->in_process) + if (die->in_process)
+ { + {
+ complaint (&symfile_complaints, + complaint (&symfile_complaints,
+ _("DIE at 0x%x attempted to be processed twice"), + _("DIE at 0x%s attempted to be processed twice"),
+ to_underlying (die->sect_off)); + sect_offset_str (die->sect_off));
+ return; + return;
+ } + }
+ +
process_die_scope scope (die, cu); process_die_scope scope (die, cu);
switch (die->tag) 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" {

View File

@ -9,10 +9,10 @@ FileName: gdb-jit-reader-multilib.patch
;;=push+jan ;;=push+jan
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
index 904cc453ad..6fb5b5b509 100755 index 3b604feb11..9f236ae26a 100755
--- a/gdb/configure --- a/gdb/configure
+++ b/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" TARGET_PTR="unsigned __int128"
else else
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
index 1557760ed8..d891c7bccc 100644 index c707e7b152..dc0acd035b 100644
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/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 long)
AC_CHECK_SIZEOF(unsigned __int128) AC_CHECK_SIZEOF(unsigned __int128)

View File

@ -9,10 +9,10 @@ FileName: gdb-linux_perf-bundle.patch
;;=fedora ;;=fedora
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
index db849572b5..7720c00f4b 100755 index a2d480c1e5..4f102c3ede 100755
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -11907,7 +11907,7 @@ else @@ -11973,7 +11973,7 @@ else
#include <linux/perf_event.h> #include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5 #ifndef PERF_ATTR_SIZE_VER5
@ -22,10 +22,10 @@ index db849572b5..7720c00f4b 100755
_ACEOF _ACEOF
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
index 4412e25450..e64b0e806f 100644 index 57ebcaeb08..1840f91651 100644
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -1466,7 +1466,7 @@ else @@ -1471,7 +1471,7 @@ else
AC_PREPROC_IFELSE(AC_LANG_SOURCE([[ AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
#include <linux/perf_event.h> #include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5 #ifndef PERF_ATTR_SIZE_VER5
@ -59,7 +59,7 @@ index b97500e579..151545105c 100644
args.argc = argc; args.argc = argc;
args.argv = argv; args.argv = argv;
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h 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 --- a/gdb/nat/linux-btrace.h
+++ b/gdb/nat/linux-btrace.h +++ b/gdb/nat/linux-btrace.h
@@ -28,6 +28,177 @@ @@ -28,6 +28,177 @@

View File

@ -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. Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5a99de75e1..6a0c15b239 100644 index 305bb3f6c0..0106ce8dd5 100644
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/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. */ traps we can no longer explain. */
old_loc->events_till_retirement = 3 * (thread_count () + 1); old_loc->events_till_retirement = 3 * (thread_count () + 1);

View File

@ -1,50 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
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 <kevinb@redhat.com>
Date: Thu May 29 19:47:14 2003 +0000
From Jimi X <jimix@watson.ibm.com>:
* 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 <jan.kratochvil@redhat.com>
* 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;

View File

@ -9,7 +9,7 @@ FileName: gdb-python-gil.patch
;;=push ;;=push
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi 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 --- a/gdb/doc/python.texi
+++ b/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 @@ -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 @findex gdb.breakpoints
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h 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 --- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h
@@ -148,6 +148,8 @@ typedef int Py_ssize_t; @@ -148,6 +148,8 @@ typedef int Py_ssize_t;
@ -41,10 +41,10 @@ index c110588f76..89bbc6987b 100644
#endif #endif
diff --git a/gdb/python/python.c b/gdb/python/python.c 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 --- a/gdb/python/python.c
+++ b/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; const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL; PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
@ -65,7 +65,7 @@ index 4844c86c54..610dda828c 100644
return NULL; return NULL;
from_tty = 0; 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; to_string = cmp;
} }
@ -81,8 +81,9 @@ index 4844c86c54..610dda828c 100644
std::string to_string_res; std::string to_string_res;
TRY TRY
{ @@ -602,6 +615,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
struct interp *interp;
counted_command_line lines = read_command_lines_1 (reader, 1, nullptr);
+ /* In the case of long running GDB commands, allow the user to + /* In the case of long running GDB commands, allow the user to
+ release the Python GIL acquired by Python. Restore the GIL + 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 (&current_ui->async, 0); scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
scoped_restore save_uiout = make_scoped_restore (&current_uiout); scoped_restore save_uiout = make_scoped_restore (&current_uiout);
@@ -600,10 +620,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) @@ -617,10 +637,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
to_string_res = execute_command_to_string (arg, from_tty); from_tty);
else else
execute_command (arg, from_tty); execute_control_commands (lines.get (), from_tty);
+ +
+ /* Reacquire the GIL if it was released earlier. */ + /* Reacquire the GIL if it was released earlier. */
+ if (release_gil) + if (release_gil)

View File

@ -9,7 +9,7 @@ FileName: gdb-readline62-ask-more-rh.patch
;;=fedora ;;=fedora
diff --git a/gdb/event-top.c b/gdb/event-top.c 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 --- a/gdb/event-top.c
+++ b/gdb/event-top.c +++ b/gdb/event-top.c
@@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing) @@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing)

File diff suppressed because it is too large Load Diff

View File

@ -1,129 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
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<unsigned char*, std::__cxx1998::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > > >, std::__debug::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > > > (mutable iterator);
state = past-the-end;
references sequence with type 'std::__debug::vector<unsigned char, gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > >' @ 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<partial_symbol*, std::allocator<partial_symbol*> >;
}
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 <jan.kratochvil@redhat.com>
Date: Mon Jun 12 16:29:53 2017 +0100
Code cleanup: C++ify .gdb_index producer
commit af5bf4ada48ff65b6658be1fab8f9c8f8ab5f319
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Sat Oct 14 08:06:29 2017 -0400
Replace psymbol_allocation_list with std::vector
gdb/ChangeLog
2018-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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);

File diff suppressed because it is too large Load Diff

View File

@ -62,10 +62,10 @@ Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c 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 --- a/gdb/alpha-tdep.c
+++ b/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; accumulate_size = 0;
else else
accumulate_size -= sizeof(arg_reg_buffer); 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. */ /* Keep sp aligned to a multiple of 16 as the ABI requires. */
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c 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 --- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c
@@ -529,6 +529,7 @@ cp_print_value (struct type *type, struct type *real_type, @@ -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 (), if (target_read_memory (address + boffset, buf.data (),
diff --git a/gdb/defs.h b/gdb/defs.h diff --git a/gdb/defs.h b/gdb/defs.h
index 4fb2129b30..0c156d56c3 100644 index dc38a288c5..ce5fee3ba3 100644
--- a/gdb/defs.h --- a/gdb/defs.h
+++ b/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" #include "utils.h"
@ -115,10 +115,10 @@ index e5c1b07040..06fb3b77c9 100644
base_valaddr = buf.data (); base_valaddr = buf.data ();
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
index 0066bfcc4b..6f0abc98a2 100644 index 7813df1436..c816e2f897 100644
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/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; return addr;
} }
@ -133,15 +133,14 @@ index 0066bfcc4b..6f0abc98a2 100644
+ "maximum allowed %s bytes."), pulongest (num), + "maximum allowed %s bytes."), pulongest (num),
+ pulongest (SIZE_MAX / 8)); + pulongest (SIZE_MAX / 8));
+} +}
+ #if GDB_SELF_TEST
gdb::unique_xmalloc_ptr<char>
gdb_realpath (const char *filename) static void
{
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
index fdcb7e49e6..ddc53f131e 100644 index 96b922dbef..a7f9be5f4e 100644
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/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; CORE_ADDR address;
@ -150,18 +149,18 @@ index fdcb7e49e6..ddc53f131e 100644
address = value_address (*arg1p); address = value_address (*arg1p);
diff --git a/gdb/value.c b/gdb/value.c diff --git a/gdb/value.c b/gdb/value.c
index b6406fedc9..ac7d07a7b5 100644 index 569281dbbd..1964cf771c 100644
--- a/gdb/value.c --- a/gdb/value.c
+++ b/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. */ description correctly. */
check_typedef (type); check_typedef (type);
+ ulongest_fits_host_or_error (TYPE_LENGTH (type)); + ulongest_fits_host_or_error (TYPE_LENGTH (type));
val = XCNEW (struct value); val = new struct value (type);
val->contents = NULL;
val->next = all_values; /* Values start out on the all_values chain. */
@@ -1023,6 +1024,8 @@ check_type_length_before_alloc (const struct type *type) @@ -1016,6 +1017,8 @@ check_type_length_before_alloc (const struct type *type)
static void static void
allocate_value_contents (struct value *val) allocate_value_contents (struct value *val)
{ {
@ -170,14 +169,14 @@ index b6406fedc9..ac7d07a7b5 100644
if (!val->contents) if (!val->contents)
{ {
check_type_length_before_alloc (val->enclosing_type); 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))) if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val)))
{ {
check_type_length_before_alloc (new_encl_type); check_type_length_before_alloc (new_encl_type);
+ ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type)); + ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type));
val->contents 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 diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 4c1ab2e73e..bd69fd2f48 100644 index 4c1ab2e73e..bd69fd2f48 100644
--- a/gdb/vax-tdep.c --- a/gdb/vax-tdep.c

View File

@ -106,36 +106,72 @@ Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-wp.patch Content-Disposition: attachment; filename=bitpos-wp.patch
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c 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 --- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c
@@ -767,7 +767,7 @@ aarch64_linux_stopped_by_watchpoint (struct target_ops *ops) @@ -62,14 +62,14 @@ public:
static int int can_use_hw_breakpoint (enum bptype, int, int) override;
aarch64_linux_watchpoint_addr_within_range (struct target_ops *target, int insert_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
CORE_ADDR addr, int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
- CORE_ADDR start, int length) - int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
+ CORE_ADDR start, LONGEST length) + 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; return start <= addr && start + length - 1 >= addr;
} }
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c 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 --- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c
@@ -1177,7 +1177,7 @@ arm_linux_stopped_by_watchpoint (struct target_ops *ops) @@ -80,7 +80,7 @@ public:
static int
arm_linux_watchpoint_addr_within_range (struct target_ops *target, int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
CORE_ADDR addr,
- CORE_ADDR start, int length) - int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
+ CORE_ADDR start, LONGEST length) + 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; 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 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 --- a/gdb/nat/aarch64-linux-hw-point.c
+++ b/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. */ Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */
static int static int
@ -144,20 +180,20 @@ index ce26f28fad..e9ebc5fba8 100644
{ {
unsigned int alignment = 0; unsigned int alignment = 0;
@@ -180,9 +180,10 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) @@ -212,9 +212,10 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
limitations can be largely relaxed with some further work. */ an address within the latter. */
static void static void
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p, -aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, +aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len,
+ CORE_ADDR *aligned_addr_p, + CORE_ADDR *aligned_addr_p,
int *aligned_len_p, CORE_ADDR *next_addr_p, int *aligned_offset_p, int *aligned_len_p,
- int *next_len_p) - CORE_ADDR *next_addr_p, int *next_len_p,
+ LONGEST *next_len_p) + CORE_ADDR *next_addr_p, LONGEST *next_len_p,
CORE_ADDR *next_addr_orig_p)
{ {
int aligned_len; int aligned_len;
unsigned int offset; @@ -611,7 +612,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type,
@@ -501,7 +502,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type,
static int static int
aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, 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, + CORE_ADDR addr, LONGEST len, int is_insert,
struct aarch64_debug_reg_state *state) struct aarch64_debug_reg_state *state)
{ {
while (len > 0) CORE_ADDR addr_orig = addr;
@@ -524,9 +525,9 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, @@ -641,12 +642,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
" "
"aligned_addr: %s, aligned_len: %d\n"
" " " "
- "next_addr: %s, next_len: %d\n", "addr_orig: %s\n"
+ "next_addr: %s, next_len: %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), 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_orig),
+ aligned_len, core_addr_to_string_nz (addr), plongest (len)); - 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) addr_orig = addr_orig_next;
return ret; @@ -660,7 +661,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
@@ -537,7 +538,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
int int
aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, 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) struct aarch64_debug_reg_state *state)
{ {
if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) 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 void
aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
const char *func, CORE_ADDR addr, const char *func, CORE_ADDR addr,
@ -205,11 +244,20 @@ index ce26f28fad..e9ebc5fba8 100644
type == hw_write ? "hw-write-watchpoint" type == hw_write ? "hw-write-watchpoint"
: (type == hw_read ? "hw-read-watchpoint" : (type == hw_read ? "hw-read-watchpoint"
: (type == hw_access ? "hw-access-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 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 --- a/gdb/nat/aarch64-linux-hw-point.h
+++ b/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, int len, int is_insert,
struct aarch64_debug_reg_state *state); struct aarch64_debug_reg_state *state);
int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, 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, + LONGEST len, int is_insert,
struct aarch64_debug_reg_state *state); 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,
@@ -180,7 +180,7 @@ void aarch64_linux_set_debug_regs (const 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, void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
const char *func, CORE_ADDR addr, const char *func, CORE_ADDR addr,
@ -227,11 +275,38 @@ index 7c42b96d1b..e1d4fc8dbc 100644
void aarch64_linux_get_debug_reg_capacity (int tid); 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 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 --- a/gdb/ppc-linux-nat.c
+++ b/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 CONDITION_VALUE will hold the value which should be put in the
DVC register. */ DVC register. */
static void static void
@ -246,7 +321,7 @@ index 4a82434c0d..49a27d8daa 100644
CORE_ADDR addr_end_data, addr_end_dvc; CORE_ADDR addr_end_data, addr_end_dvc;
/* The DVC register compares bytes within fixed-length windows which /* 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<value_ref_ptr> &chain)
of the constant. */ of the constant. */
static int static int
check_condition (CORE_ADDR watch_addr, struct expression *cond, check_condition (CORE_ADDR watch_addr, struct expression *cond,
@ -254,17 +329,18 @@ index 4a82434c0d..49a27d8daa 100644
+ CORE_ADDR *data_value, LONGEST *len) + CORE_ADDR *data_value, LONGEST *len)
{ {
int pc = 1, num_accesses_left, num_accesses_right; int pc = 1, num_accesses_left, num_accesses_right;
struct value *left_val, *right_val, *left_chain, *right_chain; struct value *left_val, *right_val;
@@ -1957,7 +1957,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, @@ -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. */ true. */
static int bool
ppc_linux_can_accel_watchpoint_condition (struct target_ops *self, -ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len,
- CORE_ADDR addr, int len, int rw, +ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr,
+ CORE_ADDR addr, LONGEST len, int rw, + LONGEST len,
struct expression *cond) int rw,
struct expression *cond)
{ {
CORE_ADDR data_value; @@ -2008,7 +2009,7 @@ ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len,
@@ -1974,7 +1974,7 @@ ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
static void static void
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
@ -273,20 +349,20 @@ index 4a82434c0d..49a27d8daa 100644
struct expression *cond, int insert) struct expression *cond, int insert)
{ {
if (len == 1 if (len == 1
@@ -2240,7 +2240,7 @@ ppc_linux_stopped_by_watchpoint (struct target_ops *ops) @@ -2274,7 +2275,7 @@ ppc_linux_nat_target::stopped_by_watchpoint ()
static int bool
ppc_linux_watchpoint_addr_within_range (struct target_ops *target, ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr,
CORE_ADDR addr, CORE_ADDR start,
- CORE_ADDR start, int length) - int length)
+ CORE_ADDR start, LONGEST length) + LONGEST length)
{ {
int mask; int mask;
diff --git a/gdb/procfs.c b/gdb/procfs.c diff --git a/gdb/procfs.c b/gdb/procfs.c
index 887f1201fe..edd1be632a 100644 index ca7cc221f9..717a1130fe 100644
--- a/gdb/procfs.c --- a/gdb/procfs.c
+++ b/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 static int
@ -295,7 +371,7 @@ index 887f1201fe..edd1be632a 100644
{ {
struct { struct {
procfs_ctl_t cmd; 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. */ /* Insert a watchpoint. */
static int static int
@ -305,10 +381,19 @@ index 887f1201fe..edd1be632a 100644
{ {
int pflags = 0; int pflags = 0;
diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/remote.c b/gdb/remote.c
index 94d5594175..86777f1e5e 100644 index ce67d76195..635cb266e8 100644
--- a/gdb/remote.c --- a/gdb/remote.c
+++ b/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'); p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr); addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr); p += hexnumstr (p, (ULONGEST) addr);
@ -317,16 +402,16 @@ index 94d5594175..86777f1e5e 100644
putpkt (rs->buf); putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0); 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 bool
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, remote_target::watchpoint_addr_within_range (CORE_ADDR addr,
- CORE_ADDR start, int length) - CORE_ADDR start, int length)
+ CORE_ADDR start, LONGEST length) + CORE_ADDR start, LONGEST length)
{ {
CORE_ADDR diff = remote_address_masked (addr - start); 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'); p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr); addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr); p += hexnumstr (p, (ULONGEST) addr);
@ -335,74 +420,116 @@ index 94d5594175..86777f1e5e 100644
putpkt (rs->buf); putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0); 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 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 --- a/gdb/target-delegates.c
+++ b/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 bool
-delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) -target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
+delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3) +target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
{ {
self = self->beneath; return this->beneath->watchpoint_addr_within_range (arg0, arg1, arg2);
return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3);
} }
static int bool
-debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3) -dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
+debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3) +dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
{ {
int result; return default_watchpoint_addr_within_range (this, arg0, arg1, arg2);
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
} }
static int bool
-delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) -debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2)
+delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4) +debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2)
{ {
self = self->beneath; bool result;
return self->to_can_accel_watchpoint_condition (self, arg1, arg2, arg3, arg4); 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
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
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_CORE_ADDR (arg1); target_debug_print_CORE_ADDR (arg1);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_int (arg2); - target_debug_print_int (arg2);
+ target_debug_print_LONGEST (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); 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); fputs_unfiltered (", ", gdb_stdlog);
diff --git a/gdb/target.c b/gdb/target.c diff --git a/gdb/target.c b/gdb/target.c
index a1ac6d0697..eb0538cb82 100644 index 7d0da32ec6..46d120b9d2 100644
--- a/gdb/target.c --- a/gdb/target.c
+++ b/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 void default_terminal_info (struct target_ops *, const char *, int);
static int default_watchpoint_addr_within_range (struct target_ops *, 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 *, static int default_region_ok_for_hw_watchpoint (struct target_ops *,
CORE_ADDR, LONGEST); 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 static int
default_watchpoint_addr_within_range (struct target_ops *target, default_watchpoint_addr_within_range (struct target_ops *target,
CORE_ADDR addr, CORE_ADDR addr,
@ -421,24 +548,24 @@ index a1ac6d0697..eb0538cb82 100644
return addr >= start && addr < start + length; return addr >= start && addr < start + length;
} }
diff --git a/gdb/target.h b/gdb/target.h diff --git a/gdb/target.h b/gdb/target.h
index 7a70c3f6da..35eee91a83 100644 index aaed35f690..b1943a6d0a 100644
--- a/gdb/target.h --- a/gdb/target.h
+++ b/gdb/target.h +++ b/gdb/target.h
@@ -535,7 +535,7 @@ struct target_ops @@ -552,7 +552,7 @@ struct target_ops
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *) TARGET_DEFAULT_RETURN (false);
TARGET_DEFAULT_RETURN (0); virtual bool stopped_data_address (CORE_ADDR *)
int (*to_watchpoint_addr_within_range) (struct target_ops *, TARGET_DEFAULT_RETURN (false);
- CORE_ADDR, CORE_ADDR, int) - virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int)
+ CORE_ADDR, CORE_ADDR, LONGEST) + virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST)
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range); TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
/* Documentation of this routine is provided with the corresponding /* 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); 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,
- CORE_ADDR, int, int, + virtual bool can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int,
+ CORE_ADDR, LONGEST, int, struct expression *)
struct expression *) TARGET_DEFAULT_RETURN (false);
TARGET_DEFAULT_RETURN (0); virtual int masked_watch_num_registers (CORE_ADDR, CORE_ADDR)
int (*to_masked_watch_num_registers) (struct target_ops *,

View File

@ -147,10 +147,10 @@ Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=bitpos-tdep.patch Content-Disposition: attachment; filename=bitpos-tdep.patch
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c 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 --- a/gdb/alpha-tdep.c
+++ b/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); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i; int i;
@ -172,7 +172,7 @@ index ea53b9ee10..34dfb661f8 100644
CORE_ADDR func_addr = find_function_addr (function, NULL); CORE_ADDR func_addr = find_function_addr (function, NULL);
/* The ABI places the address of the called function in T12. */ /* 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;) for (i = nargs; m_arg--, --i >= 0;)
{ {
const gdb_byte *contents = m_arg->contents; 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. */ /* Copy the bytes destined for registers into arg_reg_buffer. */
if (offset < sizeof(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 else
{ {
@ -193,10 +193,10 @@ index ea53b9ee10..34dfb661f8 100644
offset += tlen; offset += tlen;
contents += tlen; contents += tlen;
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c 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 --- a/gdb/amd64-tdep.c
+++ b/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); struct value **stack_args = XALLOCAVEC (struct value *, nargs);
int num_stack_args = 0; int num_stack_args = 0;
@ -207,7 +207,7 @@ index 651794a41f..c96790a6af 100644
int integer_reg = 0; int integer_reg = 0;
int sse_reg = 0; int sse_reg = 0;
int i; 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++) for (i = 0; i < nargs; i++)
{ {
struct type *type = value_type (args[i]); struct type *type = value_type (args[i]);
@ -216,7 +216,7 @@ index 651794a41f..c96790a6af 100644
enum amd64_reg_class theclass[2]; enum amd64_reg_class theclass[2];
int needed_integer_regs = 0; int needed_integer_regs = 0;
int needed_sse_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); gdb_assert (regnum != -1);
memset (buf, 0, sizeof buf); 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 /* 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 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 --- a/gdb/arm-tdep.c
+++ b/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 array). Vector types are not currently supported, matching the
generic AAPCS support. */ generic AAPCS support. */
@ -251,7 +251,7 @@ index bc83326ae7..d38dd4918b 100644
arm_vfp_cprc_sub_candidate (struct type *t, arm_vfp_cprc_sub_candidate (struct type *t,
enum arm_vfp_cprc_base_type *base_type) 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 else
{ {
@ -260,7 +260,7 @@ index bc83326ae7..d38dd4918b 100644
unsigned unitlen; unsigned unitlen;
count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), 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: case TYPE_CODE_STRUCT:
{ {
@ -275,7 +275,7 @@ index bc83326ae7..d38dd4918b 100644
if (!field_is_static (&TYPE_FIELD (t, i))) if (!field_is_static (&TYPE_FIELD (t, i)))
sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (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: case TYPE_CODE_UNION:
{ {
@ -294,7 +294,7 @@ index bc83326ae7..d38dd4918b 100644
if (sub_count == -1) if (sub_count == -1)
return -1; return -1;
count = (count > sub_count ? count : sub_count); 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) int *count)
{ {
enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN;
@ -303,7 +303,7 @@ index bc83326ae7..d38dd4918b 100644
if (c <= 0 || c > 4) if (c <= 0 || c > 4)
return 0; return 0;
*base_type = b; *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++) for (argnum = 0; argnum < nargs; argnum++)
{ {
@ -313,10 +313,10 @@ index bc83326ae7..d38dd4918b 100644
struct type *target_type; struct type *target_type;
enum type_code typecode; enum type_code typecode;
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c 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 --- a/gdb/avr-tdep.c
+++ b/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 struct stack_item
{ {
@ -332,7 +332,7 @@ index aa65a76e07..f74b927854 100644
{ {
struct stack_item *si; struct stack_item *si;
si = XNEW (struct stack_item); 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++) for (i = 0; i < nargs; i++)
{ {
@ -349,7 +349,7 @@ index aa65a76e07..f74b927854 100644
/* Calculate the potential last register needed. /* Calculate the potential last register needed.
E.g. For length 2, registers regnum and regnum-1 (say 25 and 24) 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 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 --- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c
@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, @@ -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? */ /* How may registers worth of storage do we need for this argument? */
reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c 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 --- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c
@@ -637,7 +637,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, @@ -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) for (offset = 0; offset < padded_len; offset += wordsize)
{ {
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c 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 --- a/gdb/hppa-tdep.c
+++ b/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 value *arg = args[i];
struct type *type = value_type (arg); struct type *type = value_type (arg);
@ -457,7 +457,7 @@ index 513f0e0391..0872d5e809 100644
const bfd_byte *valbuf; const bfd_byte *valbuf;
bfd_byte fptrbuf[8]; bfd_byte fptrbuf[8];
int regnum; 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, struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf) gdb_byte *readbuf, const gdb_byte *writebuf)
{ {
@ -480,10 +480,10 @@ index 7ee2f4cf2a..b811296b0d 100644
if (struct_return) if (struct_return)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c 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 --- a/gdb/i386-tdep.c
+++ b/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]; gdb_byte buf[4];
int i; int i;
int write_pass; int write_pass;
@ -492,7 +492,7 @@ index af4942ab2e..6b1586a9e3 100644
/* BND registers can be in arbitrary values at the moment of the /* BND registers can be in arbitrary values at the moment of the
inferior call. This can cause boundary violations that are not 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++) for (write_pass = 0; write_pass < 2; write_pass++)
{ {
@ -501,7 +501,7 @@ index af4942ab2e..6b1586a9e3 100644
if (struct_return) 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++) for (i = 0; i < nargs; i++)
{ {
@ -510,7 +510,7 @@ index af4942ab2e..6b1586a9e3 100644
if (write_pass) 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); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum type_code code = TYPE_CODE (type); enum type_code code = TYPE_CODE (type);
@ -519,7 +519,7 @@ index af4942ab2e..6b1586a9e3 100644
gdb_assert (code == TYPE_CODE_STRUCT gdb_assert (code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION || code == TYPE_CODE_UNION
@@ -3738,7 +3738,7 @@ static int @@ -3727,7 +3727,7 @@ static int
i386_convert_register_p (struct gdbarch *gdbarch, i386_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type) int regnum, struct type *type)
{ {
@ -528,7 +528,7 @@ index af4942ab2e..6b1586a9e3 100644
/* Values may be spread across multiple registers. Most debugging /* Values may be spread across multiple registers. Most debugging
formats aren't expressive enough to specify the locations, so 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) int *optimizedp, int *unavailablep)
{ {
struct gdbarch *gdbarch = get_frame_arch (frame); struct gdbarch *gdbarch = get_frame_arch (frame);
@ -537,7 +537,7 @@ index af4942ab2e..6b1586a9e3 100644
if (i386_fp_regnum_p (gdbarch, regnum)) if (i386_fp_regnum_p (gdbarch, regnum))
return i387_register_to_value (frame, regnum, type, to, 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, i386_value_to_register (struct frame_info *frame, int regnum,
struct type *type, const gdb_byte *from) struct type *type, const gdb_byte *from)
{ {
@ -563,10 +563,10 @@ index f8e2f234e0..b703c2cae4 100644
CORE_ADDR struct_ptr; CORE_ADDR struct_ptr;
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c 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 --- a/gdb/m32r-tdep.c
+++ b/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; CORE_ADDR regval;
gdb_byte *val; gdb_byte *val;
gdb_byte valbuf[M32R_ARG_REGISTER_SIZE]; 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 /* Non-scalars bigger than 4 bytes are left aligned, others are
right aligned. */ 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 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 --- a/gdb/mep-tdep.c
+++ b/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++) for (i = 0; i < argc; i++)
{ {
@ -646,7 +615,7 @@ index ecfd4f36db..0cc4574425 100644
if (arg_len > MEP_GPR_SIZE) if (arg_len > MEP_GPR_SIZE)
{ {
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c 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 --- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c
@@ -477,7 +477,7 @@ static void @@ -477,7 +477,7 @@ static void
@ -795,10 +764,10 @@ index 981959ad4b..9572f92f65 100644
val = value_contents (arg); val = value_contents (arg);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c 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 --- a/gdb/mn10300-tdep.c
+++ b/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); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const int push_size = register_size (gdbarch, E_PC_REGNUM); const int push_size = register_size (gdbarch, E_PC_REGNUM);
int regs_used; int regs_used;
@ -807,22 +776,6 @@ index 93c02d67b4..17ce536a90 100644
int stack_offset = 0; int stack_offset = 0;
int argnum; int argnum;
const gdb_byte *val; 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 diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index a6ba5d0ffd..184b7d6261 100644 index a6ba5d0ffd..184b7d6261 100644
--- a/gdb/ppc-sysv-tdep.c --- a/gdb/ppc-sysv-tdep.c
@ -918,10 +871,10 @@ index a6ba5d0ffd..184b7d6261 100644
if (writebuf != NULL) if (writebuf != NULL)
regcache_cooked_write_part (regcache, regnum, regcache_cooked_write_part (regcache, regnum,
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c 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 --- a/gdb/rl78-tdep.c
+++ b/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--) for (i = nargs - 1; i >= 0; i--)
{ {
struct type *value_type = value_enclosing_type (args[i]); struct type *value_type = value_enclosing_type (args[i]);
@ -933,7 +886,7 @@ index 3db72a1e96..0f4172d553 100644
sp -= container_len; sp -= container_len;
write_memory (rl78_make_data_address (sp), write_memory (rl78_make_data_address (sp),
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c 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 --- a/gdb/rs6000-aix-tdep.c
+++ b/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, @@ -187,9 +187,9 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
@ -957,37 +910,6 @@ index 38c86d4cd8..f6d4816401 100644
if (argbytes) 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 diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index a167932327..4674eb7900 100644 index a167932327..4674eb7900 100644
--- a/gdb/score-tdep.c --- a/gdb/score-tdep.c
@ -1002,10 +924,10 @@ index a167932327..4674eb7900 100644
CORE_ADDR addr = 0; CORE_ADDR addr = 0;
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c 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 --- a/gdb/sh-tdep.c
+++ b/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 static int
sh_use_struct_convention (int renesas_abi, struct type *type) sh_use_struct_convention (int renesas_abi, struct type *type)
{ {
@ -1014,7 +936,7 @@ index fbc5c9f1d0..1f6052fa97 100644
int nelem = TYPE_NFIELDS (type); int nelem = TYPE_NFIELDS (type);
/* The Renesas ABI returns aggregate types always on stack. */ /* 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. */ /* Helper function to justify value in register according to endianess. */
static const gdb_byte * static const gdb_byte *
@ -1023,7 +945,7 @@ index fbc5c9f1d0..1f6052fa97 100644
{ {
static gdb_byte valbuf[4]; 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; struct type *type;
CORE_ADDR regval; CORE_ADDR regval;
const gdb_byte *val; const gdb_byte *val;
@ -1033,7 +955,7 @@ index fbc5c9f1d0..1f6052fa97 100644
int pass_on_stack = 0; int pass_on_stack = 0;
int treat_as_flt; int treat_as_flt;
int last_reg_arg = INT_MAX; 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; struct type *type;
CORE_ADDR regval; CORE_ADDR regval;
const gdb_byte *val; const gdb_byte *val;
@ -1043,30 +965,8 @@ index fbc5c9f1d0..1f6052fa97 100644
int pass_on_stack = 0; int pass_on_stack = 0;
int last_reg_arg = INT_MAX; 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 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 --- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c
@@ -1205,7 +1205,7 @@ sparc64_16_byte_align_p (struct type *type) @@ -1205,7 +1205,7 @@ sparc64_16_byte_align_p (struct type *type)
@ -1124,10 +1024,10 @@ index 7400c24fc5..39db22947c 100644
gdb_byte buf[16]; gdb_byte buf[16];
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c 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 --- a/gdb/spu-tdep.c
+++ b/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 value *arg = args[i];
struct type *type = check_typedef (value_type (arg)); struct type *type = check_typedef (value_type (arg));
const gdb_byte *contents = value_contents (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 /* If the argument doesn't wholly fit into registers, it and
all subsequent arguments go to the stack. */ 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 value *arg = args[i];
struct type *type = check_typedef (value_type (arg)); struct type *type = check_typedef (value_type (arg));
@ -1260,10 +1160,10 @@ index 31650ac3a9..91b088251c 100644
gdb_byte buf[xstormy16_pc_size]; gdb_byte buf[xstormy16_pc_size];
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c 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 --- a/gdb/xtensa-tdep.c
+++ b/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)) if (len > (callsize > 8 ? 8 : 16))
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__,
@ -1273,7 +1173,7 @@ index e09592a94e..95133a5871 100644
areg = arreg_number (gdbarch, areg = arreg_number (gdbarch,
gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); 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); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i; int i;
@ -1295,7 +1195,7 @@ index e09592a94e..95133a5871 100644
int regno; /* regno if in register. */ int regno; /* regno if in register. */
} u; } 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 value *arg = args[i];
struct type *arg_type = check_typedef (value_type (arg)); struct type *arg_type = check_typedef (value_type (arg));
@ -1309,7 +1209,7 @@ index e09592a94e..95133a5871 100644
switch (TYPE_CODE (arg_type)) switch (TYPE_CODE (arg_type))
{ {
case TYPE_CODE_INT: 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); info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long);
break; break;
} }
@ -1319,7 +1219,7 @@ index e09592a94e..95133a5871 100644
/* Align size and onstack_size. */ /* Align size and onstack_size. */
size = (size + info->align - 1) & ~(info->align - 1); 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) if (info->onstack)
{ {
@ -1328,7 +1228,7 @@ index e09592a94e..95133a5871 100644
CORE_ADDR offset = sp + info->u.offset; CORE_ADDR offset = sp + info->u.offset;
/* Odd-sized structs are aligned to the lower side of a memory /* 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 else
{ {

View File

@ -37,10 +37,10 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922
23 files changed, 1242 insertions(+), 183 deletions(-) 23 files changed, 1242 insertions(+), 183 deletions(-)
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 51f133f1b5..5105c8d23a 100644 index 6ecc5a9be6..fa9ff30721 100644
--- a/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c
+++ b/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. */ /* See dwarf2loc.h. */
int int
@ -57,7 +57,7 @@ index 51f133f1b5..5105c8d23a 100644
if (prop == NULL) if (prop == NULL)
return 0; 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); *value = value_as_address (val);
} }
@ -66,7 +66,7 @@ index 51f133f1b5..5105c8d23a 100644
} }
} }
break; 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)) if (!value_optimized_out (val))
{ {
*value = value_as_address (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: case PROP_CONST:
*value = prop->data.const_val; *value = prop->data.const_val;
@ -86,7 +86,7 @@ index 51f133f1b5..5105c8d23a 100644
case PROP_ADDR_OFFSET: case PROP_ADDR_OFFSET:
{ {
struct dwarf2_property_baton *baton 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, val = value_at (baton->offset_info.type,
pinfo->addr + baton->offset_info.offset); pinfo->addr + baton->offset_info.offset);
*value = value_as_address (val); *value = value_as_address (val);
@ -145,10 +145,10 @@ index f82e7b2d11..74f0597359 100644
property to C code. property to C code.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 58da0fc1f9..8fc1f7ec45 100644 index 49ce83ff20..a28d0a029e 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/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 *base_type, *orig_base_type;
struct type *range_type; struct type *range_type;
struct attribute *attr; struct attribute *attr;
@ -157,7 +157,7 @@ index 58da0fc1f9..8fc1f7ec45 100644
int low_default_is_valid; int low_default_is_valid;
int high_bound_is_count = 0; int high_bound_is_count = 0;
const char *name; 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; low.kind = PROP_CONST;
high.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 /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
omitting DW_AT_lower_bound. */ 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; break;
} }
@ -175,13 +175,14 @@ index 58da0fc1f9..8fc1f7ec45 100644
+ if (attr) + if (attr)
+ if (!attr_to_dynamic_prop (attr, die, cu, &stride)) + if (!attr_to_dynamic_prop (attr, die, cu, &stride))
+ complaint (&symfile_complaints, _("Missing DW_AT_byte_stride " + complaint (&symfile_complaints, _("Missing DW_AT_byte_stride "
+ "- DIE at 0x%x [in module %s]"), + "- DIE at 0x%s [in module %s]"),
+ to_underlying (die->sect_off), objfile_name (cu->objfile)); + sect_offset_str (die->sect_off),
+ objfile_name (cu->per_cu->dwarf2_per_objfile->objfile));
+ +
attr = dwarf2_attr (die, DW_AT_lower_bound, cu); attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
if (attr) if (attr)
attr_to_dynamic_prop (attr, die, cu, &low); 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)) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
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) if (high_bound_is_count)
TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1;
diff --git a/gdb/eval.c b/gdb/eval.c diff --git a/gdb/eval.c b/gdb/eval.c
index 6f74c41b9f..d9bca2791d 100644 index 5bd6e2cbfe..50dde3ed4f 100644
--- a/gdb/eval.c --- a/gdb/eval.c
+++ b/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; 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) switch (code)
{ {
case TYPE_CODE_ARRAY: case TYPE_CODE_ARRAY:
@ -559,7 +560,7 @@ index 6f74c41b9f..d9bca2791d 100644
case TYPE_CODE_PTR: case TYPE_CODE_PTR:
case TYPE_CODE_FUNC: 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); return (arg1);
@ -609,7 +610,7 @@ index 6f74c41b9f..d9bca2791d 100644
case BINOP_LOGICAL_AND: case BINOP_LOGICAL_AND:
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
if (noside == EVAL_SKIP) 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; int ndimen = 1;
struct type *tmp_type; struct type *tmp_type;
@ -620,15 +621,22 @@ index 6f74c41b9f..d9bca2791d 100644
error (_("Can't get dimensions for a non-array type")); error (_("Can't get dimensions for a non-array type"));
diff --git a/gdb/expprint.c b/gdb/expprint.c diff --git a/gdb/expprint.c b/gdb/expprint.c
index ac5ae0fea1..41bb357a27 100644 index 70d355d369..1dfc7943da 100644
--- a/gdb/expprint.c --- a/gdb/expprint.c
+++ b/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; *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); fputs_filtered ("RANGE(", stream);
- if (range_type == HIGH_BOUND_DEFAULT - 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) + if ((range_type & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND)
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
fputs_filtered ("..", stream); fputs_filtered ("..", stream);
@ -638,7 +646,7 @@ index ac5ae0fea1..41bb357a27 100644
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
fputs_filtered (")", stream); fputs_filtered (")", stream);
return; 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) switch (range_type)
{ {
@ -650,16 +658,28 @@ index ac5ae0fea1..41bb357a27 100644
+ case SUBARRAY_HIGH_BOUND: + case SUBARRAY_HIGH_BOUND:
fputs_filtered ("Range '..EXP'", stream); fputs_filtered ("Range '..EXP'", stream);
break; break;
- case LOW_BOUND_DEFAULT_EXCLUSIVE:
- fputs_filtered ("ExclusiveRange '..EXP'", stream);
- break;
- case HIGH_BOUND_DEFAULT: - case HIGH_BOUND_DEFAULT:
+ case SUBARRAY_LOW_BOUND: + case SUBARRAY_LOW_BOUND:
fputs_filtered ("Range 'EXP..'", stream); fputs_filtered ("Range 'EXP..'", stream);
break; break;
- case NONE_BOUND_DEFAULT: - 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): + case (SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND):
fputs_filtered ("Range 'EXP..EXP'", stream); fputs_filtered ("Range 'EXP..EXP'", stream);
break; break;
- case NONE_BOUND_DEFAULT_EXCLUSIVE:
+ case (SUBARRAY_HIGH_BOUND | SUBARRAY_HIGH_BOUND_EXCLUSIVE):
fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream);
break;
default: default:
@@ -1111,11 +1109,9 @@ dump_subexp_body_standard (struct expression *exp, @@ -1121,11 +1120,9 @@ dump_subexp_body_standard (struct expression *exp,
break; break;
} }
@ -674,38 +694,60 @@ index ac5ae0fea1..41bb357a27 100644
} }
break; break;
diff --git a/gdb/expression.h b/gdb/expression.h diff --git a/gdb/expression.h b/gdb/expression.h
index a783ea5fef..be24792eb6 100644 index 9f26bb8d60..2cc0d2c1e3 100644
--- a/gdb/expression.h --- a/gdb/expression.h
+++ b/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 *); struct ui_file *, const char *);
extern void dump_prefix_expression (struct expression *, struct ui_file *); extern void dump_prefix_expression (struct expression *, struct ui_file *);
-/* In an OP_RANGE expression, either bound could be empty, indicating -/* In an OP_RANGE expression, either bound could be empty, indicating
- that its value is by default that of the corresponding bound of the - that its value is by default that of the corresponding bound of the
- array or string. So we have four sorts of subrange. This - array or string. Also, the upper end of the range can be exclusive
- enumeration type is to identify this. */ - 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 an OP_RANGE expression, either bound can be provided by the
+ In addition to this, the user can also specify a stride value to indicated + user, or not. In addition to this, the user can also specify a
+ only certain elements of the array. This enumeration type is to identify + stride value to indicated only certain elements of the array.
+ this. */ + Also, the upper end of the range can be exclusive or inclusive.
+ + This enumeration type is to identify this. */
enum range_type enum range_type
{ -{
- BOTH_BOUND_DEFAULT, /* "(:)" */ - /* Neither the low nor the high bound was given -- so this refers to
- LOW_BOUND_DEFAULT, /* "(:high)" */ - the entire available range. */
- HIGH_BOUND_DEFAULT, /* "(low:)" */ - BOTH_BOUND_DEFAULT,
- NONE_BOUND_DEFAULT /* "(low:high)" */ - /* 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_NONE_BOUND = 0x0, /* "( : )" */
+ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */ + SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */
+ SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" */ + 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) */ #endif /* !defined (EXPRESSION_H) */
diff --git a/gdb/f-exp.y b/gdb/f-exp.y 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 --- a/gdb/f-exp.y
+++ b/gdb/f-exp.y +++ b/gdb/f-exp.y
@@ -257,31 +257,63 @@ arglist : subrange @@ -257,31 +257,63 @@ arglist : subrange
@ -798,7 +840,7 @@ index 903f2af638..b4067a8460 100644
for (i = lowerbound; for (i = lowerbound;
(i < upperbound + 1 && (*elts) < options->print_max); (i < upperbound + 1 && (*elts) < options->print_max);
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 43fe56e487..a72e2b3e0a 100644 index 6d70006081..64711e8cfb 100644
--- a/gdb/gdbtypes.c --- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c
@@ -902,7 +902,8 @@ operator== (const range_bounds &l, const range_bounds &r) @@ -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) else if (bit_stride > 0)
TYPE_LENGTH (result_type) = TYPE_LENGTH (result_type) =
(bit_stride * (high_bound - low_bound + 1) + 7) / 8; (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; CORE_ADDR value;
struct type *static_range_type, *static_target_type; struct type *static_range_type, *static_target_type;
const struct dynamic_prop *prop; const struct dynamic_prop *prop;
@ -878,7 +920,7 @@ index 43fe56e487..a72e2b3e0a 100644
{ {
low_bound.kind = PROP_CONST; low_bound.kind = PROP_CONST;
low_bound.data.const_val = value; 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; prop = &TYPE_RANGE_DATA (dyn_range_type)->high;
@ -887,7 +929,7 @@ index 43fe56e487..a72e2b3e0a 100644
{ {
high_bound.kind = PROP_CONST; high_bound.kind = PROP_CONST;
high_bound.data.const_val = value; 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; high_bound.data.const_val = 0;
} }
@ -910,10 +952,10 @@ index 43fe56e487..a72e2b3e0a 100644
return static_range_type; return static_range_type;
} }
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 92ca85c295..179238ce82 100644 index 5f614e573a..878c8b0302 100644
--- a/gdb/gdbtypes.h --- a/gdb/gdbtypes.h
+++ b/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; struct dynamic_prop high;
@ -924,7 +966,7 @@ index 92ca85c295..179238ce82 100644
/* True if HIGH range bound contains the number of elements in the /* True if HIGH range bound contains the number of elements in the
subrange. This affects how the final hight bound is computed. */ 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. */ /* * Union member used for range types. */
struct range_bounds *bounds; struct range_bounds *bounds;
@ -932,7 +974,7 @@ index 92ca85c295..179238ce82 100644
} flds_bnds; } flds_bnds;
/* * Slot to point to additional language-specific fields of this /* * 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 TYPE_RANGE_DATA(range_type)->high.kind
#define TYPE_LOW_BOUND_KIND(range_type) \ #define TYPE_LOW_BOUND_KIND(range_type) \
TYPE_RANGE_DATA(range_type)->low.kind TYPE_RANGE_DATA(range_type)->low.kind
@ -948,7 +990,7 @@ index 92ca85c295..179238ce82 100644
/* Property accessors for the type data location. */ /* Property accessors for the type data location. */
#define TYPE_DATA_LOCATION(thistype) \ #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)) TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
@ -958,7 +1000,7 @@ index 92ca85c295..179238ce82 100644
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((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); struct dynamic_prop *, unsigned int);
extern struct type *create_range_type (struct type *, struct type *, extern struct type *create_range_type (struct type *, struct type *,
@ -967,10 +1009,10 @@ index 92ca85c295..179238ce82 100644
const struct dynamic_prop *); const struct dynamic_prop *);
diff --git a/gdb/parse.c b/gdb/parse.c diff --git a/gdb/parse.c b/gdb/parse.c
index 8b2bb22c76..e1bf3edbe2 100644 index 193abe853f..ea0d027bb0 100644
--- a/gdb/parse.c --- a/gdb/parse.c
+++ b/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: case OP_RANGE:
oplen = 3; oplen = 3;
@ -981,6 +1023,7 @@ index 8b2bb22c76..e1bf3edbe2 100644
- switch (range_type) - switch (range_type)
- { - {
- case LOW_BOUND_DEFAULT: - case LOW_BOUND_DEFAULT:
- case LOW_BOUND_DEFAULT_EXCLUSIVE:
- case HIGH_BOUND_DEFAULT: - case HIGH_BOUND_DEFAULT:
- args = 1; - args = 1;
- break; - break;
@ -988,6 +1031,7 @@ index 8b2bb22c76..e1bf3edbe2 100644
- args = 0; - args = 0;
- break; - break;
- case NONE_BOUND_DEFAULT: - case NONE_BOUND_DEFAULT:
- case NONE_BOUND_DEFAULT_EXCLUSIVE:
- args = 2; - args = 2;
- break; - break;
- } - }
@ -1005,10 +1049,10 @@ index 8b2bb22c76..e1bf3edbe2 100644
break; break;
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y 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 --- a/gdb/rust-exp.y
+++ b/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: case OP_RANGE:
{ {
@ -1025,33 +1069,48 @@ index 199e87671e..397a92dfdb 100644
{ {
convert_ast_to_expression (state, operation->right.op, top); convert_ast_to_expression (state, operation->right.op, top);
- if (kind == BOTH_BOUND_DEFAULT) - if (kind == BOTH_BOUND_DEFAULT)
- kind = LOW_BOUND_DEFAULT; - kind = (operation->inclusive
- else - ? 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); - gdb_assert (kind == HIGH_BOUND_DEFAULT);
- kind = NONE_BOUND_DEFAULT; - kind = (operation->inclusive
- } - ? NONE_BOUND_DEFAULT : NONE_BOUND_DEFAULT_EXCLUSIVE);
+ kind = (range_type) (kind | SUBARRAY_HIGH_BOUND); + 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); else
write_exp_elt_longcst (state, kind);
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c 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 --- a/gdb/rust-lang.c
+++ b/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); kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
*pos += 3; *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) + if ((kind & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND)
low = evaluate_subexp (NULL_TYPE, exp, pos, noside); 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) + if ((kind & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND)
high = evaluate_subexp (NULL_TYPE, exp, pos, noside); 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) 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; *low = 0;
*high = 0; *high = 0;
@ -1060,7 +1119,7 @@ index f7bec33a42..cb924e084d 100644
if (TYPE_NFIELDS (type) == 0) if (TYPE_NFIELDS (type) == 0)
return; 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; i = 0;
if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0) if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0)
{ {
@ -1076,9 +1135,9 @@ index f7bec33a42..cb924e084d 100644
- ? LOW_BOUND_DEFAULT : NONE_BOUND_DEFAULT); - ? LOW_BOUND_DEFAULT : NONE_BOUND_DEFAULT);
+ *kind = (range_type) (*kind | SUBARRAY_HIGH_BOUND); + *kind = (range_type) (*kind | SUBARRAY_HIGH_BOUND);
*high = value_as_long (value_field (range, i)); *high = value_as_long (value_field (range, i));
}
} if (rust_inclusive_range_type_p (type))
@@ -1488,7 +1487,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, @@ -1235,7 +1232,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
struct type *rhstype; struct type *rhstype;
LONGEST low, high_bound; LONGEST low, high_bound;
/* Initialized to appease the compiler. */ /* Initialized to appease the compiler. */
@ -1087,7 +1146,7 @@ index f7bec33a42..cb924e084d 100644
LONGEST high = 0; LONGEST high = 0;
int want_slice = 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")); error (_("Cannot subscript non-array type"));
if (want_slice if (want_slice
@ -1096,7 +1155,7 @@ index f7bec33a42..cb924e084d 100644
low = low_bound; low = low_bound;
if (low < 0) if (low < 0)
error (_("Index less than zero")); 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; CORE_ADDR addr;
struct value *addrval, *tem; struct value *addrval, *tem;
@ -1741,10 +1800,10 @@ index 58e3a09c37..035def5466 100644
if (type_not_associated (array_type)) if (type_not_associated (array_type))
error (_("no such vector element (vector not associated)")); error (_("no such vector element (vector not associated)"));
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
index 9525dc8499..4cd4fd96ae 100644 index 62a86c06a3..5c35d7a091 100644
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/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 * struct value *
value_slice (struct value *array, int lowbound, int length) 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 /* Create a value for a FORTRAN complex number. Currently most of the
diff --git a/gdb/value.h b/gdb/value.h diff --git a/gdb/value.h b/gdb/value.h
index 7dc67dc721..03ca06448f 100644 index 4d75c966ed..e838fd580e 100644
--- a/gdb/value.h --- a/gdb/value.h
+++ b/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); extern struct value *value_slice (struct value *, int, int);

View File

@ -33,10 +33,10 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings
20 files changed, 827 insertions(+), 110 deletions(-) 20 files changed, 827 insertions(+), 110 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS diff --git a/gdb/NEWS b/gdb/NEWS
index 6c9a2ecefd..f40eb6c390 100644 index cef558039e..fa4c0382dc 100644
--- a/gdb/NEWS --- a/gdb/NEWS
+++ b/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 *** Changes in GDB 8.1
@ -79,10 +79,10 @@ index c4c0918e26..3904fab260 100644
type_print (value_type (val), "", stream, -1); type_print (value_type (val), "", stream, -1);
fprintf_filtered (stream, ") "); fprintf_filtered (stream, ") ");
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8fc1f7ec45..98e7d842f0 100644 index a28d0a029e..4006f4a48f 100644
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/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, static int attr_to_dynamic_prop (const struct attribute *attr,
struct die_info *die, struct dwarf2_cu *cu, struct die_info *die, struct dwarf2_cu *cu,
@ -92,7 +92,7 @@ index 8fc1f7ec45..98e7d842f0 100644
/* memory allocation interface */ /* 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 newobj->static_link
= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
@ -101,7 +101,7 @@ index 8fc1f7ec45..98e7d842f0 100644
} }
cu->list_in_scope = &local_symbols; 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 byte_stride_prop
= (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop));
@ -111,7 +111,7 @@ index 8fc1f7ec45..98e7d842f0 100644
if (!stride_ok) if (!stride_ok)
{ {
complaint (&symfile_complaints, 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 gdbarch *gdbarch = get_objfile_arch (objfile);
struct type *type, *range_type, *index_type, *char_type; struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr; struct attribute *attr;
@ -217,7 +217,7 @@ index 8fc1f7ec45..98e7d842f0 100644
char_type = language_string_char_type (cu->language_defn, gdbarch); char_type = language_string_char_type (cu->language_defn, gdbarch);
type = create_string_type (NULL, char_type, range_type); 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 static int
attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, 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) + const gdb_byte *additional_data, int additional_data_size)
{ {
struct dwarf2_property_baton *baton; struct dwarf2_property_baton *baton;
struct obstack *obstack = &cu->objfile->objfile_obstack; struct obstack *obstack
@@ -17456,14 +17524,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -17540,14 +17608,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
@ -243,7 +243,7 @@ index 8fc1f7ec45..98e7d842f0 100644
+ gdb_byte *data; + gdb_byte *data;
+ +
+ data = (gdb_byte *) obstack_alloc( + 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); + DW_BLOCK (attr)->size + additional_data_size);
+ memcpy (data, DW_BLOCK (attr)->data, DW_BLOCK (attr)->size); + memcpy (data, DW_BLOCK (attr)->data, DW_BLOCK (attr)->size);
+ memcpy (data + DW_BLOCK (attr)->size, additional_data, + memcpy (data + DW_BLOCK (attr)->size, additional_data,
@ -265,7 +265,7 @@ index 8fc1f7ec45..98e7d842f0 100644
} }
else if (attr_form_is_ref (attr)) 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 = XOBNEW (obstack, struct dwarf2_property_baton);
baton->referenced_type = die_type (target_die, target_cu); baton->referenced_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu; baton->locexpr.per_cu = cu->per_cu;
@ -276,7 +276,7 @@ index 8fc1f7ec45..98e7d842f0 100644
+ { + {
+ gdb_byte *data; + 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); + DW_BLOCK (target_attr)->size + additional_data_size);
+ memcpy (data, DW_BLOCK (target_attr)->data, + memcpy (data, DW_BLOCK (target_attr)->data,
+ DW_BLOCK (target_attr)->size); + DW_BLOCK (target_attr)->size);
@ -296,15 +296,16 @@ index 8fc1f7ec45..98e7d842f0 100644
prop->data.baton = baton; prop->data.baton = baton;
prop->kind = PROP_LOCEXPR; prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL); 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); attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
if (attr) if (attr)
- if (!attr_to_dynamic_prop (attr, die, cu, &stride)) - if (!attr_to_dynamic_prop (attr, die, cu, &stride))
+ if (!attr_to_dynamic_prop (attr, die, cu, &stride, NULL, 0)) + if (!attr_to_dynamic_prop (attr, die, cu, &stride, NULL, 0))
complaint (&symfile_complaints, _("Missing DW_AT_byte_stride " complaint (&symfile_complaints, _("Missing DW_AT_byte_stride "
"- DIE at 0x%x [in module %s]"), "- DIE at 0x%s [in module %s]"),
to_underlying (die->sect_off), objfile_name (cu->objfile)); 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); attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
if (attr) if (attr)
@ -312,8 +313,9 @@ index 8fc1f7ec45..98e7d842f0 100644
+ attr_to_dynamic_prop (attr, die, cu, &low, NULL, 0); + attr_to_dynamic_prop (attr, die, cu, &low, NULL, 0);
else if (!low_default_is_valid) else if (!low_default_is_valid)
complaint (&symfile_complaints, _("Missing DW_AT_lower_bound " complaint (&symfile_complaints, _("Missing DW_AT_lower_bound "
"- DIE at 0x%x [in module %s]"), "- DIE at %s [in module %s]"),
to_underlying (die->sect_off), objfile_name (cu->objfile)); @@ -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); attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
- if (!attr_to_dynamic_prop (attr, die, cu, &high)) - 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 bounds are constant do the final calculation here. */
if (low.kind == PROP_CONST && high.kind == PROP_CONST) 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); attr = dwarf2_attr (die, DW_AT_allocated, cu);
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
- if (attr_to_dynamic_prop (attr, die, cu, &prop)) - if (attr_to_dynamic_prop (attr, die, cu, &prop))
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) + 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) 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); attr = dwarf2_attr (die, DW_AT_associated, cu);
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
- if (attr_to_dynamic_prop (attr, die, cu, &prop)) - if (attr_to_dynamic_prop (attr, die, cu, &prop))
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) + 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) 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. */ /* Read DW_AT_data_location and set in type. */
attr = dwarf2_attr (die, DW_AT_data_location, cu); 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))
+ if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) + 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) if (dwarf2_per_objfile->die_type_hash == NULL)
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c 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 "); fprintfi_filtered (level, stream, "End Type ");
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a72e2b3e0a..cb5524023f 100644 index 64711e8cfb..2aa5253100 100644
--- a/gdb/gdbtypes.c --- a/gdb/gdbtypes.c
+++ b/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); type = check_typedef (type);
/* We only want to recognize references at the outermost level. */ /* 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)); type = check_typedef (TYPE_TARGET_TYPE (type));
/* Types that have a dynamic TYPE_DATA_LOCATION are considered /* 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: case TYPE_CODE_ARRAY:
@ -527,7 +529,7 @@ index a72e2b3e0a..cb5524023f 100644
{ {
gdb_assert (TYPE_NFIELDS (type) == 1); 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; struct dynamic_prop *prop;
unsigned int bit_stride = 0; unsigned int bit_stride = 0;
@ -537,7 +539,7 @@ index a72e2b3e0a..cb5524023f 100644
type = copy_type (type); 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)); 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); prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type);
if (prop != NULL) 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; return resolved_type;
} }
@ -583,7 +585,7 @@ index a72e2b3e0a..cb5524023f 100644
/* Worker for resolved_dynamic_type. */ /* Worker for resolved_dynamic_type. */
static struct 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; break;
} }
@ -1290,10 +1292,10 @@ index b6e777235c..14b611f7b5 100644
mi_gdb_test "582-var-show-format pvla2_not_associated" \ mi_gdb_test "582-var-show-format pvla2_not_associated" \
"582\\^done,format=\"natural\"" \ "582\\^done,format=\"natural\"" \
diff --git a/gdb/typeprint.c b/gdb/typeprint.c diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index c098a3f426..319fbaf94e 100644 index 222fc0a06b..37021e8d0d 100644
--- a/gdb/typeprint.c --- a/gdb/typeprint.c
+++ b/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"); printf_filtered (" */\n");
} }
@ -1318,12 +1320,12 @@ index c098a3f426..319fbaf94e 100644
+ +
LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags); LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags);
printf_filtered ("\n"); printf_filtered ("\n");
}
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
index 4cd4fd96ae..9b25980090 100644 index 5c35d7a091..9b6600b538 100644
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/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) if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
{ {
struct type *enc_type; struct type *enc_type;
@ -1343,7 +1345,7 @@ index 4cd4fd96ae..9b25980090 100644
/* We may be pointing to something embedded in a larger object. /* We may be pointing to something embedded in a larger object.
Get the real type of the enclosing 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 else
/* Retrieve the enclosing object pointed to. */ /* Retrieve the enclosing object pointed to. */
arg2 = value_at_lazy (enc_type, arg2 = value_at_lazy (enc_type,
@ -1354,10 +1356,10 @@ index 4cd4fd96ae..9b25980090 100644
enc_type = value_type (arg2); enc_type = value_type (arg2);
return readjust_indirect_value_type (arg2, enc_type, base_type, arg1); return readjust_indirect_value_type (arg2, enc_type, base_type, arg1);
diff --git a/gdb/valprint.c b/gdb/valprint.c diff --git a/gdb/valprint.c b/gdb/valprint.c
index b19123f23e..d01d02fc09 100644 index bed2cecf2c..2537d77c19 100644
--- a/gdb/valprint.c --- a/gdb/valprint.c
+++ b/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; return 0;
} }

View File

@ -31,7 +31,7 @@ Thanks,
Jan Jan
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 5105c8d23a..5486e4dc12 100644 index fa9ff30721..cfca1c2751 100644
--- a/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@

View File

@ -18,22 +18,22 @@
Name: %{?scl_prefix}gdb Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched # Freeze it when GDB gets branched
%global snapsrc 20180109 %global snapsrc 20180522
# See timestamp of source gnulib installed into gdb/gnulib/ . # See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20161115 %global snapgnulib 20161115
%global tarname gdb-%{version} %global tarname gdb-%{version}
Version: 8.1 Version: 8.1.50.%{snapsrc}
# The release always contains a leading reserved number, start it at 1. # 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. # `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 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 Group: Development/Debuggers
# Do not provide URL for snapshots as the file lasts there only for 2 days. # 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 # ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz
#Source: % {tarname}.tar.xz Source: %{tarname}.tar.xz
Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz #Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://gnu.org/software/gdb/ URL: http://gnu.org/software/gdb/
@ -1026,6 +1026,9 @@ then
fi fi
%changelog %changelog
* Wed May 30 2018 Sergio Durigan Junior <sergiodj@redhat.com> - 8.1.50.20180522-15.fc28
- Rebase to FSF GDB 8.1.50.20180522 (8.2pre).
* Mon Apr 2 2018 Jan Kratochvil <jan.kratochvil@redhat.com> - 8.1-14.fc28 * Mon Apr 2 2018 Jan Kratochvil <jan.kratochvil@redhat.com> - 8.1-14.fc28
- Revert 'Fix PDF build on Rawhide/F-29', rm -rf texinfo/ (from RH BZ 1562580). - Revert 'Fix PDF build on Rawhide/F-29', rm -rf texinfo/ (from RH BZ 1562580).

View File

@ -1,3 +1,3 @@
SHA512 (gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz) = 3d540b99581ffa4cf2810bec979c9a01a1f8ce782b7c8efb46b40dd2421d60cdb0e52b53c5477c3e86a57957a2a14489f5c29dc53868738a1ef79e79cf76d0a1 SHA512 (gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz) = 3d540b99581ffa4cf2810bec979c9a01a1f8ce782b7c8efb46b40dd2421d60cdb0e52b53c5477c3e86a57957a2a14489f5c29dc53868738a1ef79e79cf76d0a1
SHA512 (v1.6.1.tar.gz) = c7c9c8ba78021fff3fde12a216f5729c6031114e5a727f49b7ff1a31c53b5ddba24d1b3aee252d8278ecd1fafe78a44ed059c12b9eb29eca33093e0720673468 SHA512 (v1.6.1.tar.gz) = c7c9c8ba78021fff3fde12a216f5729c6031114e5a727f49b7ff1a31c53b5ddba24d1b3aee252d8278ecd1fafe78a44ed059c12b9eb29eca33093e0720673468
SHA512 (gdb-8.1.tar.xz) = ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357 SHA512 (gdb-8.1.50.20180522.tar.xz) = 27a6b106cc1f21a74acf31be45d623115a18818a9f5008ac7748dbe745685f41f055fe8acf736ee5f0d6716d47b2a4307197db8899a3a4e220bed72b1e126d97