diff --git a/.gitignore b/.gitignore index a46c566..9696042 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz -/v1.6.1.tar.gz -/gdb-8.1.50.20180629.tar.xz +/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz +/v2.0.tar.gz +/gdb-8.2.50.20181114.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index edce570..6d7e6ea 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -12,495 +12,465 @@ Patch003: gdb-vla-intel-fortran-vla-strings.patch #=push+jan Patch004: gdb-vla-intel-stringbt-fix.patch -# Better parse 64-bit PPC system call prologues. -#=push: Write new testcase. -Patch005: gdb-6.3-ppc64syscall-20040622.patch - -# Include the pc's section when doing a symbol lookup so that the -# correct symbol is found. -#=push: Write new testcase. -Patch006: gdb-6.3-ppc64displaysymbol-20041124.patch - # Add a wrapper script to GDB that implements pstack using the # --readnever option. #=push -Patch007: gdb-6.3-gstack-20050411.patch +Patch005: gdb-6.3-gstack-20050411.patch # VSYSCALL and PIE #=fedoratest -Patch008: gdb-6.3-test-pie-20050107.patch +Patch006: gdb-6.3-test-pie-20050107.patch # Get selftest working with sep-debug-info #=fedoratest -Patch009: gdb-6.3-test-self-20050110.patch +Patch007: gdb-6.3-test-self-20050110.patch # Test support of multiple destructors just like multiple constructors #=fedoratest -Patch010: gdb-6.3-test-dtorfix-20050121.patch +Patch008: gdb-6.3-test-dtorfix-20050121.patch # Fix to support executable moving #=fedoratest -Patch011: gdb-6.3-test-movedir-20050125.patch +Patch009: gdb-6.3-test-movedir-20050125.patch # Test sibling threads to set threaded watchpoints for x86 and x86-64 #=fedoratest -Patch012: gdb-6.3-threaded-watchpoints2-20050225.patch +Patch010: gdb-6.3-threaded-watchpoints2-20050225.patch # Notify observers that the inferior has been created #=fedoratest -Patch013: gdb-6.3-inferior-notification-20050721.patch +Patch011: gdb-6.3-inferior-notification-20050721.patch # Verify printing of inherited members test #=fedoratest -Patch014: gdb-6.3-inheritancetest-20050726.patch +Patch012: gdb-6.3-inheritancetest-20050726.patch # Add readnever option #=push -Patch015: gdb-6.3-readnever-20050907.patch - -# Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661). -#=push+jan: There was some mail thread about it, this patch may be a hack. -Patch016: gdb-6.5-bz203661-emit-relocs.patch +Patch013: gdb-6.3-readnever-20050907.patch # Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). #=push+jan: It should be replaced by Infinity project. -Patch017: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch014: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch # Fix TLS symbols resolving for shared libraries with a relative pathname. # The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'. #=fedoratest: One should recheck if it is really fixed upstream. -Patch018: gdb-6.5-sharedlibrary-path.patch +Patch015: gdb-6.5-sharedlibrary-path.patch # Improved testsuite results by the testsuite provided by the courtesy of BEA. #=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful. -Patch019: gdb-6.5-BEA-testsuite.patch +Patch016: gdb-6.5-BEA-testsuite.patch # Testcase for deadlocking on last address space byte; for corrupted backtraces. #=fedoratest -Patch020: gdb-6.5-last-address-space-byte-test.patch +Patch017: gdb-6.5-last-address-space-byte-test.patch # Fix readline segfault on excessively long hand-typed lines. #=fedoratest -Patch021: gdb-6.5-readline-long-line-crash-test.patch +Patch018: gdb-6.5-readline-long-line-crash-test.patch # Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711). #=fedora -Patch022: gdb-6.5-bz216711-clone-is-outermost.patch +Patch019: gdb-6.5-bz216711-clone-is-outermost.patch # Test sideeffects of skipping ppc .so libs trampolines (BZ 218379). #=fedoratest -Patch023: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch020: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch # Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379). #=fedora -Patch024: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +Patch021: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch # Find symbols properly at their original (included) file (BZ 109921). #=fedoratest -Patch025: gdb-6.5-bz109921-DW_AT_decl_file-test.patch +Patch022: gdb-6.5-bz109921-DW_AT_decl_file-test.patch # Update PPC unwinding patches to their upstream variants (BZ 140532). #=fedoratest -Patch026: gdb-6.3-bz140532-ppc-unwinding-test.patch +Patch023: gdb-6.3-bz140532-ppc-unwinding-test.patch # Testcase for exec() from threaded program (BZ 202689). #=fedoratest -Patch027: gdb-6.3-bz202689-exec-from-pthread-test.patch +Patch024: gdb-6.3-bz202689-exec-from-pthread-test.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest -Patch028: gdb-6.6-bz230000-power6-disassembly-test.patch +Patch025: gdb-6.6-bz230000-power6-disassembly-test.patch # Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). #=fedoratest -Patch029: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch026: gdb-6.6-bz229517-gcore-without-terminal.patch # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". #=fedoratest -Patch030: gdb-6.6-testsuite-timeouts.patch +Patch027: gdb-6.6-testsuite-timeouts.patch # Support for stepping over PPC atomic instruction sequences (BZ 237572). #=fedoratest -Patch031: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch028: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch # Make upstream `set scheduler-locking step' as default. #=push+jan: How much is scheduler-locking relevant after non-stop? -Patch032: gdb-6.6-scheduler_locking-step-is-default.patch +Patch029: gdb-6.6-scheduler_locking-step-is-default.patch # Test kernel VDSO decoding while attaching to an i386 process. #=fedoratest -Patch033: gdb-6.3-attach-see-vdso-test.patch +Patch030: gdb-6.3-attach-see-vdso-test.patch # Test leftover zombie process (BZ 243845). #=fedoratest -Patch034: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch031: gdb-6.5-bz243845-stale-testing-zombie-test.patch # New locating of the matching binaries from the pure core file (build-id). #=push+jan -Patch035: gdb-6.6-buildid-locate.patch +Patch032: gdb-6.6-buildid-locate.patch # Fix loading of core files without build-ids but with build-ids in executables. # Load strictly build-id-checked core files only if no executable is specified # (Jan Kratochvil, RH BZ 1339862). #=push+jan -Patch036: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch033: gdb-6.6-buildid-locate-solib-missing-ids.patch #=push+jan -Patch037: gdb-6.6-buildid-locate-rpm.patch +Patch034: gdb-6.6-buildid-locate-rpm.patch # Fix displaying of numeric char arrays as strings (BZ 224128). #=fedoratest: But it is failing anyway, one should check the behavior more. -Patch038: gdb-6.7-charsign-test.patch +Patch035: gdb-6.7-charsign-test.patch # Test PPC hiding of call-volatile parameter register. #=fedoratest -Patch039: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch036: gdb-6.7-ppc-clobbered-registers-O2-test.patch # Testsuite fixes for more stable/comparable results. #=fedoratest -Patch040: gdb-6.7-testsuite-stable-results.patch +Patch037: gdb-6.7-testsuite-stable-results.patch # Test ia64 memory leaks of the code using libunwind. #=fedoratest -Patch041: gdb-6.5-ia64-libunwind-leak-test.patch +Patch038: gdb-6.5-ia64-libunwind-leak-test.patch # Test hiding unexpected breakpoints on intentional step commands. #=fedoratest -Patch042: gdb-6.5-missed-trap-on-step-test.patch +Patch039: gdb-6.5-missed-trap-on-step-test.patch # Test gcore memory and time requirements for large inferiors. #=fedoratest -Patch043: gdb-6.5-gcore-buffer-limit-test.patch +Patch040: gdb-6.5-gcore-buffer-limit-test.patch # Test GCORE for shmid 0 shared memory mappings. #=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. -Patch044: gdb-6.3-mapping-zero-inode-test.patch +Patch041: gdb-6.3-mapping-zero-inode-test.patch # Test a crash on `focus cmd', `focus prev' commands. #=fedoratest -Patch045: gdb-6.3-focus-cmd-prev-test.patch +Patch042: gdb-6.3-focus-cmd-prev-test.patch # Test various forms of threads tracking across exec() (BZ 442765). #=fedoratest -Patch046: gdb-6.8-bz442765-threaded-exec-test.patch - -# Silence memcpy check which returns false positive (sparc64) -#=push: But it is just a GCC workaround, look up the existing GCC PR for it. -Patch047: gdb-6.8-sparc64-silence-memcpy-check.patch +Patch043: gdb-6.8-bz442765-threaded-exec-test.patch # Test a crash on libraries missing the .text section. #=fedoratest -Patch048: gdb-6.5-section-num-fixup-test.patch +Patch044: gdb-6.5-section-num-fixup-test.patch # Fix register assignments with no GDB stack frames (BZ 436037). #=push+jan: This fix is incorrect. -Patch049: gdb-6.8-bz436037-reg-no-longer-active.patch - -# Test the watchpoints conditionals works. -#=fedoratest -Patch050: gdb-6.8-watchpoint-conditionals-test.patch +Patch045: gdb-6.8-bz436037-reg-no-longer-active.patch # Fix resolving of variables at locations lists in prelinked libs (BZ 466901). #=fedoratest -Patch051: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch046: gdb-6.8-bz466901-backtrace-full-prelinked.patch # New test for step-resume breakpoint placed in multiple threads at once. #=fedoratest -Patch052: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch047: gdb-simultaneous-step-resume-breakpoint-test.patch # Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. # Fix regression of undisplayed missing shared libraries caused by a fix for. #=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> -Patch053: gdb-core-open-vdso-warning.patch +Patch048: gdb-core-open-vdso-warning.patch # Fix syscall restarts for amd64->i386 biarch. #=push+jan -Patch054: gdb-x86_64-i386-syscall-restart.patch +Patch049: gdb-x86_64-i386-syscall-restart.patch # Fix stepping with OMP parallel Fortran sections (BZ 533176). #=push+jan: It requires some better DWARF annotations. -Patch055: gdb-bz533176-fortran-omp-step.patch +Patch050: gdb-bz533176-fortran-omp-step.patch # Fix regression by python on ia64 due to stale current frame. #=push+jan -Patch056: gdb-follow-child-stale-parent.patch +Patch051: gdb-follow-child-stale-parent.patch # Workaround ccache making lineno non-zero for command-line definitions. #=fedoratest: ccache is rarely used and it is even fixed now. -Patch057: gdb-ccache-workaround.patch +Patch052: gdb-ccache-workaround.patch #=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. -Patch058: gdb-archer-pie-addons.patch +Patch053: gdb-archer-pie-addons.patch #=push+jan: Breakpoints disabling matching should not be based on address. -Patch059: gdb-archer-pie-addons-keep-disabled.patch +Patch054: gdb-archer-pie-addons-keep-disabled.patch # Testcase for "Do not make up line information" fix by Daniel Jacobowitz. #=fedoratest -Patch060: gdb-lineno-makeup-test.patch +Patch055: gdb-lineno-makeup-test.patch # Test power7 ppc disassembly. #=fedoratest -Patch061: gdb-ppc-power7-test.patch +Patch056: gdb-ppc-power7-test.patch # Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866). # Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). #=push+jan: It should be fixed properly instead. -Patch062: gdb-bz541866-rwatch-before-run.patch +Patch057: gdb-bz541866-rwatch-before-run.patch # Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623). #=push+jan: Currently it is still not fully safe. -Patch063: gdb-moribund-utrace-workaround.patch +Patch058: gdb-moribund-utrace-workaround.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). #=fedoratest -Patch064: gdb-archer-next-over-throw-cxx-exec.patch +Patch059: gdb-archer-next-over-throw-cxx-exec.patch # Backport DWARF-4 support (BZ 601887, Tom Tromey). #=fedoratest -Patch065: gdb-bz601887-dwarf4-rh-test.patch +Patch060: gdb-bz601887-dwarf4-rh-test.patch #=push+jan -Patch066: gdb-6.6-buildid-locate-core-as-arg.patch +Patch061: gdb-6.6-buildid-locate-core-as-arg.patch # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). #=push+jan -Patch067: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch062: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). #=fedoratest -Patch068: gdb-test-bt-cfi-without-die.patch +Patch063: gdb-test-bt-cfi-without-die.patch # Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248). #=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted. -Patch069: gdb-bz568248-oom-is-error.patch +Patch064: gdb-bz568248-oom-is-error.patch # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). #=fedoratest -Patch070: gdb-bz634108-solib_address.patch +Patch065: gdb-bz634108-solib_address.patch # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). #=fedoratest -Patch071: gdb-test-pid0-core.patch +Patch066: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch072: gdb-test-dw2-aranges.patch +Patch067: gdb-test-dw2-aranges.patch # [archer-keiths-expr-cumulative+upstream] Import C++ testcases. #=fedoratest -Patch073: gdb-test-expr-cumulative-archer.patch +Patch068: gdb-test-expr-cumulative-archer.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch074: gdb-physname-pr11734-test.patch +Patch069: gdb-physname-pr11734-test.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch075: gdb-physname-pr12273-test.patch - -# Toolchain on sparc is slightly broken and debuginfo files are generated -# with non 64bit aligned tables/offsets. -# See for example readelf -S ../Xvnc.debug. -# -# As a consenquence calculation of sectp->filepos as used in -# dwarf2_read_section (gdb/dwarf2read.c:1525) will return a non aligned buffer -# that cannot be used directly as done with MMAP. -# Usage will result in a BusError. -# -# While we figure out what's wrong in the toolchain and do a full archive -# rebuild to fix it, we need to be able to use gdb :) -#=push -Patch076: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +Patch070: gdb-physname-pr12273-test.patch # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). #=fedoratest -Patch077: gdb-test-ivy-bridge.patch +Patch071: gdb-test-ivy-bridge.patch # Hack for proper PIE run of the testsuite. #=fedoratest -Patch078: gdb-runtest-pie-override.patch +Patch072: gdb-runtest-pie-override.patch # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). #=push+jan -Patch079: gdb-attach-fail-reasons-5of5.patch +Patch073: gdb-attach-fail-reasons-5of5.patch # Workaround PR libc/14166 for inferior calls of strstr. #=fedora: Compatibility with RHELs (unchecked which ones). -Patch080: gdb-glibc-strstr-workaround.patch +Patch074: gdb-glibc-strstr-workaround.patch # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). #=fedoratest -Patch081: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch075: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). #=fedoratest -Patch082: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch076: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch083: gdb-rhbz795424-bitpos-20of25.patch +Patch077: gdb-rhbz795424-bitpos-20of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch084: gdb-rhbz795424-bitpos-21of25.patch +Patch078: gdb-rhbz795424-bitpos-21of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch085: gdb-rhbz795424-bitpos-22of25.patch +Patch079: gdb-rhbz795424-bitpos-22of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch086: gdb-rhbz795424-bitpos-23of25.patch +Patch080: gdb-rhbz795424-bitpos-23of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch087: gdb-rhbz795424-bitpos-25of25.patch +Patch081: gdb-rhbz795424-bitpos-25of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch088: gdb-rhbz795424-bitpos-25of25-test.patch +Patch082: gdb-rhbz795424-bitpos-25of25-test.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch089: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch083: gdb-rhbz795424-bitpos-lazyvalue.patch # Import regression test for `gdb/findvar.c:417: internal-error: # read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. #=fedoratest -Patch090: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch084: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). #=push+jan -Patch091: gdb-gnat-dwarf-crash-3of3.patch +Patch085: gdb-gnat-dwarf-crash-3of3.patch # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) #=fedoratest -Patch092: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch086: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch # Fix 'gdb gives highly misleading error when debuginfo pkg is present, # but not corresponding binary pkg' (RH BZ 981154). #=push+jan -Patch093: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch087: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch #=fedoratest -Patch094: gdb-archer-vla-tests.patch +Patch088: gdb-archer-vla-tests.patch #=fedoratest -Patch095: gdb-vla-intel-tests.patch +Patch089: gdb-vla-intel-tests.patch # Continue backtrace even if a frame filter throws an exception (Phil Muldoon). #=push -Patch096: gdb-btrobust.patch +Patch090: gdb-btrobust.patch # Display Fortran strings in backtraces. #=fedoratest -Patch097: gdb-fortran-frame-string.patch +Patch091: gdb-fortran-frame-string.patch # Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). #=push -Patch098: gdb-python-gil.patch +Patch092: gdb-python-gil.patch # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # crash.' (RH BZ 1156192). #=fedoratest -Patch099: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch093: gdb-rhbz1156192-recursive-dlopen-test.patch # Fix jit-reader.h for multi-lib. #=push+jan -Patch100: gdb-jit-reader-multilib.patch +Patch094: gdb-jit-reader-multilib.patch # Fix '`catch syscall' doesn't work for parent after `fork' is called' # (Philippe Waroquiers, RH BZ 1149205). #=fedoratest -Patch101: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch095: gdb-rhbz1149205-catch-syscall-after-fork-test.patch # Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug # description: 'C++ (and objc): Internal error on unqualified name # re-set', PR 11657] (RH BZ 1186476). #=fedoratest -Patch102: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch096: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch # Test 'info type-printers' Python error (RH BZ 1350436). #=fedoratest -Patch103: gdb-rhbz1350436-type-printers-error.patch +Patch097: gdb-rhbz1350436-type-printers-error.patch # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Kratochvil, RH BZ 1084404). #=fedoratest -Patch104: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch098: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch # Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747). #=push+jan -Patch105: gdb-bz1219747-attach-kills.patch +Patch099: gdb-bz1219747-attach-kills.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). #=push+jan -Patch106: gdb-fedora-libncursesw.patch +Patch100: gdb-fedora-libncursesw.patch # Test clflushopt instruction decode (for RH BZ 1262471). #=fedoratest -Patch107: gdb-opcodes-clflushopt-test.patch +Patch101: gdb-opcodes-clflushopt-test.patch # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). #=fedora -Patch108: gdb-dts-rhel6-python-compat.patch +Patch102: gdb-dts-rhel6-python-compat.patch # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). #=push+jan -Patch109: gdb-6.6-buildid-locate-rpm-scl.patch +Patch103: gdb-6.6-buildid-locate-rpm-scl.patch # Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131). #=fedora -Patch110: gdb-readline62-ask-more-rh.patch +Patch104: gdb-readline62-ask-more-rh.patch # Make the GDB quit processing non-abortable to cleanup everything properly. #=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch . -Patch111: gdb-6.8-quit-never-aborts.patch +Patch105: gdb-6.8-quit-never-aborts.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=fedoratest -Patch112: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch106: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). #=fedora -Patch113: gdb-container-rh-pkg.patch +Patch107: gdb-container-rh-pkg.patch # New test for Python "Cannot locate object file for block" (for RH BZ 1325795). #=fedoratest -Patch114: gdb-rhbz1325795-framefilters-test.patch +Patch108: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). #=fedora -Patch115: gdb-linux_perf-bundle.patch +Patch109: gdb-linux_perf-bundle.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). #=fedora -Patch116: gdb-libexec-add-index.patch +Patch110: gdb-libexec-add-index.patch # New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). #=fedoratest -Patch117: gdb-rhbz1398387-tab-crash-test.patch +Patch111: gdb-rhbz1398387-tab-crash-test.patch # [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). #=fedoratest -Patch118: gdb-testsuite-readline63-sigint.patch +Patch112: gdb-testsuite-readline63-sigint.patch # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher #=push -Patch119: gdb-archer.patch +Patch113: gdb-archer.patch # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd -Patch120: gdb-vla-intel-fix-print-char-array.patch +Patch114: gdb-vla-intel-fix-print-char-array.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch121: gdb-rhbz1553104-s390x-arch12-test.patch +Patch115: gdb-rhbz1553104-s390x-arch12-test.patch + +# This patch is needed to compile GDB after -Werror=narrowing has +# been enabled by default. +# Author: Sergio Durigan Junior. +Patch116: gdb-rhbz795424-bitpos-arrayview.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index a663edb..f0da001 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -114,8 +114,3 @@ %patch114 -p1 %patch115 -p1 %patch116 -p1 -%patch117 -p1 -%patch118 -p1 -%patch119 -p1 -%patch120 -p1 -%patch121 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index bcd1724..ad75dd2 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -fd1ae9058720aa2738cc4852647097dd89c2bb88 +dd9168931facd539a585b88d7b7c6c04c8c065c2 diff --git a/_patch_order b/_patch_order index 1b3a5fe..b59f1cf 100644 --- a/_patch_order +++ b/_patch_order @@ -2,8 +2,6 @@ gdb-6.3-rh-testversion-20041202.patch gdb-vla-intel-fortran-strides.patch gdb-vla-intel-fortran-vla-strings.patch gdb-vla-intel-stringbt-fix.patch -gdb-6.3-ppc64syscall-20040622.patch -gdb-6.3-ppc64displaysymbol-20041124.patch gdb-6.3-gstack-20050411.patch gdb-6.3-test-pie-20050107.patch gdb-6.3-test-self-20050110.patch @@ -13,7 +11,6 @@ gdb-6.3-threaded-watchpoints2-20050225.patch gdb-6.3-inferior-notification-20050721.patch gdb-6.3-inheritancetest-20050726.patch gdb-6.3-readnever-20050907.patch -gdb-6.5-bz203661-emit-relocs.patch gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch gdb-6.5-sharedlibrary-path.patch gdb-6.5-BEA-testsuite.patch @@ -44,10 +41,8 @@ gdb-6.5-gcore-buffer-limit-test.patch gdb-6.3-mapping-zero-inode-test.patch gdb-6.3-focus-cmd-prev-test.patch gdb-6.8-bz442765-threaded-exec-test.patch -gdb-6.8-sparc64-silence-memcpy-check.patch gdb-6.5-section-num-fixup-test.patch gdb-6.8-bz436037-reg-no-longer-active.patch -gdb-6.8-watchpoint-conditionals-test.patch gdb-6.8-bz466901-backtrace-full-prelinked.patch gdb-simultaneous-step-resume-breakpoint-test.patch gdb-core-open-vdso-warning.patch @@ -73,7 +68,6 @@ gdb-test-dw2-aranges.patch gdb-test-expr-cumulative-archer.patch gdb-physname-pr11734-test.patch gdb-physname-pr12273-test.patch -gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch gdb-test-ivy-bridge.patch gdb-runtest-pie-override.patch gdb-attach-fail-reasons-5of5.patch @@ -119,3 +113,4 @@ gdb-testsuite-readline63-sigint.patch gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch +gdb-rhbz795424-bitpos-arrayview.patch diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index 37b09de..5dcd0b8 100644 --- a/gdb-6.3-gstack-20050411.patch +++ b/gdb-6.3-gstack-20050411.patch @@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch diff --git a/gdb/Makefile.in b/gdb/Makefile.in --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1735,7 +1735,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force +@@ -1739,7 +1739,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1784,7 +1784,25 @@ install-guile: +@@ -1788,7 +1788,25 @@ install-guile: install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -1811,6 +1829,18 @@ uninstall: force $(CONFIG_UNINSTALL) fi @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do diff --git a/gdb-6.3-ppc64displaysymbol-20041124.patch b/gdb-6.3-ppc64displaysymbol-20041124.patch deleted file mode 100644 index a09b0fe..0000000 --- a/gdb-6.3-ppc64displaysymbol-20041124.patch +++ /dev/null @@ -1,32 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Andrew Cagney -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-ppc64displaysymbol-20041124.patch - -;; Include the pc's section when doing a symbol lookup so that the -;; correct symbol is found. -;;=push: Write new testcase. - -2004-11-24 Andrew Cagney - - * printcmd.c (build_address_symbolic): Find a section for the - address. - -diff --git a/gdb/printcmd.c b/gdb/printcmd.c ---- a/gdb/printcmd.c -+++ b/gdb/printcmd.c -@@ -587,6 +587,14 @@ build_address_symbolic (struct gdbarch *gdbarch, - addr = overlay_mapped_address (addr, section); - } - } -+ /* To ensure that the symbol returned belongs to the correct setion -+ (and that the last [random] symbol from the previous section -+ isn't returned) try to find the section containing PC. First try -+ the overlay code (which by default returns NULL); and second try -+ the normal section code (which almost always succeeds). */ -+ section = find_pc_overlay (addr); -+ if (section == NULL) -+ section = find_pc_section (addr); - - /* First try to find the address in the symbol table, then - in the minsyms. Take the closest one. */ diff --git a/gdb-6.3-ppc64syscall-20040622.patch b/gdb-6.3-ppc64syscall-20040622.patch deleted file mode 100644 index e6319be..0000000 --- a/gdb-6.3-ppc64syscall-20040622.patch +++ /dev/null @@ -1,118 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Andrew Cagney -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-ppc64syscall-20040622.patch - -;; Better parse 64-bit PPC system call prologues. -;;=push: Write new testcase. - -2004-06-22 Andrew Cagney - - * rs6000-tdep.c (struct rs6000_framedata): Add field "func_start". - (skip_prologue): Delete local variable "orig_pc", use - "func_start". Add local variable "num_skip_linux_syscall_insn", - use to skip over first half of a GNU/Linux syscall and update - "func_start". - -diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c ---- a/gdb/rs6000-tdep.c -+++ b/gdb/rs6000-tdep.c -@@ -134,6 +134,7 @@ static const char *powerpc_vector_abi_string = "auto"; - - struct rs6000_framedata - { -+ CORE_ADDR func_start; /* True function start. */ - int offset; /* total size of frame --- the distance - by which we decrement sp to allocate - the frame */ -@@ -1426,7 +1427,6 @@ static CORE_ADDR - skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, - struct rs6000_framedata *fdata) - { -- CORE_ADDR orig_pc = pc; - CORE_ADDR last_prologue_pc = pc; - CORE_ADDR li_found_pc = 0; - gdb_byte buf[4]; -@@ -1445,12 +1445,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, - int minimal_toc_loaded = 0; - int prev_insn_was_prologue_insn = 1; - int num_skip_non_prologue_insns = 0; -+ int num_skip_ppc64_gnu_linux_syscall_insn = 0; - int r0_contains_arg = 0; - const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - - memset (fdata, 0, sizeof (struct rs6000_framedata)); -+ fdata->func_start = pc; - fdata->saved_gpr = -1; - fdata->saved_fpr = -1; - fdata->saved_vr = -1; -@@ -1484,6 +1486,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, - break; - op = extract_unsigned_integer (buf, 4, byte_order); - -+ /* A PPC64 GNU/Linux system call function is split into two -+ sub-functions: a non-threaded fast-path (__NAME_nocancel) -+ which does not use a frame; and a threaded slow-path -+ (Lpseudo_cancel) that does create a frame. Ref: -+ nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h -+ -+ *INDENT-OFF* -+ NAME: -+ SINGLE_THREAD_P -+ bne- .Lpseudo_cancel -+ __NAME_nocancel: -+ li r0,162 -+ sc -+ bnslr+ -+ b 0x7fe014ef64 <.__syscall_error> -+ Lpseudo_cancel: -+ stdu r1,-128(r1) -+ ... -+ *INDENT-ON* -+ -+ Unfortunatly, because the latter case uses a local label (not -+ in the symbol table) a PC in "Lpseudo_cancel" appears to be -+ in "__NAME_nocancel". The following code recognizes this, -+ adjusting FUNC_START to point to where "Lpseudo_cancel" -+ should be, and parsing the prologue sequence as if -+ "Lpseudo_cancel" was the entry point. */ -+ -+ if (((op & 0xffff0000) == 0x38000000 /* li r0,N */ -+ && pc == fdata->func_start + 0 -+ && num_skip_ppc64_gnu_linux_syscall_insn == 0) -+ || (op == 0x44000002 /* sc */ -+ && pc == fdata->func_start + 4 -+ && num_skip_ppc64_gnu_linux_syscall_insn == 1) -+ || (op == 0x4ca30020 /* bnslr+ */ -+ && pc == fdata->func_start + 8 -+ && num_skip_ppc64_gnu_linux_syscall_insn == 2)) -+ { -+ num_skip_ppc64_gnu_linux_syscall_insn++; -+ continue; -+ } -+ else if ((op & 0xfc000003) == 0x48000000 /* b __syscall_error */ -+ && pc == fdata->func_start + 12 -+ && num_skip_ppc64_gnu_linux_syscall_insn == 3) -+ { -+ num_skip_ppc64_gnu_linux_syscall_insn = -1; -+ fdata->func_start = pc; -+ continue; -+ } -+ - if ((op & 0xfc1fffff) == 0x7c0802a6) - { /* mflr Rx */ - /* Since shared library / PIC code, which needs to get its -@@ -1673,9 +1724,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, - we have no line table information or the line info tells - us that the subroutine call is not part of the line - associated with the prologue. */ -- if ((pc - orig_pc) > 8) -+ if ((pc - fdata->func_start) > 8) - { -- struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0); -+ struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0); - struct symtab_and_line this_sal = find_pc_line (pc, 0); - - if ((prologue_sal.line == 0) diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index b70b58f..8a51aef 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -32,4 +32,4 @@ diff --git a/gdb/gcore.in b/gdb/gcore.in + "$binary_path/@GDB_TRANSFORM_NAME@" -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.5-bz203661-emit-relocs.patch - -;; Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661). -;;=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 ---- a/gdb/symfile.c -+++ b/gdb/symfile.c -@@ -3584,6 +3584,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp, - DWO file. */ - bfd *abfd = sectp->owner; - -+ /* Executable files have all the relocations already resolved. -+ Handle files linked with --emit-relocs. -+ http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ -+ if ((abfd->flags & EXEC_P) != 0) -+ return NULL; -+ - /* We're only interested in sections with relocation - information. */ - if ((sectp->flags & SEC_RELOC) == 0) diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index e90bd77..81cb290 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -115,7 +115,7 @@ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c static void amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc) { -@@ -1807,6 +1881,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch) +@@ -1808,6 +1882,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch) tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET; @@ -127,7 +127,7 @@ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -2595,6 +2595,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2600,6 +2600,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -135,7 +135,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2603,6 +2604,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2608,6 +2609,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, if (cache->base == 0) return UNWIND_OUTERMOST; @@ -146,7 +146,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c return UNWIND_NO_REASON; } -@@ -2737,6 +2742,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2742,6 +2747,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_sigtramp_frame_cache (this_frame, this_cache); @@ -154,7 +154,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c if (!cache->base_p) (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); -@@ -2745,6 +2751,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2750,6 +2756,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, /* This marks the outermost frame. */ return; } @@ -169,7 +169,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8404,6 +8404,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -8406,6 +8406,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->xsave_xcr0_offset = -1; diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch index 45d8570..1cc4eec 100644 --- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch @@ -11,7 +11,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 diff --git a/gdb/symtab.c b/gdb/symtab.c --- a/gdb/symtab.c +++ b/gdb/symtab.c -@@ -3165,6 +3165,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) +@@ -3167,6 +3167,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) SYMBOL_LINKAGE_NAME (msymbol)); */ ; /* fall through */ diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index 40938a5..f1bd504 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -85,7 +85,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c #include #include "readline/readline.h" -@@ -357,12 +358,27 @@ exec_file_attach (const char *filename, int from_tty) +@@ -356,12 +357,27 @@ exec_file_attach (const char *filename, int from_tty) if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -102,7 +102,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c exec_close (); - error (_("\"%s\": not in executable format: %s"), - scratch_pathname, -- gdb_bfd_errmsg (bfd_get_error (), matching)); +- gdb_bfd_errmsg (bfd_get_error (), matching).c_str ()); + + if (is_core != 0) + throw_error (IS_CORE_ERROR, @@ -112,14 +112,14 @@ diff --git a/gdb/exec.c b/gdb/exec.c + else + error (_("\"%s\": not in executable format: %s"), + scratch_pathname, -+ gdb_bfd_errmsg (bfd_get_error (), matching)); ++ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ()); } if (build_section_table (exec_bfd, §ions, §ions_end)) diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -447,6 +447,37 @@ struct cmdarg +@@ -447,6 +447,35 @@ struct cmdarg char *string; }; @@ -130,8 +130,6 @@ diff --git a/gdb/main.c b/gdb/main.c +static void +exec_or_core_file_attach (const char *filename, int from_tty) +{ -+ volatile struct gdb_exception e; -+ + gdb_assert (exec_bfd == NULL); + + TRY @@ -157,7 +155,7 @@ diff --git a/gdb/main.c b/gdb/main.c static void captured_main_1 (struct captured_main_args *context) { -@@ -883,6 +914,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -888,6 +917,8 @@ captured_main_1 (struct captured_main_args *context) { symarg = argv[optind]; execarg = argv[optind]; @@ -166,7 +164,7 @@ diff --git a/gdb/main.c b/gdb/main.c optind++; } -@@ -1033,11 +1066,25 @@ captured_main_1 (struct captured_main_args *context) +@@ -1038,12 +1069,25 @@ captured_main_1 (struct captured_main_args *context) && symarg != NULL && strcmp (execarg, symarg) == 0) { @@ -185,13 +183,14 @@ diff --git a/gdb/main.c b/gdb/main.c /* The exec file and the symbol-file are the same. If we can't open it, better only print one error message. - catch_command_errors returns non-zero on success! */ -- if (catch_command_errors (exec_file_attach, execarg, -- !batch_flag)) +- ret = catch_command_errors (exec_file_attach, execarg, +- !batch_flag); +- if (ret != 0) + catch_command_errors returns non-zero on success! + Do not load EXECARG as a symbol file if it has been already processed + as a core file. */ -+ if (catch_command_errors (func, execarg, !batch_flag) -+ && core_bfd == NULL) - catch_command_errors (symbol_file_add_main_adapter, symarg, - !batch_flag); ++ ret = catch_command_errors (func, execarg, !batch_flag); ++ if (ret != 0 && core_bfd == NULL) + ret = catch_command_errors (symbol_file_add_main_adapter, + symarg, !batch_flag); } diff --git a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch index a25057e..162f3d7 100644 --- a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +++ b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch @@ -28,7 +28,7 @@ Comments by Sergio Durigan Junior : diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -581,7 +581,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, +@@ -578,7 +578,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, do_cleanups (inner); if (abfd == NULL) diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index 375b178..e4935f5 100644 --- a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +++ b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -652,6 +652,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -649,6 +649,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) #include #endif diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 7e39488..3a1ad85 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -689,7 +689,11 @@ static int missing_rpm_list_entries; +@@ -686,7 +686,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { static int rpm_init_done = 0; rpmts ts; -@@ -796,7 +800,11 @@ missing_rpm_enlist (const char *filename) +@@ -793,7 +797,11 @@ missing_rpm_enlist (const char *filename) mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { Header h; char *debuginfo, **slot, *s, *s2; -@@ -914,6 +922,37 @@ missing_rpm_enlist (const char *filename) +@@ -911,6 +919,37 @@ missing_rpm_enlist (const char *filename) xfree (debuginfo); count++; } @@ -74,7 +74,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c rpmdbFreeIterator_p (mi); } -@@ -924,6 +963,21 @@ missing_rpm_enlist (const char *filename) +@@ -921,6 +960,21 @@ missing_rpm_enlist (const char *filename) } static int @@ -99,7 +99,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -3469,6 +3469,16 @@ read_gdb_index_from_section (struct objfile *objfile, +@@ -3469,6 +3469,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index d5ec4b0..d21a0fe 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -244,7 +244,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -640,8 +642,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -637,8 +639,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) return result; } @@ -612,7 +612,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -695,11 +1055,17 @@ missing_filepair_change (void) +@@ -692,11 +1052,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -630,7 +630,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c missing_filepair_change (); } -@@ -766,14 +1132,39 @@ debug_print_missing (const char *binary, const char *debug) +@@ -763,14 +1129,39 @@ debug_print_missing (const char *binary, const char *debug) *slot = missing_filepair; @@ -690,7 +690,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -270,6 +273,9 @@ +@@ -261,6 +264,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -722,7 +722,7 @@ diff --git a/gdb/configure b/gdb/configure +with_rpm enable_targets enable_64_bit_bfd - enable_gdbcli + enable_gdbmi @@ -912,6 +918,11 @@ CCC CPP MAKEINFO @@ -758,7 +758,7 @@ diff --git a/gdb/configure b/gdb/configure YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. -@@ -6575,6 +6595,494 @@ _ACEOF +@@ -6621,6 +6641,494 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -1503,7 +1503,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c diff --git a/gdb/symfile.h b/gdb/symfile.h --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -540,6 +540,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, +@@ -534,6 +534,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, /* build-id support. */ extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); extern void debug_print_missing (const char *binary, const char *debug); diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index 2b96166..e86920b 100644 --- a/gdb-6.6-buildid-locate-solib-missing-ids.patch +++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c -@@ -1358,14 +1358,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1347,14 +1347,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, } { @@ -44,7 +44,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c if (build_id != NULL) { char *name, *build_id_filename; -@@ -1380,23 +1393,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1369,23 +1382,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, xfree (name); } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 618f41a..45621df 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -55,13 +55,13 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + && namesz == sizeof "GNU" + && memcmp (xnp->name, "GNU", sizeof "GNU") == 0) + { -+ size_t size = descsz; ++ size_t sz = descsz; + gdb_byte *data = (gdb_byte *) descdata; + struct bfd_build_id *retval; + -+ retval = (struct bfd_build_id *) xmalloc (sizeof *retval - 1 + size); -+ retval->size = size; -+ memcpy (retval->data, data, size); ++ retval = (struct bfd_build_id *) xmalloc (sizeof *retval - 1 + sz); ++ retval->size = sz; ++ memcpy (retval->data, data, sz); + + return retval; + } @@ -436,7 +436,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), -@@ -65,11 +463,50 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) +@@ -65,11 +463,47 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) return retval; } @@ -481,14 +481,11 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, + char **link_return, int add_debug_suffix) { -+ char *debugdir; + std::string link, link_all; -+ struct cleanup *back_to; -+ int ix; gdb_bfd_ref_ptr abfd; /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will -@@ -82,63 +519,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) +@@ -82,63 +516,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) { const gdb_byte *data = build_id; size_t size = build_id_len; @@ -807,7 +804,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd.get ()), -@@ -151,3 +821,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) +@@ -151,3 +818,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) return std::string (); } @@ -832,9 +829,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/build-id.h b/gdb/build-id.h --- a/gdb/build-id.h +++ b/gdb/build-id.h -@@ -22,9 +22,10 @@ - +@@ -23,9 +23,10 @@ #include "gdb_bfd.h" + #include "common/rsp-low.h" -/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ +/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. @@ -845,7 +842,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. Otherwise, issue a warning and return false. */ -@@ -38,13 +39,18 @@ extern int build_id_verify (bfd *abfd, +@@ -39,14 +40,19 @@ extern int build_id_verify (bfd *abfd, the caller. */ extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len, @@ -866,11 +863,12 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h +extern std::string find_separate_debug_file_by_buildid (struct objfile *objfile, + gdb::unique_xmalloc_ptr *build_id_filename_return); - #endif /* BUILD_ID_H */ + /* Return an hex-string representation of BUILD_ID. */ + diff --git a/gdb/coffread.c b/gdb/coffread.c --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -733,7 +733,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -734,7 +734,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)) { @@ -905,7 +903,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c +{ + CORE_ADDR at_entry; + struct bfd_build_id *build_id; -+ char *execfilename, *debug_filename; ++ char *execfilename; + char *build_id_filename; + struct cleanup *back_to; + @@ -949,7 +947,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c /* Issue a message saying we have no core to debug, if FROM_TTY. */ static void -@@ -464,6 +516,14 @@ core_target_open (const char *arg, int from_tty) +@@ -463,6 +515,14 @@ core_target_open (const char *arg, int from_tty) switch_to_thread (thread); } @@ -964,7 +962,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c post_create_inferior (target, from_tty); /* Now go through the target stack looking for threads since there -@@ -1066,4 +1126,11 @@ void +@@ -1071,4 +1131,11 @@ void _initialize_corelow (void) { add_target (core_target_info, core_target_open, filename_completer); @@ -979,7 +977,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -19570,6 +19570,27 @@ information files. +@@ -19937,6 +19937,27 @@ information files. @end table @@ -1007,10 +1005,22 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named +diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c +--- a/gdb/dwarf-index-cache.c ++++ b/gdb/dwarf-index-cache.c +@@ -93,7 +93,7 @@ index_cache::store (struct dwarf2_per_objfile *dwarf2_per_objfile) + if (!enabled ()) + return; + +- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd); + if (build_id == nullptr) + { + if (debug_index_cache) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2683,7 +2683,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) +@@ -2695,7 +2695,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) } if (dwz_bfd == NULL) @@ -1019,10 +1029,28 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), +@@ -6199,7 +6199,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) + static gdb::array_view + get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) + { +- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd); + if (build_id == nullptr) + return {}; + +@@ -6212,7 +6212,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) + static gdb::array_view + get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) + { +- const bfd_build_id *build_id = build_id_bfd_get (dwz->dwz_bfd.get ()); ++ const bfd_build_id *build_id = build_id_bfd_shdr_get (dwz->dwz_bfd.get ()); + if (build_id == nullptr) + return {}; + diff --git a/gdb/elfread.c b/gdb/elfread.c --- a/gdb/elfread.c +++ b/gdb/elfread.c -@@ -1290,7 +1290,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1289,7 +1289,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -1033,8 +1061,8 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c if (debugfile.empty ()) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1302,6 +1304,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) - symbol_file_add_separate (abfd.get (), debugfile.c_str (), +@@ -1301,6 +1303,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) + symbol_file_add_separate (debug_bfd.get (), debugfile.c_str (), symfile_flags, objfile); } + /* Check if any separate debug info has been extracted out. */ @@ -1061,7 +1089,7 @@ diff --git a/gdb/objfiles.h b/gdb/objfiles.h diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c --- a/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c -@@ -137,7 +137,7 @@ objfpy_get_build_id (PyObject *self, void *closure) +@@ -133,7 +133,7 @@ objfpy_get_build_id (PyObject *self, void *closure) TRY { @@ -1070,7 +1098,7 @@ diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c } CATCH (except, RETURN_MASK_ALL) { -@@ -544,7 +544,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) +@@ -550,7 +550,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) /* Don't return separate debug files. */ if (objfile->separate_debug_objfile_backlink != NULL) continue; @@ -1090,7 +1118,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1356,9 +1357,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1345,9 +1346,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, continue; } @@ -1148,7 +1176,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c diff --git a/gdb/symfile.h b/gdb/symfile.h --- a/gdb/symfile.h +++ b/gdb/symfile.h -@@ -537,6 +537,10 @@ void expand_symtabs_matching +@@ -531,6 +531,10 @@ void expand_symtabs_matching void map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname); @@ -1210,7 +1238,7 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp -@@ -1695,6 +1695,16 @@ proc default_gdb_start { } { +@@ -1706,6 +1706,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index ebc4aa6..350c81f 100644 --- a/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/gdb-6.6-scheduler_locking-step-is-default.patch @@ -9,7 +9,7 @@ Subject: gdb-6.6-scheduler_locking-step-is-default.patch diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -2193,7 +2193,7 @@ static const char *const scheduler_enums[] = { +@@ -2195,7 +2195,7 @@ static const char *const scheduler_enums[] = { schedlock_replay, NULL }; diff --git a/gdb-6.8-bz436037-reg-no-longer-active.patch b/gdb-6.8-bz436037-reg-no-longer-active.patch index ea240af..2e89141 100644 --- a/gdb-6.8-bz436037-reg-no-longer-active.patch +++ b/gdb-6.8-bz436037-reg-no-longer-active.patch @@ -9,7 +9,7 @@ Subject: gdb-6.8-bz436037-reg-no-longer-active.patch diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -1104,6 +1104,8 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1097,6 +1097,8 @@ value_assign (struct value *toval, struct value *fromval) struct gdbarch *gdbarch; int value_reg; @@ -18,7 +18,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c /* Figure out which frame this is in currently. We use VALUE_FRAME_ID for obtaining the value's frame id instead of -@@ -1113,8 +1115,14 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1106,8 +1108,14 @@ value_assign (struct value *toval, struct value *fromval) frame. */ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index f3765de..29f1b66 100644 --- a/gdb-6.8-quit-never-aborts.patch +++ b/gdb-6.8-quit-never-aborts.patch @@ -45,7 +45,7 @@ diff --git a/gdb/extension.c b/gdb/extension.c diff --git a/gdb/top.c b/gdb/top.c --- a/gdb/top.c +++ b/gdb/top.c -@@ -1611,7 +1611,13 @@ quit_force (int *exit_arg, int from_tty) +@@ -1606,7 +1606,13 @@ quit_force (int *exit_arg, int from_tty) qt.from_tty = from_tty; @@ -62,7 +62,7 @@ diff --git a/gdb/top.c b/gdb/top.c diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -108,6 +108,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; +@@ -98,6 +98,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; static int debug_timestamp = 0; diff --git a/gdb-6.8-sparc64-silence-memcpy-check.patch b/gdb-6.8-sparc64-silence-memcpy-check.patch deleted file mode 100644 index 6c0848d..0000000 --- a/gdb-6.8-sparc64-silence-memcpy-check.patch +++ /dev/null @@ -1,19 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.8-sparc64-silence-memcpy-check.patch - -;; Silence memcpy check which returns false positive (sparc64) -;;=push: But it is just a GCC workaround, look up the existing GCC PR for it. - -diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c ---- a/gdb/sparc-tdep.c -+++ b/gdb/sparc-tdep.c -@@ -1462,6 +1462,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache, - if (sparc_floating_p (type) || sparc_complex_floating_p (type)) - { - /* Floating return values. */ -+ len = (len <= 8) ? len : 8; - memcpy (buf, valbuf, len); - regcache->cooked_write (SPARC_F0_REGNUM, buf); - if (len > 4) diff --git a/gdb-6.8-watchpoint-conditionals-test.patch b/gdb-6.8-watchpoint-conditionals-test.patch deleted file mode 100644 index 5096a67..0000000 --- a/gdb-6.8-watchpoint-conditionals-test.patch +++ /dev/null @@ -1,90 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.8-watchpoint-conditionals-test.patch - -;; Test the watchpoints conditionals works. -;;=fedoratest - -For: -http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html -http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html - -diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.c b/gdb/testsuite/gdb.base/watchpoint-cond.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/watchpoint-cond.c -@@ -0,0 +1,31 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2008 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@prep.ai.mit.edu */ -+ -+int -+main (int argc, char **argv) -+{ -+ static int i = 0; /* `static' to start initialized. */ -+ int j = 2; -+ -+ for (j = 0; j < 30; j++) -+ i = 30 - j; -+ -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.exp b/gdb/testsuite/gdb.base/watchpoint-cond.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/watchpoint-cond.exp -@@ -0,0 +1,37 @@ -+# Copyright 2008 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+set testfile watchpoint-cond -+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} -+ -+if { [runto_main] < 0 } { -+ untested watchpoint-cond -+ return -1 -+} -+ -+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i" -+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*" diff --git a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch b/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch deleted file mode 100644 index fc75329..0000000 --- a/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch +++ /dev/null @@ -1,68 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch - -;; Toolchain on sparc is slightly broken and debuginfo files are generated -;; with non 64bit aligned tables/offsets. -;; See for example readelf -S ../Xvnc.debug. -;; -;; As a consenquence calculation of sectp->filepos as used in -;; dwarf2_read_section (gdb/dwarf2read.c:1525) will return a non aligned buffer -;; that cannot be used directly as done with MMAP. -;; Usage will result in a BusError. -;; -;; While we figure out what's wrong in the toolchain and do a full archive -;; rebuild to fix it, we need to be able to use gdb :) -;;=push - -diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c ---- a/gdb/gdb_bfd.c -+++ b/gdb/gdb_bfd.c -@@ -24,12 +24,14 @@ - #include "hashtab.h" - #include "filestuff.h" - #include "vec.h" -+#ifndef __sparc__ - #ifdef HAVE_MMAP - #include - #ifndef MAP_FAILED - #define MAP_FAILED ((void *) -1) - #endif - #endif -+#endif - #include "target.h" - #include "gdb/fileio.h" - #include "inferior.h" -@@ -484,6 +486,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore) - - if (sect != NULL && sect->data != NULL) - { -+#ifndef __sparc__ - #ifdef HAVE_MMAP - if (sect->map_addr != NULL) - { -@@ -493,6 +496,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore) - gdb_assert (res == 0); - } - else -+#endif - #endif - xfree (sect->data); - } -@@ -659,6 +663,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size) - if (descriptor->data != NULL) - goto done; - -+#ifndef __sparc__ - #ifdef HAVE_MMAP - if (!bfd_is_section_compressed (abfd, sectp)) - { -@@ -693,6 +698,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size) - } - } - #endif /* HAVE_MMAP */ -+#endif - - /* Handle compressed sections, or ordinary uncompressed sections in - the no-mmap case. */ diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index 4dc78f6..1e0bb94 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -8,9 +8,9 @@ Subject: gdb-archer-pie-addons-keep-disabled.patch diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15519,6 +15519,50 @@ initialize_breakpoint_ops (void) +@@ -15506,6 +15506,50 @@ static struct cmd_list_element *enablebreaklist = NULL; - static struct cmd_list_element *enablebreaklist = NULL; + cmd_list_element *commands_cmd_element = nullptr; +void +breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta) @@ -62,7 +62,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h -@@ -1684,6 +1684,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg); +@@ -1676,6 +1676,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg); UIOUT iff debugging multiple threads. */ extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout); @@ -75,7 +75,7 @@ diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h diff --git a/gdb/objfiles.c b/gdb/objfiles.c --- a/gdb/objfiles.c +++ b/gdb/objfiles.c -@@ -875,6 +875,11 @@ objfile_relocate1 (struct objfile *objfile, +@@ -878,6 +878,11 @@ objfile_relocate1 (struct objfile *objfile, obj_section_addr (s)); } diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index 9aef617..88da22a 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons.patch diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -505,6 +505,7 @@ enum field_loc_kind +@@ -506,6 +506,7 @@ enum field_loc_kind { FIELD_LOC_KIND_BITPOS, /**< bitpos */ FIELD_LOC_KIND_ENUMVAL, /**< enumval */ @@ -16,7 +16,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h FIELD_LOC_KIND_PHYSADDR, /**< physaddr */ FIELD_LOC_KIND_PHYSNAME, /**< physname */ FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */ -@@ -556,6 +557,7 @@ union field_location +@@ -557,6 +558,7 @@ union field_location field. Otherwise, physname is the mangled label of the static field. */ @@ -24,7 +24,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h CORE_ADDR physaddr; const char *physname; -@@ -1438,6 +1440,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1439,6 +1441,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval) #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) @@ -32,7 +32,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #define SET_FIELD_BITPOS(thisfld, bitpos) \ -@@ -1449,6 +1452,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1450,6 +1453,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define SET_FIELD_PHYSNAME(thisfld, name) \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \ FIELD_STATIC_PHYSNAME (thisfld) = (name)) @@ -40,7 +40,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define SET_FIELD_PHYSADDR(thisfld, addr) \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ FIELD_STATIC_PHYSADDR (thisfld) = (addr)) -@@ -1465,6 +1469,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1466,6 +1470,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n)) @@ -51,7 +51,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/value.c b/gdb/value.c --- a/gdb/value.c +++ b/gdb/value.c -@@ -2829,7 +2829,8 @@ value_static_field (struct type *type, int fieldno) +@@ -2828,7 +2828,8 @@ value_static_field (struct type *type, int fieldno) { case FIELD_LOC_KIND_PHYSADDR: retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), diff --git a/gdb-archer.patch b/gdb-archer.patch index dcb989c..e904476 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -17,7 +17,7 @@ tromey/python diff --git a/gdb/Makefile.in b/gdb/Makefile.in --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -2112,6 +2112,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -2099,6 +2099,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -53,7 +53,7 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -1245,6 +1245,16 @@ for remote debugging. +@@ -1251,6 +1251,16 @@ for remote debugging. Run using @var{device} for your program's standard input and output. @c FIXME: kingdon thinks there is more to -tty. Investigate. @@ -73,7 +73,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi -@@ -88,8 +88,6 @@ containing @code{end}. For example: +@@ -90,8 +90,6 @@ containing @code{end}. For example: @smallexample (@value{GDBP}) python @@ -112,7 +112,7 @@ diff --git a/gdb/main.c b/gdb/main.c #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -479,7 +480,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) +@@ -477,7 +478,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) } static void @@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int argc = context->argc; char **argv = context->argv; -@@ -695,10 +696,14 @@ captured_main_1 (struct captured_main_args *context) +@@ -698,10 +699,14 @@ captured_main_1 (struct captured_main_args *context) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int option_index; -@@ -716,6 +721,9 @@ captured_main_1 (struct captured_main_args *context) +@@ -719,6 +724,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c case OPT_SE: symarg = optarg; execarg = optarg; -@@ -890,7 +898,31 @@ captured_main_1 (struct captured_main_args *context) +@@ -893,7 +901,31 @@ captured_main_1 (struct captured_main_args *context) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1180,7 +1212,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -1194,7 +1226,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c if (batch_flag) { -@@ -1193,24 +1226,37 @@ static void +@@ -1210,24 +1243,37 @@ static void captured_main (void *data) { struct captured_main_args *context = (struct captured_main_args *) data; @@ -241,7 +241,7 @@ diff --git a/gdb/main.c b/gdb/main.c } /* No exit -- exit is through quit_command. */ } -@@ -1253,6 +1299,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1270,6 +1316,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ @@ -254,7 +254,7 @@ diff --git a/gdb/main.c b/gdb/main.c gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1298,6 +1350,13 @@ Output and user interface control:\n\n\ +@@ -1315,6 +1367,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -365,7 +365,7 @@ new file mode 100644 diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h -@@ -644,6 +644,9 @@ class gdbpy_enter_varobj : public gdbpy_enter +@@ -629,6 +629,9 @@ class gdbpy_enter_varobj : public gdbpy_enter }; @@ -378,7 +378,7 @@ diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h diff --git a/gdb/python/python.c b/gdb/python/python.c --- a/gdb/python/python.c +++ b/gdb/python/python.c -@@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python = +@@ -94,6 +94,8 @@ const struct extension_language_defn extension_language_python = #include "linespec.h" #include "source.h" #include "version.h" @@ -387,7 +387,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -237,6 +239,29 @@ gdbpy_enter::~gdbpy_enter () +@@ -236,6 +238,29 @@ gdbpy_enter::~gdbpy_enter () restore_active_ext_lang (m_previous_active); } @@ -417,10 +417,10 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c /* Set the quit flag. */ static void -@@ -1367,6 +1392,92 @@ gdbpy_print_stack (void) +@@ -1311,6 +1336,92 @@ gdbpy_print_stack (void) + + - /* Return the current Progspace. - There always is one. */ +/* True if 'gdb -P' was used, false otherwise. */ +static int running_python_script; + @@ -507,10 +507,10 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c + + + + /* Return a sequence holding all the Progspaces. */ static PyObject * - gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -2057,6 +2168,8 @@ PyMethodDef python_GdbMethods[] = +@@ -1965,6 +2076,8 @@ PyMethodDef python_GdbMethods[] = Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ a Python String containing the output of the command if to_string is\n\ set to True." }, @@ -522,10 +522,14 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c diff --git a/gdb/python/python.h b/gdb/python/python.h --- a/gdb/python/python.h +++ b/gdb/python/python.h -@@ -25,4 +25,6 @@ +@@ -25,7 +25,10 @@ /* This is all that python exports to gdb. */ extern const struct extension_language_defn extension_language_python; ++ + /* Command element for the 'python' command. */ + extern cmd_list_element *python_cmd_element; + +extern void run_python_script (int argc, char **argv); + #endif /* GDB_PYTHON_H */ @@ -544,7 +548,7 @@ diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp -@@ -384,6 +384,15 @@ proc test_value_after_death {} { +@@ -399,6 +399,15 @@ proc test_value_after_death {} { "print value's type" } @@ -560,7 +564,7 @@ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py # Regression test for invalid subscript operations. The bug was that # the type of the value was not being checked before allowing a # subscript operation to proceed. -@@ -512,6 +521,7 @@ if ![runto_main] then { +@@ -540,6 +549,7 @@ if ![runto_main] then { test_value_in_inferior test_inferior_function_call test_value_after_death diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 6842d18..27e984e 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -45,7 +45,7 @@ gdb/gdbserver/ diff --git a/gdb/config.in b/gdb/config.in --- a/gdb/config.in +++ b/gdb/config.in -@@ -276,6 +276,9 @@ +@@ -267,6 +267,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -55,7 +55,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -399,6 +402,9 @@ +@@ -390,6 +393,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -68,7 +68,7 @@ diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -15854,6 +15854,64 @@ cat >>confdefs.h <<_ACEOF +@@ -15844,6 +15844,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -136,7 +136,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -2054,6 +2054,10 @@ case $host_os in +@@ -2009,6 +2009,10 @@ case $host_os in esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -173,7 +173,7 @@ diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure -@@ -8535,6 +8535,64 @@ if $want_ipa ; then +@@ -8589,6 +8589,64 @@ if $want_ipa ; then fi fi @@ -241,7 +241,7 @@ diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac -@@ -486,6 +486,10 @@ if $want_ipa ; then +@@ -478,6 +478,10 @@ if $want_ipa ; then fi fi @@ -276,7 +276,7 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -1088,7 +1088,17 @@ linux_nat_target::create_inferior (const char *exec_file, +@@ -1092,7 +1092,17 @@ linux_nat_target::create_inferior (const char *exec_file, /* Make sure we report all signals during startup. */ pass_signals (0, NULL); diff --git a/gdb-btrobust.patch b/gdb-btrobust.patch index 40d406c..b1a65c6 100644 --- a/gdb-btrobust.patch +++ b/gdb-btrobust.patch @@ -14,7 +14,7 @@ printed, but a default backtrace will occur in this case. diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c -@@ -1151,6 +1151,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1154,6 +1154,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, htab_eq_pointer, NULL)); @@ -22,7 +22,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c while (true) { gdbpy_ref<> item (PyIter_Next (iterable.get ())); -@@ -1159,8 +1160,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1162,8 +1163,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, { if (PyErr_Occurred ()) { @@ -33,7 +33,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c } break; } -@@ -1193,7 +1194,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1196,7 +1197,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, /* Do not exit on error printing a single frame. Print the error and continue with other frames. */ if (success == EXT_LANG_BT_ERROR) diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 6ae10a2..8c42a3b 100644 --- a/gdb-bz1219747-attach-kills.patch +++ b/gdb-bz1219747-attach-kills.patch @@ -80,18 +80,18 @@ gdb/testsuite/ChangeLog diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -1115,7 +1115,10 @@ captured_main_1 (struct captured_main_args *context) - if (isdigit (pid_or_core_arg[0])) +@@ -1124,7 +1124,10 @@ captured_main_1 (struct captured_main_args *context) { - if (catch_command_errors (attach_command, pid_or_core_arg, -- !batch_flag) == 0) -+ !batch_flag) == 0 + ret = catch_command_errors (attach_command, pid_or_core_arg, + !batch_flag); +- if (ret == 0) ++ if (ret == 0 + /* attach_command could succeed partially and core_file_command + would try to kill it. */ + && !have_inferiors ()) - catch_command_errors (core_file_command, pid_or_core_arg, - !batch_flag); - } + ret = catch_command_errors (core_file_command, + pid_or_core_arg, + !batch_flag); diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c new file mode 100644 --- /dev/null diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index c42c458..042bca5 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -30,7 +30,7 @@ debugging problem of GOMP outside of the scope of this Bug. diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -6694,6 +6694,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6693,6 +6693,16 @@ process_event_stop_test (struct execution_control_state *ecs) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { @@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -6727,6 +6737,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6726,6 +6736,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index d5595fa..5cba714 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -10,7 +10,7 @@ Subject: gdb-bz541866-rwatch-before-run.patch diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -8804,7 +8804,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, +@@ -8785,7 +8785,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, int enabled, int internal, unsigned flags, int display_canonical) { @@ -19,7 +19,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c if (type == bp_hardware_breakpoint) { -@@ -14353,7 +14353,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, +@@ -14336,7 +14336,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, if (bpt->type == bp_hardware_breakpoint) { @@ -97,7 +97,7 @@ new file mode 100644 diff --git a/gdb/configure.nat b/gdb/configure.nat --- a/gdb/configure.nat +++ b/gdb/configure.nat -@@ -238,6 +238,7 @@ case ${gdb_host} in +@@ -242,6 +242,7 @@ case ${gdb_host} in ;; i386) # Host: Intel 386 running GNU/Linux. @@ -105,7 +105,7 @@ diff --git a/gdb/configure.nat b/gdb/configure.nat NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ i386-linux-nat.o x86-linux-nat.o linux-btrace.o \ x86-linux.o x86-linux-dregs.o" -@@ -290,6 +291,7 @@ case ${gdb_host} in +@@ -298,6 +299,7 @@ case ${gdb_host} in case ${gdb_host_cpu} in i386) # Host: GNU/Linux x86-64 @@ -116,7 +116,7 @@ diff --git a/gdb/configure.nat b/gdb/configure.nat diff --git a/gdb/target.h b/gdb/target.h --- a/gdb/target.h +++ b/gdb/target.h -@@ -1953,9 +1953,11 @@ extern struct thread_info *target_thread_handle_to_thread_info +@@ -1983,9 +1983,11 @@ extern struct thread_info *target_thread_handle_to_thread_info one. OTHERTYPE is the number of watchpoints of other types than this one used so far. */ diff --git a/gdb-bz568248-oom-is-error.patch b/gdb-bz568248-oom-is-error.patch index f3f61da..491e7f5 100644 --- a/gdb-bz568248-oom-is-error.patch +++ b/gdb-bz568248-oom-is-error.patch @@ -53,7 +53,7 @@ gdb/ diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -746,13 +746,11 @@ malloc_failure (long size) +@@ -719,13 +719,11 @@ malloc_failure (long size) { if (size > 0) { diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch index 35eb798..3c8529d 100644 --- a/gdb-container-rh-pkg.patch +++ b/gdb-container-rh-pkg.patch @@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch diff --git a/gdb/remote.c b/gdb/remote.c --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -13904,7 +13904,17 @@ remote_target::pid_to_exec_file (int pid) +@@ -13999,7 +13999,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/gdb-fedora-libncursesw.patch b/gdb-fedora-libncursesw.patch index 5037e29..f06836e 100644 --- a/gdb-fedora-libncursesw.patch +++ b/gdb-fedora-libncursesw.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534 diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -9393,6 +9393,7 @@ if test x"$prefer_curses" = xyes; then +@@ -9413,6 +9413,7 @@ if test x"$prefer_curses" = xyes; then # search /usr/local/include, if ncurses is installed in /usr/local. A # default installation of ncurses on alpha*-dec-osf* will lead to such # a situation. @@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 $as_echo_n "checking for library containing waddstr... " >&6; } if ${ac_cv_search_waddstr+:} false; then : -@@ -9417,7 +9418,7 @@ return waddstr (); +@@ -9437,7 +9438,7 @@ return waddstr (); return 0; } _ACEOF @@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure if test -z "$ac_lib"; then ac_res="none required" else -@@ -9491,6 +9492,7 @@ case $host_os in +@@ -9511,6 +9512,7 @@ case $host_os in esac # These are the libraries checked by Readline. @@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if ${ac_cv_search_tgetent+:} false; then : -@@ -9515,7 +9517,7 @@ return tgetent (); +@@ -9535,7 +9537,7 @@ return tgetent (); return 0; } _ACEOF @@ -49,7 +49,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -766,7 +766,8 @@ if test x"$prefer_curses" = xyes; then +@@ -743,7 +743,8 @@ if test x"$prefer_curses" = xyes; then # search /usr/local/include, if ncurses is installed in /usr/local. A # default installation of ncurses on alpha*-dec-osf* will lead to such # a situation. @@ -59,7 +59,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac if test "$ac_cv_search_waddstr" != no; then curses_found=yes -@@ -808,7 +809,8 @@ case $host_os in +@@ -785,7 +786,8 @@ case $host_os in esac # These are the libraries checked by Readline. diff --git a/gdb-follow-child-stale-parent.patch b/gdb-follow-child-stale-parent.patch index ab3a765..9b7b0f5 100644 --- a/gdb-follow-child-stale-parent.patch +++ b/gdb-follow-child-stale-parent.patch @@ -24,7 +24,7 @@ unwinders try to access it, breaking: diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -752,6 +752,9 @@ follow_fork (void) +@@ -754,6 +754,9 @@ follow_fork (void) } else { diff --git a/gdb-glibc-strstr-workaround.patch b/gdb-glibc-strstr-workaround.patch index 952be44..4d8dc42 100644 --- a/gdb-glibc-strstr-workaround.patch +++ b/gdb-glibc-strstr-workaround.patch @@ -9,7 +9,7 @@ Subject: gdb-glibc-strstr-workaround.patch diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -21255,6 +21255,26 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, +@@ -21490,6 +21490,26 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, /* Cache this symbol's name and the name's demangled form (if any). */ SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack); linkagename = dwarf2_physname (name, die, cu); diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch index 5b270bf..7cdd914 100644 --- a/gdb-gnat-dwarf-crash-3of3.patch +++ b/gdb-gnat-dwarf-crash-3of3.patch @@ -42,7 +42,7 @@ gdb/ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -10483,6 +10483,13 @@ private: +@@ -10581,6 +10581,13 @@ private: static void process_die (struct die_info *die, struct dwarf2_cu *cu) { @@ -59,7 +59,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -607,6 +607,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ +@@ -609,6 +609,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ target_pid_to_str (process_ptid)); } @@ -86,32 +86,32 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c + +#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) + static unsigned int debug_linux_nat; + static void + show_debug_linux_nat (struct ui_file *file, int from_tty, +@@ -1030,6 +1036,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); ++ pid_was_stopped = ptid.pid (); +#endif /* The process is definitely stopped. It is in a job control stop, unless the kernel predates the TASK_STOPPED / -@@ -1358,6 +1367,25 @@ get_detach_signal (struct lwp_info *lp) +@@ -1362,6 +1371,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) ++ if (lp->ptid.pid () == pid_was_stopped) + { + int err; + + errno = 0; -+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP); ++ err = kill_lwp (lp->ptid.lwp (), SIGSTOP); + if (debug_linux_nat) + { + fprintf_unfiltered (gdb_stdlog, @@ -125,7 +125,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c return 0; } -@@ -1506,6 +1534,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) +@@ -1510,6 +1538,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) detach_one_lwp (main_lwp, &signo); detach_success (inf); @@ -136,7 +136,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c } } -@@ -1764,6 +1796,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) +@@ -1768,6 +1800,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) return; } @@ -146,14 +146,14 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c + 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)) ++ if (!step && lp && pid_was_stopped == lp->ptid.pid ()) + pid_was_stopped = 0; + +#endif if (resume_many) iterate_over_lwps (ptid, linux_nat_resume_callback, lp); -@@ -3760,6 +3802,10 @@ linux_nat_target::mourn_inferior () +@@ -3761,6 +3803,10 @@ linux_nat_target::mourn_inferior () /* Let the arch-specific native code know this process is gone. */ linux_target->low_forget_process (pid); diff --git a/gdb-jit-reader-multilib.patch b/gdb-jit-reader-multilib.patch index 2aa41c2..d2f12c3 100644 --- a/gdb-jit-reader-multilib.patch +++ b/gdb-jit-reader-multilib.patch @@ -9,7 +9,7 @@ Subject: gdb-jit-reader-multilib.patch diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -9680,10 +9680,12 @@ _ACEOF +@@ -9700,10 +9700,12 @@ _ACEOF @@ -28,7 +28,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -843,10 +843,12 @@ AC_CHECK_SIZEOF(unsigned long long) +@@ -820,10 +820,12 @@ AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned __int128) diff --git a/gdb-libexec-add-index.patch b/gdb-libexec-add-index.patch index af19eab..7856866 100644 --- a/gdb-libexec-add-index.patch +++ b/gdb-libexec-add-index.patch @@ -20,4 +20,4 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh + myname="${0##*/}" - if test $# != 1; then + dwarf5="" diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch index c7533f7..6f62bba 100644 --- a/gdb-linux_perf-bundle.patch +++ b/gdb-linux_perf-bundle.patch @@ -9,7 +9,7 @@ Subject: gdb-linux_perf-bundle.patch diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -12059,7 +12059,7 @@ else +@@ -12083,7 +12083,7 @@ else #include #ifndef PERF_ATTR_SIZE_VER5 @@ -21,7 +21,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -1477,7 +1477,7 @@ else +@@ -1458,7 +1458,7 @@ else AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include #ifndef PERF_ATTR_SIZE_VER5 diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch index 36f985c..3f26be4 100644 --- a/gdb-moribund-utrace-workaround.patch +++ b/gdb-moribund-utrace-workaround.patch @@ -14,7 +14,7 @@ Bug in FSF GDB exploited by the ptrace-on-utrace interaction. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -12013,6 +12013,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) +@@ -11994,6 +11994,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) traps we can no longer explain. */ old_loc->events_till_retirement = 3 * (thread_count () + 1); @@ -22,4 +22,4 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c + old_loc->events_till_retirement *= 10; old_loc->owner = NULL; - VEC_safe_push (bp_location_p, moribund_locations, old_loc); + moribund_locations.push_back (old_loc); diff --git a/gdb-pahole-python2.patch b/gdb-pahole-python2.patch deleted file mode 100644 index 473a32e..0000000 --- a/gdb-pahole-python2.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py -index e08eaf5..56c1737 100644 ---- a/gdb/python/lib/gdb/command/pahole.py -+++ b/gdb/python/lib/gdb/command/pahole.py -@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are.""" - fieldsize = 8 * ftype.sizeof - - # TARGET_CHAR_BIT -- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "") -+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))), - bitpos = bitpos + fieldsize - - if ftype.code == gdb.TYPE_CODE_STRUCT: - self.pahole (ftype, level + 1, field.name) - else: -- print (' ' * (2 + 2 * level), end = "") -+ print (' ' * (2 + 2 * level)), - print ('%s %s' % (str (ftype), field.name)) - - if level == 0: - self.maybe_print_hole(bitpos, 8 * type.sizeof) - -- print (' ' * (14 + 2 * level), end = "") -+ print (' ' * (14 + 2 * level)), - print ('} %s' % name) - - def invoke (self, arg, from_tty): -@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are.""" - type = type.strip_typedefs () - if type.code != gdb.TYPE_CODE_STRUCT: - raise (TypeError, '%s is not a struct type' % arg) -- print (' ' * 14, end = "") -+ print (' ' * 14), - self.pahole (type, 0, '') - - Pahole() diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch index 9ff2e45..b6e80bc 100644 --- a/gdb-python-gil.patch +++ b/gdb-python-gil.patch @@ -9,7 +9,7 @@ Subject: gdb-python-gil.patch diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi -@@ -232,6 +232,14 @@ returned as a string. The default is @code{False}, in which case the +@@ -234,6 +234,14 @@ returned as a string. The default is @code{False}, in which case the return value is @code{None}. If @var{to_string} is @code{True}, the @value{GDBN} virtual terminal will be temporarily set to unlimited width and height, and its pagination will be disabled; @pxref{Screen Size}. @@ -27,7 +27,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h -@@ -148,6 +148,8 @@ typedef int Py_ssize_t; +@@ -137,6 +137,8 @@ typedef int Py_ssize_t; #define PyGILState_Release(ARG) ((void)(ARG)) #define PyEval_InitThreads() #define PyThreadState_Swap(ARG) ((void)(ARG)) @@ -39,7 +39,7 @@ diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h diff --git a/gdb/python/python.c b/gdb/python/python.c --- a/gdb/python/python.c +++ b/gdb/python/python.c -@@ -556,12 +556,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) +@@ -555,12 +555,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) { const char *arg; PyObject *from_tty_obj = NULL, *to_string_obj = NULL; @@ -60,7 +60,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c return NULL; from_tty = 0; -@@ -582,6 +586,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) +@@ -581,6 +585,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) to_string = cmp; } @@ -76,7 +76,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c std::string to_string_res; TRY -@@ -602,6 +615,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) +@@ -601,6 +614,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) counted_command_line lines = read_command_lines_1 (reader, 1, nullptr); @@ -87,17 +87,19 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c + if (release_gil) + state = PyEval_SaveThread(); + - scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); + { + scoped_restore save_async = make_scoped_restore (¤t_ui->async, + 0); +@@ -620,12 +640,24 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) + execute_control_commands (lines.get (), from_tty); + } - scoped_restore save_uiout = make_scoped_restore (¤t_uiout); -@@ -617,10 +637,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - from_tty); - else - execute_control_commands (lines.get (), from_tty); -+ + /* Reacquire the GIL if it was released earlier. */ + if (release_gil) + PyEval_RestoreThread (state); ++ + /* Do any commands attached to breakpoint we stopped at. */ + bpstat_do_actions (); } CATCH (except, RETURN_MASK_ALL) { diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 85691f0..6d1a0af 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -557,7 +557,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *); static struct value *assign_aggregate (struct value *, struct value *, -@@ -697,7 +698,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type) +@@ -703,7 +704,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type) } static const gdb_byte * @@ -566,7 +566,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { if (valaddr == NULL) return NULL; -@@ -706,7 +707,7 @@ cond_offset_host (const gdb_byte *valaddr, long offset) +@@ -712,7 +713,7 @@ cond_offset_host (const gdb_byte *valaddr, long offset) } static CORE_ADDR @@ -575,7 +575,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { if (address == 0) return 0; -@@ -1743,7 +1744,7 @@ desc_bounds (struct value *arr) +@@ -1754,7 +1755,7 @@ desc_bounds (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the bounds data. */ @@ -584,7 +584,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c fat_pntr_bounds_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 1); -@@ -1809,7 +1810,7 @@ desc_data (struct value *arr) +@@ -1820,7 +1821,7 @@ desc_data (struct value *arr) /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the data. */ @@ -593,7 +593,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c fat_pntr_data_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 0); -@@ -1844,7 +1845,7 @@ desc_one_bound (struct value *bounds, int i, int which) +@@ -1855,7 +1856,7 @@ desc_one_bound (struct value *bounds, int i, int which) of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper bound, if WHICH is 1. The first bound is I=1. */ @@ -602,7 +602,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c desc_bound_bitpos (struct type *type, int i, int which) { return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2); -@@ -2034,7 +2035,7 @@ ada_type_of_array (struct value *arr, int bounds) +@@ -2045,7 +2046,7 @@ ada_type_of_array (struct value *arr, int bounds) zero, and does not need to be recomputed. */ if (lo < hi) { @@ -611,7 +611,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2194,7 +2195,7 @@ decode_packed_array_bitsize (struct type *type) +@@ -2205,7 +2206,7 @@ decode_packed_array_bitsize (struct type *type) the length is arbitrary. */ static struct type * @@ -620,7 +620,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { struct type *new_elt_type; struct type *new_type; -@@ -2248,7 +2249,7 @@ decode_constrained_packed_array_type (struct type *type) +@@ -2259,7 +2260,7 @@ decode_constrained_packed_array_type (struct type *type) char *name; const char *tail; struct type *shadow_type; @@ -629,7 +629,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); -@@ -2319,7 +2320,8 @@ decode_constrained_packed_array (struct value *arr) +@@ -2330,7 +2331,8 @@ decode_constrained_packed_array (struct value *arr) array with no wrapper. In order to interpret the value through the (left-justified) packed array type we just built, we must first left-justify it. */ @@ -639,7 +639,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c ULONGEST mod; mod = ada_modulus (value_type (arr)) - 1; -@@ -2547,7 +2549,7 @@ ada_unpack_from_contents (const gdb_byte *src, int bit_offset, int bit_size, +@@ -2558,7 +2560,7 @@ ada_unpack_from_contents (const gdb_byte *src, int bit_offset, int bit_size, struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, @@ -648,7 +648,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { struct value *v; -@@ -2617,7 +2619,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, +@@ -2628,7 +2630,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, if (obj != NULL) { @@ -657,7 +657,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2663,7 +2665,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, +@@ -2674,7 +2676,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -666,7 +666,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2753,7 +2755,7 @@ ada_value_assign (struct value *toval, struct value *fromval) +@@ -2764,7 +2766,7 @@ ada_value_assign (struct value *toval, struct value *fromval) { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -675,7 +675,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c gdb_byte *buffer = (gdb_byte *) alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2804,7 +2806,7 @@ value_assign_to_component (struct value *container, struct value *component, +@@ -2815,7 +2817,7 @@ value_assign_to_component (struct value *container, struct value *component, (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -684,7 +684,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4462,7 +4464,7 @@ ensure_lval (struct value *val) +@@ -4513,7 +4515,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -693,7 +693,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4546,7 +4548,7 @@ static CORE_ADDR +@@ -4597,7 +4599,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -702,7 +702,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c gdb_byte *buf = (gdb_byte *) alloca (len); CORE_ADDR addr; -@@ -6657,7 +6659,7 @@ value_tag_from_contents_and_address (struct type *type, +@@ -6705,7 +6707,7 @@ value_tag_from_contents_and_address (struct type *type, const gdb_byte *valaddr, CORE_ADDR address) { @@ -711,7 +711,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -7150,7 +7152,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) +@@ -7198,7 +7200,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) only in that it can handle packed values of arbitrary type. */ static struct value * @@ -720,7 +720,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -7162,7 +7164,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7210,7 +7212,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -729,7 +729,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7239,9 +7241,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7287,9 +7289,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, Returns 1 if found, 0 otherwise. */ static int @@ -741,7 +741,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int *index_p) { int i; -@@ -7260,8 +7262,8 @@ find_struct_field (const char *name, struct type *type, int offset, +@@ -7308,8 +7310,8 @@ find_struct_field (const char *name, struct type *type, int offset, for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -752,7 +752,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -7363,7 +7365,7 @@ num_visible_fields (struct type *type) +@@ -7411,7 +7413,7 @@ num_visible_fields (struct type *type) long explanation in find_struct_field's function documentation. */ static struct value * @@ -761,7 +761,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { int i; -@@ -7411,7 +7413,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7459,7 +7461,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -770,7 +770,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7443,8 +7445,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7491,8 +7493,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, return NULL; } @@ -781,7 +781,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -7453,7 +7455,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, +@@ -7501,7 +7503,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, * If found, return value, else return NULL. */ static struct value * @@ -790,7 +790,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7465,7 +7467,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, +@@ -7513,7 +7515,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, * *INDEX_P. */ static struct value * @@ -799,7 +799,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { int i; -@@ -7555,7 +7557,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) +@@ -7604,7 +7606,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) v = ada_search_struct_field (name, arg, 0, t); else { @@ -809,7 +809,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7899,8 +7902,8 @@ ada_coerce_ref (struct value *val0) +@@ -7953,8 +7956,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -820,7 +820,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -8290,10 +8293,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8344,10 +8347,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -833,7 +833,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -8370,7 +8372,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8424,7 +8426,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -842,7 +842,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8506,11 +8508,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8560,11 +8562,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -858,7 +858,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c } else { -@@ -8974,7 +8976,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, +@@ -9028,7 +9030,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -889,7 +889,7 @@ diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -261,7 +261,7 @@ extern int ada_is_constrained_packed_array_type (struct type *); +@@ -263,7 +263,7 @@ extern int ada_is_constrained_packed_array_type (struct type *); extern struct value *ada_value_primitive_packed_val (struct value *, const gdb_byte *, @@ -901,7 +901,7 @@ diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c -@@ -896,8 +896,8 @@ ada_print_type (struct type *type0, const char *varstring, +@@ -891,8 +891,8 @@ ada_print_type (struct type *type0, const char *varstring, const char *name = ada_type_name (type); if (!ada_is_range_type_name (name)) @@ -912,7 +912,7 @@ diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c else { fprintf_filtered (stream, "range "); -@@ -918,7 +918,8 @@ ada_print_type (struct type *type0, const char *varstring, +@@ -913,7 +913,8 @@ ada_print_type (struct type *type0, const char *varstring, } break; case TYPE_CODE_FLT: @@ -1072,7 +1072,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -727,7 +727,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -732,7 +732,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class theclass[2]; @@ -1081,7 +1081,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -844,10 +844,10 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -849,10 +849,10 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, gdb_assert (regnum != -1); if (readbuf) @@ -1140,7 +1140,7 @@ diff --git a/gdb/annotate.h b/gdb/annotate.h diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c -@@ -228,7 +228,7 @@ legacy_virtual_frame_pointer (struct gdbarch *gdbarch, +@@ -227,7 +227,7 @@ legacy_virtual_frame_pointer (struct gdbarch *gdbarch, const struct floatformat ** default_floatformat_for_type (struct gdbarch *gdbarch, @@ -1164,7 +1164,7 @@ diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c -@@ -1098,7 +1098,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, +@@ -1096,7 +1096,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ int @@ -1299,7 +1299,7 @@ diff --git a/gdb/ax.h b/gdb/ax.h diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -2053,9 +2053,9 @@ should_be_inserted (struct bp_location *bl) +@@ -2057,9 +2057,9 @@ should_be_inserted (struct bp_location *bl) { fprintf_unfiltered (gdb_stdlog, "infrun: stepping past non-steppable watchpoint. " @@ -1311,7 +1311,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c } return 0; } -@@ -6819,7 +6819,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, +@@ -6801,7 +6801,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, static int breakpoint_address_match_range (const address_space *aspace1, CORE_ADDR addr1, @@ -1320,7 +1320,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -10902,7 +10902,7 @@ can_use_hardware_watchpoint (const std::vector &vals) +@@ -10883,7 +10883,7 @@ can_use_hardware_watchpoint (const std::vector &vals) && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1445,7 +1445,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c -@@ -307,11 +307,11 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, +@@ -270,11 +270,11 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, default: fprintf_unfiltered (stream, @@ -1571,7 +1571,7 @@ diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -1817,7 +1817,7 @@ rw_pieced_value (struct value *v, struct value *from) +@@ -1855,7 +1855,7 @@ rw_pieced_value (struct value *v, struct value *from) for (; i < c->pieces.size () && offset < max_offset; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1580,7 +1580,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c this_size_bits = p->size - bits_to_skip; if (this_size_bits > max_offset - offset) -@@ -2064,7 +2064,7 @@ write_pieced_value (struct value *to, struct value *from) +@@ -2102,7 +2102,7 @@ write_pieced_value (struct value *to, struct value *from) static int check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, @@ -1589,7 +1589,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c { struct piece_closure *c = (struct piece_closure *) value_computed_closure (value); -@@ -2077,7 +2077,7 @@ check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, +@@ -2115,7 +2115,7 @@ check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, for (i = 0; i < c->pieces.size () && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1598,7 +1598,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2179,8 +2179,8 @@ indirect_pieced_value (struct value *value) +@@ -2219,8 +2219,8 @@ indirect_pieced_value (struct value *value) = (struct piece_closure *) value_computed_closure (value); struct type *type; struct frame_info *frame; @@ -1609,7 +1609,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c struct dwarf_expr_piece *piece = NULL; LONGEST byte_offset; enum bfd_endian byte_order; -@@ -2197,7 +2197,7 @@ indirect_pieced_value (struct value *value) +@@ -2237,7 +2237,7 @@ indirect_pieced_value (struct value *value) for (i = 0; i < c->pieces.size () && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1618,7 +1618,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2486,9 +2486,9 @@ if (frame != NULL) select_frame (frame); +@@ -2526,9 +2526,9 @@ if (frame != NULL) select_frame (frame); case DWARF_VALUE_STACK: { struct value *value = ctx.fetch (0); @@ -1634,7 +1634,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2021,11 +2021,11 @@ dwarf2_complex_location_expr_complaint (void) +@@ -2033,11 +2033,11 @@ dwarf2_complex_location_expr_complaint (void) } static void @@ -1650,7 +1650,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } static void -@@ -14934,8 +14934,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, +@@ -15104,8 +15104,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1683,7 +1683,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -800,11 +801,11 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch, +@@ -799,11 +800,11 @@ binop_promote (const struct language_defn *language, struct gdbarch *gdbarch, /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1698,7 +1698,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -1546,7 +1547,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1549,7 +1550,7 @@ evaluate_subexp_standard (struct type *expect_type, struct value **argvec; int code; int ix; @@ -1707,7 +1707,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c struct type **arg_types; pc = (*pos)++; -@@ -1729,7 +1730,7 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1734,7 +1735,7 @@ evaluate_subexp_standard (struct type *expect_type, struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1832,7 +1832,7 @@ diff --git a/gdb/findvar.c b/gdb/findvar.c diff --git a/gdb/frame.c b/gdb/frame.c --- a/gdb/frame.c +++ b/gdb/frame.c -@@ -1396,7 +1396,7 @@ deprecated_frame_register_read (struct frame_info *frame, int regnum, +@@ -1398,7 +1398,7 @@ deprecated_frame_register_read (struct frame_info *frame, int regnum, int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -1841,7 +1841,7 @@ diff --git a/gdb/frame.c b/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1425,7 +1425,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, +@@ -1427,7 +1427,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, } if (len > maxsize) error (_("Bad debug information detected: " @@ -1865,7 +1865,7 @@ diff --git a/gdb/frame.h b/gdb/frame.h diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c -@@ -1794,7 +1794,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, +@@ -1799,7 +1799,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, } const struct floatformat ** @@ -1877,7 +1877,7 @@ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h -@@ -193,8 +193,8 @@ extern void set_gdbarch_wchar_signed (struct gdbarch *gdbarch, int wchar_signed) +@@ -195,8 +195,8 @@ extern void set_gdbarch_wchar_signed (struct gdbarch *gdbarch, int wchar_signed) NAME, if non-NULL, is the type name, which may be used to distinguish different target formats of the same length. */ @@ -1903,7 +1903,7 @@ diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -2906,7 +2906,7 @@ floatformat_from_type (const struct type *type) +@@ -2915,7 +2915,7 @@ floatformat_from_type (const struct type *type) least as long as OBJFILE. */ struct type * @@ -1912,7 +1912,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c const char *name) { struct type *type; -@@ -3360,8 +3360,8 @@ is_public_ancestor (struct type *base, struct type *dclass) +@@ -3369,8 +3369,8 @@ is_public_ancestor (struct type *base, struct type *dclass) static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -1923,7 +1923,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -3372,7 +3372,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3381,7 +3381,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -1932,7 +1932,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -3413,7 +3413,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3422,7 +3422,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, int is_unique_ancestor (struct type *base, struct value *val) { @@ -1941,7 +1941,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4642,7 +4642,7 @@ recursive_dump_type (struct type *type, int spaces) +@@ -4651,7 +4651,7 @@ recursive_dump_type (struct type *type, int spaces) break; } puts_filtered ("\n"); @@ -1950,7 +1950,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -5085,7 +5085,7 @@ copy_type (const struct type *type) +@@ -5096,7 +5096,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -1962,7 +1962,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -862,7 +862,7 @@ struct type +@@ -863,7 +863,7 @@ struct type type_length_units function should be used in order to get the length expressed in target addressable memory units. */ @@ -1971,7 +1971,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h /* * Core type, shared by a group of qualified types. */ -@@ -1783,7 +1783,7 @@ extern unsigned int type_length_units (struct type *type); +@@ -1790,7 +1790,7 @@ extern unsigned int type_length_units (struct type *type); /* * Helper function to construct objfile-owned types. */ @@ -1980,7 +1980,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h const char *); extern struct type *init_integer_type (struct objfile *, int, int, const char *); -@@ -1800,7 +1800,7 @@ extern struct type *init_pointer_type (struct objfile *, int, const char *, +@@ -1807,7 +1807,7 @@ extern struct type *init_pointer_type (struct objfile *, int, const char *, struct type *); /* Helper functions to construct architecture-owned types. */ @@ -2122,7 +2122,7 @@ diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8153,7 +8153,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, +@@ -8155,7 +8155,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, const struct floatformat ** i386_floatformat_for_type (struct gdbarch *gdbarch, @@ -2134,7 +2134,7 @@ diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c diff --git a/gdb/language.c b/gdb/language.c --- a/gdb/language.c +++ b/gdb/language.c -@@ -766,7 +766,7 @@ unk_lang_printchar (int c, struct type *type, struct ui_file *stream) +@@ -765,7 +765,7 @@ unk_lang_printchar (int c, struct type *type, struct ui_file *stream) static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2143,7 +2143,7 @@ diff --git a/gdb/language.c b/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -785,7 +785,7 @@ unk_lang_print_type (struct type *type, const char *varstring, +@@ -784,7 +784,7 @@ unk_lang_print_type (struct type *type, const char *varstring, static void unk_lang_val_print (struct type *type, @@ -2360,7 +2360,7 @@ diff --git a/gdb/memrange.h b/gdb/memrange.h diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c -@@ -614,7 +614,7 @@ mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr) +@@ -610,7 +610,7 @@ mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr) the specified region can be covered by the watch registers. */ int @@ -2563,9 +2563,9 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options) -@@ -71,8 +71,8 @@ pascal_val_print (struct type *type, +@@ -70,8 +70,8 @@ pascal_val_print (struct type *type, + unsigned int i = 0; /* Number of characters printed */ unsigned len; - LONGEST low_bound, high_bound; struct type *elttype; - unsigned eltlen; - int length_pos, length_size, string_pos; @@ -2577,7 +2577,7 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c -@@ -1308,7 +1308,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot) +@@ -1716,7 +1716,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot) } int @@ -2589,7 +2589,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c -@@ -1706,7 +1706,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, +@@ -2265,7 +2265,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, const struct floatformat ** ppc_floatformat_for_type (struct gdbarch *gdbarch, @@ -2622,7 +2622,7 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -3358,7 +3358,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, +@@ -3368,7 +3368,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, } int @@ -2634,7 +2634,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c diff --git a/gdb/regcache.c b/gdb/regcache.c --- a/gdb/regcache.c +++ b/gdb/regcache.c -@@ -795,7 +795,7 @@ regcache::cooked_write (int regnum, const gdb_byte *buf) +@@ -792,7 +792,7 @@ regcache::cooked_write (int regnum, const gdb_byte *buf) /* See regcache.h. */ enum register_status @@ -2643,7 +2643,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c gdb_byte *out, bool is_raw) { int reg_size = register_size (arch (), regnum); -@@ -862,7 +862,7 @@ reg_buffer::raw_collect_part (int regnum, int offset, int len, +@@ -859,7 +859,7 @@ reg_buffer::raw_collect_part (int regnum, int offset, int len, /* See regcache.h. */ enum register_status @@ -2652,7 +2652,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c const gdb_byte *in, bool is_raw) { int reg_size = register_size (arch (), regnum); -@@ -933,7 +933,7 @@ reg_buffer::raw_supply_part (int regnum, int offset, int len, +@@ -930,7 +930,7 @@ reg_buffer::raw_supply_part (int regnum, int offset, int len, } enum register_status @@ -2661,7 +2661,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c gdb_byte *buf) { assert_regnum (regnum); -@@ -943,7 +943,7 @@ readable_regcache::raw_read_part (int regnum, int offset, int len, +@@ -940,7 +940,7 @@ readable_regcache::raw_read_part (int regnum, int offset, int len, /* See regcache.h. */ void @@ -2670,7 +2670,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c const gdb_byte *buf) { assert_regnum (regnum); -@@ -953,7 +953,7 @@ regcache::raw_write_part (int regnum, int offset, int len, +@@ -950,7 +950,7 @@ regcache::raw_write_part (int regnum, int offset, int len, /* See regcache.h. */ enum register_status @@ -2679,7 +2679,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c gdb_byte *buf) { gdb_assert (regnum >= 0 && regnum < m_descr->nr_cooked_registers); -@@ -963,7 +963,7 @@ readable_regcache::cooked_read_part (int regnum, int offset, int len, +@@ -960,7 +960,7 @@ readable_regcache::cooked_read_part (int regnum, int offset, int len, /* See regcache.h. */ void @@ -2691,7 +2691,7 @@ diff --git a/gdb/regcache.c b/gdb/regcache.c diff --git a/gdb/regcache.h b/gdb/regcache.h --- a/gdb/regcache.h +++ b/gdb/regcache.h -@@ -244,8 +244,8 @@ public: +@@ -273,8 +273,8 @@ public: enum register_status raw_read (int regnum, T *val); /* Partial transfer of raw registers. Return the status of the register. */ @@ -2702,7 +2702,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h /* Make certain that the register REGNUM is up-to-date. */ virtual void raw_update (int regnum) = 0; -@@ -257,8 +257,8 @@ public: +@@ -286,8 +286,8 @@ public: enum register_status cooked_read (int regnum, T *val); /* Partial transfer of a cooked register. */ @@ -2713,7 +2713,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h /* Read register REGNUM from the regcache and return a new value. This will call mark_value_bytes_unavailable as appropriate. */ -@@ -268,7 +268,7 @@ protected: +@@ -297,7 +297,7 @@ protected: /* Perform a partial register transfer using a read, modify, write operation. Will fail if register is currently invalid. */ @@ -2722,7 +2722,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h gdb_byte *out, bool is_raw); }; -@@ -326,11 +326,12 @@ public: +@@ -355,11 +355,12 @@ public: /* Partial transfer of raw registers. Perform read, modify, write style operations. */ @@ -2737,7 +2737,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h const gdb_byte *buf); void supply_regset (const struct regset *regset, -@@ -381,7 +382,7 @@ private: +@@ -410,7 +411,7 @@ private: /* Perform a partial register transfer using a read, modify, write operation. */ @@ -2758,7 +2758,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, struct expression *) override; -@@ -10408,7 +10408,7 @@ int remote_hw_watchpoint_length_limit = -1; +@@ -10445,7 +10445,7 @@ int remote_hw_watchpoint_length_limit = -1; int remote_hw_breakpoint_limit = -1; int @@ -2770,7 +2770,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c -@@ -288,7 +288,7 @@ rust_printchar (int c, struct type *type, struct ui_file *stream) +@@ -301,7 +301,7 @@ rust_printchar (int c, struct type *type, struct ui_file *stream) static void rust_printstr (struct ui_file *stream, struct type *type, @@ -2779,7 +2779,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -497,7 +497,7 @@ static const struct generic_val_print_decorations rust_decorations = +@@ -517,7 +517,7 @@ static const struct generic_val_print_decorations rust_decorations = /* la_val_print implementation for Rust. */ static void @@ -2791,7 +2791,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c --- a/gdb/s390-linux-nat.c +++ b/gdb/s390-linux-nat.c -@@ -952,7 +952,8 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, +@@ -951,7 +951,8 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, } int @@ -2825,7 +2825,7 @@ diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c diff --git a/gdb/stack.c b/gdb/stack.c --- a/gdb/stack.c +++ b/gdb/stack.c -@@ -190,7 +190,7 @@ print_stack_frame (struct frame_info *frame, int print_level, +@@ -194,7 +194,7 @@ print_stack_frame (struct frame_info *frame, int print_level, argument (not just the first nameless argument). */ static void @@ -2834,7 +2834,7 @@ diff --git a/gdb/stack.c b/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -540,7 +540,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -544,7 +544,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, /* Offset of next stack argument beyond the one we have seen that is at the highest offset, or -1 if we haven't come to a stack argument yet. */ @@ -2843,7 +2843,7 @@ diff --git a/gdb/stack.c b/gdb/stack.c /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; /* True if we should print arguments, false otherwise. */ -@@ -569,8 +569,8 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -573,8 +573,8 @@ print_frame_args (struct symbol *func, struct frame_info *frame, case LOC_ARG: case LOC_REF_ARG: { @@ -2854,7 +2854,7 @@ diff --git a/gdb/stack.c b/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -705,7 +705,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, +@@ -709,7 +709,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, enough about the stack to find them. */ if (num != -1) { @@ -2884,8 +2884,8 @@ diff --git a/gdb/symmisc.c b/gdb/symmisc.c diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c -@@ -39,7 +39,7 @@ struct dummy_target : public target_ops - bool have_continuable_watchpoint () override; +@@ -38,7 +38,7 @@ struct dummy_target : public target_ops + int have_steppable_watchpoint () override; bool stopped_data_address (CORE_ADDR *arg0) override; bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; - int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override; @@ -2893,8 +2893,8 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; int can_do_single_step () override; -@@ -207,7 +207,7 @@ struct debug_target : public target_ops - bool have_continuable_watchpoint () override; +@@ -205,7 +205,7 @@ struct debug_target : public target_ops + int have_steppable_watchpoint () override; bool stopped_data_address (CORE_ADDR *arg0) override; bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; - int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override; @@ -2902,7 +2902,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; int can_do_single_step () override; -@@ -1098,19 +1098,19 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int +@@ -1071,19 +1071,19 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int } int @@ -2925,7 +2925,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c { int result; fprintf_unfiltered (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath ()->shortname ()); -@@ -1118,7 +1118,7 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) +@@ -1091,7 +1091,7 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) fprintf_unfiltered (gdb_stdlog, "<- %s->region_ok_for_hw_watchpoint (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); fputs_unfiltered (", ", gdb_stdlog); @@ -2946,7 +2946,7 @@ diff --git a/gdb/target.c b/gdb/target.c static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3181,7 +3181,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) +@@ -3190,7 +3190,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2958,7 +2958,7 @@ diff --git a/gdb/target.c b/gdb/target.c diff --git a/gdb/target.h b/gdb/target.h --- a/gdb/target.h +++ b/gdb/target.h -@@ -562,7 +562,7 @@ struct target_ops +@@ -563,7 +563,7 @@ struct target_ops /* Documentation of this routine is provided with the corresponding target_* macro. */ @@ -2970,12 +2970,12 @@ diff --git a/gdb/target.h b/gdb/target.h diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c -@@ -829,10 +829,10 @@ collection_list::add_register (unsigned int regno) +@@ -893,10 +893,10 @@ collection_list::add_local_register (struct gdbarch *gdbarch, void collection_list::add_memrange (struct gdbarch *gdbarch, int type, bfd_signed_vma base, -- unsigned long len) -+ ULONGEST len) +- unsigned long len, CORE_ADDR scope) ++ ULONGEST len, CORE_ADDR scope) { if (info_verbose) - printf_filtered ("(%d,%s,%ld)\n", type, paddress (gdbarch, base), len); @@ -2983,7 +2983,7 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c /* type: memrange_absolute == memory, other n == basereg */ /* base: addr if memory, offset if reg relative. */ -@@ -852,7 +852,7 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -916,7 +916,7 @@ collection_list::collect_symbol (struct symbol *sym, CORE_ADDR scope, int trace_string) { @@ -2992,7 +2992,7 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -873,8 +873,8 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -937,8 +937,8 @@ collection_list::collect_symbol (struct symbol *sym, offset = SYMBOL_VALUE_ADDRESS (sym); if (info_verbose) { @@ -3003,7 +3003,7 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c paddress (gdbarch, offset)); } /* A struct may be a C++ class with static fields, go to general -@@ -906,9 +906,9 @@ collection_list::collect_symbol (struct symbol *sym, +@@ -970,9 +970,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3014,8 +3014,8 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c + SYMBOL_PRINT_NAME (sym), pulongest (len), paddress (gdbarch, offset), reg); } - add_memrange (gdbarch, reg, offset, len); -@@ -918,9 +918,9 @@ collection_list::collect_symbol (struct symbol *sym, + add_memrange (gdbarch, reg, offset, len, scope); +@@ -982,9 +982,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = 0; if (info_verbose) { @@ -3026,8 +3026,8 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c + SYMBOL_PRINT_NAME (sym), pulongest (len), paddress (gdbarch, offset), reg); } - add_memrange (gdbarch, reg, offset, len); -@@ -930,9 +930,9 @@ collection_list::collect_symbol (struct symbol *sym, + add_memrange (gdbarch, reg, offset, len, scope); +@@ -994,9 +994,9 @@ collection_list::collect_symbol (struct symbol *sym, offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3038,8 +3038,8 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c + SYMBOL_PRINT_NAME (sym), pulongest (len), paddress (gdbarch, offset), reg); } - add_memrange (gdbarch, reg, offset, len); -@@ -2475,7 +2475,8 @@ info_scope_command (const char *args_in, int from_tty) + add_memrange (gdbarch, reg, offset, len, scope); +@@ -2492,7 +2492,8 @@ info_scope_command (const char *args_in, int from_tty) const char *symname; const char *save_args = args_in; struct block_iterator iter; @@ -3049,7 +3049,7 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c struct gdbarch *gdbarch; int regno; const char *args = args_in; -@@ -2619,8 +2620,11 @@ info_scope_command (const char *args_in, int from_tty) +@@ -2636,8 +2637,11 @@ info_scope_command (const char *args_in, int from_tty) } } if (SYMBOL_TYPE (sym)) @@ -3066,12 +3066,12 @@ diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h --- a/gdb/tracepoint.h +++ b/gdb/tracepoint.h -@@ -265,7 +265,7 @@ public: - void add_register (unsigned int regno); +@@ -269,7 +269,7 @@ public: + CORE_ADDR scope); void add_memrange (struct gdbarch *gdbarch, int type, bfd_signed_vma base, -- unsigned long len); -+ ULONGEST len); +- unsigned long len, CORE_ADDR scope); ++ ULONGEST len, CORE_ADDR scope); void collect_symbol (struct symbol *sym, struct gdbarch *gdbarch, long frame_regno, long frame_offset, @@ -3111,7 +3111,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c { struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); -@@ -659,7 +659,7 @@ value_concat (struct value *arg1, struct value *arg2) +@@ -657,7 +657,7 @@ value_concat (struct value *arg1, struct value *arg2) struct value *inval1; struct value *inval2; struct value *outval = NULL; @@ -3120,7 +3120,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c int count, idx; char inchar; struct type *type1 = check_typedef (value_type (arg1)); -@@ -1419,7 +1419,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) +@@ -1417,7 +1417,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) int value_logical_not (struct value *arg1) { @@ -3129,7 +3129,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c const gdb_byte *p; struct type *type1; -@@ -1447,11 +1447,11 @@ value_logical_not (struct value *arg1) +@@ -1445,11 +1445,11 @@ value_logical_not (struct value *arg1) static int value_strcmp (struct value *arg1, struct value *arg2) { @@ -3156,7 +3156,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c const char *, struct type *, int, enum noside); -@@ -183,7 +183,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p) +@@ -176,7 +176,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p) space. */ struct value * @@ -3165,7 +3165,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c { struct objfile *objf; struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -398,12 +398,12 @@ value_cast (struct type *type, struct value *arg2) +@@ -391,12 +391,12 @@ value_cast (struct type *type, struct value *arg2) if (code1 == TYPE_CODE_ARRAY) { struct type *element_type = TYPE_TARGET_TYPE (type); @@ -3180,7 +3180,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c LONGEST low_bound, high_bound, new_length; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -1055,7 +1055,7 @@ value_assign (struct value *toval, struct value *fromval) +@@ -1048,7 +1048,7 @@ value_assign (struct value *toval, struct value *fromval) { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3189,7 +3189,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -3357,7 +3357,7 @@ compare_parameters (struct type *t1, struct type *t2, int skip_artificial) +@@ -3392,7 +3392,7 @@ get_baseclass_offset (struct type *vt, struct type *cls, the form "DOMAIN::NAME". */ static struct value * @@ -3198,7 +3198,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c struct type *curtype, const char *name, struct type *intype, int want_address, -@@ -3391,7 +3391,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, +@@ -3426,7 +3426,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3207,7 +3207,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3564,7 +3564,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, +@@ -3617,7 +3617,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3216,7 +3216,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3713,7 +3713,7 @@ value_rtti_indirect_type (struct value *v, int *full, +@@ -3766,7 +3766,7 @@ value_rtti_indirect_type (struct value *v, int *full, struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3237,7 +3237,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, -@@ -1773,7 +1773,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, +@@ -1774,7 +1774,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3246,7 +3246,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c bool zero_pad) { const gdb_byte *p; -@@ -1926,17 +1926,17 @@ val_print_array_elements (struct type *type, +@@ -1927,17 +1927,17 @@ val_print_array_elements (struct type *type, int recurse, struct value *val, const struct value_print_options *options, @@ -3269,7 +3269,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c LONGEST low_bound, high_bound; LONGEST low_pos, high_pos; -@@ -2026,7 +2026,7 @@ val_print_array_elements (struct type *type, +@@ -2027,7 +2027,7 @@ val_print_array_elements (struct type *type, address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3430,7 +3430,7 @@ diff --git a/gdb/x86-nat.c b/gdb/x86-nat.c +x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) { struct x86_debug_reg_state *state - = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); + = x86_debug_reg_state (inferior_ptid.pid ()); diff --git a/gdb/x86-nat.h b/gdb/x86-nat.h --- a/gdb/x86-nat.h +++ b/gdb/x86-nat.h @@ -3443,7 +3443,7 @@ diff --git a/gdb/x86-nat.h b/gdb/x86-nat.h extern int x86_stopped_by_watchpoint (); extern int x86_stopped_data_address (CORE_ADDR *addr_p); extern int x86_insert_watchpoint (CORE_ADDR addr, int len, -@@ -82,7 +82,7 @@ struct x86_nat_target : public BaseTarget +@@ -75,7 +75,7 @@ struct x86_nat_target : public BaseTarget int can_use_hw_breakpoint (enum bptype type, int cnt, int othertype) override { return x86_can_use_hw_breakpoint (type, cnt, othertype); } diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch index 5617a50..f1ebbc5 100644 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ b/gdb-rhbz795424-bitpos-21of25.patch @@ -90,7 +90,7 @@ diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c diff --git a/gdb/defs.h b/gdb/defs.h --- a/gdb/defs.h +++ b/gdb/defs.h -@@ -665,4 +665,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what); +@@ -669,4 +669,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what); #include "utils.h" @@ -100,7 +100,7 @@ diff --git a/gdb/defs.h b/gdb/defs.h diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c -@@ -773,6 +773,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, +@@ -775,6 +775,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, if (boffset < 0 || boffset >= TYPE_LENGTH (type)) { @@ -111,7 +111,7 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -2834,6 +2834,17 @@ string_to_core_addr (const char *my_string) +@@ -2807,6 +2807,17 @@ string_to_core_addr (const char *my_string) return addr; } @@ -132,7 +132,7 @@ diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -2088,6 +2088,7 @@ search_struct_method (const char *name, struct value **arg1p, +@@ -2080,6 +2080,7 @@ search_struct_method (const char *name, struct value **arg1p, { CORE_ADDR address; @@ -160,7 +160,7 @@ diff --git a/gdb/value.c b/gdb/value.c if (!val->contents) { check_type_length_before_alloc (val->enclosing_type); -@@ -2876,6 +2879,7 @@ set_value_enclosing_type (struct value *val, struct type *new_encl_type) +@@ -2875,6 +2878,7 @@ set_value_enclosing_type (struct value *val, struct type *new_encl_type) if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) { check_type_length_before_alloc (new_encl_type); diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index 5788c27..a6e2a93 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -154,7 +154,7 @@ diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c const struct target_desc *read_description () override; -@@ -1207,7 +1207,7 @@ arm_linux_nat_target::stopped_by_watchpoint () +@@ -1203,7 +1203,7 @@ arm_linux_nat_target::stopped_by_watchpoint () bool arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, CORE_ADDR start, @@ -278,7 +278,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c -@@ -282,7 +282,7 @@ struct ppc_linux_nat_target final : public linux_nat_target +@@ -284,7 +284,7 @@ struct ppc_linux_nat_target final : public linux_nat_target int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; @@ -287,7 +287,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c 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 +@@ -302,9 +302,9 @@ struct ppc_linux_nat_target final : public linux_nat_target bool stopped_data_address (CORE_ADDR *) override; @@ -299,7 +299,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c override; int masked_watch_num_registers (CORE_ADDR, CORE_ADDR) override; -@@ -1659,11 +1659,11 @@ can_use_watchpoint_cond_accel (void) +@@ -2065,11 +2065,11 @@ can_use_watchpoint_cond_accel (void) CONDITION_VALUE will hold the value which should be put in the DVC register. */ static void @@ -314,7 +314,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1751,7 +1751,7 @@ num_memory_accesses (const std::vector &chain) +@@ -2157,7 +2157,7 @@ num_memory_accesses (const std::vector &chain) of the constant. */ static int check_condition (CORE_ADDR watch_addr, struct expression *cond, @@ -323,7 +323,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c { int pc = 1, num_accesses_left, num_accesses_right; struct value *left_val, *right_val; -@@ -1802,7 +1802,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, +@@ -2208,7 +2208,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, the condition expression, thus only triggering the watchpoint when it is true. */ bool @@ -333,7 +333,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c int rw, struct expression *cond) { -@@ -1820,7 +1821,7 @@ ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len, +@@ -2226,7 +2227,7 @@ ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len, static void create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, @@ -342,7 +342,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c struct expression *cond, int insert) { if (len == 1 -@@ -2086,7 +2087,7 @@ ppc_linux_nat_target::stopped_by_watchpoint () +@@ -2492,7 +2493,7 @@ ppc_linux_nat_target::stopped_by_watchpoint () bool ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, CORE_ADDR start, @@ -354,7 +354,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -1561,7 +1561,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) +@@ -1541,7 +1541,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) } static int @@ -363,7 +363,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c { struct { procfs_ctl_t cmd; -@@ -3214,7 +3214,7 @@ procfs_target::pid_to_str (ptid_t ptid) +@@ -3232,7 +3232,7 @@ procfs_target::pid_to_exec_file (int pid) /* Insert a watchpoint. */ static int @@ -384,7 +384,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c int can_use_hw_breakpoint (enum bptype, int, int) override; -@@ -10337,7 +10337,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, +@@ -10374,7 +10374,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -393,7 +393,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -10357,7 +10357,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, +@@ -10394,7 +10394,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, bool remote_target::watchpoint_addr_within_range (CORE_ADDR addr, @@ -402,7 +402,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -10386,7 +10386,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, +@@ -10423,7 +10423,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -420,15 +420,15 @@ diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c 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, + struct expression *) override; diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c -@@ -38,9 +38,9 @@ struct dummy_target : public target_ops +@@ -37,9 +37,9 @@ struct dummy_target : public target_ops + bool stopped_by_watchpoint () override; 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; @@ -438,9 +438,9 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c 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 +@@ -204,9 +204,9 @@ struct debug_target : public target_ops + bool stopped_by_watchpoint () override; 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; @@ -450,7 +450,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c 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) +@@ -1041,19 +1041,19 @@ debug_target::stopped_data_address (CORE_ADDR *arg0) } bool @@ -473,7 +473,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c { bool result; fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ()); -@@ -1090,7 +1090,7 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int +@@ -1063,7 +1063,7 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int fputs_unfiltered (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); fputs_unfiltered (", ", gdb_stdlog); @@ -482,7 +482,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c 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) +@@ -1099,19 +1099,19 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) } bool @@ -505,7 +505,7 @@ diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c { 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 +@@ -1119,7 +1119,7 @@ debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2 fprintf_unfiltered (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ()); target_debug_print_CORE_ADDR (arg0); fputs_unfiltered (", ", gdb_stdlog); @@ -526,7 +526,7 @@ diff --git a/gdb/target.c b/gdb/target.c static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -3189,7 +3189,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, +@@ -3198,7 +3198,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -538,7 +538,7 @@ diff --git a/gdb/target.c b/gdb/target.c diff --git a/gdb/target.h b/gdb/target.h --- a/gdb/target.h +++ b/gdb/target.h -@@ -557,7 +557,7 @@ struct target_ops +@@ -558,7 +558,7 @@ struct target_ops TARGET_DEFAULT_RETURN (false); virtual bool stopped_data_address (CORE_ADDR *) TARGET_DEFAULT_RETURN (false); @@ -547,7 +547,7 @@ diff --git a/gdb/target.h b/gdb/target.h TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range); /* Documentation of this routine is provided with the corresponding -@@ -565,7 +565,7 @@ struct target_ops +@@ -566,7 +566,7 @@ struct target_ops virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index bb78022..f689a17 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -192,7 +192,7 @@ diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -878,8 +878,8 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -883,8 +883,8 @@ amd64_push_arguments (struct regcache *regcache, int nargs, }; struct value **stack_args = XALLOCAVEC (struct value *, nargs); int num_stack_args = 0; @@ -203,7 +203,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -891,7 +891,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -896,7 +896,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -212,7 +212,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c enum amd64_reg_class theclass[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -@@ -955,7 +955,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, +@@ -960,7 +960,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, gdb_assert (regnum != -1); memset (buf, 0, sizeof buf); @@ -236,7 +236,7 @@ diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c -@@ -3468,7 +3468,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) +@@ -3472,7 +3472,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -245,7 +245,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3551,7 +3551,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3555,7 +3555,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, } else { @@ -254,7 +254,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), -@@ -3574,12 +3574,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3578,12 +3578,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_STRUCT: { @@ -269,7 +269,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (!field_is_static (&TYPE_FIELD (t, i))) sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -@@ -3603,13 +3603,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3607,13 +3607,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_UNION: { @@ -288,7 +288,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3645,7 +3647,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, +@@ -3649,7 +3651,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -297,7 +297,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3726,7 +3728,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -3730,7 +3732,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argnum = 0; argnum < nargs; argnum++) { @@ -357,8 +357,8 @@ diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); -- int container_len = (TYPE_LENGTH (value_type) + 3) & ~3; -+ ssize_t container_len = (TYPE_LENGTH (value_type) + 3) & ~3; +- int container_len = (TYPE_LENGTH (arg_type) + 3) & ~3; ++ ssize_t container_len = (TYPE_LENGTH (arg_type) + 3) & ~3; sp -= container_len; write_memory (sp, value_contents (args[i]), container_len); @@ -588,7 +588,7 @@ diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c -@@ -2239,7 +2239,7 @@ push_large_arguments (CORE_ADDR sp, int argc, struct value **argv, +@@ -2238,7 +2238,7 @@ push_large_arguments (CORE_ADDR sp, int argc, struct value **argv, for (i = 0; i < argc; i++) { @@ -600,7 +600,7 @@ diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c -@@ -477,7 +477,7 @@ static void +@@ -489,7 +489,7 @@ static void mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -609,7 +609,7 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c { int reg_offset = 0; -@@ -500,8 +500,8 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, +@@ -512,8 +512,8 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -620,7 +620,7 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4531,13 +4531,13 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -4562,13 +4562,13 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, gdb_byte ref_valbuf[MAX_MIPS_ABI_REGSIZE]; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -637,7 +637,7 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c /* The EABI passes structures that do not fit in a register by reference. */ -@@ -4807,7 +4807,7 @@ mips_eabi_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -4838,7 +4838,7 @@ mips_eabi_return_value (struct gdbarch *gdbarch, struct value *function, static int mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, @@ -646,7 +646,7 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c { int i; -@@ -4822,7 +4822,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, +@@ -4853,7 +4853,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, for (i = 0; i < TYPE_NFIELDS (arg_type); i++) { @@ -655,16 +655,29 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4864,7 +4864,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -4895,7 +4895,8 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argreg; int float_argreg; int argnum; -- int len = 0; +- int arg_space = 0; ++ ULONGEST arg_space = 0; + LONGEST len = 0; int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5215,11 +5215,11 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -4924,9 +4925,9 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + + if (mips_debug) + fprintf_unfiltered (gdb_stdlog, +- "mips_n32n64_push_dummy_call: sp=%s allocated %ld\n", ++ "mips_n32n64_push_dummy_call: sp=%s allocated %s\n", + paddress (gdbarch, sp), +- (long) align_up (arg_space, 16)); ++ pulongest (align_up (arg_space, 16))); + + /* Initialize the integer and float register pointers. */ + argreg = MIPS_A0_REGNUM; +@@ -5247,11 +5248,11 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, : MIPS_V0_REGNUM); field < TYPE_NFIELDS (type); field++, regnum += 2) { @@ -680,7 +693,7 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5261,8 +5261,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, +@@ -5293,8 +5294,8 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) @@ -691,16 +704,29 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5320,7 +5320,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -5352,7 +5353,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argreg; int float_argreg; int argnum; -- int len = 0; +- int arg_space = 0; ++ ULONGEST arg_space = 0; + LONGEST len = 0; int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5384,13 +5384,13 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -5389,9 +5391,9 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + + if (mips_debug) + fprintf_unfiltered (gdb_stdlog, +- "mips_o32_push_dummy_call: sp=%s allocated %ld\n", ++ "mips_o32_push_dummy_call: sp=%s allocated %s\n", + paddress (gdbarch, sp), +- (long) align_up (arg_space, 16)); ++ pulongest (align_up (arg_space, 16))); + + /* Initialize the integer and float register pointers. */ + argreg = MIPS_A0_REGNUM; +@@ -5417,13 +5419,13 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -717,18 +743,30 @@ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c val = value_contents (arg); -@@ -5844,8 +5844,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -5877,8 +5879,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argreg; int float_argreg; int argnum; -- int len = 0; +- int arg_space = 0; - int stack_offset = 0; -+ LONGEST len = 0; ++ ULONGEST arg_space = 0; + LONGEST stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5905,13 +5905,13 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -5911,9 +5913,9 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + + if (mips_debug) + fprintf_unfiltered (gdb_stdlog, +- "mips_o64_push_dummy_call: sp=%s allocated %ld\n", ++ "mips_o64_push_dummy_call: sp=%s allocated %s\n", + paddress (gdbarch, sp), +- (long) align_up (arg_space, 16)); ++ pulongest (align_up (arg_space, 16))); + + /* Initialize the integer and float register pointers. */ + argreg = MIPS_A0_REGNUM; +@@ -5939,13 +5941,13 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -867,7 +905,7 @@ diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c -@@ -177,9 +177,9 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -290,9 +290,9 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int ii; @@ -879,7 +917,7 @@ diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -307,7 +307,7 @@ ran_out_of_registers_for_arguments: +@@ -420,7 +420,7 @@ ran_out_of_registers_for_arguments: if ((argno < nargs) || argbytes) { @@ -944,7 +982,7 @@ diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c -@@ -1205,7 +1205,7 @@ sparc64_16_byte_align_p (struct type *type) +@@ -1206,7 +1206,7 @@ sparc64_16_byte_align_p (struct type *type) static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -953,7 +991,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c { struct gdbarch *gdbarch = regcache->arch (); int len = TYPE_LENGTH (type); -@@ -1265,7 +1265,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, +@@ -1266,7 +1266,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -962,7 +1000,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -1297,7 +1297,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, +@@ -1298,7 +1298,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, @@ -971,7 +1009,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c { struct gdbarch *gdbarch = regcache->arch (); -@@ -1353,7 +1353,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, +@@ -1354,7 +1354,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -980,7 +1018,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -1386,7 +1386,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, +@@ -1387,7 +1387,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -989,7 +1027,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -1486,7 +1486,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, +@@ -1487,7 +1487,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -1022,16 +1060,16 @@ diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c -@@ -881,7 +881,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -880,7 +880,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argreg = 0; int argnum; int stack_offset = 4; - int references_offset = 4; + LONGEST references_offset = 4; - CORE_ADDR func_addr = find_function_addr (function, NULL); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct type *func_type = value_type (function); -@@ -915,7 +915,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, + /* The first arg passed on stack. Mostly the first 10 args are passed by +@@ -913,7 +913,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1040,7 +1078,7 @@ diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; -@@ -934,7 +934,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -932,7 +932,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1049,7 +1087,7 @@ diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); -@@ -1090,7 +1090,8 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -1087,7 +1087,8 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } else internal_error (__FILE__, __LINE__, @@ -1074,16 +1112,17 @@ diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c -@@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch, +@@ -1019,7 +1019,8 @@ v850_push_dummy_call (struct gdbarch *gdbarch, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; -- int len = 0; +- int arg_space = 0; ++ ULONGEST arg_space = 0; + LONGEST len = 0; int stack_offset; if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) -@@ -1047,7 +1047,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch, +@@ -1047,7 +1048,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch, in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1116,7 +1155,7 @@ diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c -@@ -232,8 +232,9 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch, +@@ -232,8 +232,10 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; int argreg = E_1ST_ARG_REGNUM; @@ -1125,13 +1164,14 @@ diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c + int i, slacklen; + LONGEST j; + LONGEST typelen; - const gdb_byte *val; ++ const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; + /* If struct_return is true, then the struct return address will diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c -@@ -1626,8 +1626,7 @@ xtensa_store_return_value (struct type *type, +@@ -1615,8 +1615,7 @@ xtensa_store_return_value (struct type *type, if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1141,11 +1181,12 @@ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1701,18 +1700,18 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1689,18 +1688,19 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, + CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int i; - int size, onstack_size; ++ int i; + LONGEST size, onstack_size; gdb_byte *buf = (gdb_byte *) alloca (16); CORE_ADDR ra, ps; @@ -1163,7 +1204,7 @@ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1736,9 +1735,10 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1723,9 +1723,10 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1177,7 +1218,7 @@ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1808,8 +1808,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1794,8 +1795,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1187,7 +1228,7 @@ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1854,7 +1854,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1840,7 +1841,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, if (info->onstack) { @@ -1196,7 +1237,7 @@ diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1870,7 +1870,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, +@@ -1856,7 +1857,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, } else { diff --git a/gdb-rhbz795424-bitpos-arrayview.patch b/gdb-rhbz795424-bitpos-arrayview.patch new file mode 100644 index 0000000..603a475 --- /dev/null +++ b/gdb-rhbz795424-bitpos-arrayview.patch @@ -0,0 +1,60 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Sergio Durigan Junior +Date: Wed, 12 Sep 2018 00:02:17 -0400 +Subject: gdb-rhbz795424-bitpos-arrayview.patch + +;; This patch is needed to compile GDB after -Werror=narrowing has +;; been enabled by default. +;; Author: Sergio Durigan Junior. + +diff --git a/gdb/common/array-view.h b/gdb/common/array-view.h +--- a/gdb/common/array-view.h ++++ b/gdb/common/array-view.h +@@ -85,7 +85,7 @@ public: + using value_type = T; + using reference = T &; + using const_reference = const T &; +- using size_type = size_t; ++ using size_type = ULONGEST; + + /* Default construction creates an empty view. */ + constexpr array_view () noexcept +@@ -114,7 +114,7 @@ public: + count. */ + template>> +- constexpr array_view (U *array, size_t size) noexcept ++ constexpr array_view (U *array, ULONGEST size) noexcept + : m_array (array), m_size (size) + {} + +@@ -128,7 +128,7 @@ public: + {} + + /* Create an array view from an array. */ +- template>> + constexpr array_view (U (&array)[Size]) noexcept + : m_array (array), m_size (Size) +@@ -161,9 +161,9 @@ public: + /*constexpr14*/ T *end () noexcept { return m_array + m_size; } + constexpr const T *end () const noexcept { return m_array + m_size; } + +- /*constexpr14*/ reference operator[] (size_t index) noexcept ++ /*constexpr14*/ reference operator[] (ULONGEST index) noexcept + { return m_array[index]; } +- constexpr const_reference operator[] (size_t index) const noexcept ++ constexpr const_reference operator[] (ULONGEST index) const noexcept + { return m_array[index]; } + + constexpr size_type size () const noexcept { return m_size; } +@@ -185,7 +185,7 @@ operator== (const gdb::array_view &lhs, const gdb::array_view &rhs) + if (lhs.size () != rhs.size ()) + return false; + +- for (size_t i = 0; i < lhs.size (); i++) ++ for (ULONGEST i = 0; i < lhs.size (); i++) + if (!(lhs[i] == rhs[i])) + return false; + diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index 941a9d0..3b0c20d 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -37,7 +37,7 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922 diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -2600,11 +2600,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, +@@ -2659,11 +2659,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, /* See dwarf2loc.h. */ int @@ -54,7 +54,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (prop == NULL) return 0; -@@ -2628,7 +2631,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2687,7 +2690,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, *value = value_as_address (val); } @@ -63,7 +63,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } break; -@@ -2650,7 +2653,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2709,7 +2712,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, if (!value_optimized_out (val)) { *value = value_as_address (val); @@ -72,7 +72,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } } -@@ -2658,8 +2661,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2717,8 +2720,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, case PROP_CONST: *value = prop->data.const_val; @@ -83,7 +83,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c case PROP_ADDR_OFFSET: { struct dwarf2_property_baton *baton -@@ -2680,11 +2683,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2739,11 +2742,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, val = value_at (baton->offset_info.type, pinfo->addr + baton->offset_info.offset); *value = value_as_address (val); @@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17535,7 +17535,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17752,7 +17752,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -17555,7 +17555,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17772,7 +17772,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -17588,6 +17590,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17805,6 +17807,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -17665,7 +17675,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17897,7 +17907,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -189,7 +189,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/eval.c b/gdb/eval.c --- a/gdb/eval.c +++ b/gdb/eval.c -@@ -377,29 +377,325 @@ init_array_element (struct value *array, struct value *element, +@@ -377,29 +377,324 @@ init_array_element (struct value *array, struct value *element, return index; } @@ -207,8 +207,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c + int *pos, int nargs, enum noside noside) { - int pc = (*pos) + 1; -+ int i, dim_count = 0; - LONGEST low_bound, high_bound; +- LONGEST low_bound, high_bound; - struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array))); - enum range_type range_type - = (enum range_type) longest_to_int (exp->elts[pc].longconst); @@ -219,11 +218,12 @@ diff --git a/gdb/eval.c b/gdb/eval.c - low_bound = TYPE_LOW_BOUND (range); - else - low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); ++ int i, dim_count = 0; + struct value *new_array = array; + struct type *array_type = check_typedef (value_type (new_array)); + struct type *elt_type; + -+ typedef struct subscript_range ++ typedef struct + { + enum range_type f90_range_type; + LONGEST low, high, stride; @@ -272,11 +272,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c + for (i = 0; i < nargs; i++) + { + struct subscript_store *index = &subscript_array[i]; - -- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) -- high_bound = TYPE_HIGH_BOUND (range); -- else -- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); ++ + /* The user input is a range, with or without lower and upper bound. + E.g.: "p arry(2:5)", "p arry( :5)", "p arry( : )", etc. */ + if (exp->elts[*pos].opcode == OP_RANGE) @@ -310,7 +306,11 @@ diff --git a/gdb/eval.c b/gdb/eval.c + /* Assign the default stride value '1'. */ + else + range->stride = 1; -+ + +- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) +- high_bound = TYPE_HIGH_BOUND (range); +- else +- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); + /* Check the provided stride value is illegal, aka '0'. */ + if (range->stride == 0) + error (_("Stride must not be 0")); @@ -480,7 +480,8 @@ diff --git a/gdb/eval.c b/gdb/eval.c + struct value *v = NULL; + + elt_type = TYPE_TARGET_TYPE (value_type (new_array)); -+ + +- return value_slice (array, low_bound, high_bound - low_bound + 1); + /* Every SUBSCRIPT_RANGE in the user input signifies an actual range in + the output array. So we traverse the SUBSCRIPT_ARRAY again, looking + for a range entry. When we find one, we use the range info to create @@ -497,8 +498,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c + struct type *range_type, *interim_array_type; + + int new_length; - -- return value_slice (array, low_bound, high_bound - low_bound + 1); ++ + /* The length of a sub-dimension with all elements between the + bounds plus the start element itself. It may be modified by + a user provided stride value. */ @@ -533,20 +533,54 @@ diff --git a/gdb/eval.c b/gdb/eval.c } -@@ -1926,19 +2222,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1238,19 +1533,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, + return eval_call (exp, noside, nargs, argvec, var_func_name, expect_type); + } + +-/* Helper for skipping all the arguments in an undetermined argument list. +- This function was designed for use in the OP_F77_UNDETERMINED_ARGLIST +- case of evaluate_subexp_standard as multiple, but not all, code paths +- require a generic skip. */ +- +-static void +-skip_undetermined_arglist (int nargs, struct expression *exp, int *pos, +- enum noside noside) +-{ +- for (int i = 0; i < nargs; ++i) +- evaluate_subexp (NULL_TYPE, exp, pos, noside); +-} +- + struct value * + evaluate_subexp_standard (struct type *expect_type, + struct expression *exp, int *pos, +@@ -1945,33 +2227,8 @@ evaluate_subexp_standard (struct type *expect_type, switch (code) { case TYPE_CODE_ARRAY: - if (exp->elts[*pos].opcode == OP_RANGE) - return value_f90_subarray (arg1, exp, pos, noside); - else -- goto multi_f77_subscript; +- { +- if (noside == EVAL_SKIP) +- { +- skip_undetermined_arglist (nargs, exp, pos, noside); +- /* Return the dummy value with the correct type. */ +- return arg1; +- } +- goto multi_f77_subscript; +- } - case TYPE_CODE_STRING: - if (exp->elts[*pos].opcode == OP_RANGE) - return value_f90_subarray (arg1, exp, pos, noside); - else - { +- if (noside == EVAL_SKIP) +- { +- skip_undetermined_arglist (nargs, exp, pos, noside); +- /* Return the dummy value with the correct type. */ +- return arg1; +- } - arg2 = evaluate_subexp_with_coercion (exp, pos, noside); - return value_subscript (arg1, value_as_long (arg2)); - } @@ -554,7 +588,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2334,49 +2619,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2368,49 +2625,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -604,7 +638,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -3293,6 +3535,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3330,6 +3544,9 @@ calc_f77_array_dims (struct type *array_type) int ndimen = 1; struct type *tmp_type; @@ -639,7 +673,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered (")", stream); return; -@@ -1098,22 +1095,24 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1105,22 +1102,24 @@ dump_subexp_body_standard (struct expression *exp, switch (range_type) { @@ -672,7 +706,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream); break; default: -@@ -1121,11 +1120,9 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1128,11 +1127,9 @@ dump_subexp_body_standard (struct expression *exp, break; } @@ -689,7 +723,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c diff --git a/gdb/expression.h b/gdb/expression.h --- a/gdb/expression.h +++ b/gdb/expression.h -@@ -148,28 +148,27 @@ extern void dump_raw_expression (struct expression *, +@@ -150,28 +150,27 @@ extern void dump_raw_expression (struct expression *, struct ui_file *, const char *); extern void dump_prefix_expression (struct expression *, struct ui_file *); @@ -832,7 +866,7 @@ diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -902,7 +902,8 @@ operator== (const range_bounds &l, const range_bounds &r) +@@ -911,7 +911,8 @@ operator== (const range_bounds &l, const range_bounds &r) struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, @@ -842,7 +876,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { if (result_type == NULL) result_type = alloc_type_copy (index_type); -@@ -917,6 +918,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -926,6 +927,7 @@ create_range_type (struct type *result_type, struct type *index_type, TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; @@ -850,7 +884,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -945,7 +947,7 @@ struct type * +@@ -954,7 +956,7 @@ struct type * create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -859,7 +893,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -953,7 +955,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, +@@ -962,7 +964,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, high.kind = PROP_CONST; high.data.const_val = high_bound; @@ -872,7 +906,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c return result_type; } -@@ -1171,16 +1177,20 @@ create_array_type_with_stride (struct type *result_type, +@@ -1180,16 +1186,20 @@ create_array_type_with_stride (struct type *result_type, && (!type_not_associated (result_type) && !type_not_allocated (result_type))) { @@ -894,7 +928,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1981,12 +1991,12 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1990,12 +2000,12 @@ resolve_dynamic_range (struct type *dyn_range_type, CORE_ADDR value; struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; @@ -909,7 +943,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { low_bound.kind = PROP_CONST; low_bound.data.const_val = value; -@@ -1998,7 +2008,7 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2007,7 +2017,7 @@ resolve_dynamic_range (struct type *dyn_range_type, } prop = &TYPE_RANGE_DATA (dyn_range_type)->high; @@ -918,7 +952,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { high_bound.kind = PROP_CONST; high_bound.data.const_val = value; -@@ -2013,12 +2023,20 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2022,12 +2032,20 @@ resolve_dynamic_range (struct type *dyn_range_type, high_bound.data.const_val = 0; } @@ -943,7 +977,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -612,6 +612,10 @@ struct range_bounds +@@ -613,6 +613,10 @@ struct range_bounds struct dynamic_prop high; @@ -954,7 +988,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -776,7 +780,6 @@ struct main_type +@@ -777,7 +781,6 @@ struct main_type /* * Union member used for range types. */ struct range_bounds *bounds; @@ -962,7 +996,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h } flds_bnds; /* * Slot to point to additional language-specific fields of this -@@ -1329,6 +1332,15 @@ extern bool set_type_align (struct type *, ULONGEST); +@@ -1330,6 +1333,15 @@ extern bool set_type_align (struct type *, ULONGEST); TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -978,7 +1012,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1363,6 +1375,9 @@ extern bool set_type_align (struct type *, ULONGEST); +@@ -1364,6 +1376,9 @@ extern bool set_type_align (struct type *, ULONGEST); TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -988,7 +1022,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1892,6 +1907,7 @@ extern struct type *create_array_type_with_stride +@@ -1899,6 +1914,7 @@ extern struct type *create_array_type_with_stride struct dynamic_prop *, unsigned int); extern struct type *create_range_type (struct type *, struct type *, @@ -1038,7 +1072,7 @@ diff --git a/gdb/parse.c b/gdb/parse.c diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y -@@ -2478,24 +2478,28 @@ convert_ast_to_expression (struct parser_state *state, +@@ -2475,24 +2475,28 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation, case OP_RANGE: { @@ -1047,13 +1081,13 @@ diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y if (operation->left.op != NULL) { - convert_ast_to_expression (state, operation->left.op, top); + convert_ast_to_expression (operation->left.op, top); - kind = HIGH_BOUND_DEFAULT; + kind = SUBARRAY_LOW_BOUND; } if (operation->right.op != NULL) { - convert_ast_to_expression (state, operation->right.op, top); + convert_ast_to_expression (operation->right.op, top); - if (kind == BOTH_BOUND_DEFAULT) - kind = (operation->inclusive - ? LOW_BOUND_DEFAULT : LOW_BOUND_DEFAULT_EXCLUSIVE); @@ -1078,7 +1112,7 @@ diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c -@@ -1149,13 +1149,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside) +@@ -1179,13 +1179,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside) kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst); *pos += 3; @@ -1095,7 +1129,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c if (noside == EVAL_SKIP) return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1); -@@ -1244,7 +1242,7 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1274,7 +1272,7 @@ rust_compute_range (struct type *type, struct value *range, *low = 0; *high = 0; @@ -1104,7 +1138,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c if (TYPE_NFIELDS (type) == 0) return; -@@ -1252,15 +1250,14 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1282,15 +1280,14 @@ rust_compute_range (struct type *type, struct value *range, i = 0; if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0) { @@ -1122,7 +1156,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c *high = value_as_long (value_field (range, i)); if (rust_inclusive_range_type_p (type)) -@@ -1278,7 +1275,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1308,7 +1305,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, struct type *rhstype; LONGEST low, high_bound; /* Initialized to appease the compiler. */ @@ -1131,7 +1165,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c LONGEST high = 0; int want_slice = 0; -@@ -1376,7 +1373,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1406,7 +1403,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, error (_("Cannot subscript non-array type")); if (want_slice @@ -1140,7 +1174,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c low = low_bound; if (low < 0) error (_("Index less than zero")); -@@ -1394,7 +1391,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1424,7 +1421,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, CORE_ADDR addr; struct value *addrval, *tem; @@ -1761,7 +1795,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla.f90 b/gdb/testsuite/gdb.fortran/vla.f diff --git a/gdb/valarith.c b/gdb/valarith.c --- a/gdb/valarith.c +++ b/gdb/valarith.c -@@ -187,10 +187,16 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) +@@ -187,11 +187,17 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); ULONGEST elt_size = type_length_units (elt_type); @@ -1774,16 +1808,17 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c + else + elt_offs *= elt_size; - if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) -- && elt_offs >= type_length_units (array_type))) -+ && abs (elt_offs) >= type_length_units (array_type))) + if (index < lowerbound + || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) +- && elt_offs >= type_length_units (array_type)) ++ && abs (elt_offs) >= type_length_units (array_type)) + || (VALUE_LVAL (array) != lval_memory + && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type))) { - if (type_not_associated (array_type)) - error (_("no such vector element (vector not associated)")); diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -3808,56 +3808,195 @@ value_of_this_silent (const struct language_defn *lang) +@@ -3861,56 +3861,195 @@ value_of_this_silent (const struct language_defn *lang) struct value * value_slice (struct value *array, int lowbound, int length) diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index 980b94c..6797334 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -33,7 +33,7 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings diff --git a/gdb/NEWS b/gdb/NEWS --- a/gdb/NEWS +++ b/gdb/NEWS -@@ -103,6 +103,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* +@@ -265,6 +265,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -77,7 +77,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1789,7 +1789,8 @@ static void read_signatured_type (struct signatured_type *); +@@ -1801,7 +1801,8 @@ static void read_signatured_type (struct signatured_type *); static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, struct dwarf2_cu *cu, @@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* memory allocation interface */ -@@ -13633,7 +13634,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13757,7 +13758,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -95,8 +95,8 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c + attr_to_dynamic_prop (attr, die, cu, newobj->static_link, NULL, 0); } - cu->list_in_scope = &local_symbols; -@@ -16298,7 +16299,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) + cu->list_in_scope = cu->builder->get_local_symbols (); +@@ -16495,7 +16496,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); @@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (!stride_ok) { complaint (_("unable to read array DW_AT_byte_stride " -@@ -17059,29 +17061,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17256,29 +17258,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -150,7 +150,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c + operand. */ + DW_OP_deref_size, + /* Operand for DW_OP_deref_size. */ -+ DW_UNSND(byte_size) }; ++ (gdb_byte) DW_UNSND(byte_size) }; + + if (!attr_to_dynamic_prop (attr, die, cu, &high, append_ops, + ARRAY_SIZE(append_ops))) @@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -17429,7 +17492,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17646,7 +17709,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack -@@ -17440,14 +17504,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17657,14 +17721,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, if (attr_form_is_block (attr)) { @@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -17480,8 +17563,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17697,8 +17780,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -17592,7 +17695,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17809,7 +17912,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c complaint (_("Missing DW_AT_byte_stride " "- DIE at 0x%s [in module %s]"), sect_offset_str (die->sect_off), -@@ -17600,7 +17703,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17817,7 +17920,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -305,20 +305,20 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c else if (!low_default_is_valid) complaint (_("Missing DW_AT_lower_bound " "- DIE at %s [in module %s]"), -@@ -17608,10 +17711,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) - objfile_name (cu->per_cu->dwarf2_per_objfile->objfile)); +@@ -17826,10 +17929,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) - attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + struct attribute *attr_ub, *attr_count; + attr = attr_ub = 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, NULL, 0)) { - attr = dwarf2_attr (die, DW_AT_count, cu); + attr = attr_count = dwarf2_attr (die, DW_AT_count, cu); - if (attr_to_dynamic_prop (attr, die, cu, &high)) + if (attr_to_dynamic_prop (attr, die, cu, &high, NULL, 0)) { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -25112,7 +25215,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25386,7 +25489,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25126,7 +25229,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25400,7 +25503,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25138,7 +25241,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25412,7 +25515,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); @@ -500,7 +500,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -1904,7 +1904,8 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1913,7 +1913,8 @@ is_dynamic_type_internal (struct type *type, int top_level) type = check_typedef (type); /* We only want to recognize references at the outermost level. */ @@ -510,7 +510,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = check_typedef (TYPE_TARGET_TYPE (type)); /* Types that have a dynamic TYPE_DATA_LOCATION are considered -@@ -1938,6 +1939,7 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1947,6 +1948,7 @@ is_dynamic_type_internal (struct type *type, int top_level) } case TYPE_CODE_ARRAY: @@ -518,7 +518,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { gdb_assert (TYPE_NFIELDS (type) == 1); -@@ -2056,7 +2058,8 @@ resolve_dynamic_array (struct type *type, +@@ -2065,7 +2067,8 @@ resolve_dynamic_array (struct type *type, struct dynamic_prop *prop; unsigned int bit_stride = 0; @@ -528,7 +528,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = copy_type (type); -@@ -2081,11 +2084,15 @@ resolve_dynamic_array (struct type *type, +@@ -2090,11 +2093,15 @@ resolve_dynamic_array (struct type *type, ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -545,7 +545,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type); if (prop != NULL) { -@@ -2240,6 +2247,28 @@ resolve_dynamic_struct (struct type *type, +@@ -2249,6 +2256,28 @@ resolve_dynamic_struct (struct type *type, return resolved_type; } @@ -574,7 +574,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c /* Worker for resolved_dynamic_type. */ static struct type * -@@ -2288,7 +2317,12 @@ resolve_dynamic_type_internal (struct type *type, +@@ -2297,7 +2326,12 @@ resolve_dynamic_type_internal (struct type *type, break; } @@ -1306,7 +1306,7 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -1565,6 +1565,19 @@ value_ind (struct value *arg1) +@@ -1558,6 +1558,19 @@ value_ind (struct value *arg1) if (TYPE_CODE (base_type) == TYPE_CODE_PTR) { struct type *enc_type; @@ -1326,7 +1326,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c /* We may be pointing to something embedded in a larger object. Get the real type of the enclosing object. */ -@@ -1580,8 +1593,7 @@ value_ind (struct value *arg1) +@@ -1573,8 +1586,7 @@ value_ind (struct value *arg1) else /* Retrieve the enclosing object pointed to. */ arg2 = value_at_lazy (enc_type, diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index b2170f4..7b420ab 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -38,7 +38,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c #include "common/underlying.h" #include "common/byte-vector.h" -@@ -2348,6 +2349,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2388,6 +2389,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, ctx.per_cu = per_cu; ctx.obj_address = 0; diff --git a/gdb-x86_64-i386-syscall-restart.patch b/gdb-x86_64-i386-syscall-restart.patch index 575674f..e4a41c8 100644 --- a/gdb-x86_64-i386-syscall-restart.patch +++ b/gdb-x86_64-i386-syscall-restart.patch @@ -111,11 +111,11 @@ diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c + for -ERESTART* values -512 being above 0xfffffffffffffe00; tested by + interrupt.exp. */ + -+ int i = I386_EAX_REGNUM; ++ int k = I386_EAX_REGNUM; + + if (regnum == -1 || regnum == i) + { -+ void *ptr = regs + amd64_native_gregset_reg_offset (gdbarch, i); ++ void *ptr = regs + amd64_native_gregset_reg_offset (gdbarch, k); + + *(int64_t *) ptr = *(int32_t *) ptr; + } diff --git a/gdb.spec b/gdb.spec index 1b8e244..04a90b5 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,3 +1,7 @@ +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 + # rpmbuild parameters: # --with testsuite: Run the testsuite (biarch if possible). Default is without. # --with buildisa: Use %%{?_isa} for BuildRequires @@ -7,8 +11,6 @@ # workload gets run it decreases the general performance now. # --define 'scl somepkgname': Independent packages by scl-utils-build. -%global debug_package %{nil} - %{?scl:%scl_package gdb} %{!?scl: %global pkg_name %{name} @@ -20,15 +22,15 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20180629 +%global snapsrc 20181114 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} -Version: 8.1.50.%{snapsrc} +Version: 8.2.50.%{snapsrc} # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 27.0.riscv64%{?dist} +Release: 8.0.riscv64%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -36,7 +38,6 @@ Group: Development/Debuggers # ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz Source: %{tarname}.tar.xz #Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz -Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gnu.org/software/gdb/ # For our convenience @@ -163,7 +164,7 @@ Source3: gdb-gstack.man Source4: gdbinit # libstdc++ pretty printers from GCC SVN. -%global libstdcxxpython gdb-libstdc++-v3-python-7.1.1-20170526 +%global libstdcxxpython gdb-libstdc++-v3-python-8.1.1-20180626 #=fedora Source5: %{libstdcxxpython}.tar.xz @@ -172,18 +173,12 @@ Source5: %{libstdcxxpython}.tar.xz Source6: gdbtui # libipt: Intel Processor Trace Decoder Library -%global libipt_version 1.6.1 +%global libipt_version 2.0 #=fedora Source7: v%{libipt_version}.tar.gz #=fedora Patch1142: v1.5-libipt-static.patch -# [rhel dts libipt] Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1. -#=push+jan -Patch1171: v1.6.1-implicit-fallthrough.patch -## Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). -##=fedora -Patch1044: gdb-pahole-python2.patch ## [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). ##=fedoratest #Patch1075: gdb-testsuite-readline63-sigint.patch @@ -247,8 +242,11 @@ BuildRequires: libipt-devel%{buildisa} %endif %endif %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 # See https://bugzilla.redhat.com/show_bug.cgi?id=1593280 +# DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3. BuildRequires: mpfr-devel%{buildisa} +%endif %if 0%{?_with_testsuite:1} @@ -418,7 +416,6 @@ tar xzf %{SOURCE7} ( cd processor-trace-%{libipt_version} %patch1142 -p1 -%patch1171 -p1 ) %endif @@ -448,7 +445,6 @@ done %if 0%{?rhel:1} && 0%{?rhel} <= 7 %patch1119 -p1 -%patch1044 -p1 %endif find -name "*.orig" | xargs rm -f @@ -506,18 +502,6 @@ cd %{gdb_build}$fprofile export CFLAGS="$RPM_OPT_FLAGS %{?_with_asan:-fsanitize=address}" export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}" -%if 0%{?fedora} > 27 || 0%{?rhel} > 7 -# FIXME: gcc-8.0: -# ./elf32-target.h:215:4: error: cast between incompatible function types from 'void * (*)(bfd *)' {aka 'void * (*)(struct bfd *)'} to 'asymbol * (*)(bfd *, void *, long unsigned int)' {aka 'struct bfd_symbol * (*)(struct bfd *, void *, long unsigned int)'} [-Werror=cast-function-type] -# ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) -CFLAGS="$CFLAGS -Wno-error=cast-function-type" - -# FIXME: gcc-8.0: -# linux-tdep.c:1767:11: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 17 equals destination size [-Werror=stringop-truncation] -# strncpy (p->pr_fname, basename, sizeof (p->pr_fname)); -CFLAGS="$CFLAGS -Wno-error=stringop-truncation" -%endif # 0%{?fedora} > 27 || 0%{?rhel} > 7 - %if 0%{!?rhel:1} || 0%{?rhel} > 7 CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" %endif @@ -586,6 +570,8 @@ export CXXFLAGS="$CFLAGS" --with-separate-debug-dir=/usr/lib/debug \ --disable-sim \ --disable-rpath \ + --without-stage1-ldflags \ + --disable-libmcheck \ %if 0%{!?rhel:1} || 0%{?rhel} > 7 --with-babeltrace \ --with-guile \ @@ -629,7 +615,12 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \ %else --without-intel-pt \ %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 --with-mpfr \ +%else + --without-mpfr \ +%endif + --enable-unit-tests \ --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ %ifarch sparc sparcv9 @@ -672,10 +663,10 @@ else fi # Prepare gdb/config.h first. -make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" maybe-configure-gdb +make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 maybe-configure-gdb perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config.status -make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" +make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" V=1 ! grep '_RELOCATABLE.*1' gdb/config.h grep '^#define HAVE_LIBSELINUX 1$' gdb/config.h @@ -698,7 +689,7 @@ done # fprofile cd %{gdb_build} make %{?_smp_mflags} \ - -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split + -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split MAKEINFOFLAGS=--no-split V=1 # Copy the /gdb/NEWS file to the directory above it. cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src} @@ -707,6 +698,9 @@ cp $RPM_BUILD_DIR/%{gdb_src}/gdb/NEWS $RPM_BUILD_DIR/%{gdb_src} # Initially we're in the %{gdb_src} directory. cd %{gdb_build} +# We always run the unittests. +(cd gdb; make run GDBFLAGS='-batch -ex "maintenance selftest"') + %if 0%{!?_with_testsuite:1} echo ====================TESTSUITE DISABLED========================= %else @@ -741,7 +735,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2 then continue fi - CHECK="$CHECK check//unix/$BI" + CHECK="$CHECK check//unix/$BI check//native-gdbserver/$BI check//native-extended-gdbserver/$BI" done # Do not try -m64 inferiors for -m32 GDB as it cannot handle inferiors larger # than itself. @@ -750,7 +744,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2 RPM_SIZE="$(file ./biarch|sed -n 's/^.*: ELF \(32\|64\)-bit .*$/\1/p')" if [ "$RPM_SIZE" != "64" ] then - CHECK="$(echo " $CHECK "|sed 's# check//unix/-m64 # #')" + CHECK="$(echo " $CHECK "|sed 's#check//unix/-m64 check//native-gdbserver/-m64 check//native-extended-gdbserver/-m64# #')" fi # Disable some problematic testcases. @@ -773,7 +767,7 @@ for t in sum log do for file in testsuite*/gdb.$t do - suffix="${file#testsuite.unix.}" + suffix="${file#testsuite}" suffix="${suffix%/gdb.$t}" ln $file gdb-%{_target_platform}$suffix.$t || : done @@ -830,7 +824,6 @@ do touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/ChangeLog $i done -%ifnarch riscv64 %if 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1} mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir} cp -p ./gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/ @@ -839,7 +832,6 @@ for pyo in "" "-O";do %{__python} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))' done %endif # 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1} -%endif # riscv64 %if 0%{!?_without_python:1} %if 0%{!?rhel:1} || 0%{?rhel} > 6 @@ -941,7 +933,6 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %endif %files -%defattr(-,root,root) # File must begin with "/": {GFDL,COPYING3,COPYING,COPYING.LIB,COPYING3.LIB} %if 0%{!?el6:1} %license COPYING3 COPYING COPYING.LIB COPYING3.LIB @@ -950,10 +941,8 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %endif %doc README NEWS %{_bindir}/gdb -%ifnarch riscv64 %{_bindir}/gcore %{_mandir}/*/gcore.1* -%endif %{_bindir}/gstack %{_mandir}/*/gstack.1* %{_bindir}/pstack @@ -963,7 +952,6 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %{_includedir}/gdb %if 0%{!?scl:1} %files headless -%defattr(-,root,root) %{_prefix}/libexec/gdb %endif %config(noreplace) %{_sysconfdir}/gdbinit @@ -984,18 +972,13 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py # don't include the files in include, they are part of binutils -%ifnarch sparc sparcv9 +%ifnarch sparc sparcv9 riscv64 %files gdbserver -%defattr(-,root,root) -%ifnarch riscv64 %{_bindir}/gdbserver -%endif %{_mandir}/*/gdbserver.1* -%ifnarch riscv64 %if %{have_inproctrace} %{_libdir}/libinproctrace.so %endif # %{have_inproctrace} -%endif # ifnarch riscv64 %endif %if 0%{!?_without_python:1} @@ -1017,7 +1000,6 @@ done %files doc %doc %{gdb_build}/gdb/doc/{gdb,annotate}.{html,pdf} -%defattr(-,root,root) %{_infodir}/annotate.info* %{_infodir}/gdb.info* @@ -1050,8 +1032,113 @@ fi %endif %changelog -* Wed Jul 04 2018 David Abdurachmanov - 8.1.50.20180629-27.0.riscv64.fc29 -- Enable RISC-V (riscv64) +* Fri Nov 16 2018 David Abdurachmanov - 8.2.50.20181114-8.0.riscv64.fc30 +- Add support for RISC-V (riscv64) + +* Wed Nov 14 2018 Sergio Durigan Junior - 8.2.50.20181114-8.fc30 +- Rebase to FSF GDB 8.2.50.20181114 (8.3pre). +- Drop gdb-6.3-ppc64syscall-20040622.patch. +- Drop gdb-6.3-ppc64displaysymbol-20041124.patch. +- Drop gdb-6.8-watchpoint-conditionals-test.patch. + +* Thu Oct 18 2018 Sergio Durigan Junior - 8.2.50.20181016-7.fc30 +- Use "--enable-unit-tests" flag when compiling GDB. + +* Tue Oct 16 2018 Sergio Durigan Junior - 8.2.50.20181016-6.fc30 +- Rebase to FSF GDB 8.2.50.20181016 (8.3pre). +- Enable and always run the unittests when building the package. + +* Wed Oct 10 2018 Sergio Durigan Junior - 8.2.50.20181010-5.fc30 +- Rebase to FSF GDB 8.2.50.20181010 (8.3pre). +- Remove 'gdb-6.8-sparc64-silence-memcpy-check.patch'. +- Remove 'gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch'. + +* Sat Oct 6 2018 Sergio Durigan Junior - 8.2.50.20181006-4.fc30 +- Rebase to FSF GDB 8.2.50.20181006 (8.3pre). + +* Thu Oct 4 2018 Jan Kratochvil - 8.2.50.20180917-3.fc30 +- Fix annobin complaints (RH BZ 1630564): + --without-stage1-ldflags: Disable static libstdc++ and libgcc linking. + --disable-libmcheck: That is a distro-level decision, not package decision. + +* Wed Sep 19 2018 Sergio Durigan Junior - 8.2.50.20180917-2.fc30 +- Remove 'gdb-6.5-bz203661-emit-relocs.patch'. +- Update changelog entry for last release. + +* Mon Sep 17 2018 Sergio Durigan Junior - 8.2.50.20180917-1.fc30 +- Rebase to FSF GDB 8.2.50.20180917 (8.3pre). +- Add 'gdb-rhbz795424-bitpos-arrayview.patch'. +- Remove 'gdb-rhbz881849-ipv6-1of3.patch'. +- Remove 'gdb-rhbz881849-ipv6-2of3.patch'. +- Remove 'gdb-rhbz881849-ipv6-3of3.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-1of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-2of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-3of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-4of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-5of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-6of7.patch'. +- Remove 'gdb-rhbz1187581-power8-regs-7of7.patch'. + +* Tue Aug 21 2018 Sergio Durigan Junior - 8.1.90.20180727-45.fc30 +- Enable verbose output when running "make". + +* Thu Aug 9 2018 Jan Kratochvil - 8.1.90.20180727-44.fc29 +- Add GDB support to access/display POWER8 registers (IBM, RH BZ 1187581). + +* Thu Aug 9 2018 Sergio Durigan Junior - 8.1.90.20180727-43.fc29 +- Reenable libipt. + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-42.fc29 +- Again, temporarily disable libipt (needed to upgrade libipt to 2.0). + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-41.fc29 +- Reenable libipt. +- Rebuild due to new libipt release. +- Adjust bundled libipt; remove unnecessary patch. +- Sync IPv6 patch with F-28 GDB. + +* Wed Aug 8 2018 Sergio Durigan Junior - 8.1.90.20180727-40.fc29 +- Temporarily disable libipt (needed to upgrade libipt to 2.0). + +* Wed Aug 8 2018 Jan Kratochvil - 8.1.90.20180727-39.fc29 +- [dts] Fix build by removing a patch for already removed pahole.py . +- [dts rhel6] Fix build by updating gdb-gnat-dwarf-crash-3of3.patch . + +* Mon Jul 30 2018 Sergio Durigan Junior - 8.1.90.20180727-38.fc29 +- Recompile to fix RH BZ 1609504 (due to RH BZ 1609577). + +* Sat Jul 28 2018 Sergio Durigan Junior - 8.1.90.20180727-37.fc29 +- Rebase to FSF GDB 8.1.90.20180727 (8.2pre). + +* Wed Jul 25 2018 Sergio Durigan Junior - 8.1.90.20180724-36.fc29 +- Rebase to FSF GDB 8.1.90.20180724 (8.2pre). + +* Sat Jul 14 2018 Sergio Durigan Junior - 8.1.90.20180714-35.fc29 +- Rebase to FSF GDB 8.1.90.20180714 (8.2pre). +- Backport IPv6 patch (RH BZ 881849, Sergio Durigan Junior). + +* Fri Jul 13 2018 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-33.fc29 +- [dts] [rhel6] Do not use mpfr as rhel6 has mpfr-2 while GDB requires mpfr-3. + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-32.fc29 +- Remove as no longer needed: + Workaround gcc-8.0: -Wno-error=cast-function-type,stringop-truncation + +* Thu Jul 12 2018 Jan Kratochvil - 8.1.90.20180708-31.fc29 +- [dts] Upgrade libstdc++-v3-python to 8.1.1-20180626. + +* Thu Jul 12 2018 Sergio Durigan Junior - 8.1.90.20180708-30.fc29 +- Rebuild due to GCC ABI change. + +* Sun Jul 8 2018 Sergio Durigan Junior - 8.1.90.20180708-29.fc29 +- Rebase to FSF GDB 8.1.90.20180708 (8.2pre). + +* Wed Jul 4 2018 Sergio Durigan Junior - 8.1.50.20180704-28.fc29 +- Rebase to FSF GDB 8.1.50.20180704 (8.2pre). +- Remove defattr directives from specfile. * Mon Jul 02 2018 Miro Hrončok - Rebuilt for Python 3.7 diff --git a/generate-git-repo-from-patches.sh b/generate-git-repo-from-patches.sh index 8f68477..490cca9 100755 --- a/generate-git-repo-from-patches.sh +++ b/generate-git-repo-from-patches.sh @@ -35,8 +35,14 @@ test -f _git_upstream_commit || die "Cannot find _git_upstream_commit file." test -f _patch_order || die "Cannot find _patch_order file." last_ancestor_commit=`cat _git_upstream_commit` + cd $1 + +git name-rev $last_ancestor_commit +test $? -eq 0 || die "Could not find $last_ancestor_commit in the repository $1. Did you run 'git fetch'?" + git checkout $last_ancestor_commit for p in `cat ../_patch_order` ; do git am ../$p + test $? -eq 0 || die "Could not apply patch '$p'." done diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh index 3d454b7..faa64a2 100755 --- a/generate-patches-from-git-repo.sh +++ b/generate-patches-from-git-repo.sh @@ -51,6 +51,10 @@ for f in `cat _patch_order` ; do done cd $1 + +git name-rev $commit_or_tag +test $? -eq 0 || die "Could not find $commit_or_tag in the repository. Did you run 'git fetch'?" + idx=1 common_ancestor=`git merge-base HEAD $commit_or_tag` diff --git a/sources b/sources index d1088ae..109fe02 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz) = 3d540b99581ffa4cf2810bec979c9a01a1f8ce782b7c8efb46b40dd2421d60cdb0e52b53c5477c3e86a57957a2a14489f5c29dc53868738a1ef79e79cf76d0a1 -SHA512 (v1.6.1.tar.gz) = c7c9c8ba78021fff3fde12a216f5729c6031114e5a727f49b7ff1a31c53b5ddba24d1b3aee252d8278ecd1fafe78a44ed059c12b9eb29eca33093e0720673468 -SHA512 (gdb-8.1.50.20180629.tar.xz) = 8950feb5f7a6fef41f6220aa01d93454ed0198b4c0e6fb021da4235b537fab46d46031593e251a6255d9e2a715f0f9174abdf068ee8fc3e1b0c99d60a5b75a95 +SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 +SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 +SHA512 (gdb-8.2.50.20181114.tar.xz) = e8af2d2889aad7c74ede7f6b0dd57de38b9a7a9acaf0433a48338b079388ae3aa84e0697d0fecc022113a07d0873d87e19a43f8d22177118f19b386c3fdbd30c diff --git a/v1.5-libipt-static.patch b/v1.5-libipt-static.patch index 477b6c4..6599445 100644 --- a/v1.5-libipt-static.patch +++ b/v1.5-libipt-static.patch @@ -1,6 +1,8 @@ ---- processor-trace-1.5/libipt/CMakeLists.txt-orig 2016-04-07 08:52:14.000000000 +0200 -+++ processor-trace-1.5/libipt/CMakeLists.txt 2016-08-17 23:12:23.241109244 +0200 -@@ -81,7 +81,7 @@ endif (CMAKE_HOST_WIN32) +Index: processor-trace-2.0/libipt/CMakeLists.txt +=================================================================== +--- processor-trace-2.0.orig/libipt/CMakeLists.txt ++++ processor-trace-2.0/libipt/CMakeLists.txt +@@ -85,7 +85,7 @@ endif (CMAKE_HOST_WIN32) set(LIBIPT_FILES ${LIBIPT_FILES} ${LIBIPT_SECTION_FILES}) @@ -9,8 +11,10 @@ ${LIBIPT_FILES} ) ---- processor-trace-1.5/libipt/src/posix/init.c-orig 2016-04-07 08:52:14.000000000 +0200 -+++ processor-trace-1.5/libipt/src/posix/init.c 2016-08-23 09:04:11.540176668 +0200 +Index: processor-trace-2.0/libipt/src/posix/init.c +=================================================================== +--- processor-trace-2.0.orig/libipt/src/posix/init.c ++++ processor-trace-2.0/libipt/src/posix/init.c @@ -29,7 +29,7 @@ #include "pt_ild.h" diff --git a/v1.6.1-implicit-fallthrough.patch b/v1.6.1-implicit-fallthrough.patch deleted file mode 100644 index db844d3..0000000 --- a/v1.6.1-implicit-fallthrough.patch +++ /dev/null @@ -1,23 +0,0 @@ -gcc-7.1.1-1.fc27.x86_64 -/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c: In function ‘pt_blk_proceed_no_event_cached’: -/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2282:6: error: this statement may fall through [-Werror=implicit-fallthrough=] - if (bce.isize) { - ^ -/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2328:2: note: here - case ptbq_decode: { - ^~~~ - -diff --git a/libipt/src/pt_block_decoder.c b/libipt/src/pt_block_decoder.c -index 21783a6..91d5bb3 100644 ---- a/libipt/src/pt_block_decoder.c -+++ b/libipt/src/pt_block_decoder.c -@@ -2095,6 +2095,9 @@ static int pt_blk_proceed_no_event_cached(struct pt_block_decoder *decoder, - } - - /* Fall through to ptbq_decode. */ -+#if __GNUC__ >= 7 -+ __attribute__ ((fallthrough)); -+#endif - - case ptbq_decode: { - struct pt_insn_ext iext;