diff --git a/.gitignore b/.gitignore index c1dd31d..0d6b990 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz /v2.0.tar.gz -/gdb-8.3.50.20190321.tar.xz +/gdb-8.3.50.20190412.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 02596be..d3ec18e 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -196,273 +196,224 @@ Patch048: gdb-x86_64-i386-syscall-restart.patch #=push+jan: It requires some better DWARF annotations. Patch049: gdb-bz533176-fortran-omp-step.patch -# Fix regression by python on ia64 due to stale current frame. -#=push+jan -Patch050: gdb-follow-child-stale-parent.patch - # Workaround ccache making lineno non-zero for command-line definitions. #=fedoratest: ccache is rarely used and it is even fixed now. -Patch051: gdb-ccache-workaround.patch +Patch050: gdb-ccache-workaround.patch #=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. -Patch052: gdb-archer-pie-addons.patch +Patch051: gdb-archer-pie-addons.patch #=push+jan: Breakpoints disabling matching should not be based on address. -Patch053: gdb-archer-pie-addons-keep-disabled.patch +Patch052: gdb-archer-pie-addons-keep-disabled.patch # Testcase for "Do not make up line information" fix by Daniel Jacobowitz. #=fedoratest -Patch054: gdb-lineno-makeup-test.patch +Patch053: gdb-lineno-makeup-test.patch # Test power7 ppc disassembly. #=fedoratest -Patch055: gdb-ppc-power7-test.patch - -# Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866). -# Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). -#=push+jan: It should be fixed properly instead. -Patch056: gdb-bz541866-rwatch-before-run.patch +Patch054: gdb-ppc-power7-test.patch # Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623). #=push+jan: Currently it is still not fully safe. -Patch057: gdb-moribund-utrace-workaround.patch +Patch055: gdb-moribund-utrace-workaround.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). #=fedoratest -Patch058: gdb-archer-next-over-throw-cxx-exec.patch +Patch056: gdb-archer-next-over-throw-cxx-exec.patch # Backport DWARF-4 support (BZ 601887, Tom Tromey). #=fedoratest -Patch059: gdb-bz601887-dwarf4-rh-test.patch +Patch057: gdb-bz601887-dwarf4-rh-test.patch #=push+jan -Patch060: gdb-6.6-buildid-locate-core-as-arg.patch +Patch058: gdb-6.6-buildid-locate-core-as-arg.patch # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). #=push+jan -Patch061: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch059: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). #=fedoratest -Patch062: gdb-test-bt-cfi-without-die.patch +Patch060: gdb-test-bt-cfi-without-die.patch # Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248). #=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted. -Patch063: gdb-bz568248-oom-is-error.patch +Patch061: gdb-bz568248-oom-is-error.patch # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). #=fedoratest -Patch064: gdb-bz634108-solib_address.patch +Patch062: gdb-bz634108-solib_address.patch # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). #=fedoratest -Patch065: gdb-test-pid0-core.patch +Patch063: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch066: gdb-test-dw2-aranges.patch +Patch064: gdb-test-dw2-aranges.patch # [archer-keiths-expr-cumulative+upstream] Import C++ testcases. #=fedoratest -Patch067: gdb-test-expr-cumulative-archer.patch +Patch065: gdb-test-expr-cumulative-archer.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch068: gdb-physname-pr11734-test.patch +Patch066: gdb-physname-pr11734-test.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch069: gdb-physname-pr12273-test.patch +Patch067: gdb-physname-pr12273-test.patch # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). #=fedoratest -Patch070: gdb-test-ivy-bridge.patch +Patch068: gdb-test-ivy-bridge.patch # Hack for proper PIE run of the testsuite. #=fedoratest -Patch071: gdb-runtest-pie-override.patch +Patch069: gdb-runtest-pie-override.patch # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). #=push+jan -Patch072: gdb-attach-fail-reasons-5of5.patch +Patch070: gdb-attach-fail-reasons-5of5.patch # Workaround PR libc/14166 for inferior calls of strstr. #=fedoratest: Compatibility with RHELs (unchecked which ones). -Patch073: gdb-glibc-strstr-workaround.patch +Patch071: gdb-glibc-strstr-workaround.patch # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). #=fedoratest -Patch074: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch072: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). #=fedoratest -Patch075: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch076: gdb-rhbz795424-bitpos-20of25.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch077: gdb-rhbz795424-bitpos-21of25.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch078: gdb-rhbz795424-bitpos-22of25.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch079: gdb-rhbz795424-bitpos-23of25.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch080: gdb-rhbz795424-bitpos-25of25.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch081: gdb-rhbz795424-bitpos-25of25-test.patch - -# Fix `GDB cannot access struct member whose offset is larger than 256MB' -# (RH BZ 795424). -#=push -Patch082: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch073: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch # Import regression test for `gdb/findvar.c:417: internal-error: # read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. #=fedoratest -Patch083: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch074: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). #=push+jan -Patch084: gdb-gnat-dwarf-crash-3of3.patch +Patch075: gdb-gnat-dwarf-crash-3of3.patch # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) #=fedoratest -Patch085: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch076: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch # Fix 'gdb gives highly misleading error when debuginfo pkg is present, # but not corresponding binary pkg' (RH BZ 981154). #=push+jan -Patch086: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch077: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch #=fedoratest -Patch087: gdb-archer-vla-tests.patch +Patch078: gdb-archer-vla-tests.patch #=fedoratest -Patch088: gdb-vla-intel-tests.patch +Patch079: gdb-vla-intel-tests.patch # Continue backtrace even if a frame filter throws an exception (Phil Muldoon). #=push -Patch089: gdb-btrobust.patch +Patch080: gdb-btrobust.patch # Display Fortran strings in backtraces. #=fedoratest -Patch090: gdb-fortran-frame-string.patch +Patch081: gdb-fortran-frame-string.patch # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # crash.' (RH BZ 1156192). #=fedoratest -Patch091: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch082: gdb-rhbz1156192-recursive-dlopen-test.patch # Fix jit-reader.h for multi-lib. #=push+jan -Patch092: gdb-jit-reader-multilib.patch +Patch083: gdb-jit-reader-multilib.patch # Fix '`catch syscall' doesn't work for parent after `fork' is called' # (Philippe Waroquiers, RH BZ 1149205). #=fedoratest -Patch093: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch084: gdb-rhbz1149205-catch-syscall-after-fork-test.patch # Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug # description: 'C++ (and objc): Internal error on unqualified name # re-set', PR 11657] (RH BZ 1186476). #=fedoratest -Patch094: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch085: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch # Test 'info type-printers' Python error (RH BZ 1350436). #=fedoratest -Patch095: gdb-rhbz1350436-type-printers-error.patch +Patch086: gdb-rhbz1350436-type-printers-error.patch # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Kratochvil, RH BZ 1084404). #=fedoratest -Patch096: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch087: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch # Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747). #=push+jan -Patch097: gdb-bz1219747-attach-kills.patch +Patch088: gdb-bz1219747-attach-kills.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). #=push+jan -Patch098: gdb-fedora-libncursesw.patch +Patch089: gdb-fedora-libncursesw.patch # Test clflushopt instruction decode (for RH BZ 1262471). #=fedoratest -Patch099: gdb-opcodes-clflushopt-test.patch +Patch090: gdb-opcodes-clflushopt-test.patch # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). #=fedora -Patch100: gdb-dts-rhel6-python-compat.patch +Patch091: gdb-dts-rhel6-python-compat.patch # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). #=push+jan -Patch101: gdb-6.6-buildid-locate-rpm-scl.patch +Patch092: gdb-6.6-buildid-locate-rpm-scl.patch # Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131). #=fedora -Patch102: gdb-readline62-ask-more-rh.patch +Patch093: gdb-readline62-ask-more-rh.patch # Make the GDB quit processing non-abortable to cleanup everything properly. #=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch . -Patch103: gdb-6.8-quit-never-aborts.patch +Patch094: gdb-6.8-quit-never-aborts.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=fedoratest -Patch104: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch095: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). #=fedora -Patch105: gdb-container-rh-pkg.patch +Patch096: gdb-container-rh-pkg.patch # New test for Python "Cannot locate object file for block" (for RH BZ 1325795). #=fedoratest -Patch106: gdb-rhbz1325795-framefilters-test.patch +Patch097: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). #=fedora -Patch107: gdb-linux_perf-bundle.patch +Patch098: gdb-linux_perf-bundle.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). #=fedora -Patch108: gdb-libexec-add-index.patch +Patch099: gdb-libexec-add-index.patch # New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). #=fedoratest -Patch109: gdb-rhbz1398387-tab-crash-test.patch +Patch100: gdb-rhbz1398387-tab-crash-test.patch # [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). #=fedoratest -Patch110: gdb-testsuite-readline63-sigint.patch +Patch101: gdb-testsuite-readline63-sigint.patch # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher #=push -Patch111: gdb-archer.patch +Patch102: gdb-archer.patch # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd -Patch112: gdb-vla-intel-fix-print-char-array.patch +Patch103: gdb-vla-intel-fix-print-char-array.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch113: gdb-rhbz1553104-s390x-arch12-test.patch - -# This patch is needed to compile GDB after -Werror=narrowing has -# been enabled by default. -# Author: Sergio Durigan Junior. -Patch114: gdb-rhbz795424-bitpos-arrayview.patch +Patch104: gdb-rhbz1553104-s390x-arch12-test.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index afc8a74..2e5e265 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -102,13 +102,3 @@ %patch102 -p1 %patch103 -p1 %patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index 3a0215e..f1d9f05 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -cc00a5d100973549bf5e4840937529633f4de1fa +3822612df0694cc07597e534fa73b34aa2540812 diff --git a/_patch_order b/_patch_order index 89f69fe..e712423 100644 --- a/_patch_order +++ b/_patch_order @@ -47,13 +47,11 @@ gdb-simultaneous-step-resume-breakpoint-test.patch gdb-core-open-vdso-warning.patch gdb-x86_64-i386-syscall-restart.patch gdb-bz533176-fortran-omp-step.patch -gdb-follow-child-stale-parent.patch gdb-ccache-workaround.patch gdb-archer-pie-addons.patch gdb-archer-pie-addons-keep-disabled.patch gdb-lineno-makeup-test.patch gdb-ppc-power7-test.patch -gdb-bz541866-rwatch-before-run.patch gdb-moribund-utrace-workaround.patch gdb-archer-next-over-throw-cxx-exec.patch gdb-bz601887-dwarf4-rh-test.patch @@ -73,13 +71,6 @@ gdb-attach-fail-reasons-5of5.patch gdb-glibc-strstr-workaround.patch gdb-rhel5.9-testcase-xlf-var-inside-mod.patch gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch -gdb-rhbz795424-bitpos-20of25.patch -gdb-rhbz795424-bitpos-21of25.patch -gdb-rhbz795424-bitpos-22of25.patch -gdb-rhbz795424-bitpos-23of25.patch -gdb-rhbz795424-bitpos-25of25.patch -gdb-rhbz795424-bitpos-25of25-test.patch -gdb-rhbz795424-bitpos-lazyvalue.patch gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch gdb-gnat-dwarf-crash-3of3.patch gdb-rhbz1007614-memleak-infpy_read_memory-test.patch @@ -111,4 +102,3 @@ gdb-testsuite-readline63-sigint.patch gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch -gdb-rhbz795424-bitpos-arrayview.patch diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index 6690e15..6ba993d 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 -@@ -1749,7 +1749,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force +@@ -1751,7 +1751,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force install: all @$(MAKE) $(FLAGS_TO_PASS) install-only @@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e "$$t"` ; \ if test "x$$transformed_name" = x; then \ -@@ -1798,7 +1798,25 @@ install-guile: +@@ -1800,7 +1800,25 @@ install-guile: install-python: $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb @@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in transformed_name=`t='$(program_transform_name)'; \ echo gdb | sed -e $$t` ; \ if test "x$$transformed_name" = x; then \ -@@ -1821,6 +1839,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -1823,6 +1841,18 @@ uninstall: force $(CONFIG_UNINSTALL) fi @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do diff --git a/gdb-6.3-rh-testversion-20041202.patch b/gdb-6.3-rh-testversion-20041202.patch index ebfbf1b..e50bc7a 100644 --- a/gdb-6.3-rh-testversion-20041202.patch +++ b/gdb-6.3-rh-testversion-20041202.patch @@ -24,3 +24,15 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest } # start the "xgdb" process +diff --git a/gdb/top.c b/gdb/top.c +--- a/gdb/top.c ++++ b/gdb/top.c +@@ -2011,7 +2011,7 @@ init_gdb_version_vars (void) + struct internalvar *major_version_var = create_internalvar ("_gdb_major"); + struct internalvar *minor_version_var = create_internalvar ("_gdb_minor"); + int vmajor = 0, vminor = 0, vrevision = 0; +- sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision); ++ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision); + set_internalvar_integer (major_version_var, vmajor); + set_internalvar_integer (minor_version_var, vminor + (vrevision > 0)); + } diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index 16f7fc4..d54287f 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -127,7 +127,7 @@ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c -@@ -2601,6 +2601,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2600,6 +2600,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -135,7 +135,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2609,6 +2610,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2608,6 +2609,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, if (cache->base == 0) return UNWIND_OUTERMOST; @@ -146,7 +146,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c return UNWIND_NO_REASON; } -@@ -2743,6 +2748,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2741,6 +2746,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, { struct amd64_frame_cache *cache = amd64_sigtramp_frame_cache (this_frame, this_cache); @@ -154,7 +154,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c if (!cache->base_p) (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); -@@ -2751,6 +2757,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2749,6 +2755,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, /* This marks the outermost frame. */ return; } @@ -169,7 +169,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8420,6 +8420,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -8417,6 +8417,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->xsave_xcr0_offset = -1; 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 319515b..bbd635f 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 -@@ -3177,6 +3177,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) +@@ -3168,6 +3168,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) SYMBOL_LINKAGE_NAME (msymbol)); */ ; /* fall through */ diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index f8a8315..8b49cfd 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -64,7 +64,7 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h --- a/gdb/common/common-exceptions.h +++ b/gdb/common/common-exceptions.h -@@ -104,6 +104,9 @@ enum errors { +@@ -106,6 +106,9 @@ enum errors { "_ERROR" is appended to the name. */ MAX_COMPLETIONS_REACHED_ERROR, @@ -77,15 +77,16 @@ diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h diff --git a/gdb/exec.c b/gdb/exec.c --- a/gdb/exec.c +++ b/gdb/exec.c -@@ -36,6 +36,7 @@ - #include "gdb_bfd.h" - #include "gcore.h" - #include "source.h" -+#include "exceptions.h" +@@ -18,6 +18,8 @@ + along with this program. If not, see . */ - #include - #include "readline/readline.h" -@@ -355,12 +356,27 @@ exec_file_attach (const char *filename, int from_tty) + #include "defs.h" ++#include "arch-utils.h" ++#include "exceptions.h" + #include "frame.h" + #include "inferior.h" + #include "target.h" +@@ -345,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty) if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -119,7 +120,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -440,6 +440,35 @@ struct cmdarg +@@ -439,6 +439,34 @@ struct cmdarg char *string; }; @@ -132,11 +133,11 @@ diff --git a/gdb/main.c b/gdb/main.c +{ + gdb_assert (exec_bfd == NULL); + -+ TRY ++ try + { + exec_file_attach (filename, from_tty); + } -+ CATCH (e, RETURN_MASK_ALL) ++ catch (const gdb_exception_error &e) + { + if (e.error == IS_CORE_ERROR) + { @@ -149,13 +150,12 @@ diff --git a/gdb/main.c b/gdb/main.c + } + throw_exception (e); + } -+ END_CATCH +} + static void captured_main_1 (struct captured_main_args *context) { -@@ -885,6 +914,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -884,6 +912,8 @@ captured_main_1 (struct captured_main_args *context) { symarg = argv[optind]; execarg = argv[optind]; @@ -164,7 +164,7 @@ diff --git a/gdb/main.c b/gdb/main.c optind++; } -@@ -1035,12 +1066,25 @@ captured_main_1 (struct captured_main_args *context) +@@ -1034,12 +1064,25 @@ captured_main_1 (struct captured_main_args *context) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index 61baf82..0634527 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 -@@ -711,6 +711,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -710,6 +710,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) #include #endif diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 12e15eb..436a31f 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 -@@ -745,7 +745,11 @@ static int missing_rpm_list_entries; +@@ -744,7 +744,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { static int rpm_init_done = 0; rpmts ts; -@@ -852,7 +856,11 @@ missing_rpm_enlist (const char *filename) +@@ -851,7 +855,11 @@ missing_rpm_enlist (const char *filename) mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { Header h; char *debuginfo, **slot, *s, *s2; -@@ -970,6 +978,37 @@ missing_rpm_enlist (const char *filename) +@@ -969,6 +977,37 @@ missing_rpm_enlist (const char *filename) xfree (debuginfo); count++; } @@ -74,7 +74,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c rpmdbFreeIterator_p (mi); } -@@ -979,6 +1018,20 @@ missing_rpm_enlist (const char *filename) +@@ -978,6 +1017,20 @@ missing_rpm_enlist (const char *filename) return count; } diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 9506331..5e2b2dc 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -235,20 +235,15 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -35,6 +35,8 @@ - #include "elf/common.h" - #include "elf-bfd.h" - #include -+#include "elf/external.h" +@@ -31,6 +31,7 @@ + #include "gdb_bfd.h" + #include "gdbcmd.h" + #include "gdbcore.h" +#include "inferior.h" - - #define BUILD_ID_VERBOSE_NONE 0 - #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -696,12 +698,362 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) - return NULL; - - result = xstrdup (bfd_get_filename (abfd)); -- abfd.release (); + #include "libbfd.h" + #include "objfiles.h" + #include "observable.h" +@@ -699,8 +700,359 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) return result; } @@ -609,7 +604,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -755,11 +1107,17 @@ missing_filepair_change (void) +@@ -754,11 +1106,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -627,7 +622,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c missing_filepair_change (); } -@@ -826,14 +1184,39 @@ debug_print_missing (const char *binary, const char *debug) +@@ -825,14 +1183,39 @@ debug_print_missing (const char *binary, const char *debug) *slot = missing_filepair; @@ -1456,55 +1451,11 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/corelow.c b/gdb/corelow.c --- a/gdb/corelow.c +++ b/gdb/corelow.c -@@ -330,10 +330,9 @@ static void - build_id_locate_exec (int from_tty) - { - CORE_ADDR at_entry; -- struct bfd_build_id *build_id; -- char *execfilename; -+ gdb::unique_xmalloc_ptr build_id; -+ gdb::unique_xmalloc_ptr execfilename; - char *build_id_filename; -- struct cleanup *back_to; - - if (exec_bfd != NULL || symfile_objfile != NULL) - return; -@@ -341,10 +340,9 @@ build_id_locate_exec (int from_tty) - if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0) - return; - -- build_id = build_id_addr_get (at_entry); -+ build_id.reset (build_id_addr_get (at_entry)); - if (build_id == NULL) - return; -- back_to = make_cleanup (xfree, build_id); - - /* SYMFILE_OBJFILE should refer to the main executable (not only to its - separate debug info file). gcc44+ keeps .eh_frame only in the main -@@ -352,22 +350,19 @@ build_id_locate_exec (int from_tty) - file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer - directly to the separate debug info file. */ - -- execfilename = build_id_to_filename (build_id, &build_id_filename); -- make_cleanup (xfree, build_id_filename); -+ execfilename.reset (build_id_to_filename (build_id.get (), -+ &build_id_filename)); - - if (execfilename != NULL) - { -- make_cleanup (xfree, execfilename); -- exec_file_attach (execfilename, from_tty); -- symbol_file_add_main (execfilename, -+ exec_file_attach (execfilename.get (), from_tty); -+ symbol_file_add_main (execfilename.get (), - symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE)); - if (symfile_objfile != NULL) +@@ -362,7 +362,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else - debug_print_missing (_("the main executable file"), build_id_filename); -- -- do_cleanups (back_to); + debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename); /* No automatic SOLIB_ADD as the libraries would get read twice. */ @@ -1520,7 +1471,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c /* readline include files. */ #include "readline/readline.h" -@@ -359,6 +360,8 @@ display_gdb_prompt (const char *new_prompt) +@@ -358,6 +359,8 @@ display_gdb_prompt (const char *new_prompt) /* Reset the nesting depth used when trace-commands is set. */ reset_command_nest_depth (); @@ -1529,7 +1480,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c /* Do not call the python hook on an explicit prompt change as passed to this function, as this forms a secondary/local prompt, IE, displayed but not set. */ -@@ -770,7 +773,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl) +@@ -769,7 +772,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl) command_handler (cmd); if (ui->prompt_state != PROMPTED) diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index 797ded0..9c419d5 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 -@@ -1348,14 +1348,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1346,14 +1346,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, } { @@ -44,7 +44,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c if (build_id != NULL) { char *name, *build_id_filename; -@@ -1370,23 +1383,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1368,23 +1381,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, xfree (name); } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 6db8389..2054987 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -9,19 +9,25 @@ Subject: gdb-6.6-buildid-locate.patch diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -26,11 +26,67 @@ - #include "objfiles.h" - #include "filenames.h" - #include "gdbcore.h" -+#include "libbfd.h" -+#include "gdbcore.h" -+#include "gdbcmd.h" -+#include "observable.h" +@@ -22,15 +22,71 @@ + #include "gdb_bfd.h" + #include "build-id.h" + #include "common/gdb_vecs.h" +-#include "symfile.h" +-#include "objfiles.h" ++#include ++#include "elf-bfd.h" ++#include "elf/common.h" +#include "elf/external.h" +#include "elf/internal.h" -+#include "elf/common.h" -+#include "elf-bfd.h" -+#include + #include "filenames.h" ++#include "gdb_bfd.h" ++#include "gdbcmd.h" + #include "gdbcore.h" ++#include "libbfd.h" ++#include "objfiles.h" ++#include "observable.h" ++#include "symfile.h" + +#define BUILD_ID_VERBOSE_NONE 0 +#define BUILD_ID_VERBOSE_FILENAMES 1 @@ -554,7 +560,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + + /* We expect to be silent on the non-existing files. */ + gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename.get (), gnutarget, -1); -+ + +- return {}; + if (debug_bfd == NULL) + { + if (separate_debug_file_debug) @@ -570,8 +577,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + + continue; + } - -- return {}; ++ + ret_bfd = debug_bfd; + break; } @@ -593,13 +599,13 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + + if (add_debug_suffix) + link0 += ".debug"; -+ + +- return {}; + /* If the symlink has target request to install the target. + BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. + https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ + std::string link0_resolved (link_resolve (link0.c_str (), 0)); - -- return {}; ++ + if (link_all.empty ()) + link_all = link0_resolved; + else @@ -669,7 +675,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c if (debug_bfd != NULL) return debug_bfd; } -@@ -175,22 +685,190 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) +@@ -175,22 +685,189 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) return {}; } @@ -684,7 +690,6 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + return NULL; + + result = xstrdup (bfd_get_filename (abfd)); -+ abfd.release (); + return result; +} + @@ -863,7 +868,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd.get ()), -@@ -203,3 +881,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) +@@ -203,3 +880,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) return std::string (); } @@ -940,18 +945,18 @@ diff --git a/gdb/coffread.c b/gdb/coffread.c diff --git a/gdb/corelow.c b/gdb/corelow.c --- a/gdb/corelow.c +++ b/gdb/corelow.c -@@ -43,6 +43,10 @@ - #include "gdb_bfd.h" - #include "completer.h" - #include "common/filestuff.h" +@@ -22,6 +22,10 @@ + #include + #include + #include "frame.h" /* required by inferior.h */ +#include "auxv.h" ++#include "build-id.h" +#include "elf/common.h" +#include "gdbcmd.h" -+#include "build-id.h" - - #ifndef O_LARGEFILE - #define O_LARGEFILE 0 -@@ -320,6 +324,54 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg) + #include "inferior.h" + #include "infrun.h" + #include "symtab.h" +@@ -320,6 +324,49 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg) inferior_ptid = ptid; /* Yes, make it current. */ } @@ -961,10 +966,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c +build_id_locate_exec (int from_tty) +{ + CORE_ADDR at_entry; -+ struct bfd_build_id *build_id; -+ char *execfilename; ++ gdb::unique_xmalloc_ptr build_id; ++ gdb::unique_xmalloc_ptr execfilename; + char *build_id_filename; -+ struct cleanup *back_to; + + if (exec_bfd != NULL || symfile_objfile != NULL) + return; @@ -972,10 +976,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c + if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0) + return; + -+ build_id = build_id_addr_get (at_entry); ++ build_id.reset (build_id_addr_get (at_entry)); + if (build_id == NULL) + return; -+ back_to = make_cleanup (xfree, build_id); + + /* SYMFILE_OBJFILE should refer to the main executable (not only to its + separate debug info file). gcc44+ keeps .eh_frame only in the main @@ -983,14 +986,13 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c + file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer + directly to the separate debug info file. */ + -+ execfilename = build_id_to_filename (build_id, &build_id_filename); -+ make_cleanup (xfree, build_id_filename); ++ execfilename.reset (build_id_to_filename (build_id.get (), ++ &build_id_filename)); + + if (execfilename != NULL) + { -+ make_cleanup (xfree, execfilename); -+ exec_file_attach (execfilename, from_tty); -+ symbol_file_add_main (execfilename, ++ exec_file_attach (execfilename.get (), from_tty); ++ symbol_file_add_main (execfilename.get (), + symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE)); + if (symfile_objfile != NULL) + symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; @@ -998,15 +1000,13 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c + else + debug_print_missing (_("the main executable file"), build_id_filename); + -+ do_cleanups (back_to); -+ + /* No automatic SOLIB_ADD as the libraries would get read twice. */ +} + /* Issue a message saying we have no core to debug, if FROM_TTY. */ static void -@@ -455,6 +507,14 @@ core_target_open (const char *arg, int from_tty) +@@ -455,6 +502,14 @@ core_target_open (const char *arg, int from_tty) switch_to_thread (thread); } @@ -1021,7 +1021,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c post_create_inferior (target, from_tty); /* Now go through the target stack looking for threads since there -@@ -1061,4 +1121,11 @@ void +@@ -1059,4 +1114,11 @@ void _initialize_corelow (void) { add_target (core_target_info, core_target_open, filename_completer); @@ -1036,7 +1036,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -19945,6 +19945,27 @@ information files. +@@ -19967,6 +19967,27 @@ information files. @end table @@ -1134,7 +1134,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c diff --git a/gdb/objfiles.h b/gdb/objfiles.h --- a/gdb/objfiles.h +++ b/gdb/objfiles.h -@@ -553,6 +553,10 @@ struct objfile +@@ -618,6 +618,10 @@ struct objfile htab_t static_links {}; }; @@ -1150,14 +1150,14 @@ diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c @@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure) - TRY + try { - build_id = build_id_bfd_get (objfile->obfd); + build_id = build_id_bfd_shdr_get (objfile->obfd); } - CATCH (except, RETURN_MASK_ALL) + catch (const gdb_exception &except) { -@@ -535,7 +535,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) +@@ -533,7 +533,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) /* Don't return separate debug files. */ if (objfile->separate_debug_objfile_backlink != NULL) continue; @@ -1177,7 +1177,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1346,9 +1347,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1344,9 +1345,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, continue; } @@ -1297,7 +1297,7 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp -@@ -1697,6 +1697,16 @@ proc default_gdb_start { } { +@@ -1716,6 +1716,16 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index 8bf061c..4fe6c1a 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 -@@ -2065,7 +2065,7 @@ static const char *const scheduler_enums[] = { +@@ -2068,7 +2068,7 @@ static const char *const scheduler_enums[] = { schedlock_replay, NULL }; diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index dc66e93..413ba3f 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 -@@ -1617,7 +1617,13 @@ quit_force (int *exit_arg, int from_tty) +@@ -1618,7 +1618,13 @@ quit_force (int *exit_arg, int from_tty) qt.from_tty = from_tty; @@ -58,7 +58,7 @@ diff --git a/gdb/top.c b/gdb/top.c +#endif /* Get out of tfind mode, and kill or detach all inferiors. */ - TRY + try diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index 0a40fa4..fcf6408 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons-keep-disabled.patch diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15451,6 +15451,50 @@ static struct cmd_list_element *enablebreaklist = NULL; +@@ -15437,6 +15437,50 @@ static struct cmd_list_element *enablebreaklist = NULL; cmd_list_element *commands_cmd_element = nullptr; diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index 6819e3a..5a3e678 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -51,7 +51,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/value.c b/gdb/value.c --- a/gdb/value.c +++ b/gdb/value.c -@@ -2827,7 +2827,8 @@ value_static_field (struct type *type, int fieldno) +@@ -2825,7 +2825,8 @@ value_static_field (struct type *type, int fieldno) { case FIELD_LOC_KIND_PHYSADDR: retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno), diff --git a/gdb-archer.patch b/gdb-archer.patch index 01788c4..af14dad 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 -@@ -2082,6 +2082,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -2084,6 +2084,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -112,7 +112,7 @@ diff --git a/gdb/main.c b/gdb/main.c #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -470,7 +471,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) +@@ -468,7 +469,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) } static void @@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int argc = context->argc; char **argv = context->argv; -@@ -690,10 +691,14 @@ captured_main_1 (struct captured_main_args *context) +@@ -688,10 +689,14 @@ captured_main_1 (struct captured_main_args *context) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int option_index; -@@ -711,6 +716,9 @@ captured_main_1 (struct captured_main_args *context) +@@ -709,6 +714,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c case OPT_SE: symarg = optarg; execarg = optarg; -@@ -890,7 +898,31 @@ captured_main_1 (struct captured_main_args *context) +@@ -888,7 +896,31 @@ captured_main_1 (struct captured_main_args *context) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1191,7 +1223,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -1189,7 +1221,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c if (batch_flag) { -@@ -1207,24 +1240,37 @@ static void +@@ -1205,22 +1238,35 @@ static void captured_main (void *data) { struct captured_main_args *context = (struct captured_main_args *) data; @@ -207,11 +207,11 @@ diff --git a/gdb/main.c b/gdb/main.c +#if HAVE_PYTHON + if (python_script) { -- TRY +- try - { - captured_command_loop (); - } -- CATCH (ex, RETURN_MASK_ALL) +- catch (const gdb_exception &ex) + extern int pagination_enabled; + pagination_enabled = 0; + run_python_script (context->argc - optind, &context->argv[optind]); @@ -227,21 +227,18 @@ diff --git a/gdb/main.c b/gdb/main.c + while (1) { - exception_print (gdb_stderr, ex); -+ TRY ++ try + { + captured_command_loop (); + } -+ CATCH (ex, RETURN_MASK_ALL) ++ catch (const gdb_exception &ex) + { + exception_print (gdb_stderr, ex); + } -+ END_CATCH } -- END_CATCH } /* No exit -- exit is through quit_command. */ - } -@@ -1267,6 +1313,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1263,6 +1309,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ @@ -254,7 +251,7 @@ diff --git a/gdb/main.c b/gdb/main.c gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1312,6 +1364,13 @@ Output and user interface control:\n\n\ +@@ -1308,6 +1360,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -374,7 +371,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -1283,6 +1285,94 @@ gdbpy_print_stack_or_quit () +@@ -1276,6 +1278,94 @@ gdbpy_print_stack_or_quit () @@ -469,7 +466,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c /* Return a sequence holding all the Progspaces. */ static PyObject * -@@ -1935,6 +2025,8 @@ PyMethodDef python_GdbMethods[] = +@@ -1928,6 +2018,8 @@ PyMethodDef python_GdbMethods[] = Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ a Python String containing the output of the command if to_string is\n\ set to True." }, diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 1ed78da..1f248c3 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -255,7 +255,7 @@ diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c -@@ -967,7 +967,16 @@ linux_ptrace_fun () +@@ -971,7 +971,16 @@ linux_ptrace_fun () { if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) < 0) @@ -276,22 +276,21 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -1098,7 +1098,17 @@ linux_nat_target::create_inferior (const char *exec_file, +@@ -1098,7 +1098,16 @@ linux_nat_target::create_inferior (const char *exec_file, /* Make sure we report all signals during startup. */ pass_signals ({}); - inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty); -+ TRY ++ try + { + inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty); + } -+ CATCH (ex, RETURN_MASK_ERROR) ++ catch (const gdb_exception_error &ex) + { + std::string result = linux_ptrace_create_warnings (); + -+ throw_error (ex.error, "%s%s", result.c_str (), ex.message); ++ throw_error (ex.error, "%s%s", result.c_str (), ex.message->c_str ()); + } -+ END_CATCH } /* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not diff --git a/gdb-btrobust.patch b/gdb-btrobust.patch index c162628..7fe9eb3 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 -@@ -1139,6 +1139,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1138,6 +1138,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, htab_eq_pointer, NULL)); @@ -22,7 +22,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c while (true) { gdbpy_ref<> item (PyIter_Next (iterable.get ())); -@@ -1147,8 +1148,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1146,8 +1147,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, { if (PyErr_Occurred ()) { @@ -33,7 +33,7 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c } break; } -@@ -1181,7 +1182,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, +@@ -1179,7 +1180,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, /* Do not exit on error printing a single frame. Print the error and continue with other frames. */ if (success == EXT_LANG_BT_ERROR) diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 4ed6c0d..acad0b6 100644 --- a/gdb-bz1219747-attach-kills.patch +++ b/gdb-bz1219747-attach-kills.patch @@ -80,7 +80,7 @@ gdb/testsuite/ChangeLog diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -1121,7 +1121,10 @@ captured_main_1 (struct captured_main_args *context) +@@ -1119,7 +1119,10 @@ captured_main_1 (struct captured_main_args *context) { ret = catch_command_errors (attach_command, pid_or_core_arg, !batch_flag); diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index 69b2552..b8a4ac4 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 -@@ -6492,6 +6492,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6448,6 +6448,16 @@ process_event_stop_test (struct execution_control_state *ecs) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { @@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -6525,6 +6535,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6481,6 +6491,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch deleted file mode 100644 index b7c8ecf..0000000 --- a/gdb-bz541866-rwatch-before-run.patch +++ /dev/null @@ -1,175 +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-bz541866-rwatch-before-run.patch - -;; Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866). -;; Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). -;;=push+jan: It should be fixed properly instead. - -diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c ---- a/gdb/breakpoint.c -+++ b/gdb/breakpoint.c -@@ -8783,7 +8783,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, - int enabled, int internal, unsigned flags, - int display_canonical) - { -- int i; -+ int i ATTRIBUTE_UNUSED; - - if (type == bp_hardware_breakpoint) - { -@@ -14281,7 +14281,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, - - if (bpt->type == bp_hardware_breakpoint) - { -- int i; -+ int i ATTRIBUTE_UNUSED; - i = hw_breakpoint_used_count (); - target_resources_ok = - target_can_use_hardware_watchpoint (bp_hardware_breakpoint, -diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h -new file mode 100644 ---- /dev/null -+++ b/gdb/config/i386/nm-linux.h -@@ -0,0 +1,28 @@ -+/* Native support for GNU/Linux i386. -+ -+ Copyright 2010 Free Software Foundation, Inc. -+ -+ This file is part of GDB. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+#ifndef NM_LINUX_H -+#define NM_LINUX_H -+ -+#include "config/nm-linux.h" -+ -+/* Red Hat backward compatibility with gdb-6.8. */ -+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 -+ -+#endif /* NM_LINUX64_H */ -diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h -new file mode 100644 ---- /dev/null -+++ b/gdb/config/i386/nm-linux64.h -@@ -0,0 +1,28 @@ -+/* Native support for GNU/Linux amd64. -+ -+ Copyright 2010 Free Software Foundation, Inc. -+ -+ This file is part of GDB. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+#ifndef NM_LINUX64_H -+#define NM_LINUX64_H -+ -+#include "config/nm-linux.h" -+ -+/* Red Hat backward compatibility with gdb-6.8. */ -+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 -+ -+#endif /* NM_LINUX64_H */ -diff --git a/gdb/configure.nat b/gdb/configure.nat ---- a/gdb/configure.nat -+++ b/gdb/configure.nat -@@ -245,6 +245,7 @@ case ${gdb_host} in - ;; - i386) - # Host: Intel 386 running GNU/Linux. -+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h" - NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \ - i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \ - nat/x86-linux.o nat/x86-linux-dregs.o" -@@ -301,6 +302,7 @@ case ${gdb_host} in - case ${gdb_host_cpu} in - i386) - # Host: GNU/Linux x86-64 -+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h" - NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \ - amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \ - nat/linux-btrace.o \ -diff --git a/gdb/target.h b/gdb/target.h ---- a/gdb/target.h -+++ b/gdb/target.h -@@ -1971,9 +1971,11 @@ extern struct thread_info *target_thread_handle_to_thread_info - one. OTHERTYPE is the number of watchpoints of other types than - this one used so far. */ - -+#ifndef target_can_use_hardware_watchpoint - #define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \ - (current_top_target ()->can_use_hw_breakpoint) ( \ - TYPE, CNT, OTHERTYPE) -+#endif - - /* Returns the number of debug registers needed to watch the given - memory region, or zero if not supported. */ -diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp -@@ -0,0 +1,40 @@ -+# Copyright 2009, 2010 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set. -+if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] -+ && ![istarget "ia64-*-*"]) -+ || [target_info exists gdb,no_hardware_watchpoints]} then { -+ verbose "Skipping watchpoint-hw-before-run test." -+ return -+} -+ -+set test watchpoint-hw-before-run -+set srcfile watchpoint-hw-hit-once.c -+if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } { -+ return -1 -+} -+ -+gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee" -+ -+# `runto_main' or `runto main' would delete the watchpoint created above. -+ -+if { [gdb_start_cmd] < 0 } { -+ untested start -+ return -1 -+} -+gdb_test "" "main .* at .*" "start" -+ -+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch index 73955f0..e77b415 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 -@@ -13922,7 +13922,17 @@ remote_target::pid_to_exec_file (int pid) +@@ -13920,7 +13920,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/gdb-follow-child-stale-parent.patch b/gdb-follow-child-stale-parent.patch deleted file mode 100644 index 57660ed..0000000 --- a/gdb-follow-child-stale-parent.patch +++ /dev/null @@ -1,36 +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-follow-child-stale-parent.patch - -;; Fix regression by python on ia64 due to stale current frame. -;;=push+jan - -Problem occurs with python and its get_current_arch () as it selects -selected_frame and current_frame while still inferior_ptid is valid for the -original parent. But since this place it is already attached and later -unwinders try to access it, breaking: - -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork - -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork - -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork - -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork - -PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish - +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork - +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork - +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork - +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork - +FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish - -diff --git a/gdb/infrun.c b/gdb/infrun.c ---- a/gdb/infrun.c -+++ b/gdb/infrun.c -@@ -755,6 +755,9 @@ follow_fork (void) - } - else - { -+ /* Possibly referenced PARENT is no longer valid. */ -+ reinit_frame_cache (); -+ - /* This pending follow fork event is now handled, one way - or another. The previous selected thread may be gone - from the lists by now, but if it is still around, need diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch index 4865715..00e123e 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 -@@ -10587,6 +10587,13 @@ private: +@@ -10586,6 +10586,13 @@ private: static void process_die (struct die_info *die, struct dwarf2_cu *cu) { @@ -99,7 +99,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c /* The process is definitely stopped. It is in a job control stop, unless the kernel predates the TASK_STOPPED / -@@ -1368,6 +1377,25 @@ get_detach_signal (struct lwp_info *lp) +@@ -1367,6 +1376,25 @@ get_detach_signal (struct lwp_info *lp) return gdb_signal_to_host (signo); } @@ -125,7 +125,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c return 0; } -@@ -1517,6 +1545,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) +@@ -1515,6 +1543,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) detach_one_lwp (main_lwp, &signo); detach_success (inf); @@ -136,7 +136,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c } } -@@ -1775,6 +1807,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) +@@ -1772,6 +1804,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) return; } @@ -153,7 +153,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c if (resume_many) iterate_over_lwps (ptid, [=] (struct lwp_info *info) { -@@ -3777,6 +3819,10 @@ linux_nat_target::mourn_inferior () +@@ -3773,6 +3815,10 @@ linux_nat_target::mourn_inferior () /* Let the arch-specific native code know this process is gone. */ linux_target->low_forget_process (pid); diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch index 4facb74..c8190d7 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 -@@ -11939,6 +11939,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) +@@ -11931,6 +11931,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) traps we can no longer explain. */ old_loc->events_till_retirement = 3 * (thread_count () + 1); diff --git a/gdb-readline62-ask-more-rh.patch b/gdb-readline62-ask-more-rh.patch index 5a5a177..4311a27 100644 --- a/gdb-readline62-ask-more-rh.patch +++ b/gdb-readline62-ask-more-rh.patch @@ -9,7 +9,7 @@ Subject: gdb-readline62-ask-more-rh.patch diff --git a/gdb/event-top.c b/gdb/event-top.c --- a/gdb/event-top.c +++ b/gdb/event-top.c -@@ -1179,6 +1179,13 @@ gdb_setup_readline (int editing) +@@ -1176,6 +1176,13 @@ gdb_setup_readline (int editing) { struct ui *ui = current_ui; diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch deleted file mode 100644 index 6f55e28..0000000 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ /dev/null @@ -1,3435 +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-rhbz795424-bitpos-20of25.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-09/msg00631.html - ---MP_/yp5f+W_ED2JtUlSyBi8xujr -Content-Type: text/plain; charset=US-ASCII -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -This is patch 1/4, which implements the bulk of the changes in type -length and bitpos/type offset. I have verified that there are no -regressions resulting from this patch by running the testsuite on -Fedora 16 x86_64. Patch and changelog attached. - -Regards, -Siddhesh - ---MP_/yp5f+W_ED2JtUlSyBi8xujr -Content-Type: text/plain -Content-Transfer-Encoding: quoted-printable -Content-Disposition: attachment; filename=ChangeLog-main - -gdb/ChangeLog - -2012-08-05 Siddhesh Poyarekar - - * ada-lang.c (fat_pntr_bounds_bitpos): Return LONGEST. - (fat_pntr_data_bitpos): Likewise. - (desc_bound_bitpos): Likewise. - (constrained_packed_array_type): Expand ELT_BITS parameter to - LONGEST. - (move_bits): Expand parameters SRC_OFFSET and N to LONGEST. - (cond_offset_host): Expand parameter OFFSET to LONGEST. - (cond_offset_target): Likewise. - (ada_type_of_array): Expand ARRAY_BITSIZE to LONGEST. - (decode_constrained_packed_array_type): Expand BITS to LONGEST. - (decode_constrained_packed_array): Expand BIT_POS to LONGEST. - (ada_value_primitive_packed_val): Expand parameter OFFSET to - LONGEST. Expand TARG, NTARG and NEW_OFFSET to LONGEST. - (ada_value_assign): Expand FROM_SIZE to LONGEST. - (value_assign_to_component): Expand BITS to LONGEST. - (ensure_lval): Expand LEN to LONGEST. - (value_pointer): Expand LEN to ULONGEST. - (value_tag_from_contents_and_address): Expand TAG_BYTE_OFFSET to - LONGEST. - (ada_value_primitive_field): Expand parameter OFFSET to LONGEST. - Expand bit_pos to LONGEST. - (find_struct_field): Expand parameters OFFSET and BYTE_OFFSET_P to - LONGEST. Expand BIT_POS and FLD_OFFSET to LONGEST. - (ada_search_struct_field): Expand parameter OFFSET to LONGEST. - Expand VAR_OFFSET to LONGEST. - (ada_index_struct_field): Expand parameters INDEX and OFFSET to - LONGEST. - (ada_index_struct_field_1): Expand parameters INDEX_P and OFFSET - to LONGEST. - (ada_value_struct_elt): Expand BYTE_OFFSET to LONGEST. - (align_value): Return ULONGEST. Expand parameter OFF and - ALIGNMENT to ULONGEST. - (ada_template_to_fixed_record_type_1): Expand OFF, BIT_LEN and - fld_bit_len to LONGEST. Expand FIELD_OFFSET to LONGEST. Use - pulongest function to print TYPE_LENGTH. - (to_fixed_array_type): Expand LEN to LONGEST. - * ada-lang.h (ada_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (ada_printstr): Expand parameter LENGTH to ULONGEST. - (ada_value_primitive_packed_val): Expand parameter OFFSET to - LONGEST. - * ada-typeprint.c (ada_print_type): Use pulongest to print - TYPE_LENGTH. - * ada-valprint.c (val_print_packed_array_elements): Expand ELTLEN - to ULONGEST. - (char_at): Expand parameter I to LONGEST. - (printstr): Expand parameter LENGTH, I, REP1, REPS to ULONGEST. - Use pulongest to format print REPS. - (ada_printstr): Expand parameter LENGTH to LONGEST. - (ada_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - (ada_val_print_array): Expand ELTLEN, LEN to ULONGEST and TEMP_LEN - to LONGEST. - (ada_val_print_1): Expand parameter OFFSET to LONGEST. - (print_variant_part): Expand parameters OFFSET and OUTER_OFFSET to - LONGEST. - (print_field_values): Likewise. Expand BIT_POS to LONGEST. - * annotate.c (annotate_array_section_begin): Expand parameter - IDX to LONGEST. Use plongest to format-print IDX. - (annotate_elt_rep): Expand parameter REPCOUNT to ULONGEST. Use - plongest to format-print REPCOUNT. - * annotate.h: Likewise. - * arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint): - Expand parameter parameter LEN to LONGEST. - * ax-gdb.c (gen_left_shift): Expand parameter DISTANCE to LONGEST. - (gen_offset): Expand parameter OFFSET to LONGEST. - (gen_bitfield_ref): Expand parameters START, END to LONGEST. - Expand BOUND_START, BOUND_END, OFFSET to LONGEST. - (gen_primitive_field): Expand parameter OFFSET to LONGEST. - (gen_struct_ref_recursive): Likewise. - * ax-general.c (ax_trace_quick): Expand parameter N to LONGEST. - * ax.h (ax_trace_quick): Likewise. - * breakpoint.c (breakpoint_address_match_range): Expand parameter - LEN1 to LONGEST. - (can_use_hardware_watchpoint): Expand LEN to LONGEST. - * breakpoint.h (struct bp_target_info): Expand member LENGTH to - LONGEST. - (struct bp_location): Likewise. - * c-lang.c (c_printstr): Expand parameter LENGTH to ULONGEST. - (evaluate_subexp_c): Expand ELEMENT_SIZE, I to LONGEST. - * c-lang.h (c_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (c_printstr): Expand parameter LENGTH to ULONGEST. - (cp_print_value_fields): Expand parameter OFFSET to LONGEST. - (cp_print_value_fields_rtti): Likewise. - * c-typeprint.c (c_type_print_varspec_suffix): Remove cast down to - int and use plongest to print LONGEST. - * c-valprint.c (c_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. Expand OFFSET to LONGEST, ELTLEN to ULONGEST. - (c_value_print): Expand TOP to LONGEST. - * cp-abi.c (baseclass_offset): Return LONGEST. Expand parameter - EMBEDDED_OFFSET to LONGEST. Expand RES to LONGEST. - (value_virtual_fn_field): Expand parameter OFFSET to LONGEST. - (value_rtti_type): Expand parameter TOP to point to LONGEST. - * cp-abi.h (value_virtual_fn_field): Expand OFFSET to LONGEST. - (value_rtti_type): Expand TOP to point to LONGEST. - (baseclass_offset): Return LONGEST. Expand parameter - EMBEDDED_OFFSET to LONGEST. - (struct cp_abi_ops): Expand parameter OFFSET for VIRTUAL_FN_FIELD - to LONGEST. Expand parameter TOP to point to LONGEST in - VALUE_RTTI_TYPE. Return LONGEST from BASECLASS_OFFSET and expand - parameter EMBEDDED_OFFSET to LONGEST. - * cp-valprint.c (cp_print_value_fields): Expand parameter OFFSET - to LONGEST. Expand I_OFFSET to LONGEST. - (cp_print_value_fields_rtti): Expand parameter OFFSET to - LONGEST. Expand TOP to LONGEST. - (cp_print_value): Expand parameter OFFSET to LONGEST. Expand - THISOFFSET, BOFFSET to LONGEST. - * d-lang.h (d_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - * d-valprint.c (dynamic_array_type): Likewise. - (d_val_print): Likewise. - * doublest.c (floatformat_from_length): Expand parameter LEN to - LONGEST. Use plongest to format string for LONGEST. - * dwarf2loc.c (copy_bitwise): Expand parameters DEST_OFFSET_BITS, - BIT_COUNT to ULONGEST. Rename parameter SOURCE_OFFSET_BITS to - SOURCE_OFFSET and expand to ULONGEST. New variable - SOURCE_OFFSET_BITS. - (read_pieced_value): Expand OFFSET, DEST_OFFSET_BITS, - SOURCE_OFFSET_BITS, SOURCE_OFFSET to LONGEST. Expand TYPE_LEN, - THIS_SIZE, THIS_SIZE_BITS to ULONGEST. - (write_pieced_value): Likewise. - (check_pieced_value_bits): Expand parameters BIT_OFFSET and - BIT_LENGTH to LONGEST. Expand THIS_SIZE_BITS to ULONGEST. - (check_pieced_value_validity): Expand parameters BIT_OFFSET and - BIT_LENGTH to LONGEST. - (check_pieced_synthetic_pointer): Likewise. - (indirect_pieced_value): Expand BIT_LENGTH, BYTE_OFFSET and - BIT_OFFSET to LONGEST. - (dwarf2_evaluate_loc_desc_full): Expand N to ULONGEST. - * dwarf2read.c (dwarf2_const_value_length_mismatch_complaint): - Expand parameters ARG2 and ARG3 to LONGEST. Use plongest to - print ARG2 and ARG3. - (dwarf2_add_field): Expand ANONYMOUS_SIZE, BIT_OFFSET to - LONGEST. - * eval.c (evaluate_struct_tuple): Expand BITPOS to LONGEST. - (init_array_element): Expand ELEMENT_SIZE to LONGEST. - (binop_promote): Expand PROMOTED_LEN1, PROMOTED_LEN2, RESULT_LEN - to ULONGEST. - (evaluate_subexp_standard): Expand MEM_OFFSET, TOP, ELEMENT_SIZE - to LONGEST. - * f-lang.c (f_printstr): Expand parameter LENGTH to ULONGEST. - * f-lang.h (f_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - * f-valprint.c (f77_array_offset_tbl): Make LONGEST. - (f77_create_arrayprint_offset_tbl): Expand ELTLEN to LONGEST. - (f77_print_array_1): Expand parameter EMBEDDED_OFFSET to - LONGEST. Expand I to LONGEST. - (f77_print_array): Expand parameter EMBEDDED_OFFSET to LONGEST. - (f_val_print): Likewise. Expand OFFSET to LONGEST. - * findvar.c (default_value_from_register): Expand LEN to LONGEST. - (read_frame_register_value): Expand OFFSET, REG_OFFSET, LEN, - REG_LEN to LONGEST. - * frame.c (get_frame_register_bytes): Expand parameter LEN to - LONGEST. - * frame.h (get_frame_register_bytes): Likewise. - * gdbtypes.c (init_type): Expand parameter LENGTH to LONGEST. - (is_unique_ancestor_worker): Expand parameters OFFSET, - EMBEDDED_OFFSET to LONGEST. Expand THIS_OFFSET to LONGEST. - (is_unique_ancestor): Expand OFFSET to LONGEST. - (recursive_dump_type): Use pulongest to format print TYPE_LENGTH. - Use plongest to format print TYPE_FIELD_BITPOS. - (arch_type): Expand parameter LENGTH to LONGEST. - * gdbtypes.h (struct type.main_type.fld_bnds.fields): Expand - member BITPOS to LONGEST. - (struct type): Expand member LENGTH to ULONGEST. - (init_type): Expand parameter LENGTH to LONGEST. - (arch_type): Likewise. - * gnu-v2-abi.c (gnuv2_virtual_fn_field): Expand parameter OFFSET - to LONGEST. - (gnuv2_value_rtti_type): Expand parameter TOP to point to LONGEST. - (gnuv2_baseclass_offset): Return LONGEST. Expand parameter - EMBEDDED_OFFSET to LONGEST. Expand FIELD_OFFSET, BOFFSET, - FIELD_LENGTH to LONGEST. - * gnu-v3-abi.c (build_gdb_vtable_type): Expand OFFSET to LONGEST. - (vtable_address_point_offset): Return LONGEST. - (gnuv3_rtti_type): Expand parameter TOP_P to point to LONGEST. - (gnuv3_virtual_fn_field): Expand parameter OFFSET to LONGEST. - (gnuv3_baseclass_offset): Return LONGEST. Expand parameter - EMBEDDED_OFSET to LONGEST. Expand CUR_BASE_OFFSET, BASE_OFFSET to - LONGEST. - (gnuv3_find_method_in): Expand POS to LONGEST. - * go-lang.h (go_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - * go-valprint.c (print_go_string): Likewise. - (go_val_print): Likewise. - * i386-nat.c (i386_handle_nonaligned_watchpoint): Expand - parameter LEN to LONGEST. - (i386_region_ok_for_watchpoint): Likewise. - * inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Expand - parameter LEN to LONGEST. - * jv-lang.c (java_link_class_type): Expand BOFFSET to LONGEST. - (java_printstr): Expand parameter LENGTH to ULONGEST. - * jv-lang.h (java_val_print): Expand parameter EMBEDDED_OFFSET to - LONGEST. - * jv-valprint.c (java_print_value_fields): Expand parameter OFFSET - to LONGEST. - (java_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - * language.c (unk_lang_printstr): Expand parameter LENGTH to - ULONGEST. - (unk_lang_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - * language.h (language_defn): Expand parameter LENGTH of - LA_PRINTSTR to ULONGEST. Expand parameter EMBEDDED_OFFSET of - LA_VAL_PRINT to LONGEST. - * m2-lang.c (m2_printstr): Expand parameter LENGTH to ULONGEST. - Expand I, REP1, REPS to ULONGEST. Use pulongest to format print - REPS. - * m2-lang.h (m2_val_print): Expand parameter embedded_offset to - LONGEST. - * m2-typeprint.c (m2_array): New variable VAL. Use pulongest to - * format print VAL. - (m2_enum): expand LASTVAL to LONGEST. - * m2-valprint.c (m2_print_long_set): Expand parameter - EMBEDDED_OFFSET to LONGEST. - (m2_print_unbounded_array): Likewise. - (m2_print_array_contents): Likewise. - (m2_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - Expand I, LEN, TEMP_LEN to ULONGEST. - * memrange.c (mem_ranges_overlap): Expand parameters LEN1, LEN2 to - LONGEST. - * memrange.h (struct mem_range): Expand member LENGTH to LONGEST. - (mem_ranges_overlap): Expand parameters LEN1, LEN2 to LONGEST. - * mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint): - Expand parameter LEN to LONGEST. - * objc-lang.c (objc_printstr): Expand parameter LENGTH to - ULONGEST. Expand I, REP1, REPS to ULONGEST. use pulongest to - format print REPS. - * opencl-lang.c (lookup_opencl_vector_type): Expand parameter - EL_LENGTH to ULONGEST. Expand LENGTH to ULONGEST. - (lval_func_read): Expand OFFSET, N, I, J and ELSIZE to LONGEST. - (lval_func_write): Likewise. - (lval_func_check_validity): Expand parameter LENGTH to LONGEST. - Expand ELSIZE, START, END, I, STARTREST, ENDREST, COMP_OFFSET, - COMP_LENGTH to LONGEST. - (lval_func_check_any_valid): Expand ELSIZE to LONGEST. - (lval_func_check_synthetic_pointer): Expand parameters OFFSET and - LENGTH to LONGEST. Expand ELSIZE, START, END, I, STARTREST, - ENDREST, COMP_LENGTH, COMP_OFFSET to LONGEST. - * p-lang.c (is_pascal_string_type): Expand parameters LENGTH_POS, - STRING_POS, LENGTH_SIZE to point to LONGEST. - (pascal_printstr): Expand parameter LENGTH to ULONGEST. Expand - I, REP1, REPS to ULONGEST. Use pulongest to format print REPS. - * p-lang.h (pascal_val_print): Expand parameter EMBEDDED_OFFSET - to LONGEST. - (is_pascal_string_type): Expand parameters LENGTH_POS, STRING_POS, - LENGTH_SIZE to point to LONGEST. - (pascal_printstr): Expand parameter LENGTH to ULONGEST. - (pascal_object_print_value_fields): Expand parameter OFFSET to - LONGEST. - * p-valprint.c (pascal_val_print): Expand parameter - EMBEDDED_OFFSET to LONGEST. Expand ELTLEN to ULONGEST. Expand - LENGTH_SIZE, LENGTH_POS, STRING_POS to LONGEST. - (pascal_object_print_value_fields): Expand parameter OFFSET to - LONGEST. - (pascal_object_print_value): Likewise. Expand BOFFSET, - THISOFFSET to LONGEST. - * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): - Expand parameter LEN to point to LONGEST. - * printcmd.c (print_formatted): Expand LEN to LONGEST. - (print_scalar_formatted): Likewise. - * procfs.c (procfs_region_ok_for_hw_watchpoint): Expand - parameter LEN to LONGEST. - * python/py-prettyprint.c (apply_val_pretty_printer): Expand - parameter EMBEDDED_OFFSET to LONGEST. - * python/python.h (apply_val_pretty_printer): Likewise. - * regcache.c (regcache_xfer_part): Expand parameter OFFSET to - LONGEST. - (regcache_raw_read_part): Likewise. - (regcache_raw_write_part): Likewise. - (regcache_cooked_read_part): Likewise. - (regcache_cooked_write_part): Likewise. - * regcache.h (regcache_raw_read_part): Likewise. - (regcache_raw_write_part): Likewise. - (regcache_cooked_read_part): Likewise. - (regcache_cooked_write_part): Likewise. - * remote.c (remote_region_ok_for_hw_watchpoint): Expand - parameter LEN to LONGEST. - * s390-nat.c (s390_region_ok_for_hw_watchpoint): Expand - parameter LEN to LONGEST. - * spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Expand - parameter len to LONGEST. - * stack.c (print_frame_nameless_args): Expand parameter START to - LONGEST. - (print_frame_args): Expand HIGHEST_OFFSET, CURRENT_OFFSET, - ARG_SIZE, START to LONGEST. - * symmisc.c (print_symbol): Expand I to ULONGEST. Use pulongest - to format print TYPE_LENGTH. - * target.c (default_region_ok_for_hw_watchpoint): Expand parameter - LEN to LONGEST. - (debug_to_region_ok_for_hw_watchpoint): Likewise. - * target.h (struct target_ops): Expand parameter LEN to LONGEST - for TO_REGION_OK_FOR_HW_WATCHPOINT. - * tracepoint.c (add_memrange): Expand parameter LEN to LONGEST. - Use plongest to format print LEN. - (collect_symbol): Expand LEN to ULONGEST. Use pulongest to - format print LEN. - (scope_info): Expand J to LONGEST. Use pulongest to format - print TYPE_LENGTH. - * typeprint.c (whatis_exp): Expand TOP to LONGEST. - * valarith.c (value_subscripted_rvalue): Expand parameters INDEX - and LOWERBOUND to LONGEST. Expand ELT_SIZE, ELT_OFFS to ULONGEST. - (value_concat): expand INVAL1LEN and INVAL2LEN to ssize_t. - (value_logical_not): Expand LEN to LONGEST. - (value_strcmp): Expand LEN1, LEN2, I, LEN to LONGEST. - * valops.c (value_allocate_space_in_inferior): Expand parameter - LEN to LONGEST. - (value_cast_structs): Expand TOP to LONGEST. - (value_cast): Expand ELEMENT_LENGTH to ULONGEST. Expand - VAL_LENGTH to LONGEST. - (dynamic_cast_check_1): Expand parameter EMBEDDED_OFFSET to - LONGEST. Expand OFFSET to LONGEST. - (dynamic_cast_check_2): Likewise. - (value_dynamic_cast): Expand TOP to LONGEST. - (read_value_memory): Expand EMBEDDED_OFFSET to LONGEST. - (value_assign): Expand CHANGED_LEN, OFFSET to LONGEST. - (value_array): Expand TYPELENGTH to ULONGEST. - (update_search_result): Expand parameters LAST_BOFFSET, BOFFSET - to LONGEST. - (do_search_struct_field): Expand parameter OFFSET, LAST_BOFFSET - to LONGEST. Expand NEW_OFFSET, BOFFSET to LONGEST. - (search_struct_field): Expand parameter OFFSET to LONGEST. - Expand BOFFSET to LONGEST. - (search_struct_method): Expand parameter OFFSET to LONGEST. - Expand BASE_OFFSET, THIS_OFFSET to LONGEST. - (find_method_list): Expand parameters OFFSET, BOFFSET to - LONGEST. Expand BASE_OFFSET to LONGEST. - (value_find_oload_method_list): Expand parameter BOFFSET to point - to LONGEST. - (find_overload_match): Expand BOFFSET to LONGEST. - (value_struct_elt_for_reference): Expand parameter OFFSET to - LONGEST. Remove unneeded cast. Expand BASE_OFFSET to LONGEST. - (value_rtti_indirect_type): Expand parameter TOP to point to - LONGEST. - (value_full_object): Expand parameter XTOP to LONGEST. Expand - TOP to LONGEST. - * valprint.c (valprint_check_validity): Expand parameter - EMBEDDED_OFFSET to LONGEST. - (generic_val_print): Likewise. - (val_print): Likewise. - (val_print_scalar_formatted): Likewise. - (print_hex_chars): Expand parameter LEN to ULONGEST. - (val_print_array_elements): Expand parameter EMBEDDED_OFFSET to - LONGEST, I to ULONGEST. Expand LEN, ELTLEN, REP1, REPS to - ULONGEST. Use pulongest to format print REPS. - (generic_printstr): Expand parameter LENGTH to ULONGEST. - * valprint.h (val_print_array_elements): Expand parameter - EMBEDDED_OFFSET to LONGEST. - (val_print_scalar_formatted): Likewise. - (print_hex_chars): Expand parameter LEN to ULONGEST. - (generic_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - (generic_printstr): Expand parameter LENGTH to ULONGEST. - * value.c (struct range): Expand members OFFSET, LENGTH to - LONGEST. - (ranges_overlap): Expand parameters OFFSET1, OFFSET2, LEN1 AND - LEN2 to LONGEST. - (range_contain): Expand parameter OFFSET, LENGTH to LONGEST. - (struct value): Expand members OFFSET, EMBEDDED_OFFSET, - POINTED_TO_OFFSET to LONGEST. - (value_bytes_available): Expand parameters OFFSET, LENGTH to - LONGEST. - (mark_value_bytes_unavailable): Likewise. - (find_first_range_overlap): Likewise. - (value_available_contents_eq): Expand parameters OFFSET1, OFFSET2 - and LENGTH to LONGEST. - (value_offset): Return LONGEST. - (set_value_offset): Expand parameter OFFSET to LONGEST. - (value_contents_copy_raw): Expand parameters SRC_OFFSET, - DST_OFFSET, LENGTH to ssize_t. - (value_contents_copy): Likewise. - (value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST. - (value_bits_synthetic_pointer): Likewise. - (value_embedded_offset): Return LONGEST. - (set_value_embedded_offset): Expand parameter VAL to LONGEST. - (value_pointed_to_offset): Return LONGEST. - (set_value_pointed_to_offset): Expand parameter VAL to LONGEST. - (set_internalvar_component): Expand parameter OFFSET to LONGEST. - (value_primitive_field): Likewise. Expand BITPOS, BOFFSET, - CONTAINER_BITSIZE to LONGEST. - (value_fn_field): Expand parameter OFFSET to LONGEST. - (unpack_value_bits_as_long_1): Expand parameters EMBEDDED_OFFSET, - BITPOS to LONGEST. Expand READ_OFFSET to LONGEST. - (unpack_value_bits_as_long): Expand parameter EMBEDED_OFFSET to - LONGEST. - (unpack_value_field_as_long_1): Likewise. Expand BITPOS to - LONGEST. - (unpack_value_field_as_long): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (value_field_bitfield): Likewise. - (modify_field): Expand parameter BITPOS to LONGEST. Expand - BYTESIZE to LONGEST. - * value.h (value_offset): Return LONGEST. - (set_value_offset): Expand parameter OFFSET to LONGEST. - (value_pointed_to_offset): Return LONGEST. - (set_value_pointed_to_offset): Expand parameter VAL to LONGEST. - (value_embedded_offset): Return LONGEST. - (set_value_embedded_offset): Expand parameter VAL to LONGEST. - (struct lval_funcs): Expand parameters OFFSET and LENGTH to - LONGEST for CHECK_VALIDITY. Likewise for CHECK_SYNTHETIC_POINTER. - (valprint_check_validity): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST. - (value_bits_synthetic_pointer): Likewise. - (value_bytes_available): Likewise. - (mark_value_bytes_unavailable): Likewise. - (value_available_contents_eq): Fix comment. Expand parameters - OFFSET1, OFFSET2, LENGTH to LONGEST. - (read_value_memory): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (unpack_value_bits_as_long): Expand parameter EMBEDDED_OFFSET to - LONGEST. - (unpack_value_field_as_long): Likewise. - (value_field_bitfield): Likewise. - (value_contents_copy_raw): Expand parameters SRC_OFFSET, - DST_OFFSET, LENGTH to LONGEST. - (value_contents_copy): Likewise. - (value_primitive_field): Expand parameter OFFSET to LONGEST. - (value_rtti_indirect_type): Expand parameter TOP to point to - LONGEST. - (value_full_object): Expand parameter XTOP to LONGEST. - (set_internalvar_component): Expand parameter OFFSET to LONGEST. - (value_fn_field): Expand parameter OFFSET to LONGEST. - (modify_field): Expand parameter BITPOS to LONGEST. - (val_print): Expand parameter EMBEDDED_OFFSET to LONGEST. - (value_allocate_space_in_inferior): Expand parameter LEN to - LONGEST. - -gdb/testsuite/ChangeLog: - -2012-08-05 Siddhesh Poyarekar - - * gdb.base/longest-types.exp: Add test case to get offset of - BUF2. - ---MP_/yp5f+W_ED2JtUlSyBi8xujr -Content-Type: text/x-patch -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; filename=bitpos-main.patch - -diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c ---- a/gdb/aarch64-linux-nat.c -+++ b/gdb/aarch64-linux-nat.c -@@ -808,7 +808,7 @@ aarch64_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len, - /* Implement the "region_ok_for_hw_watchpoint" target_ops method. */ - - int --aarch64_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+aarch64_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - return aarch64_linux_region_ok_for_watchpoint (addr, len); - } -diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c ---- a/gdb/ada-lang.c -+++ b/gdb/ada-lang.c -@@ -78,7 +78,7 @@ static struct type *desc_bounds_type (struct type *); - - static struct value *desc_bounds (struct value *); - --static int fat_pntr_bounds_bitpos (struct type *); -+static LONGEST fat_pntr_bounds_bitpos (struct type *); - - static int fat_pntr_bounds_bitsize (struct type *); - -@@ -86,13 +86,13 @@ static struct type *desc_data_target_type (struct type *); - - static struct value *desc_data (struct value *); - --static int fat_pntr_data_bitpos (struct type *); -+static LONGEST fat_pntr_data_bitpos (struct type *); - - static int fat_pntr_data_bitsize (struct type *); - - static struct value *desc_one_bound (struct value *, int, int); - --static int desc_bound_bitpos (struct type *, int, int); -+static LONGEST desc_bound_bitpos (struct type *, int, int); - - static int desc_bound_bitsize (struct type *, int, int); - -@@ -175,7 +175,7 @@ static struct type *static_unwrap_type (struct type *type); - - static struct value *unwrap_value (struct value *); - --static struct type *constrained_packed_array_type (struct type *, long *); -+static struct type *constrained_packed_array_type (struct type *, LONGEST *); - - static struct type *decode_constrained_packed_array_type (struct type *); - -@@ -214,14 +214,14 @@ static struct value *value_val_atr (struct type *, struct value *); - static struct symbol *standard_lookup (const char *, const struct block *, - domain_enum); - --static struct value *ada_search_struct_field (const char *, struct value *, int, -+static struct value *ada_search_struct_field (const char *, struct value *, LONGEST, - struct type *); - --static struct value *ada_value_primitive_field (struct value *, int, int, -+static struct value *ada_value_primitive_field (struct value *, LONGEST, int, - struct type *); - --static int find_struct_field (const char *, struct type *, int, -- struct type **, int *, int *, int *, int *); -+static int find_struct_field (const char *, struct type *, LONGEST, -+ struct type **, LONGEST *, int *, int *, int *); - - static int ada_resolve_function (struct block_symbol *, int, - struct value **, int, const char *, -@@ -232,7 +232,7 @@ static int ada_is_direct_array_type (struct type *); - static void ada_language_arch_info (struct gdbarch *, - struct language_arch_info *); - --static struct value *ada_index_struct_field (int, struct value *, int, -+static struct value *ada_index_struct_field (LONGEST, struct value *, LONGEST, - struct type *); - - static struct value *assign_aggregate (struct value *, struct value *, -@@ -701,7 +701,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type) - } - - static const gdb_byte * --cond_offset_host (const gdb_byte *valaddr, long offset) -+cond_offset_host (const gdb_byte *valaddr, LONGEST offset) - { - if (valaddr == NULL) - return NULL; -@@ -710,7 +710,7 @@ cond_offset_host (const gdb_byte *valaddr, long offset) - } - - static CORE_ADDR --cond_offset_target (CORE_ADDR address, long offset) -+cond_offset_target (CORE_ADDR address, LONGEST offset) - { - if (address == 0) - return 0; -@@ -1752,7 +1752,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. */ - --static int -+static LONGEST - fat_pntr_bounds_bitpos (struct type *type) - { - return TYPE_FIELD_BITPOS (desc_base_type (type), 1); -@@ -1818,7 +1818,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. */ - --static int -+static LONGEST - fat_pntr_data_bitpos (struct type *type) - { - return TYPE_FIELD_BITPOS (desc_base_type (type), 0); -@@ -1853,7 +1853,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. */ - --static int -+static LONGEST - desc_bound_bitpos (struct type *type, int i, int which) - { - return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2); -@@ -2043,7 +2043,7 @@ ada_type_of_array (struct value *arr, int bounds) - zero, and does not need to be recomputed. */ - if (lo < hi) - { -- int array_bitsize = -+ LONGEST array_bitsize = - (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); - - TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2203,7 +2203,7 @@ decode_packed_array_bitsize (struct type *type) - the length is arbitrary. */ - - static struct type * --constrained_packed_array_type (struct type *type, long *elt_bits) -+constrained_packed_array_type (struct type *type, LONGEST *elt_bits) - { - struct type *new_elt_type; - struct type *new_type; -@@ -2257,7 +2257,7 @@ decode_constrained_packed_array_type (struct type *type) - char *name; - const char *tail; - struct type *shadow_type; -- long bits; -+ LONGEST bits; - - if (!raw_name) - raw_name = ada_type_name (desc_base_type (type)); -@@ -2328,7 +2328,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. */ -- int bit_size, bit_pos; -+ int bit_size; -+ LONGEST bit_pos; - ULONGEST mod; - - mod = ada_modulus (value_type (arr)) - 1; -@@ -2556,7 +2557,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, -- long offset, int bit_offset, int bit_size, -+ LONGEST offset, int bit_offset, int bit_size, - struct type *type) - { - struct value *v; -@@ -2626,7 +2627,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, - - if (obj != NULL) - { -- long new_offset = offset; -+ LONGEST new_offset = offset; - - set_value_component_location (v, obj); - set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2696,7 +2697,7 @@ ada_value_assign (struct value *toval, struct value *fromval) - { - int len = (value_bitpos (toval) - + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; -- int from_size; -+ LONGEST from_size; - gdb_byte *buffer = (gdb_byte *) alloca (len); - struct value *val; - CORE_ADDR to_addr = value_address (toval); -@@ -2747,7 +2748,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); -- int bits; -+ LONGEST bits; - - val = value_cast (value_type (component), val); - -@@ -4447,7 +4448,7 @@ ensure_lval (struct value *val) - if (VALUE_LVAL (val) == not_lval - || VALUE_LVAL (val) == lval_internalvar) - { -- int len = TYPE_LENGTH (ada_check_typedef (value_type (val))); -+ LONGEST len = TYPE_LENGTH (ada_check_typedef (value_type (val))); - const CORE_ADDR addr = - value_as_long (value_allocate_space_in_inferior (len)); - -@@ -4531,7 +4532,7 @@ static CORE_ADDR - value_pointer (struct value *value, struct type *type) - { - struct gdbarch *gdbarch = get_type_arch (type); -- unsigned len = TYPE_LENGTH (type); -+ ULONGEST len = TYPE_LENGTH (type); - gdb_byte *buf = (gdb_byte *) alloca (len); - CORE_ADDR addr; - -@@ -6644,7 +6645,7 @@ value_tag_from_contents_and_address (struct type *type, - const gdb_byte *valaddr, - CORE_ADDR address) - { -- int tag_byte_offset; -+ LONGEST tag_byte_offset; - struct type *tag_type; - - if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -7137,7 +7138,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 * --ada_value_primitive_field (struct value *arg1, int offset, int fieldno, -+ada_value_primitive_field (struct value *arg1, LONGEST offset, int fieldno, - struct type *arg_type) - { - struct type *type; -@@ -7149,7 +7150,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, - - if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) - { -- int bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno); -+ LONGEST bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno); - int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); - - return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7226,9 +7227,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, - Returns 1 if found, 0 otherwise. */ - - static int --find_struct_field (const char *name, struct type *type, int offset, -+find_struct_field (const char *name, struct type *type, LONGEST offset, - struct type **field_type_p, -- int *byte_offset_p, int *bit_offset_p, int *bit_size_p, -+ LONGEST *byte_offset_p, int *bit_offset_p, int *bit_size_p, - int *index_p) - { - int i; -@@ -7247,8 +7248,8 @@ find_struct_field (const char *name, struct type *type, int offset, - - for (i = 0; i < TYPE_NFIELDS (type); i += 1) - { -- int bit_pos = TYPE_FIELD_BITPOS (type, i); -- int fld_offset = offset + bit_pos / 8; -+ LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i); -+ LONGEST fld_offset = offset + bit_pos / 8; - const char *t_field_name = TYPE_FIELD_NAME (type, i); - - if (t_field_name == NULL) -@@ -7350,7 +7351,7 @@ num_visible_fields (struct type *type) - long explanation in find_struct_field's function documentation. */ - - static struct value * --ada_search_struct_field (const char *name, struct value *arg, int offset, -+ada_search_struct_field (const char *name, struct value *arg, LONGEST offset, - struct type *type) - { - int i; -@@ -7398,7 +7399,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)); -- int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; -+ LONGEST var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; - - for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) - { -@@ -7430,8 +7431,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, - return NULL; - } - --static struct value *ada_index_struct_field_1 (int *, struct value *, -- int, struct type *); -+static struct value *ada_index_struct_field_1 (LONGEST *, struct value *, -+ LONGEST, struct type *); - - - /* Return field #INDEX in ARG, where the index is that returned by -@@ -7440,7 +7441,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, - * If found, return value, else return NULL. */ - - static struct value * --ada_index_struct_field (int index, struct value *arg, int offset, -+ada_index_struct_field (LONGEST index, struct value *arg, LONGEST offset, - struct type *type) - { - return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7452,7 +7453,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, - * *INDEX_P. */ - - static struct value * --ada_index_struct_field_1 (int *index_p, struct value *arg, int offset, -+ada_index_struct_field_1 (LONGEST *index_p, struct value *arg, LONGEST offset, - struct type *type) - { - int i; -@@ -7543,7 +7544,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) - v = ada_search_struct_field (name, arg, 0, t); - else - { -- int bit_offset, bit_size, byte_offset; -+ int bit_offset, bit_size; -+ LONGEST byte_offset; - struct type *field_type; - CORE_ADDR address; - -@@ -7892,8 +7894,8 @@ ada_coerce_ref (struct value *val0) - /* Return OFF rounded upward if necessary to a multiple of - ALIGNMENT (a power of 2). */ - --static unsigned int --align_value (unsigned int off, unsigned int alignment) -+static ULONGEST -+align_value (ULONGEST off, ULONGEST alignment) - { - return (off + alignment - 1) & ~(alignment - 1); - } -@@ -8283,10 +8285,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, - struct value *mark = value_mark (); - struct value *dval; - struct type *rtype; -- int nfields, bit_len; -+ int nfields; - int variant_field; -- long off; -- int fld_bit_len; -+ LONGEST off, bit_len, fld_bit_len; - int f; - - /* Compute the number of fields in this record type that are going -@@ -8363,7 +8364,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, - that follow this one. */ - if (ada_is_aligner_type (field_type)) - { -- long field_offset = TYPE_FIELD_BITPOS (field_type, f); -+ LONGEST field_offset = TYPE_FIELD_BITPOS (field_type, f); - - field_valaddr = cond_offset_host (field_valaddr, field_offset); - field_address = cond_offset_target (field_address, field_offset); -@@ -8499,11 +8500,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, - if (TYPE_LENGTH (type) <= 0) - { - if (TYPE_NAME (rtype)) -- warning (_("Invalid type size for `%s' detected: %d."), -- TYPE_NAME (rtype), TYPE_LENGTH (type)); -+ warning (_("Invalid type size for `%s' detected: %s."), -+ TYPE_NAME (rtype), pulongest (TYPE_LENGTH (type))); - else -- warning (_("Invalid type size for detected: %d."), -- TYPE_LENGTH (type)); -+ warning (_("Invalid type size for detected: %s."), -+ pulongest (TYPE_LENGTH (type))); - } - else - { -@@ -8967,7 +8968,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. */ -- int len = TYPE_LENGTH (result) / TYPE_LENGTH (TYPE_TARGET_TYPE (result)); -+ LONGEST len = (TYPE_LENGTH (result) -+ / TYPE_LENGTH (TYPE_TARGET_TYPE (result))); - int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0); - - TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); -diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h ---- a/gdb/ada-lang.h -+++ b/gdb/ada-lang.h -@@ -173,7 +173,7 @@ extern void ada_print_type (struct type *, const char *, struct ui_file *, int, - extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, - struct ui_file *stream); - --extern void ada_val_print (struct type *, int, CORE_ADDR, -+extern void ada_val_print (struct type *, LONGEST, CORE_ADDR, - struct ui_file *, int, - struct value *, - const struct value_print_options *); -@@ -188,7 +188,7 @@ extern void ada_emit_char (int, struct type *, struct ui_file *, int, int); - extern void ada_printchar (int, struct type *, struct ui_file *); - - extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *, -- unsigned int, const char *, int, -+ ULONGEST, const char *, int, - const struct value_print_options *); - - struct value *ada_convert_actual (struct value *actual, -@@ -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 *, -- long, int, int, -+ LONGEST, int, int, - struct type *); - - extern struct type *ada_coerce_to_simple_array_type (struct type *); -diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c ---- a/gdb/ada-typeprint.c -+++ b/gdb/ada-typeprint.c -@@ -895,8 +895,8 @@ ada_print_type (struct type *type0, const char *varstring, - const char *name = ada_type_name (type); - - if (!ada_is_range_type_name (name)) -- fprintf_filtered (stream, _("<%d-byte integer>"), -- TYPE_LENGTH (type)); -+ fprintf_filtered (stream, _("<%s-byte integer>"), -+ pulongest (TYPE_LENGTH (type))); - else - { - fprintf_filtered (stream, "range "); -@@ -917,7 +917,8 @@ ada_print_type (struct type *type0, const char *varstring, - } - break; - case TYPE_CODE_FLT: -- fprintf_filtered (stream, _("<%d-byte float>"), TYPE_LENGTH (type)); -+ fprintf_filtered (stream, _("<%s-byte float>"), -+ pulongest (TYPE_LENGTH (type))); - break; - case TYPE_CODE_ENUM: - if (show < 0) -diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c ---- a/gdb/ada-valprint.c -+++ b/gdb/ada-valprint.c -@@ -34,11 +34,11 @@ - #include "target-float.h" - - static int print_field_values (struct type *, const gdb_byte *, -- int, -+ LONGEST, - struct ui_file *, int, - struct value *, - const struct value_print_options *, -- int, struct type *, int, -+ int, struct type *, LONGEST, - const struct language_defn *); - - -@@ -316,7 +316,7 @@ ada_emit_char (int c, struct type *type, struct ui_file *stream, - of a character. */ - - static int --char_at (const gdb_byte *string, int i, int type_len, -+char_at (const gdb_byte *string, LONGEST i, int type_len, - enum bfd_endian byte_order) - { - if (type_len == 1) -@@ -475,11 +475,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) - - static void - printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, -- unsigned int length, int force_ellipses, int type_len, -+ ULONGEST length, int force_ellipses, int type_len, - const struct value_print_options *options) - { - enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (elttype)); -- unsigned int i; -+ ULONGEST i; - unsigned int things_printed = 0; - int in_quotes = 0; - int need_comma = 0; -@@ -494,9 +494,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, - { - /* Position of the character we are examining - to see whether it is repeated. */ -- unsigned int rep1; -+ ULONGEST rep1; - /* Number of repetitions we have detected so far. */ -- unsigned int reps; -+ ULONGEST reps; - - QUIT; - -@@ -527,7 +527,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, - ada_emit_char (char_at (string, i, type_len, byte_order), - elttype, stream, '\'', type_len); - fputs_filtered ("'", stream); -- fprintf_filtered (stream, _(" "), reps); -+ fprintf_filtered (stream, _(" "), -+ pulongest (reps)); - i = rep1 - 1; - things_printed += options->repeat_count_threshold; - need_comma = 1; -@@ -555,7 +556,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, - - void - ada_printstr (struct ui_file *stream, struct type *type, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - const struct value_print_options *options) - { -@@ -565,12 +566,12 @@ ada_printstr (struct ui_file *stream, struct type *type, - - static int - print_variant_part (struct type *type, int field_num, -- const gdb_byte *valaddr, int offset, -+ const gdb_byte *valaddr, LONGEST offset, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options, - int comma_needed, -- struct type *outer_type, int outer_offset, -+ struct type *outer_type, LONGEST outer_offset, - const struct language_defn *language) - { - struct type *var_type = TYPE_FIELD_TYPE (type, field_num); -@@ -606,11 +607,11 @@ print_variant_part (struct type *type, int field_num, - - static int - print_field_values (struct type *type, const gdb_byte *valaddr, -- int offset, struct ui_file *stream, int recurse, -+ LONGEST offset, struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options, - int comma_needed, -- struct type *outer_type, int outer_offset, -+ struct type *outer_type, LONGEST outer_offset, - const struct language_defn *language) - { - int i, len; -@@ -676,7 +677,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr, - else - { - struct value *v; -- int bit_pos = TYPE_FIELD_BITPOS (type, i); -+ LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i); - int bit_size = TYPE_FIELD_BITSIZE (type, i); - struct value_print_options opts; - -@@ -721,8 +722,8 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, - { - enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); - struct type *elttype = TYPE_TARGET_TYPE (type); -- unsigned int eltlen; -- unsigned int len; -+ ULONGEST eltlen; -+ ULONGEST len; - - /* We know that ELTTYPE cannot possibly be null, because we assume - that we're called only when TYPE is a string-like type. -@@ -741,7 +742,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, - elements up to it. */ - if (options->stop_print_at_null) - { -- int temp_len; -+ LONGEST temp_len; - - /* Look for a NULL char. */ - for (temp_len = 0; -@@ -1114,7 +1115,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, - - static void - ada_val_print_1 (struct type *type, -- int offset, CORE_ADDR address, -+ LONGEST offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options, -@@ -1198,7 +1199,7 @@ ada_val_print_1 (struct type *type, - - void - ada_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options) -diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c ---- a/gdb/amd64-tdep.c -+++ b/gdb/amd64-tdep.c -@@ -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]; -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; - static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; - int integer_reg = 0; -@@ -849,10 +849,10 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, - gdb_assert (regnum != -1); - - if (readbuf) -- regcache->raw_read_part (regnum, offset, std::min (len, 8), -+ regcache->raw_read_part (regnum, offset, std::min (len, (LONGEST) 8), - readbuf + i * 8); - if (writebuf) -- regcache->raw_write_part (regnum, offset, std::min (len, 8), -+ regcache->raw_write_part (regnum, offset, std::min (len, (LONGEST) 8), - writebuf + i * 8); - } - -diff --git a/gdb/annotate.c b/gdb/annotate.c ---- a/gdb/annotate.c -+++ b/gdb/annotate.c -@@ -531,21 +531,21 @@ annotate_frame_end (void) - } - - void --annotate_array_section_begin (int idx, struct type *elttype) -+annotate_array_section_begin (LONGEST idx, struct type *elttype) - { - if (annotation_level == 2) - { -- printf_filtered (("\n\032\032array-section-begin %d "), idx); -+ printf_filtered (("\n\032\032array-section-begin %s "), plongest (idx)); - print_value_flags (elttype); - printf_filtered (("\n")); - } - } - - void --annotate_elt_rep (unsigned int repcount) -+annotate_elt_rep (ULONGEST repcount) - { - if (annotation_level == 2) -- printf_filtered (("\n\032\032elt-rep %u\n"), repcount); -+ printf_filtered (("\n\032\032elt-rep %s\n"), pulongest (repcount)); - } - - void -diff --git a/gdb/annotate.h b/gdb/annotate.h ---- a/gdb/annotate.h -+++ b/gdb/annotate.h -@@ -105,8 +105,8 @@ extern void annotate_frame_source_end (void); - extern void annotate_frame_where (void); - extern void annotate_frame_end (void); - --extern void annotate_array_section_begin (int, struct type *); --extern void annotate_elt_rep (unsigned int); -+extern void annotate_array_section_begin (LONGEST, struct type *); -+extern void annotate_elt_rep (ULONGEST); - extern void annotate_elt_rep_end (void); - extern void annotate_elt (void); - extern void annotate_array_section_end (void); -diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c ---- a/gdb/arch-utils.c -+++ b/gdb/arch-utils.c -@@ -227,7 +227,7 @@ legacy_virtual_frame_pointer (struct gdbarch *gdbarch, - - const struct floatformat ** - default_floatformat_for_type (struct gdbarch *gdbarch, -- const char *name, int len) -+ const char *name, LONGEST len) - { - const struct floatformat **format = NULL; - -diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h ---- a/gdb/arch-utils.h -+++ b/gdb/arch-utils.h -@@ -131,7 +131,7 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer; - /* Default implementation of gdbarch_floatformat_for_type. */ - extern const struct floatformat ** - default_floatformat_for_type (struct gdbarch *gdbarch, -- const char *name, int len); -+ const char *name, LONGEST len); - - extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame, - CORE_ADDR pc); -diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c ---- a/gdb/arm-linux-nat.c -+++ b/gdb/arm-linux-nat.c -@@ -1092,7 +1092,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 --arm_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+arm_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); - CORE_ADDR max_wp_length, aligned_addr; -diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c ---- a/gdb/ax-gdb.c -+++ b/gdb/ax-gdb.c -@@ -82,12 +82,12 @@ static void gen_traced_pop (struct agent_expr *, struct axs_value *); - static void gen_sign_extend (struct agent_expr *, struct type *); - static void gen_extend (struct agent_expr *, struct type *); - static void gen_fetch (struct agent_expr *, struct type *); --static void gen_left_shift (struct agent_expr *, int); -+static void gen_left_shift (struct agent_expr *, LONGEST); - - - static void gen_frame_args_address (struct agent_expr *); - static void gen_frame_locals_address (struct agent_expr *); --static void gen_offset (struct agent_expr *ax, int offset); -+static void gen_offset (struct agent_expr *ax, LONGEST offset); - static void gen_sym_offset (struct agent_expr *, struct symbol *); - static void gen_var_ref (struct agent_expr *ax, struct axs_value *value, - struct symbol *var); -@@ -132,13 +132,13 @@ static void gen_complement (struct agent_expr *ax, struct axs_value *value); - static void gen_deref (struct axs_value *); - static void gen_address_of (struct axs_value *); - static void gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value, -- struct type *type, int start, int end); -+ struct type *type, LONGEST start, LONGEST end); - static void gen_primitive_field (struct agent_expr *ax, - struct axs_value *value, -- int offset, int fieldno, struct type *type); -+ LONGEST offset, int fieldno, struct type *type); - static int gen_struct_ref_recursive (struct agent_expr *ax, - struct axs_value *value, -- const char *field, int offset, -+ const char *field, LONGEST offset, - struct type *type); - static void gen_struct_ref (struct agent_expr *ax, - struct axs_value *value, -@@ -529,7 +529,7 @@ gen_fetch (struct agent_expr *ax, struct type *type) - right shift it by -DISTANCE bits if DISTANCE < 0. This generates - unsigned (logical) right shifts. */ - static void --gen_left_shift (struct agent_expr *ax, int distance) -+gen_left_shift (struct agent_expr *ax, LONGEST distance) - { - if (distance > 0) - { -@@ -583,7 +583,7 @@ gen_frame_locals_address (struct agent_expr *ax) - programming in ML, it would be clearer why these are the same - thing. */ - static void --gen_offset (struct agent_expr *ax, int offset) -+gen_offset (struct agent_expr *ax, LONGEST offset) - { - /* It would suffice to simply push the offset and add it, but this - makes it easier to read positive and negative offsets in the -@@ -1254,7 +1254,7 @@ gen_address_of (struct axs_value *value) - structure. */ - static void - gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value, -- struct type *type, int start, int end) -+ struct type *type, LONGEST start, LONGEST end) - { - /* Note that ops[i] fetches 8 << i bits. */ - static enum agent_op ops[] -@@ -1289,13 +1289,13 @@ gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value, - - /* The first and one-after-last bits in the field, but rounded down - and up to byte boundaries. */ -- int bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT; -- int bound_end = (((end + TARGET_CHAR_BIT - 1) -- / TARGET_CHAR_BIT) -- * TARGET_CHAR_BIT); -+ LONGEST bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT; -+ LONGEST bound_end = (((end + TARGET_CHAR_BIT - 1) -+ / TARGET_CHAR_BIT) -+ * TARGET_CHAR_BIT); - - /* current bit offset within the structure */ -- int offset; -+ LONGEST offset; - - /* The index in ops of the opcode we're considering. */ - int op; -@@ -1413,7 +1413,7 @@ gen_bitfield_ref (struct agent_expr *ax, struct axs_value *value, - - static void - gen_primitive_field (struct agent_expr *ax, struct axs_value *value, -- int offset, int fieldno, struct type *type) -+ LONGEST offset, int fieldno, struct type *type) - { - /* Is this a bitfield? */ - if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1437,7 +1437,7 @@ gen_primitive_field (struct agent_expr *ax, struct axs_value *value, - - static int - gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value, -- const char *field, int offset, struct type *type) -+ const char *field, LONGEST offset, struct type *type) - { - int i, rslt; - int nbases = TYPE_N_BASECLASSES (type); -diff --git a/gdb/ax-general.c b/gdb/ax-general.c ---- a/gdb/ax-general.c -+++ b/gdb/ax-general.c -@@ -177,7 +177,7 @@ ax_zero_ext (struct agent_expr *x, int n) - - /* Append a trace_quick instruction to EXPR, to record N bytes. */ - void --ax_trace_quick (struct agent_expr *x, int n) -+ax_trace_quick (struct agent_expr *x, LONGEST n) - { - /* N must fit in a byte. */ - if (n < 0 || n > 255) -diff --git a/gdb/ax.h b/gdb/ax.h ---- a/gdb/ax.h -+++ b/gdb/ax.h -@@ -193,7 +193,7 @@ extern void ax_ext (struct agent_expr *EXPR, int N); - extern void ax_zero_ext (struct agent_expr *EXPR, int N); - - /* Append a trace_quick instruction to EXPR, to record N bytes. */ --extern void ax_trace_quick (struct agent_expr *EXPR, int N); -+extern void ax_trace_quick (struct agent_expr *EXPR, LONGEST N); - - /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or - aop_if_goto). We assume we don't know the target offset yet, -diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c ---- a/gdb/breakpoint.c -+++ b/gdb/breakpoint.c -@@ -2057,9 +2057,9 @@ should_be_inserted (struct bp_location *bl) - { - fprintf_unfiltered (gdb_stdlog, - "infrun: stepping past non-steppable watchpoint. " -- "skipping watchpoint at %s:%d\n", -+ "skipping watchpoint at %s:%s\n", - paddress (bl->gdbarch, bl->address), -- bl->length); -+ plongest (bl->length)); - } - return 0; - } -@@ -6803,7 +6803,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, - static int - breakpoint_address_match_range (const address_space *aspace1, - CORE_ADDR addr1, -- int len1, const address_space *aspace2, -+ LONGEST len1, const address_space *aspace2, - CORE_ADDR addr2) - { - return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -10869,7 +10869,7 @@ can_use_hardware_watchpoint (const std::vector &vals) - && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) - { - CORE_ADDR vaddr = value_address (v); -- int len; -+ LONGEST len; - int num_regs; - - len = (target_exact_watchpoints -diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h ---- a/gdb/breakpoint.h -+++ b/gdb/breakpoint.h -@@ -252,7 +252,7 @@ struct bp_target_info - - /* If this is a ranged breakpoint, then this field contains the - length of the range that will be watched for execution. */ -- int length; -+ LONGEST length; - - /* If the breakpoint lives in memory and reading that memory would - give back the breakpoint, instead of the original contents, then -@@ -417,7 +417,7 @@ public: - /* For hardware watchpoints, the size of the memory region being - watched. For hardware ranged breakpoints, the size of the - breakpoint range. */ -- int length = 0; -+ LONGEST length = 0; - - /* Type of hardware watchpoint. */ - target_hw_bp_type watchpoint_type {}; -diff --git a/gdb/c-lang.c b/gdb/c-lang.c ---- a/gdb/c-lang.c -+++ b/gdb/c-lang.c -@@ -185,7 +185,7 @@ c_printchar (int c, struct type *type, struct ui_file *stream) - - void - c_printstr (struct ui_file *stream, struct type *type, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *user_encoding, int force_ellipses, - const struct value_print_options *options) - { -@@ -664,7 +664,7 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp, - } - else - { -- int i; -+ LONGEST i; - - /* Write the terminating character. */ - for (i = 0; i < TYPE_LENGTH (type); ++i) -@@ -673,7 +673,7 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp, - if (satisfy_expected) - { - LONGEST low_bound, high_bound; -- int element_size = TYPE_LENGTH (type); -+ LONGEST element_size = TYPE_LENGTH (type); - - if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), - &low_bound, &high_bound) < 0) -diff --git a/gdb/c-lang.h b/gdb/c-lang.h ---- a/gdb/c-lang.h -+++ b/gdb/c-lang.h -@@ -82,7 +82,7 @@ extern void c_print_typedef (struct type *, - struct ui_file *); - - extern void c_val_print (struct type *, -- int, CORE_ADDR, -+ LONGEST, CORE_ADDR, - struct ui_file *, int, - struct value *, - const struct value_print_options *); -@@ -102,7 +102,7 @@ extern void c_printchar (int, struct type *, struct ui_file *); - extern void c_printstr (struct ui_file * stream, - struct type *elttype, - const gdb_byte *string, -- unsigned int length, -+ ULONGEST length, - const char *user_encoding, - int force_ellipses, - const struct value_print_options *options); -diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c ---- a/gdb/c-valprint.c -+++ b/gdb/c-valprint.c -@@ -247,7 +247,7 @@ c_val_print_array (struct type *type, const gdb_byte *valaddr, - if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0) - { - LONGEST low_bound, high_bound; -- int eltlen, len; -+ LONGEST eltlen, len; - struct gdbarch *gdbarch = get_type_arch (type); - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - unsigned int i = 0; /* Number of characters printed. */ -@@ -321,8 +321,8 @@ c_val_print_array (struct type *type, const gdb_byte *valaddr, - if (cp_is_vtbl_ptr_type (elttype)) - { - i = 1; -- fprintf_filtered (stream, _("%d vtable entries"), -- len - 1); -+ fprintf_filtered (stream, _("%s vtable entries"), -+ plongest (len - 1)); - } - else - { -@@ -399,7 +399,7 @@ c_val_print_struct (struct type *type, const gdb_byte *valaddr, - -fvtable_thunks. (Otherwise, look under - TYPE_CODE_PTR.) */ - struct gdbarch *gdbarch = get_type_arch (type); -- int offset = (embedded_offset -+ LONGEST offset = (embedded_offset - + TYPE_FIELD_BITPOS (type, - VTBL_FNADDR_OFFSET) / 8); - struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET); -@@ -498,7 +498,7 @@ c_val_print_memberptr (struct type *type, const gdb_byte *valaddr, - - void - c_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options) -diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c ---- a/gdb/compile/compile-c-support.c -+++ b/gdb/compile/compile-c-support.c -@@ -270,11 +270,11 @@ generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, - - default: - fprintf_unfiltered (stream, -- " unsigned char %s[%d]" -+ " unsigned char %s[%s]" - " __attribute__((__aligned__(" - "__BIGGEST_ALIGNMENT__)))", - regname.c_str (), -- TYPE_LENGTH (regtype)); -+ pulongest (TYPE_LENGTH (regtype))); - } - fputs_unfiltered (";\n", stream); - } -diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c ---- a/gdb/cp-abi.c -+++ b/gdb/cp-abi.c -@@ -64,12 +64,12 @@ is_operator_name (const char *name) - return (*current_cp_abi.is_operator_name) (name); - } - --int -+LONGEST - baseclass_offset (struct type *type, int index, const gdb_byte *valaddr, - LONGEST embedded_offset, CORE_ADDR address, - const struct value *val) - { -- int res = 0; -+ LONGEST res = 0; - - gdb_assert (current_cp_abi.baseclass_offset != NULL); - -@@ -96,7 +96,7 @@ baseclass_offset (struct type *type, int index, const gdb_byte *valaddr, - struct value * - value_virtual_fn_field (struct value **arg1p, - struct fn_field *f, int j, -- struct type *type, int offset) -+ struct type *type, LONGEST offset) - { - if ((current_cp_abi.virtual_fn_field) == NULL) - return NULL; -diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h ---- a/gdb/cp-abi.h -+++ b/gdb/cp-abi.h -@@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_field (struct value **valuep, - struct fn_field *f, - int j, - struct type *type, -- int offset); -+ LONGEST offset); - - - /* Try to find the run-time type of VALUE, using C++ run-time type -@@ -144,11 +144,11 @@ extern struct type *value_rtti_type (struct value *value, - contents of VAL. The result is the offset of the baseclass value - relative to (the address of)(ARG) + OFFSET. */ - --extern int baseclass_offset (struct type *type, -- int index, const gdb_byte *valaddr, -- LONGEST embedded_offset, -- CORE_ADDR address, -- const struct value *val); -+extern LONGEST baseclass_offset (struct type *type, -+ int index, const gdb_byte *valaddr, -+ LONGEST embedded_offset, -+ CORE_ADDR address, -+ const struct value *val); - - /* Describe the target of a pointer to method. CONTENTS is the byte - pattern representing the pointer to method. TYPE is the pointer to -@@ -226,12 +226,12 @@ struct cp_abi_ops - struct value *(*virtual_fn_field) (struct value **arg1p, - struct fn_field * f, - int j, struct type * type, -- int offset); -+ LONGEST offset); - struct type *(*rtti_type) (struct value *v, int *full, - LONGEST *top, int *using_enc); -- int (*baseclass_offset) (struct type *type, int index, -- const bfd_byte *valaddr, LONGEST embedded_offset, -- CORE_ADDR address, const struct value *val); -+ LONGEST (*baseclass_offset) (struct type *type, int index, -+ const bfd_byte *valaddr, LONGEST embedded_offset, -+ CORE_ADDR address, const struct value *val); - void (*print_method_ptr) (const gdb_byte *contents, - struct type *type, - struct ui_file *stream); -diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c ---- a/gdb/cp-valprint.c -+++ b/gdb/cp-valprint.c -@@ -335,7 +335,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, - } - else if (i == vptr_fieldno && type == vptr_basetype) - { -- int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; -+ LONGEST i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; - struct type *i_type = TYPE_FIELD_TYPE (type, i); - - if (valprint_check_validity (stream, i_type, i_offset, val)) -diff --git a/gdb/d-lang.h b/gdb/d-lang.h ---- a/gdb/d-lang.h -+++ b/gdb/d-lang.h -@@ -79,7 +79,7 @@ extern struct block_symbol d_lookup_nested_symbol (struct type *, const char *, - /* Defined in d-valprint.c */ - - extern void d_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options); -diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c ---- a/gdb/d-valprint.c -+++ b/gdb/d-valprint.c -@@ -73,7 +73,7 @@ dynamic_array_type (struct type *type, - - /* Implements the la_val_print routine for language D. */ - void --d_val_print (struct type *type, int embedded_offset, -+d_val_print (struct type *type, LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options) -diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c ---- a/gdb/dwarf2loc.c -+++ b/gdb/dwarf2loc.c -@@ -1624,7 +1624,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]; -- size_t this_size_bits, this_size; -+ ULONGEST this_size_bits, this_size; - - this_size_bits = p->size - bits_to_skip; - if (this_size_bits > max_offset - offset) -@@ -1871,7 +1871,7 @@ write_pieced_value (struct value *to, struct value *from) - - static int - check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, -- int bit_length) -+ LONGEST bit_length) - { - struct piece_closure *c - = (struct piece_closure *) value_computed_closure (value); -@@ -1884,7 +1884,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]; -- size_t this_size_bits = p->size; -+ ULONGEST this_size_bits = p->size; - - if (bit_offset > 0) - { -@@ -1988,8 +1988,8 @@ indirect_pieced_value (struct value *value) - = (struct piece_closure *) value_computed_closure (value); - struct type *type; - struct frame_info *frame; -- int i, bit_length; -- LONGEST bit_offset; -+ int i; -+ LONGEST bit_length, bit_offset; - struct dwarf_expr_piece *piece = NULL; - LONGEST byte_offset; - enum bfd_endian byte_order; -@@ -2006,7 +2006,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]; -- size_t this_size_bits = p->size; -+ ULONGEST this_size_bits = p->size; - - if (bit_offset > 0) - { -@@ -2295,9 +2295,9 @@ if (frame != NULL) select_frame (frame); - case DWARF_VALUE_STACK: - { - struct value *value = ctx.fetch (0); -- size_t n = TYPE_LENGTH (value_type (value)); -- size_t len = TYPE_LENGTH (subobj_type); -- size_t max = TYPE_LENGTH (type); -+ ULONGEST n = TYPE_LENGTH (value_type (value)); -+ ULONGEST len = TYPE_LENGTH (subobj_type); -+ ULONGEST max = TYPE_LENGTH (type); - struct gdbarch *objfile_gdbarch = get_objfile_arch (objfile); - - if (subobj_byte_offset + len > max) -diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c ---- a/gdb/dwarf2read.c -+++ b/gdb/dwarf2read.c -@@ -2064,11 +2064,11 @@ dwarf2_complex_location_expr_complaint (void) - } - - static void --dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, -- int arg3) -+dwarf2_const_value_length_mismatch_complaint (const char *arg1, LONGEST arg2, -+ LONGEST arg3) - { -- complaint (_("const value length mismatch for '%s', got %d, expected %d"), -- arg1, arg2, arg3); -+ complaint (_("const value length mismatch for '%s', got %s, expected %s"), -+ arg1, plongest (arg2), plongest (arg3)); - } - - static void -@@ -15103,8 +15103,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. */ -- int anonymous_size; -- int bit_offset = DW_UNSND (attr); -+ LONGEST anonymous_size; -+ LONGEST bit_offset = DW_UNSND (attr); - - attr = dwarf2_attr (die, DW_AT_byte_size, cu); - if (attr) -diff --git a/gdb/eval.c b/gdb/eval.c ---- a/gdb/eval.c -+++ b/gdb/eval.c -@@ -295,7 +295,8 @@ evaluate_struct_tuple (struct value *struct_val, - while (--nargs >= 0) - { - struct value *val = NULL; -- int bitpos, bitsize; -+ LONGEST bitpos; -+ int bitsize; - bfd_byte *addr; - - fieldno++; -@@ -356,7 +357,7 @@ init_array_element (struct value *array, struct value *element, - enum noside noside, LONGEST low_bound, LONGEST high_bound) - { - LONGEST index; -- int element_size = TYPE_LENGTH (value_type (element)); -+ LONGEST element_size = TYPE_LENGTH (value_type (element)); - - if (exp->elts[*pos].opcode == BINOP_COMMA) - { -@@ -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); -- unsigned int promoted_len1 = TYPE_LENGTH (type1); -- unsigned int promoted_len2 = TYPE_LENGTH (type2); -+ ULONGEST promoted_len1 = TYPE_LENGTH (type1); -+ ULONGEST promoted_len2 = TYPE_LENGTH (type2); - int is_unsigned1 = TYPE_UNSIGNED (type1); - int is_unsigned2 = TYPE_UNSIGNED (type2); -- unsigned int result_len; -+ ULONGEST result_len; - int unsigned_operation; - - /* Determine type length and signedness after promotion for -@@ -1553,7 +1554,7 @@ evaluate_subexp_standard (struct type *expect_type, - struct value **argvec; - int code; - int ix; -- long mem_offset; -+ LONGEST mem_offset; - struct type **arg_types; - - pc = (*pos)++; -@@ -1738,7 +1739,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); -- int element_size = TYPE_LENGTH (check_typedef (element_type)); -+ LONGEST element_size = TYPE_LENGTH (check_typedef (element_type)); - LONGEST low_bound, high_bound, index; - - if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -diff --git a/gdb/f-lang.c b/gdb/f-lang.c ---- a/gdb/f-lang.c -+++ b/gdb/f-lang.c -@@ -104,7 +104,7 @@ f_printchar (int c, struct type *type, struct ui_file *stream) - - static void - f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, -- unsigned int length, const char *encoding, int force_ellipses, -+ ULONGEST length, const char *encoding, int force_ellipses, - const struct value_print_options *options) - { - const char *type_encoding = f_get_encoding (type); -diff --git a/gdb/f-lang.h b/gdb/f-lang.h ---- a/gdb/f-lang.h -+++ b/gdb/f-lang.h -@@ -31,7 +31,7 @@ extern int f_parse (struct parser_state *); - extern void f_print_type (struct type *, const char *, struct ui_file *, int, - int, const struct type_print_options *); - --extern void f_val_print (struct type *, int, CORE_ADDR, -+extern void f_val_print (struct type *, LONGEST, CORE_ADDR, - struct ui_file *, int, - struct value *, - const struct value_print_options *); -diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c ---- a/gdb/f-valprint.c -+++ b/gdb/f-valprint.c -@@ -36,7 +36,7 @@ - - static void f77_get_dynamic_length_of_aggregate (struct type *); - --int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; -+LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; - - /* Array which holds offsets to be applied to get a row's elements - for a given array. Array also holds the size of each subarray. */ -@@ -71,8 +71,8 @@ f77_get_upperbound (struct type *type) - static void - f77_get_dynamic_length_of_aggregate (struct type *type) - { -- int upper_bound = -1; -- int lower_bound = 1; -+ LONGEST upper_bound = -1; -+ LONGEST lower_bound = 1; - - /* Recursively go all the way down into a possibly multi-dimensional - F77 array and get the bounds. For simple arrays, this is pretty -@@ -104,7 +104,7 @@ f77_get_dynamic_length_of_aggregate (struct type *type) - static void - f77_print_array_1 (int nss, int ndimensions, struct type *type, - const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - const struct value *val, - const struct value_print_options *options, -@@ -113,7 +113,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, - struct type *range_type = TYPE_INDEX_TYPE (check_typedef (type)); - CORE_ADDR addr = address + embedded_offset; - LONGEST lowerbound, upperbound; -- int i; -+ LONGEST i; - - get_discrete_bounds (range_type, &lowerbound, &upperbound); - -@@ -175,7 +175,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, - - static void - f77_print_array (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, -+ LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, - int recurse, - const struct value *val, -@@ -214,7 +214,7 @@ static const struct generic_val_print_decorations f_decorations = - function; they are identical. */ - - void --f_val_print (struct type *type, int embedded_offset, -+f_val_print (struct type *type, LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options) -diff --git a/gdb/findvar.c b/gdb/findvar.c ---- a/gdb/findvar.c -+++ b/gdb/findvar.c -@@ -821,7 +821,7 @@ struct value * - default_value_from_register (struct gdbarch *gdbarch, struct type *type, - int regnum, struct frame_id frame_id) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - struct value *value = allocate_value (type); - struct frame_info *frame; - -@@ -865,7 +865,7 @@ read_frame_register_value (struct value *value, struct frame_info *frame) - LONGEST offset = 0; - LONGEST reg_offset = value_offset (value); - int regnum = VALUE_REGNUM (value); -- int len = type_length_units (check_typedef (value_type (value))); -+ LONGEST len = type_length_units (check_typedef (value_type (value))); - - gdb_assert (VALUE_LVAL (value) == lval_register); - -@@ -880,7 +880,7 @@ read_frame_register_value (struct value *value, struct frame_info *frame) - while (len > 0) - { - struct value *regval = get_frame_register_value (frame, regnum); -- int reg_len = type_length_units (value_type (regval)) - reg_offset; -+ LONGEST reg_len = type_length_units (value_type (regval)) - reg_offset; - - /* If the register length is larger than the number of bytes - remaining to copy, then only copy the appropriate bytes. */ -diff --git a/gdb/frame.c b/gdb/frame.c ---- a/gdb/frame.c -+++ b/gdb/frame.c -@@ -1393,7 +1393,7 @@ deprecated_frame_register_read (struct frame_info *frame, int regnum, - - int - get_frame_register_bytes (struct frame_info *frame, int regnum, -- CORE_ADDR offset, int len, gdb_byte *myaddr, -+ CORE_ADDR offset, LONGEST len, gdb_byte *myaddr, - int *optimizedp, int *unavailablep) - { - struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1422,7 +1422,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, - } - if (len > maxsize) - error (_("Bad debug information detected: " -- "Attempt to read %d bytes from registers."), len); -+ "Attempt to read %s bytes from registers."), plongest (len)); - - /* Copy the data. */ - while (len > 0) -diff --git a/gdb/frame.h b/gdb/frame.h ---- a/gdb/frame.h -+++ b/gdb/frame.h -@@ -620,7 +620,7 @@ extern void put_frame_register (struct frame_info *frame, int regnum, - contents are optimized out or unavailable, set *OPTIMIZEDP, - *UNAVAILABLEP accordingly. */ - extern int get_frame_register_bytes (struct frame_info *frame, int regnum, -- CORE_ADDR offset, int len, -+ CORE_ADDR offset, LONGEST len, - gdb_byte *myaddr, - int *optimizedp, int *unavailablep); - -diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c ---- a/gdb/gdbarch.c -+++ b/gdb/gdbarch.c -@@ -1803,7 +1803,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, - } - - const struct floatformat ** --gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length) -+gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, LONGEST length) - { - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->floatformat_for_type != NULL); -diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h ---- a/gdb/gdbarch.h -+++ b/gdb/gdbarch.h -@@ -218,8 +218,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. */ - --typedef const struct floatformat ** (gdbarch_floatformat_for_type_ftype) (struct gdbarch *gdbarch, const char *name, int length); --extern const struct floatformat ** gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length); -+typedef const struct floatformat ** (gdbarch_floatformat_for_type_ftype) (struct gdbarch *gdbarch, const char *name, LONGEST length); -+extern const struct floatformat ** gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, LONGEST length); - extern void set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch, gdbarch_floatformat_for_type_ftype *floatformat_for_type); - - /* For most targets, a pointer on the target and its representation as an -diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh ---- a/gdb/gdbarch.sh -+++ b/gdb/gdbarch.sh -@@ -385,7 +385,7 @@ v;int;wchar_signed;;;1;-1;1 - # Returns the floating-point format to be used for values of length LENGTH. - # NAME, if non-NULL, is the type name, which may be used to distinguish - # different target formats of the same length. --m;const struct floatformat **;floatformat_for_type;const char *name, int length;name, length;0;default_floatformat_for_type;;0 -+m;const struct floatformat **;floatformat_for_type;const char *name, LONGEST length;name, length;0;default_floatformat_for_type;;0 - - # For most targets, a pointer on the target and its representation as an - # address in GDB have the same size and "look the same". For such a -diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c ---- a/gdb/gdbtypes.c -+++ b/gdb/gdbtypes.c -@@ -2873,7 +2873,7 @@ floatformat_from_type (const struct type *type) - least as long as OBJFILE. */ - - struct type * --init_type (struct objfile *objfile, enum type_code code, int bit, -+init_type (struct objfile *objfile, enum type_code code, LONGEST bit, - const char *name) - { - struct type *type; -@@ -3330,8 +3330,8 @@ is_public_ancestor (struct type *base, struct type *dclass) - - static int - is_unique_ancestor_worker (struct type *base, struct type *dclass, -- int *offset, -- const gdb_byte *valaddr, int embedded_offset, -+ LONGEST *offset, -+ const gdb_byte *valaddr, LONGEST embedded_offset, - CORE_ADDR address, struct value *val) - { - int i, count = 0; -@@ -3342,7 +3342,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; -- int this_offset; -+ LONGEST this_offset; - - iter = check_typedef (TYPE_BASECLASS (dclass, i)); - -@@ -3383,7 +3383,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, - int - is_unique_ancestor (struct type *base, struct value *val) - { -- int offset = -1; -+ LONGEST offset = -1; - - return is_unique_ancestor_worker (base, value_type (val), &offset, - value_contents_for_printing (val), -@@ -4643,7 +4643,7 @@ recursive_dump_type (struct type *type, int spaces) - break; - } - puts_filtered ("\n"); -- printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type)); -+ printfi_filtered (spaces, "length %s\n", pulongest (TYPE_LENGTH (type))); - if (TYPE_OBJFILE_OWNED (type)) - { - printfi_filtered (spaces, "objfile "); -@@ -5088,7 +5088,7 @@ copy_type (const struct type *type) - - struct type * - arch_type (struct gdbarch *gdbarch, -- enum type_code code, int bit, const char *name) -+ enum type_code code, LONGEST bit, const char *name) - { - struct type *type; - -diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h ---- a/gdb/gdbtypes.h -+++ b/gdb/gdbtypes.h -@@ -864,7 +864,7 @@ struct type - type_length_units function should be used in order to get the length - expressed in target addressable memory units. */ - -- unsigned int length; -+ ULONGEST length; - - /* * Core type, shared by a group of qualified types. */ - -@@ -1787,7 +1787,7 @@ extern unsigned int type_length_units (struct type *type); - - /* * Helper function to construct objfile-owned types. */ - --extern struct type *init_type (struct objfile *, enum type_code, int, -+extern struct type *init_type (struct objfile *, enum type_code, LONGEST, - const char *); - extern struct type *init_integer_type (struct objfile *, int, int, - const char *); -@@ -1804,7 +1804,7 @@ extern struct type *init_pointer_type (struct objfile *, int, const char *, - struct type *); - - /* Helper functions to construct architecture-owned types. */ --extern struct type *arch_type (struct gdbarch *, enum type_code, int, -+extern struct type *arch_type (struct gdbarch *, enum type_code, LONGEST, - const char *); - extern struct type *arch_integer_type (struct gdbarch *, int, int, - const char *); -diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c ---- a/gdb/gnu-v2-abi.c -+++ b/gdb/gnu-v2-abi.c -@@ -82,7 +82,7 @@ gnuv2_is_operator_name (const char *name) - TYPE is the type in which F is located. */ - static struct value * - gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, -- struct type * type, int offset) -+ struct type *type, LONGEST offset) - { - struct value *arg1 = *arg1p; - struct type *type1 = check_typedef (value_type (arg1)); -@@ -338,7 +338,7 @@ vb_match (struct type *type, int index, struct type *basetype) - target). The result is the offset of the baseclass value relative - to (the address of)(ARG) + OFFSET. */ - --static int -+static LONGEST - gnuv2_baseclass_offset (struct type *type, int index, - const bfd_byte *valaddr, LONGEST embedded_offset, - CORE_ADDR address, const struct value *val) -@@ -358,8 +358,7 @@ gnuv2_baseclass_offset (struct type *type, int index, - if (vb_match (type, i, basetype)) - { - struct type *field_type; -- LONGEST field_offset; -- int field_length; -+ LONGEST field_offset, field_length; - CORE_ADDR addr; - - field_type = check_typedef (TYPE_FIELD_TYPE (type, i)); -@@ -383,7 +382,7 @@ gnuv2_baseclass_offset (struct type *type, int index, - /* Don't go through baseclass_offset, as that wraps - exceptions, thus, inner exceptions would be wrapped more - than once. */ -- int boffset = -+ LONGEST boffset = - gnuv2_baseclass_offset (type, i, valaddr, - embedded_offset, address, val); - -diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c ---- a/gdb/gnu-v3-abi.c -+++ b/gdb/gnu-v3-abi.c -@@ -109,7 +109,7 @@ build_gdb_vtable_type (struct gdbarch *arch) - { - struct type *t; - struct field *field_list, *field; -- int offset; -+ LONGEST offset; - - struct type *void_ptr_type - = builtin_type (arch)->builtin_data_ptr; -@@ -185,7 +185,7 @@ vtable_ptrdiff_type (struct gdbarch *gdbarch) - /* Return the offset from the start of the imaginary `struct - gdb_gnu_v3_abi_vtable' object to the vtable's "address point" - (i.e., where objects' virtual table pointers point). */ --static int -+static LONGEST - vtable_address_point_offset (struct gdbarch *gdbarch) - { - struct type *vtable_type -@@ -409,7 +409,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gdbarch, struct value *container, - static struct value * - gnuv3_virtual_fn_field (struct value **value_p, - struct fn_field *f, int j, -- struct type *vfn_base, int offset) -+ struct type *vfn_base, LONGEST offset) - { - struct type *values_type = check_typedef (value_type (*value_p)); - struct gdbarch *gdbarch; -@@ -439,7 +439,7 @@ gnuv3_virtual_fn_field (struct value **value_p, - - -1 is returned on error. */ - --static int -+static LONGEST - gnuv3_baseclass_offset (struct type *type, int index, - const bfd_byte *valaddr, LONGEST embedded_offset, - CORE_ADDR address, const struct value *val) -@@ -448,7 +448,7 @@ gnuv3_baseclass_offset (struct type *type, int index, - struct type *ptr_type; - struct value *vtable; - struct value *vbase_array; -- long int cur_base_offset, base_offset; -+ LONGEST cur_base_offset, base_offset; - - /* Determine architecture. */ - gdbarch = get_type_arch (type); -@@ -471,7 +471,7 @@ gnuv3_baseclass_offset (struct type *type, int index, - cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); - if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) - error (_("Misaligned vbase offset.")); -- cur_base_offset = cur_base_offset / ((int) TYPE_LENGTH (ptr_type)); -+ cur_base_offset = cur_base_offset / ((LONGEST) TYPE_LENGTH (ptr_type)); - - vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); - gdb_assert (vtable != NULL); -@@ -515,7 +515,7 @@ gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset, - we're out of luck. */ - for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) - { -- int pos; -+ LONGEST pos; - struct type *basetype; - - if (BASETYPE_VIA_VIRTUAL (domain, i)) -diff --git a/gdb/go-lang.h b/gdb/go-lang.h ---- a/gdb/go-lang.h -+++ b/gdb/go-lang.h -@@ -83,7 +83,7 @@ extern void go_print_type (struct type *type, const char *varstring, - /* Defined in go-valprint.c. */ - - extern void go_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options); -diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c ---- a/gdb/go-valprint.c -+++ b/gdb/go-valprint.c -@@ -86,7 +86,7 @@ print_go_string (struct type *type, - /* Implements the la_val_print routine for language Go. */ - - void --go_val_print (struct type *type, int embedded_offset, -+go_val_print (struct type *type, LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options) -diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c ---- a/gdb/i386-tdep.c -+++ b/gdb/i386-tdep.c -@@ -8156,7 +8156,7 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, - - const struct floatformat ** - i386_floatformat_for_type (struct gdbarch *gdbarch, -- const char *name, int len) -+ const char *name, LONGEST len) - { - if (len == 128 && name) - if (strcmp (name, "__float128") == 0 -diff --git a/gdb/language.c b/gdb/language.c ---- a/gdb/language.c -+++ b/gdb/language.c -@@ -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, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - const struct value_print_options *options) - { -@@ -784,7 +784,7 @@ unk_lang_print_type (struct type *type, const char *varstring, - - static void - unk_lang_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options) -diff --git a/gdb/language.h b/gdb/language.h ---- a/gdb/language.h -+++ b/gdb/language.h -@@ -184,7 +184,7 @@ struct language_defn - struct ui_file * stream); - - void (*la_printstr) (struct ui_file * stream, struct type *elttype, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - const struct value_print_options *); - -@@ -222,7 +222,7 @@ struct language_defn - printing. */ - - void (*la_val_print) (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options); -diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c ---- a/gdb/m2-lang.c -+++ b/gdb/m2-lang.c -@@ -103,10 +103,10 @@ m2_printchar (int c, struct type *type, struct ui_file *stream) - - static void - m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, -- unsigned int length, const char *encoding, int force_ellipses, -+ ULONGEST length, const char *encoding, int force_ellipses, - const struct value_print_options *options) - { -- unsigned int i; -+ ULONGEST i; - unsigned int things_printed = 0; - int in_quotes = 0; - int need_comma = 0; -@@ -121,9 +121,9 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, - { - /* Position of the character we are examining - to see whether it is repeated. */ -- unsigned int rep1; -+ ULONGEST rep1; - /* Number of repetitions we have detected so far. */ -- unsigned int reps; -+ ULONGEST reps; - - QUIT; - -@@ -149,7 +149,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, - in_quotes = 0; - } - m2_printchar (string[i], type, stream); -- fprintf_filtered (stream, " ", reps); -+ fprintf_filtered (stream, " ", pulongest (reps)); - i = rep1 - 1; - things_printed += options->repeat_count_threshold; - need_comma = 1; -diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h ---- a/gdb/m2-lang.h -+++ b/gdb/m2-lang.h -@@ -35,7 +35,7 @@ extern void m2_print_typedef (struct type *, struct symbol *, - extern int m2_is_long_set (struct type *type); - extern int m2_is_unbounded_array (struct type *type); - --extern void m2_val_print (struct type *, int, CORE_ADDR, -+extern void m2_val_print (struct type *, LONGEST, CORE_ADDR, - struct ui_file *, int, - struct value *, - const struct value_print_options *); -diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c ---- a/gdb/m2-typeprint.c -+++ b/gdb/m2-typeprint.c -@@ -234,9 +234,12 @@ static void m2_array (struct type *type, struct ui_file *stream, - m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); - } - else -- fprintf_filtered (stream, "%d", -- (TYPE_LENGTH (type) -- / TYPE_LENGTH (TYPE_TARGET_TYPE (type)))); -+ { -+ ULONGEST val = (TYPE_LENGTH (type) -+ / TYPE_LENGTH (TYPE_TARGET_TYPE (type))); -+ -+ fprintf_filtered (stream, "%s", pulongest (val)); -+ } - } - fprintf_filtered (stream, "] OF "); - m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c ---- a/gdb/m2-valprint.c -+++ b/gdb/m2-valprint.c -@@ -35,7 +35,7 @@ static int print_unpacked_pointer (struct type *type, - struct ui_file *stream); - static void - m2_print_array_contents (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options, -@@ -67,7 +67,7 @@ get_long_set_bounds (struct type *type, LONGEST *low, LONGEST *high) - - static void - m2_print_long_set (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream) - { - int empty_set = 1; -@@ -158,7 +158,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, - - static void - m2_print_unbounded_array (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - const struct value_print_options *options) - { -@@ -260,7 +260,7 @@ print_variable_at_address (struct type *type, - - static void - m2_print_array_contents (struct type *type, const gdb_byte *valaddr, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options, -@@ -308,12 +308,12 @@ static const struct generic_val_print_decorations m2_decorations = - function; they are identical. */ - - void --m2_val_print (struct type *type, int embedded_offset, -+m2_val_print (struct type *type, LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options) - { -- unsigned len; -+ ULONGEST len; - struct type *elttype; - CORE_ADDR addr; - const gdb_byte *valaddr = value_contents_for_printing (original_value); -@@ -339,7 +339,7 @@ m2_val_print (struct type *type, int embedded_offset, - elements up to it. */ - if (options->stop_print_at_null) - { -- unsigned int temp_len; -+ ULONGEST temp_len; - - /* Look for a NULL char. */ - for (temp_len = 0; -@@ -414,7 +414,7 @@ m2_val_print (struct type *type, int embedded_offset, - { - struct type *range = elttype; - LONGEST low_bound, high_bound; -- int i; -+ LONGEST i; - int need_comma = 0; - - fputs_filtered ("{", stream); -diff --git a/gdb/memrange.c b/gdb/memrange.c ---- a/gdb/memrange.c -+++ b/gdb/memrange.c -@@ -22,8 +22,8 @@ - #include - - int --mem_ranges_overlap (CORE_ADDR start1, int len1, -- CORE_ADDR start2, int len2) -+mem_ranges_overlap (CORE_ADDR start1, LONGEST len1, -+ CORE_ADDR start2, LONGEST len2) - { - ULONGEST h, l; - -diff --git a/gdb/memrange.h b/gdb/memrange.h ---- a/gdb/memrange.h -+++ b/gdb/memrange.h -@@ -28,7 +28,7 @@ struct mem_range - { - mem_range () = default; - -- mem_range (CORE_ADDR start_, int length_) -+ mem_range (CORE_ADDR start_, LONGEST length_) - : start (start_), length (length_) - {} - -@@ -47,14 +47,14 @@ struct mem_range - CORE_ADDR start; - - /* Length of the range. */ -- int length; -+ LONGEST length; - }; - - /* Returns true if the ranges defined by [start1, start1+len1) and - [start2, start2+len2) overlap. */ - --extern int mem_ranges_overlap (CORE_ADDR start1, int len1, -- CORE_ADDR start2, int len2); -+extern int mem_ranges_overlap (CORE_ADDR start1, LONGEST len1, -+ CORE_ADDR start2, LONGEST len2); - - /* Returns true if ADDR is in RANGE. */ - -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 -@@ -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 --mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - struct pt_watch_regs dummy_regs; - int i; -diff --git a/gdb/nat/x86-dregs.c b/gdb/nat/x86-dregs.c ---- a/gdb/nat/x86-dregs.c -+++ b/gdb/nat/x86-dregs.c -@@ -380,7 +380,7 @@ x86_remove_aligned_watchpoint (struct x86_debug_reg_state *state, - - static int - x86_handle_nonaligned_watchpoint (struct x86_debug_reg_state *state, -- x86_wp_op_t what, CORE_ADDR addr, int len, -+ x86_wp_op_t what, CORE_ADDR addr, LONGEST len, - enum target_hw_bp_type type) - { - int retval = 0; -@@ -548,7 +548,7 @@ x86_dr_remove_watchpoint (struct x86_debug_reg_state *state, - - int - x86_dr_region_ok_for_watchpoint (struct x86_debug_reg_state *state, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) - { - int nregs; - -diff --git a/gdb/nat/x86-dregs.h b/gdb/nat/x86-dregs.h ---- a/gdb/nat/x86-dregs.h -+++ b/gdb/nat/x86-dregs.h -@@ -117,7 +117,7 @@ extern int x86_dr_remove_watchpoint (struct x86_debug_reg_state *state, - /* Return non-zero if we can watch a memory region that starts at - address ADDR and whose length is LEN bytes. */ - extern int x86_dr_region_ok_for_watchpoint (struct x86_debug_reg_state *state, -- CORE_ADDR addr, int len); -+ CORE_ADDR addr, LONGEST len); - - /* If the inferior has some break/watchpoint that triggered, set the - address associated with that break/watchpoint and return true. -diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c ---- a/gdb/opencl-lang.c -+++ b/gdb/opencl-lang.c -@@ -76,11 +76,11 @@ builtin_opencl_type (struct gdbarch *gdbarch) - - static struct type * - lookup_opencl_vector_type (struct gdbarch *gdbarch, enum type_code code, -- unsigned int el_length, unsigned int flag_unsigned, -+ ULONGEST el_length, unsigned int flag_unsigned, - int n) - { - int i; -- unsigned int length; -+ ULONGEST length; - struct type *type = NULL; - struct type **types = builtin_opencl_type (gdbarch); - -@@ -172,7 +172,7 @@ lval_func_read (struct value *v) - struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val))); - LONGEST offset = value_offset (v); - LONGEST elsize = TYPE_LENGTH (eltype); -- int n, i, j = 0; -+ LONGEST n, i, j = 0; - LONGEST lowb = 0; - LONGEST highb = 0; - -@@ -201,7 +201,7 @@ lval_func_write (struct value *v, struct value *fromval) - struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val))); - LONGEST offset = value_offset (v); - LONGEST elsize = TYPE_LENGTH (eltype); -- int n, i, j = 0; -+ LONGEST n, i, j = 0; - LONGEST lowb = 0; - LONGEST highb = 0; - -@@ -241,17 +241,17 @@ lval_func_write (struct value *v, struct value *fromval) - - static int - lval_func_check_synthetic_pointer (const struct value *v, -- LONGEST offset, int length) -+ LONGEST offset, LONGEST length) - { - struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); - /* Size of the target type in bits. */ -- int elsize = -+ LONGEST elsize = - TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; -- int startrest = offset % elsize; -- int start = offset / elsize; -- int endrest = (offset + length) % elsize; -- int end = (offset + length) / elsize; -- int i; -+ LONGEST startrest = offset % elsize; -+ LONGEST start = offset / elsize; -+ LONGEST endrest = (offset + length) % elsize; -+ LONGEST end = (offset + length) / elsize; -+ LONGEST i; - - if (endrest) - end++; -@@ -261,8 +261,8 @@ lval_func_check_synthetic_pointer (const struct value *v, - - for (i = start; i < end; i++) - { -- int comp_offset = (i == start) ? startrest : 0; -- int comp_length = (i == end) ? endrest : elsize; -+ LONGEST comp_offset = (i == start) ? startrest : 0; -+ LONGEST comp_length = (i == end) ? endrest : elsize; - - if (!value_bits_synthetic_pointer (c->val, - c->indices[i] * elsize + comp_offset, -diff --git a/gdb/p-lang.c b/gdb/p-lang.c ---- a/gdb/p-lang.c -+++ b/gdb/p-lang.c -@@ -93,8 +93,8 @@ pascal_main_name (void) - are not multiple of TARGET_CHAR_BIT then the results are wrong - but this does not happen for Free Pascal nor for GPC. */ - int --is_pascal_string_type (struct type *type,int *length_pos, -- int *length_size, int *string_pos, -+is_pascal_string_type (struct type *type, LONGEST *length_pos, -+ LONGEST *length_size, LONGEST *string_pos, - struct type **char_type, - const char **arrayname) - { -@@ -214,12 +214,12 @@ pascal_printchar (int c, struct type *type, struct ui_file *stream) - - void - pascal_printstr (struct ui_file *stream, struct type *type, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - const struct value_print_options *options) - { - enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); -- unsigned int i; -+ ULONGEST i; - unsigned int things_printed = 0; - int in_quotes = 0; - int need_comma = 0; -@@ -247,9 +247,9 @@ pascal_printstr (struct ui_file *stream, struct type *type, - { - /* Position of the character we are examining - to see whether it is repeated. */ -- unsigned int rep1; -+ ULONGEST rep1; - /* Number of repetitions we have detected so far. */ -- unsigned int reps; -+ ULONGEST reps; - unsigned long int current_char; - - QUIT; -@@ -281,7 +281,7 @@ pascal_printstr (struct ui_file *stream, struct type *type, - in_quotes = 0; - } - pascal_printchar (current_char, type, stream); -- fprintf_filtered (stream, " ", reps); -+ fprintf_filtered (stream, " ", pulongest (reps)); - i = rep1 - 1; - things_printed += options->repeat_count_threshold; - need_comma = 1; -diff --git a/gdb/p-lang.h b/gdb/p-lang.h ---- a/gdb/p-lang.h -+++ b/gdb/p-lang.h -@@ -37,7 +37,7 @@ extern void pascal_print_type (struct type *, const char *, struct ui_file *, - extern void pascal_print_typedef (struct type *, struct symbol *, - struct ui_file *); - --extern void pascal_val_print (struct type *, int, -+extern void pascal_val_print (struct type *, LONGEST, - CORE_ADDR, struct ui_file *, int, - struct value *, - const struct value_print_options *); -@@ -51,13 +51,13 @@ extern void pascal_type_print_method_args (const char *, const char *, - /* These are in p-lang.c: */ - - extern int -- is_pascal_string_type (struct type *, int *, int *, int *, -+ is_pascal_string_type (struct type *, LONGEST *, LONGEST *, LONGEST *, - struct type **, const char **); - - extern void pascal_printchar (int, struct type *, struct ui_file *); - - extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *, -- unsigned int, const char *, int, -+ ULONGEST, const char *, int, - const struct value_print_options *); - - extern struct type **const pascal_builtin_types[]; -diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c ---- a/gdb/p-valprint.c -+++ b/gdb/p-valprint.c -@@ -60,7 +60,7 @@ static const struct generic_val_print_decorations p_decorations = - - void - pascal_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options) -@@ -70,8 +70,8 @@ pascal_val_print (struct type *type, - unsigned int i = 0; /* Number of characters printed */ - unsigned len; - struct type *elttype; -- unsigned eltlen; -- int length_pos, length_size, string_pos; -+ ULONGEST eltlen; -+ LONGEST length_pos, length_size, string_pos; - struct type *char_type; - CORE_ADDR addr; - int want_space = 0; -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 -@@ -1716,7 +1716,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot) - } - - int --ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - /* Handle sub-8-byte quantities. */ - if (len <= 0) -diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c ---- a/gdb/ppc-linux-tdep.c -+++ b/gdb/ppc-linux-tdep.c -@@ -2263,7 +2263,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, - - const struct floatformat ** - ppc_floatformat_for_type (struct gdbarch *gdbarch, -- const char *name, int len) -+ const char *name, LONGEST len) - { - if (len == 128 && name) - { -diff --git a/gdb/printcmd.c b/gdb/printcmd.c ---- a/gdb/printcmd.c -+++ b/gdb/printcmd.c -@@ -276,7 +276,7 @@ print_formatted (struct value *val, int size, - struct ui_file *stream) - { - struct type *type = check_typedef (value_type (val)); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - if (VALUE_LVAL (val) == lval_memory) - next_address = value_address (val) + len; -@@ -352,7 +352,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type, - int size, struct ui_file *stream) - { - struct gdbarch *gdbarch = get_type_arch (type); -- unsigned int len = TYPE_LENGTH (type); -+ ULONGEST len = TYPE_LENGTH (type); - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - - /* String printing should go through val_print_scalar_formatted. */ -diff --git a/gdb/procfs.c b/gdb/procfs.c ---- a/gdb/procfs.c -+++ b/gdb/procfs.c -@@ -3368,7 +3368,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, - } - - int --procfs_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+procfs_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - /* The man page for proc(4) on Solaris 2.6 and up says that the - system can support "thousands" of hardware watchpoints, but gives -diff --git a/gdb/regcache.c b/gdb/regcache.c ---- a/gdb/regcache.c -+++ b/gdb/regcache.c -@@ -763,7 +763,7 @@ regcache::cooked_write (int regnum, const gdb_byte *buf) - /* See regcache.h. */ - - enum register_status --readable_regcache::read_part (int regnum, int offset, int len, -+readable_regcache::read_part (int regnum, LONGEST offset, LONGEST len, - gdb_byte *out, bool is_raw) - { - int reg_size = register_size (arch (), regnum); -@@ -830,7 +830,7 @@ reg_buffer::raw_collect_part (int regnum, int offset, int len, - /* See regcache.h. */ - - enum register_status --regcache::write_part (int regnum, int offset, int len, -+regcache::write_part (int regnum, LONGEST offset, LONGEST len, - const gdb_byte *in, bool is_raw) - { - int reg_size = register_size (arch (), regnum); -@@ -901,7 +901,7 @@ reg_buffer::raw_supply_part (int regnum, int offset, int len, - } - - enum register_status --readable_regcache::raw_read_part (int regnum, int offset, int len, -+readable_regcache::raw_read_part (int regnum, int offset, LONGEST len, - gdb_byte *buf) - { - assert_regnum (regnum); -@@ -911,7 +911,7 @@ readable_regcache::raw_read_part (int regnum, int offset, int len, - /* See regcache.h. */ - - void --regcache::raw_write_part (int regnum, int offset, int len, -+regcache::raw_write_part (int regnum, int offset, LONGEST len, - const gdb_byte *buf) - { - assert_regnum (regnum); -@@ -921,7 +921,7 @@ regcache::raw_write_part (int regnum, int offset, int len, - /* See regcache.h. */ - - enum register_status --readable_regcache::cooked_read_part (int regnum, int offset, int len, -+readable_regcache::cooked_read_part (int regnum, LONGEST offset, LONGEST len, - gdb_byte *buf) - { - gdb_assert (regnum >= 0 && regnum < m_descr->nr_cooked_registers); -@@ -931,7 +931,7 @@ readable_regcache::cooked_read_part (int regnum, int offset, int len, - /* See regcache.h. */ - - void --regcache::cooked_write_part (int regnum, int offset, int len, -+regcache::cooked_write_part (int regnum, LONGEST offset, LONGEST len, - const gdb_byte *buf) - { - gdb_assert (regnum >= 0 && regnum < m_descr->nr_cooked_registers); -diff --git a/gdb/regcache.h b/gdb/regcache.h ---- a/gdb/regcache.h -+++ b/gdb/regcache.h -@@ -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. */ -- enum register_status raw_read_part (int regnum, int offset, int len, -- gdb_byte *buf); -+ enum register_status raw_read_part (int regnum, int offset, -+ LONGEST len, gdb_byte *buf); - - /* Make certain that the register REGNUM is up-to-date. */ - virtual void raw_update (int regnum) = 0; -@@ -286,8 +286,8 @@ public: - enum register_status cooked_read (int regnum, T *val); - - /* Partial transfer of a cooked register. */ -- enum register_status cooked_read_part (int regnum, int offset, int len, -- gdb_byte *buf); -+ enum register_status cooked_read_part (int regnum, LONGEST offset, -+ LONGEST len, gdb_byte *buf); - - /* Read register REGNUM from the regcache and return a new value. This - will call mark_value_bytes_unavailable as appropriate. */ -@@ -297,7 +297,7 @@ protected: - - /* Perform a partial register transfer using a read, modify, write - operation. Will fail if register is currently invalid. */ -- enum register_status read_part (int regnum, int offset, int len, -+ enum register_status read_part (int regnum, LONGEST offset, LONGEST len, - gdb_byte *out, bool is_raw); - }; - -@@ -355,11 +355,12 @@ public: - - /* Partial transfer of raw registers. Perform read, modify, write style - operations. */ -- void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf); -+ void raw_write_part (int regnum, int offset, LONGEST len, -+ const gdb_byte *buf); - - /* Partial transfer of a cooked register. Perform read, modify, write style - operations. */ -- void cooked_write_part (int regnum, int offset, int len, -+ void cooked_write_part (int regnum, LONGEST offset, LONGEST len, - const gdb_byte *buf); - - void supply_regset (const struct regset *regset, -@@ -410,7 +411,7 @@ private: - - /* Perform a partial register transfer using a read, modify, write - operation. */ -- enum register_status write_part (int regnum, int offset, int len, -+ enum register_status write_part (int regnum, LONGEST offset, LONGEST len, - const gdb_byte *in, bool is_raw); - - /* The address space of this register cache (for registers where it -diff --git a/gdb/remote.c b/gdb/remote.c ---- a/gdb/remote.c -+++ b/gdb/remote.c -@@ -448,7 +448,7 @@ public: - - int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; - -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - - int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; -@@ -10369,7 +10369,7 @@ int remote_hw_watchpoint_length_limit = -1; - int remote_hw_breakpoint_limit = -1; - - int --remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+remote_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - if (remote_hw_watchpoint_length_limit == 0) - return 0; -diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c ---- a/gdb/rust-lang.c -+++ b/gdb/rust-lang.c -@@ -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, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *user_encoding, int force_ellipses, - const struct value_print_options *options) - { -@@ -517,7 +517,7 @@ static const struct generic_val_print_decorations rust_decorations = - /* la_val_print implementation for Rust. */ - - static void --rust_val_print (struct type *type, int embedded_offset, -+rust_val_print (struct type *type, LONGEST embedded_offset, - CORE_ADDR address, struct ui_file *stream, int recurse, - struct value *val, - const struct value_print_options *options) -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 -@@ -951,7 +951,8 @@ s390_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, - } - - int --s390_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt) -+s390_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, -+ LONGEST cnt) - { - return 1; - } -diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c ---- a/gdb/spu-multiarch.c -+++ b/gdb/spu-multiarch.c -@@ -65,7 +65,7 @@ struct spu_multiarch_target final : public target_ops - const gdb_byte *pattern, ULONGEST pattern_len, - CORE_ADDR *found_addrp) override; - -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - - struct gdbarch *thread_architecture (ptid_t) override; - }; -@@ -162,7 +162,7 @@ spu_multiarch_target::thread_architecture (ptid_t ptid) - /* Override the to_region_ok_for_hw_watchpoint routine. */ - - int --spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+spu_multiarch_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - /* We cannot watch SPU local store. */ - if (SPUADDR_SPU (addr) != -1) -diff --git a/gdb/stack.c b/gdb/stack.c ---- a/gdb/stack.c -+++ b/gdb/stack.c -@@ -194,7 +194,7 @@ print_stack_frame (struct frame_info *frame, int print_level, - argument (not just the first nameless argument). */ - - static void --print_frame_nameless_args (struct frame_info *frame, long start, int num, -+print_frame_nameless_args (struct frame_info *frame, LONGEST start, int num, - int first, struct ui_file *stream) - { - struct gdbarch *gdbarch = get_frame_arch (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. */ -- long highest_offset = -1; -+ LONGEST highest_offset = -1; - /* Number of ints of arguments that we have printed so far. */ - int args_printed = 0; - /* True if we should print arguments, false otherwise. */ -@@ -573,8 +573,8 @@ print_frame_args (struct symbol *func, struct frame_info *frame, - case LOC_ARG: - case LOC_REF_ARG: - { -- long current_offset = SYMBOL_VALUE (sym); -- int arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym)); -+ LONGEST current_offset = SYMBOL_VALUE (sym); -+ LONGEST arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym)); - - /* Compute address of next argument by adding the size of - this argument and rounding to an int boundary. */ -@@ -709,7 +709,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, - enough about the stack to find them. */ - if (num != -1) - { -- long start; -+ LONGEST start; - - if (highest_offset == -1) - start = gdbarch_frame_args_skip (get_frame_arch (frame)); -diff --git a/gdb/symmisc.c b/gdb/symmisc.c ---- a/gdb/symmisc.c -+++ b/gdb/symmisc.c -@@ -584,11 +584,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, - - case LOC_CONST_BYTES: - { -- unsigned i; -+ ULONGEST i; - struct type *type = check_typedef (SYMBOL_TYPE (symbol)); - -- fprintf_filtered (outfile, "const %u hex bytes:", -- TYPE_LENGTH (type)); -+ fprintf_filtered (outfile, "const %s hex bytes:", -+ pulongest (TYPE_LENGTH (type))); - for (i = 0; i < TYPE_LENGTH (type); i++) - fprintf_filtered (outfile, " %02x", - (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c ---- a/gdb/target-delegates.c -+++ b/gdb/target-delegates.c -@@ -38,7 +38,7 @@ struct dummy_target : public target_ops - bool have_steppable_watchpoint () override; - bool stopped_data_address (CORE_ADDR *arg0) override; - bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; -- int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override; - bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; - int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; - int can_do_single_step () override; -@@ -205,7 +205,7 @@ struct debug_target : public target_ops - bool have_steppable_watchpoint () override; - bool stopped_data_address (CORE_ADDR *arg0) override; - bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; -- int region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override; - bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; - int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; - int can_do_single_step () override; -@@ -1071,19 +1071,19 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int - } - - int --target_ops::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) -+target_ops::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) - { - return this->beneath ()->region_ok_for_hw_watchpoint (arg0, arg1); - } - - int --dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) -+dummy_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) - { - return default_region_ok_for_hw_watchpoint (this, arg0, arg1); - } - - int --debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, int arg1) -+debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) - { - int result; - fprintf_unfiltered (gdb_stdlog, "-> %s->region_ok_for_hw_watchpoint (...)\n", this->beneath ()->shortname ()); -@@ -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); -- target_debug_print_int (arg1); -+ target_debug_print_LONGEST (arg1); - fputs_unfiltered (") = ", gdb_stdlog); - target_debug_print_int (result); - fputs_unfiltered ("\n", gdb_stdlog); -diff --git a/gdb/target.c b/gdb/target.c ---- a/gdb/target.c -+++ b/gdb/target.c -@@ -58,7 +58,7 @@ static int default_watchpoint_addr_within_range (struct target_ops *, - CORE_ADDR, CORE_ADDR, int); - - static int default_region_ok_for_hw_watchpoint (struct target_ops *, -- CORE_ADDR, int); -+ CORE_ADDR, LONGEST); - - static void default_rcmd (struct target_ops *, const char *, struct ui_file *); - -@@ -3117,7 +3117,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) - - static int - default_region_ok_for_hw_watchpoint (struct target_ops *self, -- CORE_ADDR addr, int len) -+ CORE_ADDR addr, LONGEST len) - { - return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); - } -diff --git a/gdb/target.h b/gdb/target.h ---- a/gdb/target.h -+++ b/gdb/target.h -@@ -566,7 +566,7 @@ struct target_ops - - /* Documentation of this routine is provided with the corresponding - target_* macro. */ -- virtual int region_ok_for_hw_watchpoint (CORE_ADDR, int) -+ virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) - TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); - - virtual bool can_accel_watchpoint_condition (CORE_ADDR, int, int, -diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c ---- a/gdb/tracepoint.c -+++ b/gdb/tracepoint.c -@@ -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, CORE_ADDR scope) -+ ULONGEST len, CORE_ADDR scope) - { - if (info_verbose) -- printf_filtered ("(%d,%s,%ld)\n", type, paddress (gdbarch, base), len); -+ printf_filtered ("(%d,%s,%s)\n", type, paddress (gdbarch, base), pulongest (len)); - - /* type: memrange_absolute == memory, other n == basereg */ - /* base: addr if memory, offset if reg relative. */ -@@ -916,7 +916,7 @@ collection_list::collect_symbol (struct symbol *sym, - CORE_ADDR scope, - int trace_string) - { -- unsigned long len; -+ ULONGEST len; - unsigned int reg; - bfd_signed_vma offset; - int treat_as_expr = 0; -@@ -937,8 +937,8 @@ collection_list::collect_symbol (struct symbol *sym, - offset = SYMBOL_VALUE_ADDRESS (sym); - if (info_verbose) - { -- printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n", -- SYMBOL_PRINT_NAME (sym), len, -+ printf_filtered ("LOC_STATIC %s: collect %s bytes at %s.\n", -+ SYMBOL_PRINT_NAME (sym), pulongest (len), - paddress (gdbarch, offset)); - } - /* A struct may be a C++ class with static fields, go to general -@@ -970,9 +970,9 @@ collection_list::collect_symbol (struct symbol *sym, - offset = frame_offset + SYMBOL_VALUE (sym); - if (info_verbose) - { -- printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s" -+ printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset %s" - " from frame ptr reg %d\n", -- SYMBOL_PRINT_NAME (sym), len, -+ SYMBOL_PRINT_NAME (sym), pulongest (len), - paddress (gdbarch, offset), reg); - } - add_memrange (gdbarch, reg, offset, len, scope); -@@ -982,9 +982,9 @@ collection_list::collect_symbol (struct symbol *sym, - offset = 0; - if (info_verbose) - { -- printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset %s" -+ printf_filtered ("LOC_REGPARM_ADDR %s: Collect %s bytes at offset %s" - " from reg %d\n", -- SYMBOL_PRINT_NAME (sym), len, -+ SYMBOL_PRINT_NAME (sym), pulongest (len), - paddress (gdbarch, offset), reg); - } - 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) - { -- printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset %s" -+ printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset %s" - " from frame ptr reg %d\n", -- SYMBOL_PRINT_NAME (sym), len, -+ SYMBOL_PRINT_NAME (sym), pulongest (len), - paddress (gdbarch, offset), reg); - } - 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; -- int j, count = 0; -+ int count = 0; -+ LONGEST j; - struct gdbarch *gdbarch; - int regno; - const char *args = args_in; -@@ -2636,8 +2637,11 @@ info_scope_command (const char *args_in, int from_tty) - } - } - if (SYMBOL_TYPE (sym)) -- printf_filtered (", length %d.\n", -- TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym)))); -+ { -+ ULONGEST len = TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))); -+ -+ printf_filtered (", length %s.\n", pulongest (len)); -+ } - } - if (BLOCK_FUNCTION (block)) - break; -diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h ---- a/gdb/tracepoint.h -+++ b/gdb/tracepoint.h -@@ -269,7 +269,7 @@ public: - CORE_ADDR scope); - void add_memrange (struct gdbarch *gdbarch, - int type, bfd_signed_vma base, -- 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, -diff --git a/gdb/typeprint.c b/gdb/typeprint.c ---- a/gdb/typeprint.c -+++ b/gdb/typeprint.c -@@ -120,7 +120,8 @@ print_offset_data::update (struct type *type, unsigned int field_idx, - { - /* Since union fields don't have the concept of offsets, we just - print their sizes. */ -- fprintf_filtered (stream, "/* %4u */", TYPE_LENGTH (ftype)); -+ fprintf_filtered (stream, "/* %4s */", -+ pulongest (TYPE_LENGTH (ftype))); - return; - } - -@@ -183,8 +184,8 @@ print_offset_data::finish (struct type *type, int level, - - fputs_filtered ("\n", stream); - print_spaces_filtered (level + 4 + print_offset_data::indentation, stream); -- fprintf_filtered (stream, "/* total size (bytes): %4u */\n", -- TYPE_LENGTH (type)); -+ fprintf_filtered (stream, "/* total size (bytes): %4s */\n", -+ pulongest (TYPE_LENGTH (type))); - } - - -diff --git a/gdb/valarith.c b/gdb/valarith.c ---- a/gdb/valarith.c -+++ b/gdb/valarith.c -@@ -182,7 +182,7 @@ value_subscript (struct value *array, LONGEST index) - to doubles, but no longer does. */ - - struct value * --value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) -+value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound) - { - struct type *array_type = check_typedef (value_type (array)); - struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); -@@ -656,7 +656,7 @@ value_concat (struct value *arg1, struct value *arg2) - struct value *inval1; - struct value *inval2; - struct value *outval = NULL; -- int inval1len, inval2len; -+ ssize_t inval1len, inval2len; - int count, idx; - char inchar; - struct type *type1 = check_typedef (value_type (arg1)); -@@ -1416,7 +1416,7 @@ value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op) - int - value_logical_not (struct value *arg1) - { -- int len; -+ LONGEST len; - const gdb_byte *p; - struct type *type1; - -@@ -1444,11 +1444,11 @@ value_logical_not (struct value *arg1) - static int - value_strcmp (struct value *arg1, struct value *arg2) - { -- int len1 = TYPE_LENGTH (value_type (arg1)); -- int len2 = TYPE_LENGTH (value_type (arg2)); -+ LONGEST len1 = TYPE_LENGTH (value_type (arg1)); -+ LONGEST len2 = TYPE_LENGTH (value_type (arg2)); - const gdb_byte *s1 = value_contents (arg1); - const gdb_byte *s2 = value_contents (arg2); -- int i, len = len1 < len2 ? len1 : len2; -+ LONGEST i, len = len1 < len2 ? len1 : len2; - - for (i = 0; i < len; i++) - { -diff --git a/gdb/valops.c b/gdb/valops.c ---- a/gdb/valops.c -+++ b/gdb/valops.c -@@ -81,7 +81,7 @@ static enum oload_classification classify_oload_match - (const badness_vector &, int, int); - - static struct value *value_struct_elt_for_reference (struct type *, -- int, struct type *, -+ LONGEST, struct type *, - const char *, - struct type *, - int, enum noside); -@@ -171,7 +171,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p) - space. */ - - struct value * --value_allocate_space_in_inferior (int len) -+value_allocate_space_in_inferior (LONGEST len) - { - struct objfile *objf; - struct value *val = find_function_in_inferior ("malloc", &objf); -@@ -386,12 +386,12 @@ value_cast (struct type *type, struct value *arg2) - if (code1 == TYPE_CODE_ARRAY) - { - struct type *element_type = TYPE_TARGET_TYPE (type); -- unsigned element_length = TYPE_LENGTH (check_typedef (element_type)); -+ ULONGEST element_length = TYPE_LENGTH (check_typedef (element_type)); - - if (element_length > 0 && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) - { - struct type *range_type = TYPE_INDEX_TYPE (type); -- int val_length = TYPE_LENGTH (type2); -+ LONGEST val_length = TYPE_LENGTH (type2); - LONGEST low_bound, high_bound, new_length; - - if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -@@ -1043,7 +1043,7 @@ value_assign (struct value *toval, struct value *fromval) - { - const gdb_byte *dest_buffer; - CORE_ADDR changed_addr; -- int changed_len; -+ LONGEST changed_len; - gdb_byte buffer[sizeof (LONGEST)]; - - if (value_bitsize (toval)) -@@ -3335,7 +3335,7 @@ get_baseclass_offset (struct type *vt, struct type *cls, - the form "DOMAIN::NAME". */ - - static struct value * --value_struct_elt_for_reference (struct type *domain, int offset, -+value_struct_elt_for_reference (struct type *domain, LONGEST offset, - struct type *curtype, const char *name, - struct type *intype, - int want_address, -@@ -3369,7 +3369,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), -- offset + (LONGEST) (TYPE_FIELD_BITPOS (t, i) >> 3)); -+ offset + (TYPE_FIELD_BITPOS (t, i) >> 3)); - else if (noside != EVAL_NORMAL) - return allocate_value (TYPE_FIELD_TYPE (t, i)); - else -@@ -3548,7 +3548,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, - for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) - { - struct value *v; -- int base_offset; -+ LONGEST base_offset; - - if (BASETYPE_VIA_VIRTUAL (t, i)) - base_offset = 0; -@@ -3697,7 +3697,7 @@ value_rtti_indirect_type (struct value *v, int *full, - struct value * - value_full_object (struct value *argp, - struct type *rtype, -- int xfull, int xtop, -+ int xfull, LONGEST xtop, - int xusing_enc) - { - struct type *real_type; -diff --git a/gdb/valprint.c b/gdb/valprint.c ---- a/gdb/valprint.c -+++ b/gdb/valprint.c -@@ -879,7 +879,7 @@ generic_val_print_complex (struct type *type, - - void - generic_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options, -@@ -1772,7 +1772,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, - - void - print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, -- unsigned len, enum bfd_endian byte_order, -+ ULONGEST len, enum bfd_endian byte_order, - bool zero_pad) - { - const gdb_byte *p; -@@ -1925,17 +1925,17 @@ val_print_array_elements (struct type *type, - int recurse, - struct value *val, - const struct value_print_options *options, -- unsigned int i) -+ ULONGEST i) - { - unsigned int things_printed = 0; -- unsigned len; -+ ULONGEST len; - struct type *elttype, *index_type, *base_index_type; -- unsigned eltlen; -+ ULONGEST eltlen; - /* Position of the array element we are examining to see - whether it is repeated. */ -- unsigned int rep1; -+ ULONGEST rep1; - /* Number of repetitions we have detected so far. */ -- unsigned int reps; -+ ULONGEST reps; - LONGEST low_bound, high_bound; - LONGEST low_pos, high_pos; - -@@ -2025,7 +2025,7 @@ val_print_array_elements (struct type *type, - address, stream, recurse + 1, val, options, - current_language); - annotate_elt_rep (reps); -- fprintf_filtered (stream, " ", reps); -+ fprintf_filtered (stream, " ", pulongest (reps)); - annotate_elt_rep_end (); - - i = rep1 - 1; -@@ -2667,7 +2667,7 @@ print_converted_chars_to_obstack (struct obstack *obstack, - - void - generic_printstr (struct ui_file *stream, struct type *type, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - int quote_char, int c_style_terminator, - const struct value_print_options *options) -diff --git a/gdb/valprint.h b/gdb/valprint.h ---- a/gdb/valprint.h -+++ b/gdb/valprint.h -@@ -119,7 +119,7 @@ extern void val_print_array_elements (struct type *, LONGEST, - CORE_ADDR, struct ui_file *, int, - struct value *, - const struct value_print_options *, -- unsigned int); -+ ULONGEST); - - extern void val_print_scalar_formatted (struct type *, - LONGEST, -@@ -138,7 +138,7 @@ extern void print_decimal_chars (struct ui_file *, const gdb_byte *, - unsigned int, bool, enum bfd_endian); - - extern void print_hex_chars (struct ui_file *, const gdb_byte *, -- unsigned int, enum bfd_endian, bool); -+ ULONGEST, enum bfd_endian, bool); - - extern void print_char_chars (struct ui_file *, struct type *, - const gdb_byte *, unsigned int, enum bfd_endian); -@@ -192,7 +192,7 @@ struct generic_val_print_decorations - - - extern void generic_val_print (struct type *type, -- int embedded_offset, CORE_ADDR address, -+ LONGEST embedded_offset, CORE_ADDR address, - struct ui_file *stream, int recurse, - struct value *original_value, - const struct value_print_options *options, -@@ -202,7 +202,7 @@ extern void generic_emit_char (int c, struct type *type, struct ui_file *stream, - int quoter, const char *encoding); - - extern void generic_printstr (struct ui_file *stream, struct type *type, -- const gdb_byte *string, unsigned int length, -+ const gdb_byte *string, ULONGEST length, - const char *encoding, int force_ellipses, - int quote_char, int c_style_terminator, - const struct value_print_options *options); -diff --git a/gdb/value.c b/gdb/value.c ---- a/gdb/value.c -+++ b/gdb/value.c -@@ -383,7 +383,8 @@ value_bytes_available (const struct value *value, - } - - int --value_bits_any_optimized_out (const struct value *value, int bit_offset, int bit_length) -+value_bits_any_optimized_out (const struct value *value, LONGEST bit_offset, -+ LONGEST bit_length) - { - gdb_assert (!value->lazy); - -@@ -831,8 +832,8 @@ find_first_range_overlap_and_match (struct ranges_and_idx *rp1, - Return true if the available bits match. */ - - static bool --value_contents_bits_eq (const struct value *val1, int offset1, -- const struct value *val2, int offset2, -+value_contents_bits_eq (const struct value *val1, LONGEST offset1, -+ const struct value *val2, LONGEST offset2, - int length) - { - /* Each array element corresponds to a ranges source (unavailable, -@@ -1423,7 +1424,8 @@ value_optimized_out (struct value *value) - the following LENGTH bytes. */ - - void --mark_value_bytes_optimized_out (struct value *value, int offset, int length) -+mark_value_bytes_optimized_out (struct value *value, LONGEST offset, -+ LONGEST length) - { - mark_value_bits_optimized_out (value, - offset * TARGET_CHAR_BIT, -diff --git a/gdb/value.h b/gdb/value.h ---- a/gdb/value.h -+++ b/gdb/value.h -@@ -274,7 +274,7 @@ struct lval_funcs - /* If non-NULL, this is used to determine whether the indicated bits - of VALUE are a synthetic pointer. */ - int (*check_synthetic_pointer) (const struct value *value, -- LONGEST offset, int length); -+ LONGEST offset, LONGEST length); - - /* Return a duplicate of VALUE's closure, for use in a new value. - This may simply return the same closure, if VALUE's is -@@ -405,7 +405,8 @@ extern int value_optimized_out (struct value *value); - otherwise. */ - - extern int value_bits_any_optimized_out (const struct value *value, -- int bit_offset, int bit_length); -+ LONGEST bit_offset, -+ LONGEST bit_length); - - /* Like value_optimized_out, but return true iff the whole value is - optimized out. */ -@@ -415,7 +416,7 @@ extern int value_entirely_optimized_out (struct value *value); - LENGTH bytes as optimized out. */ - - extern void mark_value_bytes_optimized_out (struct value *value, -- int offset, int length); -+ LONGEST offset, LONGEST length); - - /* Mark VALUE's content bits starting at OFFSET and extending for - LENGTH bits as optimized out. */ -@@ -850,12 +851,11 @@ extern struct value *value_primitive_field (struct value *arg1, LONGEST offset, - int fieldno, - struct type *arg_type); - -- - extern struct type *value_rtti_indirect_type (struct value *, int *, LONGEST *, - int *); - - extern struct value *value_full_object (struct value *, struct type *, int, -- int, int); -+ LONGEST, int); - - extern struct value *value_cast_pointers (struct type *, struct value *, int); - -@@ -1148,10 +1148,11 @@ extern struct value *value_literal_complex (struct value *, struct value *, - extern struct value *find_function_in_inferior (const char *, - struct objfile **); - --extern struct value *value_allocate_space_in_inferior (int); -+extern struct value *value_allocate_space_in_inferior (LONGEST); - - extern struct value *value_subscripted_rvalue (struct value *array, -- LONGEST index, int lowerbound); -+ LONGEST index, -+ LONGEST lowerbound); - - /* User function handler. */ - -diff --git a/gdb/x86-nat.c b/gdb/x86-nat.c ---- a/gdb/x86-nat.c -+++ b/gdb/x86-nat.c -@@ -173,7 +173,7 @@ x86_remove_watchpoint (CORE_ADDR addr, int len, - address ADDR and whose length is LEN bytes. */ - - int --x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) -+x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) - { - struct x86_debug_reg_state *state - = x86_debug_reg_state (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 -@@ -49,7 +49,7 @@ extern void x86_forget_process (pid_t pid); - definitions. */ - - extern int x86_can_use_hw_breakpoint (enum bptype type, int cnt, int othertype); --extern int x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len); -+extern int x86_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len); - extern int x86_stopped_by_watchpoint (); - extern int x86_stopped_data_address (CORE_ADDR *addr_p); - extern int x86_insert_watchpoint (CORE_ADDR addr, int len, -@@ -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); } - -- int region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) override -+ int region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len) override - { return x86_region_ok_for_hw_watchpoint (addr, len); } - - int insert_watchpoint (CORE_ADDR addr, int len, diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch deleted file mode 100644 index b178db2..0000000 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ /dev/null @@ -1,181 +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-rhbz795424-bitpos-21of25.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-09/msg00632.html - ---MP_/PnL6l3LUsXWpZ/olqawWlzb -Content-Type: text/plain; charset=US-ASCII -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -This is part two of the bitpos expansion patch. This implements checks -in some places in the code to ensure that a type size in ULONGEST is -small enough to fit into host memory. Tested for regressions on x86_64 -Fedora 16. - -Regards, -Siddhesh - ---MP_/PnL6l3LUsXWpZ/olqawWlzb -Content-Type: text/plain -Content-Transfer-Encoding: quoted-printable -Content-Disposition: attachment; filename=ChangeLog-ensure_sizet - -gdb/ChangeLog - - * alpha-tdep.c (alpha_push_dummy_call) Check for underflow in - SP. - * cp-valprint (cp_print_value): Ensure BASECLASS fits into - size_t. - * dwarf2loc.c (read_pieced_value): Ensure that THIS_SIZE fits - into size_t. - (write_pieced_value): Likewise. - * findcmd.c (parse_find_args): Ensure PATTERN_BUF_SIZE fits into - size_t. - * p-valprint (pascal_object_print_value): Ensure BASECLASS fits - into size_t. - * utils.c (ulongest_fits_host_or_error): New function to find if - a ULONGEST number fits into size_t. - * utils.h: Declare ulongest_fits_host_or_error. - * valops.c (search_struct_method): Ensure BASECLASS fits into - size_t. - * value.c (allocate_value_lazy): Ensure TYPE fits into size_t. - (allocate_value_contents): Likewise. - (set_value_enclosing_type): Ensure NEW_ENCL_TYPE fits into - size_t. - * vax-tdep.c (vax_return_value): Ensure that TYPE fits into - size_t. - ---MP_/PnL6l3LUsXWpZ/olqawWlzb -Content-Type: text/x-patch -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch - -diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c ---- a/gdb/alpha-tdep.c -+++ b/gdb/alpha-tdep.c -@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - accumulate_size = 0; - else - accumulate_size -= sizeof(arg_reg_buffer); -+ -+ /* Check for underflow. */ -+ if (sp - accumulate_size > sp) -+ error (_("Insufficient memory in GDB host for arguments, " -+ "need %s bytes, but less than %s bytes available."), -+ plongest (accumulate_size), plongest (CORE_ADDR_MAX - sp)); -+ - sp -= accumulate_size; - - /* Keep sp aligned to a multiple of 16 as the ABI requires. */ -diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c ---- a/gdb/cp-valprint.c -+++ b/gdb/cp-valprint.c -@@ -529,6 +529,7 @@ cp_print_value (struct type *type, struct type *real_type, - if ((boffset + offset) < 0 - || (boffset + offset) >= TYPE_LENGTH (real_type)) - { -+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); - gdb::byte_vector buf (TYPE_LENGTH (baseclass)); - - if (target_read_memory (address + boffset, buf.data (), -diff --git a/gdb/defs.h b/gdb/defs.h ---- a/gdb/defs.h -+++ b/gdb/defs.h -@@ -669,4 +669,6 @@ DEF_ENUM_FLAGS_TYPE (enum user_selected_what_flag, user_selected_what); - - #include "utils.h" - -+extern void ulongest_fits_host_or_error (ULONGEST num); -+ - #endif /* #ifndef DEFS_H */ -diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c ---- a/gdb/p-valprint.c -+++ b/gdb/p-valprint.c -@@ -773,6 +773,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, - - if (boffset < 0 || boffset >= TYPE_LENGTH (type)) - { -+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); - buf.resize (TYPE_LENGTH (baseclass)); - - base_valaddr = buf.data (); -diff --git a/gdb/utils.c b/gdb/utils.c ---- a/gdb/utils.c -+++ b/gdb/utils.c -@@ -2932,6 +2932,17 @@ string_to_core_addr (const char *my_string) - return addr; - } - -+/* Ensure that the input NUM is not larger than the maximum capacity of the -+ host system. We choose SIZE_MAX / 8 as a conservative estimate of the size -+ of a resource that a system may allocate. */ -+void -+ulongest_fits_host_or_error (ULONGEST num) -+{ -+ if (num > SIZE_MAX / 8) -+ error (_("Insufficient memory in host GDB for object of size %s bytes, " -+ "maximum allowed %s bytes."), pulongest (num), -+ pulongest (SIZE_MAX / 8)); -+} - #if GDB_SELF_TEST - - static void -diff --git a/gdb/valops.c b/gdb/valops.c ---- a/gdb/valops.c -+++ b/gdb/valops.c -@@ -2064,6 +2064,7 @@ search_struct_method (const char *name, struct value **arg1p, - { - CORE_ADDR address; - -+ ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); - gdb::byte_vector tmp (TYPE_LENGTH (baseclass)); - address = value_address (*arg1p); - -diff --git a/gdb/value.c b/gdb/value.c ---- a/gdb/value.c -+++ b/gdb/value.c -@@ -933,6 +933,7 @@ allocate_value_lazy (struct type *type) - description correctly. */ - check_typedef (type); - -+ ulongest_fits_host_or_error (TYPE_LENGTH (type)); - val = new struct value (type); - - /* Values start out on the all_values chain. */ -@@ -1015,6 +1016,8 @@ check_type_length_before_alloc (const struct type *type) - static void - allocate_value_contents (struct value *val) - { -+ ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type)); -+ - if (!val->contents) - { - check_type_length_before_alloc (val->enclosing_type); -@@ -2874,6 +2877,7 @@ set_value_enclosing_type (struct value *val, struct type *new_encl_type) - if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) - { - check_type_length_before_alloc (new_encl_type); -+ ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type)); - val->contents - .reset ((gdb_byte *) xrealloc (val->contents.release (), - TYPE_LENGTH (new_encl_type))); -diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c ---- a/gdb/vax-tdep.c -+++ b/gdb/vax-tdep.c -@@ -219,6 +219,7 @@ vax_return_value (struct gdbarch *gdbarch, struct value *function, - ULONGEST addr; - - regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr); -+ ulongest_fits_host_or_error (TYPE_LENGTH (type)); - read_memory (addr, readbuf, len); - } - diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch deleted file mode 100644 index c83f18c..0000000 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ /dev/null @@ -1,558 +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-rhbz795424-bitpos-22of25.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-09/msg00629.html - ---MP_/6HRlH6vpyqtSy4CYyMrX6b2 -Content-Type: text/plain; charset=US-ASCII -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -This is part three of the bitpos expansion change. Some architectures -allow arbitrary length watchpoints and combined with the fact that type -lengths could be large enough, we need LONGEST for watchpoint lengths. -It is architecture dependent however, whether the LONGEST is needed or -not. This patch updates the signatures of watchpoint insertion and -removal functions of all architectures (to comply with the function -signatures in the callback struct), but expands types only in -architectures that need it. Tested on Fedora 16 x86_64. - -Regards, -Siddhesh ---MP_/6HRlH6vpyqtSy4CYyMrX6b2 -Content-Type: text/plain -Content-Transfer-Encoding: quoted-printable -Content-Disposition: attachment; filename=ChangeLog-wp - -gdb/ChangeLog: - - * arm-linux-nat.c (arm_linux_insert_watchpoint): Expand - parameter LEN to LONGEST. - (arm_linux_remove_watchpoint): Likewise. - (arm_linux_watchpoint_addr_within_range): Expand parameter - LENGTH to LONGEST. - * i386-nat.c (i386_insert_watchpoint): Expand parameter LEN to - LONGEST. - (i386_remove_watchpoint): Likewise. - * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise. - (ia64_linux_remove_watchpoint): Likewise. - * inf-ttrace.c (inf_ttrace_insert_watchpoint): Likewise. - Expand NUM_PAGES, PAGE to LONGEST. - (inf_ttrace_remove_watchpoint): Likewise. - * mips-linux-nat.c (mips_linux_insert_watchpoint): Expand - parameter LEN to LONGEST. - (mips_linux_remove_watchpoint): Likewise. - * nto-procfs.c (procfs_remove_hw_watchpoint): Likewise. - (procfs_insert_hw_watchpoint): Likewise. - * ppc-linux-nat.c (calculate_dvc): Likewise. Expand I, - NUM_BYTE_ENABLE to LONGEST. - (check_condition): Expand parameter LEN to point to LONGEST. - (ppc_linux_can_accel_watchpoint_condition): Expand parameter - LEN to LONGEST. - (create_watchpoint_request): Likewise. - (ppc_linux_insert_watchpoint): Likewise. - (ppc_linux_remove_watchpoint): Likewise. - (ppc_linux_watchpoint_addr_within_range): Expand parameter - LENGTH to LONGEST. - * procfs.c (proc_set_watchpoint): Expand parameter LEN to - LONGEST. - (procfs_set_watchpoint): Likewise. - (procfs_insert_watchpoint): Likewise. - (procfs_remove_watchpoint): Likewise. - * remote-m32r-sdi.c (m32r_insert_watchpoint): Likewise. Use - plongest to format print LEN. - (m32r_remove_watchpoint): Likewise. - * remote-mips.c (mips_insert_watchpoint): Expand parameter LEN - to LONGEST. - (mips_remove_watchpoint): Likewise. - * remote.c (remote_insert_watchpoint): Likewise. - Use phex_nz to format print LEN. - (remote_remove_watchpoint): Likewise. - (remote_watchpoint_addr_within_range): Expand parameter LENGTH - to LONGEST. - * s390-linux-nat.c (s390_insert_watchpoint): Expand parameter LEN to - LONGEST. - (s390_remove_watchpoint): Likewise. - * target.c (update_current_target): Expand parameter LEN for - callbacks to TO_INSERT_WATCHPOINT, TO_REMOVE_WATCHPOINT, - TO_CAN_ACCEL_WATCHPOINT_CONDITION, to LONGEST. - (default_watchpoint_addr_within_range): Expand parameter - LENGTH to LONGEST. - (debug_to_can_accel_watchpoint_condition): Expand parameter LEN - to LONGEST. Use plongest to format print LEN. - (debug_to_watchpoint_addr_within_range): Expand parameter LENGTH - to LONGEST. Use plongest to format print LENGTH. - (debug_to_insert_watchpoint): Expand parameter LEN to LONGEST. - Use plongest to format print LEN. - (debug_to_remove_watchpoint): Likewise. - * target.h (struct target_ops): Expand parameter LEN of - TO_REMOVE_WATCHPOINT, TO_INSERT_WATCHPOINT, - TO_WATCHPOINT_ADDR_WITHIN_RANGE and - TO_CAN_ACCEL_WATCHPOINT_CONDITION to LONGEST. - ---MP_/6HRlH6vpyqtSy4CYyMrX6b2 -Content-Type: text/x-patch -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; filename=bitpos-wp.patch - -diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c ---- a/gdb/aarch64-linux-nat.c -+++ b/gdb/aarch64-linux-nat.c -@@ -63,14 +63,14 @@ public: - int can_use_hw_breakpoint (enum bptype, int, int) override; - int insert_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; - int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; - int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; - bool stopped_by_watchpoint () override; - bool stopped_data_address (CORE_ADDR *) override; -- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; -+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override; - - int can_do_single_step () override; - -@@ -887,7 +887,8 @@ aarch64_linux_nat_target::stopped_by_watchpoint () - - bool - aarch64_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, -+ LONGEST length) - { - return start <= addr && start + length - 1 >= addr; - } -diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c ---- a/gdb/arm-linux-nat.c -+++ b/gdb/arm-linux-nat.c -@@ -80,7 +80,7 @@ public: - - int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; - -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - - int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; -@@ -91,7 +91,7 @@ public: - - bool stopped_data_address (CORE_ADDR *) override; - -- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; -+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override; - - const struct target_desc *read_description () override; - -@@ -1199,7 +1199,7 @@ arm_linux_nat_target::stopped_by_watchpoint () - bool - arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, - CORE_ADDR start, -- int length) -+ LONGEST length) - { - return start <= addr && start + length - 1 >= addr; - } -diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c ---- a/gdb/nat/aarch64-linux-hw-point.c -+++ b/gdb/nat/aarch64-linux-hw-point.c -@@ -137,7 +137,7 @@ aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int offset, int len) - Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */ - - static int --aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) -+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len) - { - unsigned int alignment = 0; - -@@ -212,9 +212,10 @@ aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) - an address within the latter. */ - - static void --aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p, -+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, -+ CORE_ADDR *aligned_addr_p, - int *aligned_offset_p, int *aligned_len_p, -- CORE_ADDR *next_addr_p, int *next_len_p, -+ CORE_ADDR *next_addr_p, LONGEST *next_len_p, - CORE_ADDR *next_addr_orig_p) - { - int aligned_len; -@@ -602,7 +603,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, - - static int - aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, -- CORE_ADDR addr, int len, int is_insert, -+ CORE_ADDR addr, LONGEST len, int is_insert, - struct aarch64_debug_reg_state *state) - { - CORE_ADDR addr_orig = addr; -@@ -632,12 +633,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, - " " - "addr_orig: %s\n" - " " -- "next_addr: %s, next_len: %d\n" -+ "next_addr: %s, next_len: %s\n" - " " - "addr_orig_next: %s\n", - is_insert, core_addr_to_string_nz (aligned_addr), - aligned_len, core_addr_to_string_nz (addr_orig), -- core_addr_to_string_nz (addr), len, -+ core_addr_to_string_nz (addr), plongest (len), - core_addr_to_string_nz (addr_orig_next)); - - addr_orig = addr_orig_next; -@@ -651,7 +652,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, - - int - aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, -- int len, int is_insert, -+ LONGEST len, int is_insert, - struct aarch64_debug_reg_state *state) - { - if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) -@@ -733,14 +734,14 @@ aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state, - void - aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, - const char *func, CORE_ADDR addr, -- int len, enum target_hw_bp_type type) -+ LONGEST len, enum target_hw_bp_type type) - { - int i; - - debug_printf ("%s", func); - if (addr || len) -- debug_printf (" (addr=0x%08lx, len=%d, type=%s)", -- (unsigned long) addr, len, -+ debug_printf (" (addr=0x%08lx, len=%s, type=%s)", -+ (unsigned long) addr, plongest (len), - type == hw_write ? "hw-write-watchpoint" - : (type == hw_read ? "hw-read-watchpoint" - : (type == hw_access ? "hw-access-watchpoint" -@@ -823,7 +824,7 @@ aarch64_linux_get_debug_reg_capacity (int tid) - ADDR and whose length is LEN in bytes. */ - - int --aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len) -+aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len) - { - CORE_ADDR aligned_addr; - -diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h ---- a/gdb/nat/aarch64-linux-hw-point.h -+++ b/gdb/nat/aarch64-linux-hw-point.h -@@ -176,7 +176,7 @@ int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, - int len, int is_insert, - struct aarch64_debug_reg_state *state); - int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, -- int len, int is_insert, -+ LONGEST len, int is_insert, - struct aarch64_debug_reg_state *state); - - void aarch64_linux_set_debug_regs (struct aarch64_debug_reg_state *state, -@@ -189,12 +189,12 @@ bool aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state, - - void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, - const char *func, CORE_ADDR addr, -- int len, enum target_hw_bp_type type); -+ LONGEST len, enum target_hw_bp_type type); - - void aarch64_linux_get_debug_reg_capacity (int tid); - - struct aarch64_debug_reg_state *aarch64_get_debug_reg_state (pid_t pid); - --int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len); -+int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len); - - #endif /* NAT_AARCH64_LINUX_HW_POINT_H */ -diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c ---- a/gdb/ppc-linux-nat.c -+++ b/gdb/ppc-linux-nat.c -@@ -284,7 +284,7 @@ struct ppc_linux_nat_target final : public linux_nat_target - int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) - override; - -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - - int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; -@@ -302,9 +302,9 @@ struct ppc_linux_nat_target final : public linux_nat_target - - bool stopped_data_address (CORE_ADDR *) override; - -- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; -+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override; - -- bool can_accel_watchpoint_condition (CORE_ADDR, int, int, struct expression *) -+ bool can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int, struct expression *) - override; - - int masked_watch_num_registers (CORE_ADDR, CORE_ADDR) override; -@@ -2065,11 +2065,11 @@ can_use_watchpoint_cond_accel (void) - CONDITION_VALUE will hold the value which should be put in the - DVC register. */ - static void --calculate_dvc (CORE_ADDR addr, int len, CORE_ADDR data_value, -+calculate_dvc (CORE_ADDR addr, LONGEST len, CORE_ADDR data_value, - uint32_t *condition_mode, uint64_t *condition_value) - { -- int i, num_byte_enable, align_offset, num_bytes_off_dvc, -- rightmost_enabled_byte; -+ LONGEST i, num_byte_enable; -+ int align_offset, num_bytes_off_dvc, rightmost_enabled_byte; - CORE_ADDR addr_end_data, addr_end_dvc; - - /* The DVC register compares bytes within fixed-length windows which -@@ -2157,7 +2157,7 @@ num_memory_accesses (const std::vector &chain) - of the constant. */ - static int - check_condition (CORE_ADDR watch_addr, struct expression *cond, -- CORE_ADDR *data_value, int *len) -+ CORE_ADDR *data_value, LONGEST *len) - { - int pc = 1, num_accesses_left, num_accesses_right; - struct value *left_val, *right_val; -@@ -2208,7 +2208,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, - the condition expression, thus only triggering the watchpoint when it is - true. */ - bool --ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len, -+ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, -+ LONGEST len, - int rw, - struct expression *cond) - { -@@ -2226,7 +2227,7 @@ ppc_linux_nat_target::can_accel_watchpoint_condition (CORE_ADDR addr, int len, - - static void - create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, -- int len, enum target_hw_bp_type type, -+ LONGEST len, enum target_hw_bp_type type, - struct expression *cond, int insert) - { - if (len == 1 -@@ -2492,7 +2493,7 @@ ppc_linux_nat_target::stopped_by_watchpoint () - bool - ppc_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, - CORE_ADDR start, -- int length) -+ LONGEST length) - { - int mask; - -diff --git a/gdb/procfs.c b/gdb/procfs.c ---- a/gdb/procfs.c -+++ b/gdb/procfs.c -@@ -1546,7 +1546,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) - } - - static int --proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags) -+proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, LONGEST len, int wflags) - { - struct { - procfs_ctl_t cmd; -@@ -3232,7 +3232,7 @@ procfs_target::pid_to_exec_file (int pid) - /* Insert a watchpoint. */ - - static int --procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag, -+procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, LONGEST len, int rwflag, - int after) - { - int pflags = 0; -diff --git a/gdb/remote.c b/gdb/remote.c ---- a/gdb/remote.c -+++ b/gdb/remote.c -@@ -440,7 +440,7 @@ public: - - bool stopped_data_address (CORE_ADDR *) override; - -- bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override; -+ bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) override; - - int can_use_hw_breakpoint (enum bptype, int, int) override; - -@@ -10298,7 +10298,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, - p = strchr (rs->buf.data (), '\0'); - addr = remote_address_masked (addr); - p += hexnumstr (p, (ULONGEST) addr); -- xsnprintf (p, endbuf - p, ",%x", len); -+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len))); - - putpkt (rs->buf); - getpkt (&rs->buf, 0); -@@ -10318,7 +10318,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, - - bool - remote_target::watchpoint_addr_within_range (CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) - { - CORE_ADDR diff = remote_address_masked (addr - start); - -@@ -10347,7 +10347,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, - p = strchr (rs->buf.data (), '\0'); - addr = remote_address_masked (addr); - p += hexnumstr (p, (ULONGEST) addr); -- xsnprintf (p, endbuf - p, ",%x", len); -+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len))); - putpkt (rs->buf); - getpkt (&rs->buf, 0); - -diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c ---- a/gdb/s390-linux-nat.c -+++ b/gdb/s390-linux-nat.c -@@ -121,7 +121,7 @@ public: - override; - int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) - override; -- int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; -+ int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) override; - bool stopped_by_watchpoint () override; - int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, - struct expression *) override; -diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c ---- a/gdb/target-delegates.c -+++ b/gdb/target-delegates.c -@@ -37,9 +37,9 @@ struct dummy_target : public target_ops - bool stopped_by_watchpoint () override; - bool have_steppable_watchpoint () override; - bool stopped_data_address (CORE_ADDR *arg0) override; -- bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; -+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) override; - int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override; -- bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; -+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) override; - int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; - int can_do_single_step () override; - bool supports_terminal_ours () override; -@@ -204,9 +204,9 @@ struct debug_target : public target_ops - bool stopped_by_watchpoint () override; - bool have_steppable_watchpoint () override; - bool stopped_data_address (CORE_ADDR *arg0) override; -- bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) override; -+ bool watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) override; - int region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) override; -- bool can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) override; -+ bool can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) override; - int masked_watch_num_registers (CORE_ADDR arg0, CORE_ADDR arg1) override; - int can_do_single_step () override; - bool supports_terminal_ours () override; -@@ -1041,19 +1041,19 @@ debug_target::stopped_data_address (CORE_ADDR *arg0) - } - - bool --target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) -+target_ops::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) - { - return this->beneath ()->watchpoint_addr_within_range (arg0, arg1, arg2); - } - - bool --dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) -+dummy_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) - { - return default_watchpoint_addr_within_range (this, arg0, arg1, arg2); - } - - bool --debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int arg2) -+debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, LONGEST arg2) - { - bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->watchpoint_addr_within_range (...)\n", this->beneath ()->shortname ()); -@@ -1063,7 +1063,7 @@ debug_target::watchpoint_addr_within_range (CORE_ADDR arg0, CORE_ADDR arg1, int - fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_CORE_ADDR (arg1); - fputs_unfiltered (", ", gdb_stdlog); -- target_debug_print_int (arg2); -+ target_debug_print_LONGEST (arg2); - fputs_unfiltered (") = ", gdb_stdlog); - target_debug_print_bool (result); - fputs_unfiltered ("\n", gdb_stdlog); -@@ -1099,19 +1099,19 @@ debug_target::region_ok_for_hw_watchpoint (CORE_ADDR arg0, LONGEST arg1) - } - - bool --target_ops::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) -+target_ops::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) - { - return this->beneath ()->can_accel_watchpoint_condition (arg0, arg1, arg2, arg3); - } - - bool --dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) -+dummy_target::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) - { - return false; - } - - bool --debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2, struct expression *arg3) -+debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, LONGEST arg1, int arg2, struct expression *arg3) - { - bool result; - fprintf_unfiltered (gdb_stdlog, "-> %s->can_accel_watchpoint_condition (...)\n", this->beneath ()->shortname ()); -@@ -1119,7 +1119,7 @@ debug_target::can_accel_watchpoint_condition (CORE_ADDR arg0, int arg1, int arg2 - fprintf_unfiltered (gdb_stdlog, "<- %s->can_accel_watchpoint_condition (", this->beneath ()->shortname ()); - target_debug_print_CORE_ADDR (arg0); - fputs_unfiltered (", ", gdb_stdlog); -- target_debug_print_int (arg1); -+ target_debug_print_LONGEST (arg1); - fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg2); - fputs_unfiltered (", ", gdb_stdlog); -diff --git a/gdb/target.c b/gdb/target.c ---- a/gdb/target.c -+++ b/gdb/target.c -@@ -55,7 +55,7 @@ static void generic_tls_error (void) ATTRIBUTE_NORETURN; - static void default_terminal_info (struct target_ops *, const char *, int); - - static int default_watchpoint_addr_within_range (struct target_ops *, -- CORE_ADDR, CORE_ADDR, int); -+ CORE_ADDR, CORE_ADDR, LONGEST); - - static int default_region_ok_for_hw_watchpoint (struct target_ops *, - CORE_ADDR, LONGEST); -@@ -3125,7 +3125,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, - static int - default_watchpoint_addr_within_range (struct target_ops *target, - CORE_ADDR addr, -- CORE_ADDR start, int length) -+ CORE_ADDR start, LONGEST length) - { - return addr >= start && addr < start + length; - } -diff --git a/gdb/target.h b/gdb/target.h ---- a/gdb/target.h -+++ b/gdb/target.h -@@ -561,7 +561,7 @@ struct target_ops - TARGET_DEFAULT_RETURN (false); - virtual bool stopped_data_address (CORE_ADDR *) - TARGET_DEFAULT_RETURN (false); -- virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) -+ virtual bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, LONGEST) - TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range); - - /* Documentation of this routine is provided with the corresponding -@@ -569,7 +569,7 @@ struct target_ops - virtual int region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST) - TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); - -- virtual bool can_accel_watchpoint_condition (CORE_ADDR, int, int, -+ virtual bool can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int, - struct expression *) - TARGET_DEFAULT_RETURN (false); - virtual int masked_watch_num_registers (CORE_ADDR, CORE_ADDR) diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch deleted file mode 100644 index 0500f6d..0000000 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ /dev/null @@ -1,1248 +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-rhbz795424-bitpos-23of25.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-09/msg00630.html - ---MP_/X_WjDOvz/B_fvlsrmCwRdxe -Content-Type: text/plain; charset=US-ASCII -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -This is the last part of the bitpos change. This patch does the same -thing that patch 1/4 does, except that it does so in the *-tdep files -wherever necessary. I separated these changes mainly because they are -related and can be reviewed independently. Tested on Fedora 16 x86_64. - -Regards, -Siddhesh - ---MP_/X_WjDOvz/B_fvlsrmCwRdxe -Content-Type: text/plain -Content-Transfer-Encoding: quoted-printable -Content-Disposition: attachment; filename=ChangeLog-tdep - -gdb/ChangeLog - - * alpha-tdep.c (alpha_push_dummy_call): Expand ACCUMULATE_SIZE, - REQUIRED_ARG_REGS, OFFSET, LEN, TLEN to ssize_t. - (struct alpha_arg): Expand members LEN, OFFSET to ssize_t. - * amd64-tdep.c (amd64_push_arguments): Expand NUM_ELEMENTS, - ELEMENT and LEN to LONGEST. - (amd64_return_value): Expand LEN to LONGEST. - * amd64-windows-tdep.c (amd64_windows_return_value): Expand LEN - to LONGEST. - * arm-tdep.c (arm_vfp_cprc_sub_candidate): Return LONGEST. - Expand COUNT, SUB_COUNT to LONGEST. - (arm_vfp_call_candidate): Expand C to LONGEST. - (arm_push_dummy_call): Expand LEN to LONGEST. - * avr-tdep.c (struct stack_item): Expand member LEN to ssize_t. - (push_stack_item): Expand parameter LEN to ssize_t. - (avr_push_dummy_call): Expand LAST_REGNUM, J, LEN to ssize_t. - * bfin-tdep.c (bfin_push_dummy_call): Expand TOTAL_LEN, - CONTAINER_LEN to ssize_t. - * cris-tdep.c (struct stack_item): Expand member LEN to ssize_t. - (push_stack_item): Expand parameter LEN to ssize_t. - (cris_push_dummy_call): Expand LEN, REG_DEMAND, I to ssize_t. - * h8300-tdep.c (h8300_push_dummy_call): Expand STACK_ALLOC, - STACK_OFFSET to LONGEST. Expand LEN, PADDED_LEN, OFFSET to - ssize_t. - * hppa-tdep.c (hppa64_push_dummy_call): Expand LEN to LONGEST. - (hppa64_return_value): Likewise. - * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Expand - ARGS_SPACE to LONGEST. - * i386-tdep.c (i386_push_dummy_call): Expand ARG_SPACE, - ARG_SPACE_USED, LEN to LONGEST. - (i386_reg_struct_return_p): Expand LEN to LONGEST. - (i386_convert_register_p): Likewise. - (i386_register_to_value): Likewise. - (i386_value_to_register): Likewise. - * ia64-tdep.c (ia64_push_dummy_call): Expand ARGOFFSET, LEN, - NSLOTS, MEMSLOTS to LONGEST. - * iq2000-tdep.c (iq2000_push_dummy_call): Expand TYPELEN, - STACKSPACE to LONGEST. - * m32r-tdep.c (m32r_push_dummy_call): Expand LEN to LONGEST. - * m68k-tdep.c (m68k_reg_struct_return_p): Expand LEN to LONGEST. - (m68k_push_dummy_call): Expand LEN, CONTAINER_LEN, OFFSET to - LONGEST. - * m88k-tdep.c (m88k_store_arguments): Expand NUM_STACK_WORDS, - LEN, STACK_WORD to LONGEST. - * mep-tdep.c (push_large_arguments): Expand ARG_LEN to ULONGEST. - * microblaze-tdep.c (microblaze_store_return_value): Expand LEN to - LONGEST. - * mips-tdep.c (mips_xfer_register): Expand parameter BUF_OFFSET to - LONGEST. Use plongest to format print BUF_OFFSET. - (mips_eabi_push_dummy_call): Expand LEN to LONGEST. Use plongest - to format print LEN. - (mips_n32n64_fp_arg_chunk_p): Expand parameter OFFSET to LONGEST. - Expand POS to LONGEST. - (mips_n32n64_push_dummy_call): Expand LEN to LONGEST. - (mips_n32n64_return_value): Expand OFFSET to LONGEST. Use - plongest to format print OFFSET. - (mips_o32_push_dummy_call): Expand LEN to LONGEST. Use plongest - to format print LEN. - (mips_o64_push_dummy_call): Expand LEN, STACK_OFFSET to LONGEST. - Use plongest to format print LEN. - * mn10300-tdep.c (mn10300_push_dummy_call): Expand LEN to - LONGEST. - * mt-tdep.c (mt_push_dummy_call): Expand STACK_DEST, TYPELEN to - LONGEST. - * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Expand - ARGSPACE, ARGOFFSET, STRUCTOFFSET, LEN, to LONGEST. - (ppc64_sysv_abi_push_dummy_call): Expand BYTE, LEN to ssize_t. - * rl78-tdep.c (rl78_push_dummy_call): Expand LEN, CONTAINER_LEN - to LONGEST. - * rs6000-aix-tdep.c (rs6000_push_dummy_call): Expand ARGBYTES, - LEN to LONGEST. - (ran_out_of_registers_for_arguments): Expand SPACE, JJ to - LONGEST. - * s390-linux-tdep.c (s390_value_from_register): Expand LEN to LONGEST. - (is_power_of_two): Expand parameter N to ULONGEST. - (s390_push_dummy_call): Expand LENGTH to ULONGEST. - * score-tdep.c (score_push_dummy_call): Expand ARGLEN to - LONGEST. - * sh-tdep.c (sh_use_struct_convention) Expand len to LONGEST. - (sh_justify_value_in_reg): Expand parameter LEN to LONGEST. - (sh_push_dummy_call_fpu): Expand LEN to LONGEST. Expand REG_SIZE - to ssize_t. - (sh_push_dummy_call_nofpu): Likewise. - * sh64-tdep.c (sh64_push_dummy_call): Expand STACK_OFFSET, - STACK_ALLOC, LEN to LONGEST. - * sparc-tdep.c (sparc32_store_arguments): Expand LEN to LONGEST. - * sparc64-tdep.c (sparc64_store_floating_fields): Expand - parameter BITPOS to LONGEST. Expand SUBPOS to LONGEST. - (sparc64_extract_floating_fields): Likewise. - (sparc64_store_arguments): Expand LEN to LONGEST. - * spu-tdep.c (spu_push_dummy_call): Expand N_REGS, LEN to LONGEST. - (spu_value_from_register): Expand LEN to LONGEST. - * tic6x-tdep.c (tic6x_push_dummy_call): Expand REFERENCES_OFFST, - LEN to LONGEST. Expand LEN to ssize_t. Use plongest to format - print LEN. - * tilegx-tdep.c (tilegx_push_dummy_call): Expand TYPELEN, - SLACKLEN, ALIGNLEN to LONGEST. - * v850-tdep.c (v850_push_dummy_call): Expand LEN to LONGEST. - * vax-tdep.c (vax_store_arguments): Expand COUNT, LEN to LONGEST. - (vax_return_value): Expand LEN to LONGEST. - * xstormy16-tdep.c (xstormy16_push_dummy_call): Expand J, TYPELEN - to LONGEST. - * xtensa-tdep.c (xtensa_store_return_value): Print LEN instead of - TYPE_LENGTH.. - (struct argument_info): Expoand member LENGTH to ssize_t. - (struct argument_info.u): Expand member OFFSET to ssize_t. - (xtensa_push_dummy_call): Expand SIZE, ONSTACK_SIZE to LONGEST. - Expand N to ssize_t. Use pulongest to format print TYPE_LENGTH. - ---MP_/X_WjDOvz/B_fvlsrmCwRdxe -Content-Type: text/x-patch -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; filename=bitpos-tdep.patch - -diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c ---- a/gdb/alpha-tdep.c -+++ b/gdb/alpha-tdep.c -@@ -300,17 +300,17 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int i; -- int accumulate_size = (return_method == return_method_struct) ? 8 : 0; -+ ssize_t accumulate_size = (return_method == return_method_struct) ? 8 : 0; - struct alpha_arg - { - const gdb_byte *contents; -- int len; -- int offset; -+ ssize_t len; -+ ssize_t offset; - }; - struct alpha_arg *alpha_args = XALLOCAVEC (struct alpha_arg, nargs); - struct alpha_arg *m_arg; - gdb_byte arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS]; -- int required_arg_regs; -+ ssize_t required_arg_regs; - CORE_ADDR func_addr = find_function_addr (function, NULL); - - /* The ABI places the address of the called function in T12. */ -@@ -430,8 +430,8 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - for (i = nargs; m_arg--, --i >= 0;) - { - const gdb_byte *contents = m_arg->contents; -- int offset = m_arg->offset; -- int len = m_arg->len; -+ ssize_t offset = m_arg->offset; -+ ssize_t len = m_arg->len; - - /* Copy the bytes destined for registers into arg_reg_buffer. */ - if (offset < sizeof(arg_reg_buffer)) -@@ -443,7 +443,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - } - else - { -- int tlen = sizeof(arg_reg_buffer) - offset; -+ ssize_t tlen = sizeof(arg_reg_buffer) - offset; - memcpy (arg_reg_buffer + offset, contents, tlen); - offset += tlen; - contents += tlen; -diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c ---- a/gdb/amd64-tdep.c -+++ b/gdb/amd64-tdep.c -@@ -883,8 +883,8 @@ amd64_push_arguments (struct regcache *regcache, int nargs, struct value **args, - }; - struct value **stack_args = XALLOCAVEC (struct value *, nargs); - int num_stack_args = 0; -- int num_elements = 0; -- int element = 0; -+ LONGEST num_elements = 0; -+ LONGEST element = 0; - int integer_reg = 0; - int sse_reg = 0; - int i; -@@ -896,7 +896,7 @@ if (return_method == return_method_struct) - for (i = 0; i < nargs; i++) - { - struct type *type = value_type (args[i]); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - enum amd64_reg_class theclass[2]; - int needed_integer_regs = 0; - int needed_sse_regs = 0; -@@ -960,7 +960,7 @@ if (return_method == return_method_struct) - - gdb_assert (regnum != -1); - memset (buf, 0, sizeof buf); -- memcpy (buf, valbuf + j * 8, std::min (len, 8)); -+ memcpy (buf, valbuf + j * 8, std::min (len, (LONGEST) 8)); - regcache->raw_write_part (regnum, offset, 8, buf); - } - } -diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c ---- a/gdb/amd64-windows-tdep.c -+++ b/gdb/amd64-windows-tdep.c -@@ -291,7 +291,7 @@ amd64_windows_return_value (struct gdbarch *gdbarch, struct value *function, - struct type *type, struct regcache *regcache, - gdb_byte *readbuf, const gdb_byte *writebuf) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - int regnum = -1; - - /* See if our value is returned through a register. If it is, then -diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c ---- a/gdb/arm-tdep.c -+++ b/gdb/arm-tdep.c -@@ -3440,7 +3440,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. */ - --static int -+static LONGEST - arm_vfp_cprc_sub_candidate (struct type *t, - enum arm_vfp_cprc_base_type *base_type) - { -@@ -3523,7 +3523,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, - } - else - { -- int count; -+ LONGEST count; - unsigned unitlen; - - count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), -@@ -3546,12 +3546,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, - - case TYPE_CODE_STRUCT: - { -- int count = 0; -+ LONGEST count = 0; - unsigned unitlen; - int i; - for (i = 0; i < TYPE_NFIELDS (t); i++) - { -- int sub_count = 0; -+ LONGEST sub_count = 0; - - if (!field_is_static (&TYPE_FIELD (t, i))) - sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -@@ -3575,13 +3575,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, - - case TYPE_CODE_UNION: - { -- int count = 0; -+ LONGEST count = 0; - unsigned unitlen; - int i; - for (i = 0; i < TYPE_NFIELDS (t); i++) - { -- int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -- base_type); -+ LONGEST sub_count; -+ -+ sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -+ base_type); - if (sub_count == -1) - return -1; - count = (count > sub_count ? count : sub_count); -@@ -3617,7 +3619,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; -- int c = arm_vfp_cprc_sub_candidate (t, &b); -+ LONGEST c = arm_vfp_cprc_sub_candidate (t, &b); - if (c <= 0 || c > 4) - return 0; - *base_type = b; -@@ -3699,7 +3701,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (argnum = 0; argnum < nargs; argnum++) - { -- int len; -+ LONGEST len; - struct type *arg_type; - struct type *target_type; - enum type_code typecode; -diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c ---- a/gdb/avr-tdep.c -+++ b/gdb/avr-tdep.c -@@ -1192,13 +1192,13 @@ avr_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) - - struct stack_item - { -- int len; -+ ssize_t len; - struct stack_item *prev; - gdb_byte *data; - }; - - static struct stack_item * --push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len) -+push_stack_item (struct stack_item *prev, const bfd_byte *contents, ssize_t len) - { - struct stack_item *si; - si = XNEW (struct stack_item); -@@ -1287,12 +1287,12 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (i = 0; i < nargs; i++) - { -- int last_regnum; -- int j; -+ ssize_t last_regnum; -+ ssize_t j; - struct value *arg = args[i]; - struct type *type = check_typedef (value_type (arg)); - const bfd_byte *contents = value_contents (arg); -- int len = TYPE_LENGTH (type); -+ ssize_t len = TYPE_LENGTH (type); - - /* Calculate the potential last register needed. - E.g. For length 2, registers regnum and regnum-1 (say 25 and 24) -diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c ---- a/gdb/bfin-tdep.c -+++ b/gdb/bfin-tdep.c -@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int i; - long reg_r0, reg_r1, reg_r2; -- int total_len = 0; -+ ssize_t total_len = 0; - - for (i = nargs - 1; i >= 0; i--) - { -@@ -526,7 +526,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, - { - struct type *value_type = value_enclosing_type (args[i]); - struct type *arg_type = check_typedef (value_type); -- 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); -diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c ---- a/gdb/cris-tdep.c -+++ b/gdb/cris-tdep.c -@@ -657,13 +657,13 @@ static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, - - struct stack_item - { -- int len; -+ ssize_t len; - struct stack_item *prev; - gdb_byte *data; - }; - - static struct stack_item * --push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len) -+push_stack_item (struct stack_item *prev, const gdb_byte *contents, ssize_t len) - { - struct stack_item *si = XNEW (struct stack_item); - si->data = (gdb_byte *) xmalloc (len); -@@ -814,13 +814,13 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (argnum = 0; argnum < nargs; argnum++) - { -- int len; -+ ssize_t len; - const gdb_byte *val; -- int reg_demand; -- int i; -+ ssize_t reg_demand; -+ ssize_t i; - -- len = TYPE_LENGTH (value_type (args[argnum])); - val = value_contents (args[argnum]); -+ len = TYPE_LENGTH (value_type (args[argnum])); - - /* How may registers worth of storage do we need for this argument? */ - reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c ---- a/gdb/h8300-tdep.c -+++ b/gdb/h8300-tdep.c -@@ -619,7 +619,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - CORE_ADDR struct_addr) - { - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); -- int stack_alloc = 0, stack_offset = 0; -+ LONGEST stack_alloc = 0, stack_offset = 0; - int wordsize = BINWORD (gdbarch); - int reg = E_ARG0_REGNUM; - int argument; -@@ -645,11 +645,11 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - for (argument = 0; argument < nargs; argument++) - { - struct type *type = value_type (args[argument]); -- int len = TYPE_LENGTH (type); -+ ssize_t len = TYPE_LENGTH (type); - char *contents = (char *) value_contents (args[argument]); - - /* Pad the argument appropriately. */ -- int padded_len = align_up (len, wordsize); -+ ssize_t padded_len = align_up (len, wordsize); - /* Use std::vector here to get zero initialization. */ - std::vector padded (padded_len); - -@@ -678,7 +678,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - /* Heavens to Betsy --- it's really going in registers! - Note that on the h8/300s, there are gaps between the - registers in the register file. */ -- int offset; -+ ssize_t offset; - - for (offset = 0; offset < padded_len; offset += wordsize) - { -diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c ---- a/gdb/hppa-tdep.c -+++ b/gdb/hppa-tdep.c -@@ -985,7 +985,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - { - struct value *arg = args[i]; - struct type *type = value_type (arg); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - const bfd_byte *valbuf; - bfd_byte fptrbuf[8]; - int regnum; -@@ -1178,7 +1178,7 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function, - struct type *type, struct regcache *regcache, - gdb_byte *readbuf, const gdb_byte *writebuf) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - int regnum, offset; - - if (len > 16) -diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c ---- a/gdb/i386-darwin-tdep.c -+++ b/gdb/i386-darwin-tdep.c -@@ -167,7 +167,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (write_pass = 0; write_pass < 2; write_pass++) - { -- int args_space = 0; -+ LONGEST args_space = 0; - int num_m128 = 0; - - if (return_method == return_method_struct) -diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c ---- a/gdb/i386-tdep.c -+++ b/gdb/i386-tdep.c -@@ -2679,7 +2679,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - gdb_byte buf[4]; - int i; - int write_pass; -- int args_space = 0; -+ LONGEST args_space = 0; - - /* BND registers can be in arbitrary values at the moment of the - inferior call. This can cause boundary violations that are not -@@ -2694,7 +2694,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (write_pass = 0; write_pass < 2; write_pass++) - { -- int args_space_used = 0; -+ LONGEST args_space_used = 0; - - if (return_method == return_method_struct) - { -@@ -2711,7 +2711,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - - for (i = 0; i < nargs; i++) - { -- int len = TYPE_LENGTH (value_enclosing_type (args[i])); -+ LONGEST len = TYPE_LENGTH (value_enclosing_type (args[i])); - - if (write_pass) - { -@@ -2918,7 +2918,7 @@ i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) - { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - enum type_code code = TYPE_CODE (type); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - gdb_assert (code == TYPE_CODE_STRUCT - || code == TYPE_CODE_UNION -@@ -3704,7 +3704,7 @@ static int - i386_convert_register_p (struct gdbarch *gdbarch, - int regnum, struct type *type) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - /* Values may be spread across multiple registers. Most debugging - formats aren't expressive enough to specify the locations, so -@@ -3737,7 +3737,7 @@ i386_register_to_value (struct frame_info *frame, int regnum, - int *optimizedp, int *unavailablep) - { - struct gdbarch *gdbarch = get_frame_arch (frame); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - if (i386_fp_regnum_p (gdbarch, regnum)) - return i387_register_to_value (frame, regnum, type, to, -@@ -3773,7 +3773,7 @@ static void - i386_value_to_register (struct frame_info *frame, int regnum, - struct type *type, const gdb_byte *from) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) - { -diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c ---- a/gdb/iq2000-tdep.c -+++ b/gdb/iq2000-tdep.c -@@ -652,8 +652,9 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - const bfd_byte *val; - bfd_byte buf[4]; - struct type *type; -- int i, argreg, typelen, slacklen; -- int stackspace = 0; -+ int i, argreg, slacklen; -+ LONGEST typelen; -+ LONGEST stackspace = 0; - /* Used to copy struct arguments into the stack. */ - CORE_ADDR struct_ptr; - -diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c ---- a/gdb/m32r-tdep.c -+++ b/gdb/m32r-tdep.c -@@ -671,7 +671,7 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - CORE_ADDR regval; - gdb_byte *val; - gdb_byte valbuf[M32R_ARG_REGISTER_SIZE]; -- int len; -+ LONGEST len; - - /* First force sp to a 4-byte alignment. */ - sp = sp & ~3; -diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c ---- a/gdb/m68k-tdep.c -+++ b/gdb/m68k-tdep.c -@@ -372,7 +372,7 @@ m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) - { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - enum type_code code = TYPE_CODE (type); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION - || code == TYPE_CODE_COMPLEX); -@@ -505,9 +505,9 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - for (i = nargs - 1; i >= 0; i--) - { - struct type *value_type = value_enclosing_type (args[i]); -- int len = TYPE_LENGTH (value_type); -- int container_len = (len + 3) & ~3; -- int offset; -+ LONGEST len = TYPE_LENGTH (value_type); -+ LONGEST container_len = (len + 3) & ~3; -+ LONGEST offset; - - /* Non-scalars bigger than 4 bytes are left aligned, others are - right aligned. */ -diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c ---- a/gdb/mep-tdep.c -+++ b/gdb/mep-tdep.c -@@ -2238,7 +2238,7 @@ push_large_arguments (CORE_ADDR sp, int argc, struct value **argv, - - for (i = 0; i < argc; i++) - { -- unsigned arg_len = TYPE_LENGTH (value_type (argv[i])); -+ ULONGEST arg_len = TYPE_LENGTH (value_type (argv[i])); - - if (arg_len > MEP_GPR_SIZE) - { -diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c ---- a/gdb/mips-tdep.c -+++ b/gdb/mips-tdep.c -@@ -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, -- const gdb_byte *out, int buf_offset) -+ const gdb_byte *out, LONGEST buf_offset) - { - int reg_offset = 0; - -@@ -512,8 +512,8 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, - } - if (mips_debug) - fprintf_unfiltered (gdb_stderr, -- "xfer $%d, reg offset %d, buf offset %d, length %d, ", -- reg_num, reg_offset, buf_offset, length); -+ "xfer $%d, reg offset %d, buf offset %s, length %d, ", -+ reg_num, reg_offset, plongest (buf_offset), length); - if (mips_debug && out != NULL) - { - int i; -@@ -4563,13 +4563,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)); -- int len = TYPE_LENGTH (arg_type); -+ LONGEST len = TYPE_LENGTH (arg_type); - enum type_code typecode = TYPE_CODE (arg_type); - - if (mips_debug) - fprintf_unfiltered (gdb_stdlog, -- "mips_eabi_push_dummy_call: %d len=%d type=%d", -- argnum + 1, len, (int) typecode); -+ "mips_eabi_push_dummy_call: %d len=%s type=%d", -+ argnum + 1, plongest (len), (int) typecode); - - /* The EABI passes structures that do not fit in a register by - reference. */ -@@ -4839,7 +4839,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, -- int offset) -+ LONGEST offset) - { - int i; - -@@ -4854,7 +4854,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, - - for (i = 0; i < TYPE_NFIELDS (arg_type); i++) - { -- int pos; -+ LONGEST pos; - struct type *field_type; - - /* We're only looking at normal fields. */ -@@ -4897,7 +4897,8 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - int argreg; - int float_argreg; - int argnum; -- 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); -@@ -4926,9 +4927,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; -@@ -5249,11 +5250,11 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, - : MIPS_V0_REGNUM); - field < TYPE_NFIELDS (type); field++, regnum += 2) - { -- int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field]) -- / TARGET_CHAR_BIT); -+ LONGEST offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field]) -+ / TARGET_CHAR_BIT); - if (mips_debug) -- fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", -- offset); -+ fprintf_unfiltered (gdb_stderr, "Return float struct+%s\n", -+ plongest (offset)); - if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) - { - /* A 16-byte long double field goes in two consecutive -@@ -5295,8 +5296,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) -- fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n", -- offset, xfer, regnum); -+ fprintf_unfiltered (gdb_stderr, "Return struct+%s:%d in $%d\n", -+ plongest (offset), xfer, regnum); - mips_xfer_register (gdbarch, regcache, - gdbarch_num_regs (gdbarch) + regnum, - xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5355,7 +5356,8 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - int argreg; - int float_argreg; - int argnum; -- 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); -@@ -5392,9 +5394,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; -@@ -5420,13 +5422,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)); -- int len = TYPE_LENGTH (arg_type); -+ LONGEST len = TYPE_LENGTH (arg_type); - enum type_code typecode = TYPE_CODE (arg_type); - - if (mips_debug) - fprintf_unfiltered (gdb_stdlog, -- "mips_o32_push_dummy_call: %d len=%d type=%d", -- argnum + 1, len, (int) typecode); -+ "mips_o32_push_dummy_call: %d len=%s type=%d", -+ argnum + 1, plongest (len), (int) typecode); - - val = value_contents (arg); - -@@ -5880,8 +5882,8 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - int argreg; - int float_argreg; - int argnum; -- int arg_space = 0; -- int stack_offset = 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); - -@@ -5914,9 +5916,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; -@@ -5942,13 +5944,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)); -- int len = TYPE_LENGTH (arg_type); -+ LONGEST len = TYPE_LENGTH (arg_type); - enum type_code typecode = TYPE_CODE (arg_type); - - if (mips_debug) - fprintf_unfiltered (gdb_stdlog, -- "mips_o64_push_dummy_call: %d len=%d type=%d", -- argnum + 1, len, (int) typecode); -+ "mips_o64_push_dummy_call: %d len=%s type=%d", -+ argnum + 1, plongest (len), (int) typecode); - - val = value_contents (arg); - -diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c ---- a/gdb/mn10300-tdep.c -+++ b/gdb/mn10300-tdep.c -@@ -1197,7 +1197,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch, - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - const int push_size = register_size (gdbarch, E_PC_REGNUM); - int regs_used; -- int len, arg_len; -+ LONGEST len, arg_len; - int stack_offset = 0; - int argnum; - const gdb_byte *val; -diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c ---- a/gdb/ppc-sysv-tdep.c -+++ b/gdb/ppc-sysv-tdep.c -@@ -69,7 +69,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); - ULONGEST saved_sp; -- int argspace = 0; /* 0 is an initial wrong guess. */ -+ LONGEST argspace = 0; /* 0 is an initial wrong guess. */ - int write_pass; - - gdb_assert (tdep->wordsize == 4); -@@ -100,9 +100,9 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - /* Next available vector register for vector arguments. */ - int vreg = 2; - /* Arguments start above the "LR save word" and "Back chain". */ -- int argoffset = 2 * tdep->wordsize; -+ LONGEST argoffset = 2 * tdep->wordsize; - /* Structures start after the arguments. */ -- int structoffset = argoffset + argspace; -+ LONGEST structoffset = argoffset + argspace; - - /* If the function is returning a `struct', then the first word - (which will be passed in r3) is used for struct return -@@ -121,7 +121,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - { - struct value *arg = args[argno]; - struct type *type = check_typedef (value_type (arg)); -- int len = TYPE_LENGTH (type); -+ ssize_t len = TYPE_LENGTH (type); - const bfd_byte *val = value_contents (arg); - - if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1247,11 +1247,11 @@ struct ppc64_sysv_argpos - - static void - ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, -- const bfd_byte *val, int len, int align, -+ const bfd_byte *val, ssize_t len, int align, - struct ppc64_sysv_argpos *argpos) - { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); -- int offset = 0; -+ LONGEST offset = 0; - - /* Enforce alignment of stack location, if requested. */ - if (align > tdep->wordsize) -@@ -1288,7 +1288,7 @@ ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, - { - if (argpos->regcache && argpos->greg <= 10) - argpos->regcache->cooked_write_part -- (tdep->ppc_gp0_regnum + argpos->greg, offset, len, val); -+ (tdep->ppc_gp0_regnum + argpos->greg, offset, (LONGEST) len, val); - argpos->greg++; - } - } -@@ -1347,7 +1347,7 @@ ppc64_sysv_abi_push_freg (struct gdbarch *gdbarch, - if (argpos->regcache && argpos->freg <= 13) - { - int regnum = tdep->ppc_fp0_regnum + argpos->freg; -- int offset = 0; -+ LONGEST offset = 0; - - if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) - offset = 8 - TYPE_LENGTH (type); -@@ -1797,7 +1797,7 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype, - && TYPE_CODE (valtype) == TYPE_CODE_DECFLOAT) - { - int regnum = tdep->ppc_fp0_regnum + 1 + index; -- int offset = 0; -+ LONGEST offset = 0; - - if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) - offset = 8 - TYPE_LENGTH (valtype); -@@ -1873,7 +1873,7 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype, - && TYPE_CODE (valtype) == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype)) - { - int regnum = tdep->ppc_gp0_regnum + 3 + index; -- int offset = 0; -+ LONGEST offset = 0; - - if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) - offset = 8 - TYPE_LENGTH (valtype); -@@ -1981,7 +1981,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, - && TYPE_LENGTH (TYPE_TARGET_TYPE (valtype)) == 1) - { - int regnum = tdep->ppc_gp0_regnum + 3; -- int offset = (register_size (gdbarch, regnum) - TYPE_LENGTH (valtype)); -+ LONGEST offset -+ = (register_size (gdbarch, regnum) - TYPE_LENGTH (valtype)); - - if (writebuf != NULL) - regcache->cooked_write_part (regnum, offset, TYPE_LENGTH (valtype), -diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c ---- a/gdb/rl78-tdep.c -+++ b/gdb/rl78-tdep.c -@@ -1347,8 +1347,8 @@ rl78_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - for (i = nargs - 1; i >= 0; i--) - { - struct type *value_type = value_enclosing_type (args[i]); -- int len = TYPE_LENGTH (value_type); -- int container_len = (len + 1) & ~1; -+ LONGEST len = TYPE_LENGTH (value_type); -+ LONGEST container_len = (len + 1) & ~1; - - sp -= container_len; - write_memory (rl78_make_data_address (sp), -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 -@@ -291,9 +291,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; -- int len = 0; -+ LONGEST len = 0; - int argno; /* current argument number */ -- int argbytes; /* current argument byte */ -+ LONGEST argbytes; /* current argument byte */ - gdb_byte tmp_buffer[50]; - int f_argno = 0; /* current floating point argno */ - int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -421,7 +421,7 @@ ran_out_of_registers_for_arguments: - - if ((argno < nargs) || argbytes) - { -- int space = 0, jj; -+ LONGEST space = 0, jj; - - if (argbytes) - { -diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c ---- a/gdb/score-tdep.c -+++ b/gdb/score-tdep.c -@@ -517,7 +517,7 @@ score_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int argnum; - int argreg; -- int arglen = 0; -+ LONGEST arglen = 0; - CORE_ADDR stack_offset = 0; - CORE_ADDR addr = 0; - -diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c ---- a/gdb/sh-tdep.c -+++ b/gdb/sh-tdep.c -@@ -812,7 +812,7 @@ sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) - static int - sh_use_struct_convention (int renesas_abi, struct type *type) - { -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - int nelem = TYPE_NFIELDS (type); - - /* The Renesas ABI returns aggregate types always on stack. */ -@@ -914,7 +914,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) - - /* Helper function to justify value in register according to endianess. */ - static const gdb_byte * --sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len) -+sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, LONGEST len) - { - static gdb_byte valbuf[4]; - -@@ -1074,7 +1074,8 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, - struct type *type; - CORE_ADDR regval; - const gdb_byte *val; -- int len, reg_size = 0; -+ LONGEST len; -+ int reg_size = 0; - int pass_on_stack = 0; - int treat_as_flt; - int last_reg_arg = INT_MAX; -@@ -1216,7 +1217,8 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, - struct type *type; - CORE_ADDR regval; - const gdb_byte *val; -- int len, reg_size = 0; -+ LONGEST len; -+ int reg_size = 0; - int pass_on_stack = 0; - int last_reg_arg = INT_MAX; - -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) - - static void - sparc64_store_floating_fields (struct regcache *regcache, struct type *type, -- const gdb_byte *valbuf, int element, int bitpos) -+ const gdb_byte *valbuf, int element, LONGEST bitpos) - { - struct gdbarch *gdbarch = regcache->arch (); - int len = TYPE_LENGTH (type); -@@ -1265,7 +1265,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)); -- int subpos = bitpos + TYPE_FIELD_BITPOS (type, i); -+ LONGEST subpos = bitpos + TYPE_FIELD_BITPOS (type, i); - - sparc64_store_floating_fields (regcache, subtype, valbuf, - element, subpos); -@@ -1297,7 +1297,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, - - static void - sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, -- gdb_byte *valbuf, int bitpos) -+ gdb_byte *valbuf, LONGEST bitpos) - { - struct gdbarch *gdbarch = regcache->arch (); - -@@ -1353,7 +1353,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)); -- int subpos = bitpos + TYPE_FIELD_BITPOS (type, i); -+ LONGEST subpos = bitpos + TYPE_FIELD_BITPOS (type, i); - - sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); - } -@@ -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]); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - - if (sparc64_structure_or_union_p (type) - || (sparc64_complex_floating_p (type) && len == 32)) -@@ -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]); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - int regnum = -1; - gdb_byte buf[16]; - -diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c ---- a/gdb/spu-tdep.c -+++ b/gdb/spu-tdep.c -@@ -1432,7 +1432,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - struct value *arg = args[i]; - struct type *type = check_typedef (value_type (arg)); - const gdb_byte *contents = value_contents (arg); -- int n_regs = align_up (TYPE_LENGTH (type), 16) / 16; -+ LONGEST n_regs = align_up (TYPE_LENGTH (type), 16) / 16; - - /* If the argument doesn't wholly fit into registers, it and - all subsequent arguments go to the stack. */ -@@ -1464,7 +1464,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - { - struct value *arg = args[i]; - struct type *type = check_typedef (value_type (arg)); -- int len = TYPE_LENGTH (type); -+ LONGEST len = TYPE_LENGTH (type); - int preferred_slot; - - if (spu_scalar_value_p (type)) -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, - int argreg = 0; - int argnum; - int stack_offset = 4; -- int references_offset = 4; -+ LONGEST references_offset = 4; - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - struct type *func_type = value_type (function); - /* The first arg passed on stack. Mostly the first 10 args are passed by -@@ -914,7 +914,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++) - { -- int len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); -+ LONGEST len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); - if (argnum >= 10 - argreg) - references_offset += len; - stack_offset += len; -@@ -933,7 +933,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)); -- int len = TYPE_LENGTH (arg_type); -+ ssize_t len = TYPE_LENGTH (arg_type); - enum type_code typecode = TYPE_CODE (arg_type); - - val = value_contents (arg); -@@ -1088,7 +1088,8 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, - } - else - internal_error (__FILE__, __LINE__, -- _("unexpected length %d of arg %d"), len, argnum); -+ _("unexpected length %s of arg %d"), -+ plongest (len), argnum); - - addr = sp + stack_offset; - write_memory (addr, val, len); -diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c ---- a/gdb/tilegx-tdep.c -+++ b/gdb/tilegx-tdep.c -@@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch *gdbarch, - CORE_ADDR stack_dest = sp; - int argreg = TILEGX_R0_REGNUM; - int i, j; -- int typelen, slacklen; -+ LONGEST typelen, slacklen; - static const gdb_byte four_zero_words[16] = { 0 }; - - /* If struct_return is 1, then the struct return address will -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,8 @@ v850_push_dummy_call (struct gdbarch *gdbarch, - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int argreg; - int argnum; -- int arg_space = 0; -+ ULONGEST arg_space = 0; -+ LONGEST len = 0; - int stack_offset; - - if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) -@@ -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++) - { -- int len; -+ LONGEST len; - gdb_byte *val; - gdb_byte valbuf[v850_reg_size]; - -diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c ---- a/gdb/vax-tdep.c -+++ b/gdb/vax-tdep.c -@@ -110,7 +110,7 @@ vax_store_arguments (struct regcache *regcache, int nargs, - struct gdbarch *gdbarch = regcache->arch (); - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - gdb_byte buf[4]; -- int count = 0; -+ LONGEST count = 0; - int i; - - /* We create an argument list on the stack, and make the argument -@@ -119,7 +119,7 @@ vax_store_arguments (struct regcache *regcache, int nargs, - /* Push arguments in reverse order. */ - for (i = nargs - 1; i >= 0; i--) - { -- int len = TYPE_LENGTH (value_enclosing_type (args[i])); -+ LONGEST len = TYPE_LENGTH (value_enclosing_type (args[i])); - - sp -= (len + 3) & ~3; - count += (len + 3) / 4; -diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c ---- a/gdb/xstormy16-tdep.c -+++ b/gdb/xstormy16-tdep.c -@@ -233,8 +233,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; -- int i, j; -- int typelen, slacklen; -+ int i, slacklen; -+ LONGEST j; -+ LONGEST typelen; -+ const gdb_byte *val; - gdb_byte buf[xstormy16_pc_size]; - - /* If returning a struct using target ABI method, then the struct return -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -1615,8 +1615,7 @@ xtensa_store_return_value (struct type *type, - - if (len > (callsize > 8 ? 8 : 16)) - internal_error (__FILE__, __LINE__, -- _("unimplemented for this length: %d"), -- TYPE_LENGTH (type)); -+ _("unimplemented for this length: %d"), len); - areg = arreg_number (gdbarch, - gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); - -@@ -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 size, onstack_size; -+ int i; -+ LONGEST size, onstack_size; - gdb_byte *buf = (gdb_byte *) alloca (16); - CORE_ADDR ra, ps; - struct argument_info - { - const bfd_byte *contents; -- int length; -+ ssize_t length; - int onstack; /* onstack == 0 => in reg */ - int align; /* alignment */ - union - { -- int offset; /* stack offset if on stack. */ -+ ssize_t offset; /* stack offset if on stack. */ - int regno; /* regno if in register. */ - } u; - }; -@@ -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)); -- fprintf_unfiltered (gdb_stdlog, "%2d: %s %3d ", i, -- host_address_to_string (arg), -- TYPE_LENGTH (arg_type)); -+ const char *arg_type_len_s = pulongest (TYPE_LENGTH (arg_type)); -+ -+ fprintf_unfiltered (gdb_stdlog, "%2d: %s %s ", i, -+ host_address_to_string (arg), arg_type_len_s); - switch (TYPE_CODE (arg_type)) - { - case TYPE_CODE_INT: -@@ -1794,8 +1795,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, - info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); - break; - } -- info->length = TYPE_LENGTH (arg_type); - info->contents = value_contents (arg); -+ info->length = TYPE_LENGTH (arg_type); - - /* Align size and onstack_size. */ - size = (size + info->align - 1) & ~(info->align - 1); -@@ -1840,7 +1841,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, - - if (info->onstack) - { -- int n = info->length; -+ ssize_t n = info->length; - CORE_ADDR offset = sp + info->u.offset; - - /* Odd-sized structs are aligned to the lower side of a memory -@@ -1856,7 +1857,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, - } - else - { -- int n = info->length; -+ ssize_t n = info->length; - const bfd_byte *cp = info->contents; - int r = info->u.regno; - diff --git a/gdb-rhbz795424-bitpos-25of25-test.patch b/gdb-rhbz795424-bitpos-25of25-test.patch deleted file mode 100644 index 1738f5b..0000000 --- a/gdb-rhbz795424-bitpos-25of25-test.patch +++ /dev/null @@ -1,638 +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-rhbz795424-bitpos-25of25-test.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-10/msg00231.html - -On Mon, 15 Oct 2012 15:25:55 +0200, Jan Kratochvil wrote: -> I have filed for it now: -> Invalid debug/ array bounds w/-fno-range-check and 32-bit target -> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54934 - -Therefore it looks as a valid gfortran FSF GCC HEAD bug so provided -a hand-patched .S file for i386; patched GDB PASSes with it. - -Thanks, -Jan - -2012-10-15 Siddhesh Poyarekar - Jan Kratochvil - - * gdb.fortran/array-bounds.exp: New test file. - * gdb.fortran/array-bounds.f: New test file. - * gdb.fortran/array-bounds.S: New test file. - -diff --git a/gdb/testsuite/gdb.fortran/array-bounds.S b/gdb/testsuite/gdb.fortran/array-bounds.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/array-bounds.S -@@ -0,0 +1,529 @@ -+/* Copyright 2012 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . -+ -+ This file is part of the gdb testsuite. */ -+ -+ .file "array-bounds.f" -+ .text -+.Ltext0: -+ .type MAIN__, @function -+MAIN__: -+.LFB0: -+ .file 1 "gdb.fortran/array-bounds.f" -+ # gdb.fortran/array-bounds.f:16 -+ .loc 1 16 0 -+ .cfi_startproc -+# BLOCK 2 seq:0 -+# PRED: ENTRY (FALLTHRU) -+ pushl %ebp -+.LCFI0: -+ .cfi_def_cfa_offset 8 -+ .cfi_offset 5, -8 -+ movl %esp, %ebp -+.LCFI1: -+ .cfi_def_cfa_register 5 -+ subl $40, %esp -+.LBB2: -+# SUCC: 3 (FALLTHRU) -+ # gdb.fortran/array-bounds.f:18 -+ .loc 1 18 0 -+ movl $-1, %eax -+# BLOCK 3 seq:1 -+# PRED: 2 (FALLTHRU) 4 [100.0%] -+.L3: -+ # gdb.fortran/array-bounds.f:18 -+ .loc 1 18 0 is_stmt 0 discriminator 1 -+ testl %eax, %eax -+# SUCC: 5 4 (FALLTHRU) -+ jg .L2 -+# BLOCK 4 seq:2 -+# PRED: 3 (FALLTHRU) -+ # gdb.fortran/array-bounds.f:18 -+ .loc 1 18 0 discriminator 2 -+ leal 1(%eax), %ecx -+ movl .LC0, %edx -+ movl %edx, -16(%ebp,%ecx,4) -+ addl $1, %eax -+# SUCC: 3 [100.0%] -+ jmp .L3 -+# BLOCK 5 seq:3 -+# PRED: 3 -+.L2: -+.LBE2: -+ # gdb.fortran/array-bounds.f:19 -+ .loc 1 19 0 is_stmt 1 -+ movl -16(%ebp), %eax -+ movl -12(%ebp), %edx -+ movl %eax, -24(%ebp) -+ movl %edx, -20(%ebp) -+ # gdb.fortran/array-bounds.f:20 -+ .loc 1 20 0 -+ movl $0, 4(%esp) -+ movl $0, (%esp) -+# SUCC: -+ call _gfortran_stop_string -+ .cfi_endproc -+.LFE0: -+ .size MAIN__, .-MAIN__ -+ .globl main -+ .type main, @function -+main: -+.LFB1: -+ # gdb.fortran/array-bounds.f:21 -+ .loc 1 21 0 -+ .cfi_startproc -+# BLOCK 2 seq:0 -+# PRED: ENTRY (FALLTHRU) -+ pushl %ebp -+.LCFI2: -+ .cfi_def_cfa_offset 8 -+ .cfi_offset 5, -8 -+ movl %esp, %ebp -+.LCFI3: -+ .cfi_def_cfa_register 5 -+ andl $-16, %esp -+ subl $16, %esp -+ # gdb.fortran/array-bounds.f:21 -+ .loc 1 21 0 -+ movl 12(%ebp), %eax -+ movl %eax, 4(%esp) -+ movl 8(%ebp), %eax -+ movl %eax, (%esp) -+ call _gfortran_set_args -+ movl $options.1.1824, 4(%esp) -+ movl $7, (%esp) -+ call _gfortran_set_options -+ call MAIN__ -+ movl $0, %eax -+ leave -+.LCFI4: -+ .cfi_restore 5 -+ .cfi_def_cfa 4, 4 -+# SUCC: EXIT [100.0%] -+ ret -+ .cfi_endproc -+.LFE1: -+ .size main, .-main -+ .section .rodata -+ .align 4 -+ .type options.1.1824, @object -+ .size options.1.1824, 28 -+options.1.1824: -+ .long 68 -+ .long 1023 -+ .long 0 -+ .long 0 -+ .long 1 -+ .long 1 -+ .long 0 -+ .align 4 -+.LC0: -+ .long 1109917696 -+ .text -+.Letext0: -+ .section .debug_info,"",@progbits -+.Ldebug_info0: -+ .long 2f - 1f # Length of Compilation Unit Info -+1: -+ .value 0x2 # DWARF version number -+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section -+ .byte 0x4 # Pointer Size (in bytes) -+dieb: .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) -+ .long .LASF5 # DW_AT_producer: "GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude" -+ .byte 0xe # DW_AT_language -+ .byte 0x2 # DW_AT_identifier_case -+ .long .LASF6 # DW_AT_name: "gdb.fortran/array-bounds.f" -+ .long .LASF7 # DW_AT_comp_dir: "" -+ .long .Ltext0 # DW_AT_low_pc -+ .long .Letext0 # DW_AT_high_pc -+ .long .Ldebug_line0 # DW_AT_stmt_list -+die26: .uleb128 0x2 # (DIE (0x26) DW_TAG_subprogram) -+ .long .LASF8 # DW_AT_name: "MAIN__" -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x10 # DW_AT_decl_line -+ .long .LFB0 # DW_AT_low_pc -+ .long .LFE0 # DW_AT_high_pc -+ .long .LLST0 # DW_AT_frame_base -+ .byte 0x1 # DW_AT_GNU_all_tail_call_sites -+ .byte 0x1 # DW_AT_main_subprogram -+ .byte 0x2 # DW_AT_calling_convention -+ .long die66 - .Ldebug_info0 # DW_AT_sibling -+die40: .uleb128 0x3 # (DIE (0x40) DW_TAG_variable) -+ .ascii "bar\0" # DW_AT_name -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x11 # DW_AT_decl_line -+ .long die66 - .Ldebug_info0 # DW_AT_type -+ .byte 0x2 # DW_AT_location -+ .byte 0x91 # DW_OP_fbreg -+ .sleb128 -24 -+die4e: .uleb128 0x3 # (DIE (0x4e) DW_TAG_variable) -+ .ascii "foo\0" # DW_AT_name -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x10 # DW_AT_decl_line -+ .long die88 - .Ldebug_info0 # DW_AT_type -+ .byte 0x2 # DW_AT_location -+ .byte 0x91 # DW_OP_fbreg -+ .sleb128 -32 -+die5c: .uleb128 0x4 # (DIE (0x5c) DW_TAG_lexical_block) -+ .long .LBB2 # DW_AT_low_pc -+ .long .LBE2 # DW_AT_high_pc -+ .byte 0 # end of children of DIE 0x26 -+die66: .uleb128 0x5 # (DIE (0x66) DW_TAG_array_type) -+ .long die81 - .Ldebug_info0 # DW_AT_type -+ .long die7a - .Ldebug_info0 # DW_AT_sibling -+die6f: .uleb128 0x6 # (DIE (0x6f) DW_TAG_subrange_type) -+ .long die7a - .Ldebug_info0 # DW_AT_type -+#if 0 -+ .long 0xffffffff # DW_AT_lower_bound -+ .byte 0 # DW_AT_upper_bound -+#else -+ .quad 0xfffffffeffffffff # DW_AT_lower_bound -+ .quad 0xffffffff00000000 # DW_AT_upper_bound -+#endif -+ .byte 0 # end of children of DIE 0x66 -+die7a: .uleb128 0x7 # (DIE (0x7a) DW_TAG_base_type) -+#if 0 -+ .byte 0x4 # DW_AT_byte_size -+#else -+ .byte 0x8 # DW_AT_byte_size -+#endif -+ .byte 0x5 # DW_AT_encoding -+ .long .LASF0 # DW_AT_name: "integer(kind=4)" -+die81: .uleb128 0x7 # (DIE (0x81) DW_TAG_base_type) -+ .byte 0x4 # DW_AT_byte_size -+ .byte 0x4 # DW_AT_encoding -+ .long .LASF1 # DW_AT_name: "real(kind=4)" -+die88: .uleb128 0x5 # (DIE (0x88) DW_TAG_array_type) -+ .long die81 - .Ldebug_info0 # DW_AT_type -+ .long die99 - .Ldebug_info0 # DW_AT_sibling -+die91: .uleb128 0x8 # (DIE (0x91) DW_TAG_subrange_type) -+ .long die7a - .Ldebug_info0 # DW_AT_type -+#if 0 -+ .byte 0 # DW_AT_lower_bound -+ .byte 0x1 # DW_AT_upper_bound -+#else -+ .quad 0x100000000 # DW_AT_lower_bound -+ .quad 0x100000001 # DW_AT_upper_bound -+#endif -+ .byte 0 # end of children of DIE 0x88 -+die99: .uleb128 0x9 # (DIE (0x99) DW_TAG_subprogram) -+ .byte 0x1 # DW_AT_external -+ .long .LASF9 # DW_AT_name: "main" -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x15 # DW_AT_decl_line -+ .long die7a - .Ldebug_info0 # DW_AT_type -+ .long .LFB1 # DW_AT_low_pc -+ .long .LFE1 # DW_AT_high_pc -+ .long .LLST1 # DW_AT_frame_base -+ .byte 0x1 # DW_AT_GNU_all_tail_call_sites -+ .long died4 - .Ldebug_info0 # DW_AT_sibling -+dieb6: .uleb128 0xa # (DIE (0xb6) DW_TAG_formal_parameter) -+ .long .LASF2 # DW_AT_name: "argc" -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x15 # DW_AT_decl_line -+ .long died4 - .Ldebug_info0 # DW_AT_type -+ .byte 0x2 # DW_AT_location -+ .byte 0x91 # DW_OP_fbreg -+ .sleb128 0 -+diec4: .uleb128 0xa # (DIE (0xc4) DW_TAG_formal_parameter) -+ .long .LASF3 # DW_AT_name: "argv" -+ .byte 0x1 # DW_AT_decl_file (gdb.fortran/array-bounds.f) -+ .byte 0x15 # DW_AT_decl_line -+ .long died9 - .Ldebug_info0 # DW_AT_type -+ .byte 0x3 # DW_AT_location -+ .byte 0x91 # DW_OP_fbreg -+ .sleb128 4 -+ .byte 0x6 # DW_OP_deref -+ .byte 0 # end of children of DIE 0x99 -+died4: .uleb128 0xb # (DIE (0xd4) DW_TAG_const_type) -+ .long die7a - .Ldebug_info0 # DW_AT_type -+died9: .uleb128 0xc # (DIE (0xd9) DW_TAG_pointer_type) -+ .byte 0x4 # DW_AT_byte_size -+ .long diedf - .Ldebug_info0 # DW_AT_type -+diedf: .uleb128 0x7 # (DIE (0xdf) DW_TAG_base_type) -+ .byte 0x1 # DW_AT_byte_size -+ .byte 0x8 # DW_AT_encoding -+ .long .LASF4 # DW_AT_name: "character(kind=1)" -+ .byte 0 # end of children of DIE 0xb -+2: -+ .section .debug_abbrev,"",@progbits -+.Ldebug_abbrev0: -+ .uleb128 0x1 # (abbrev code) -+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit) -+ .byte 0x1 # DW_children_yes -+ .uleb128 0x25 # (DW_AT_producer) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x13 # (DW_AT_language) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x42 # (DW_AT_identifier_case) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x1b # (DW_AT_comp_dir) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x10 # (DW_AT_stmt_list) -+ .uleb128 0x6 # (DW_FORM_data4) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x2 # (abbrev code) -+ .uleb128 0x2e # (TAG: DW_TAG_subprogram) -+ .byte 0x1 # DW_children_yes -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x3a # (DW_AT_decl_file) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3b # (DW_AT_decl_line) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x40 # (DW_AT_frame_base) -+ .uleb128 0x6 # (DW_FORM_data4) -+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites) -+ .uleb128 0xc # (DW_FORM_flag) -+ .uleb128 0x6a # (DW_AT_main_subprogram) -+ .uleb128 0xc # (DW_FORM_flag) -+ .uleb128 0x36 # (DW_AT_calling_convention) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x1 # (DW_AT_sibling) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x3 # (abbrev code) -+ .uleb128 0x34 # (TAG: DW_TAG_variable) -+ .byte 0 # DW_children_no -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0x8 # (DW_FORM_string) -+ .uleb128 0x3a # (DW_AT_decl_file) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3b # (DW_AT_decl_line) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .uleb128 0x2 # (DW_AT_location) -+ .uleb128 0xa # (DW_FORM_block1) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x4 # (abbrev code) -+ .uleb128 0xb # (TAG: DW_TAG_lexical_block) -+ .byte 0 # DW_children_no -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x5 # (abbrev code) -+ .uleb128 0x1 # (TAG: DW_TAG_array_type) -+ .byte 0x1 # DW_children_yes -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .uleb128 0x1 # (DW_AT_sibling) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x6 # (abbrev code) -+ .uleb128 0x21 # (TAG: DW_TAG_subrange_type) -+ .byte 0 # DW_children_no -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+#if 0 -+ .uleb128 0x22 # (DW_AT_lower_bound) -+ .uleb128 0x6 # (DW_FORM_data4) -+ .uleb128 0x2f # (DW_AT_upper_bound) -+ .uleb128 0xb # (DW_FORM_data1) -+#else -+ .uleb128 0x22 # (DW_AT_lower_bound) -+ .uleb128 0x7 # (DW_FORM_data8) -+ .uleb128 0x2f # (DW_AT_upper_bound) -+ .uleb128 0x7 # (DW_FORM_data8) -+#endif -+ .byte 0 -+ .byte 0 -+ .uleb128 0x7 # (abbrev code) -+ .uleb128 0x24 # (TAG: DW_TAG_base_type) -+ .byte 0 # DW_children_no -+ .uleb128 0xb # (DW_AT_byte_size) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3e # (DW_AT_encoding) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .byte 0 -+ .byte 0 -+ .uleb128 0x8 # (abbrev code) -+ .uleb128 0x21 # (TAG: DW_TAG_subrange_type) -+ .byte 0 # DW_children_no -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+#if 0 -+ .uleb128 0x22 # (DW_AT_lower_bound) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x2f # (DW_AT_upper_bound) -+ .uleb128 0xb # (DW_FORM_data1) -+#else -+ .uleb128 0x22 # (DW_AT_lower_bound) -+ .uleb128 0x7 # (DW_FORM_data8) -+ .uleb128 0x2f # (DW_AT_upper_bound) -+ .uleb128 0x7 # (DW_FORM_data8) -+#endif -+ .byte 0 -+ .byte 0 -+ .uleb128 0x9 # (abbrev code) -+ .uleb128 0x2e # (TAG: DW_TAG_subprogram) -+ .byte 0x1 # DW_children_yes -+ .uleb128 0x3f # (DW_AT_external) -+ .uleb128 0xc # (DW_FORM_flag) -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x3a # (DW_AT_decl_file) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3b # (DW_AT_decl_line) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .uleb128 0x11 # (DW_AT_low_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x12 # (DW_AT_high_pc) -+ .uleb128 0x1 # (DW_FORM_addr) -+ .uleb128 0x40 # (DW_AT_frame_base) -+ .uleb128 0x6 # (DW_FORM_data4) -+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites) -+ .uleb128 0xc # (DW_FORM_flag) -+ .uleb128 0x1 # (DW_AT_sibling) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .byte 0 -+ .byte 0 -+ .uleb128 0xa # (abbrev code) -+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter) -+ .byte 0 # DW_children_no -+ .uleb128 0x3 # (DW_AT_name) -+ .uleb128 0xe # (DW_FORM_strp) -+ .uleb128 0x3a # (DW_AT_decl_file) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x3b # (DW_AT_decl_line) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .uleb128 0x2 # (DW_AT_location) -+ .uleb128 0xa # (DW_FORM_block1) -+ .byte 0 -+ .byte 0 -+ .uleb128 0xb # (abbrev code) -+ .uleb128 0x26 # (TAG: DW_TAG_const_type) -+ .byte 0 # DW_children_no -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .byte 0 -+ .byte 0 -+ .uleb128 0xc # (abbrev code) -+ .uleb128 0xf # (TAG: DW_TAG_pointer_type) -+ .byte 0 # DW_children_no -+ .uleb128 0xb # (DW_AT_byte_size) -+ .uleb128 0xb # (DW_FORM_data1) -+ .uleb128 0x49 # (DW_AT_type) -+ .uleb128 0x13 # (DW_FORM_ref4) -+ .byte 0 -+ .byte 0 -+ .byte 0 -+ .section .debug_loc,"",@progbits -+.Ldebug_loc0: -+.LLST0: -+ .long .LFB0-.Ltext0 # Location list begin address (*.LLST0) -+ .long .LCFI0-.Ltext0 # Location list end address (*.LLST0) -+ .value 0x2 # Location expression size -+ .byte 0x74 # DW_OP_breg4 -+ .sleb128 4 -+ .long .LCFI0-.Ltext0 # Location list begin address (*.LLST0) -+ .long .LCFI1-.Ltext0 # Location list end address (*.LLST0) -+ .value 0x2 # Location expression size -+ .byte 0x74 # DW_OP_breg4 -+ .sleb128 8 -+ .long .LCFI1-.Ltext0 # Location list begin address (*.LLST0) -+ .long .LFE0-.Ltext0 # Location list end address (*.LLST0) -+ .value 0x2 # Location expression size -+ .byte 0x75 # DW_OP_breg5 -+ .sleb128 8 -+ .long 0 # Location list terminator begin (*.LLST0) -+ .long 0 # Location list terminator end (*.LLST0) -+.LLST1: -+ .long .LFB1-.Ltext0 # Location list begin address (*.LLST1) -+ .long .LCFI2-.Ltext0 # Location list end address (*.LLST1) -+ .value 0x2 # Location expression size -+ .byte 0x74 # DW_OP_breg4 -+ .sleb128 4 -+ .long .LCFI2-.Ltext0 # Location list begin address (*.LLST1) -+ .long .LCFI3-.Ltext0 # Location list end address (*.LLST1) -+ .value 0x2 # Location expression size -+ .byte 0x74 # DW_OP_breg4 -+ .sleb128 8 -+ .long .LCFI3-.Ltext0 # Location list begin address (*.LLST1) -+ .long .LCFI4-.Ltext0 # Location list end address (*.LLST1) -+ .value 0x2 # Location expression size -+ .byte 0x75 # DW_OP_breg5 -+ .sleb128 8 -+ .long .LCFI4-.Ltext0 # Location list begin address (*.LLST1) -+ .long .LFE1-.Ltext0 # Location list end address (*.LLST1) -+ .value 0x2 # Location expression size -+ .byte 0x74 # DW_OP_breg4 -+ .sleb128 4 -+ .long 0 # Location list terminator begin (*.LLST1) -+ .long 0 # Location list terminator end (*.LLST1) -+ .section .debug_aranges,"",@progbits -+ .long 0x1c # Length of Address Ranges Info -+ .value 0x2 # DWARF Version -+ .long .Ldebug_info0 # Offset of Compilation Unit Info -+ .byte 0x4 # Size of Address -+ .byte 0 # Size of Segment Descriptor -+ .value 0 # Pad to 8 byte boundary -+ .value 0 -+ .long .Ltext0 # Address -+ .long .Letext0-.Ltext0 # Length -+ .long 0 -+ .long 0 -+ .section .debug_line,"",@progbits -+.Ldebug_line0: -+ .section .debug_str,"MS",@progbits,1 -+.LASF4: -+ .string "character(kind=1)" -+.LASF5: -+ .string "GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude" -+.LASF7: -+ .string "" -+.LASF0: -+#if 0 -+ .string "integer(kind=4)" -+#else -+ .string "integer(kind=8)" -+#endif -+.LASF9: -+ .string "main" -+.LASF8: -+ .string "MAIN__" -+.LASF6: -+ .string "gdb.fortran/array-bounds.f" -+.LASF2: -+ .string "argc" -+.LASF1: -+ .string "real(kind=4)" -+.LASF3: -+ .string "argv" -+ .ident "GCC: (GNU) 4.8.0 20121015 (experimental)" -+ .section .note.GNU-stack,"",@progbits -diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/array-bounds.exp -@@ -0,0 +1,43 @@ -+# Copyright 2012 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+# This file is part of the gdb testsuite. It contains test to ensure that -+# array bounds accept LONGEST. -+ -+if { [skip_fortran_tests] } { return -1 } -+ -+set testfile "array-bounds" -+ -+if { [is_ilp32_target] && ([istarget "i\[34567\]86-*-linux*"] -+ || [istarget "x86_64-*-linux*"]) } { -+ set srcfile ${testfile}.S -+ set opts {nodebug f90} -+} else { -+ set srcfile ${testfile}.f -+ set opts {debug f90} -+} -+ -+if {[prepare_for_testing $testfile.exp $testfile $srcfile $opts]} { -+ print "compile failed" -+ return -1 -+} -+ -+if { ![runto MAIN__] } { -+ perror "Could not run to breakpoint `MAIN__'." -+ continue -+} -+ -+gdb_test "print &foo" {.*\(4294967296:4294967297\).*} -+gdb_test "print &bar" {.*\(-4294967297:-4294967296\).*} -diff --git a/gdb/testsuite/gdb.fortran/array-bounds.f b/gdb/testsuite/gdb.fortran/array-bounds.f -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/array-bounds.f -@@ -0,0 +1,22 @@ -+c Copyright 2012 Free Software Foundation, Inc. -+ -+c This program is free software; you can redistribute it and/or modify -+c it under the terms of the GNU General Public License as published by -+c the Free Software Foundation; either version 3 of the License, or -+c (at your option) any later version. -+c -+c This program is distributed in the hope that it will be useful, -+c but WITHOUT ANY WARRANTY; without even the implied warranty of -+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+c GNU General Public License for more details. -+c -+c You should have received a copy of the GNU General Public License -+c along with this program. If not, see . -+ -+ dimension foo(4294967296_8:4294967297_8) -+ dimension bar(-4294967297_8:-4294967296_8) -+ bar = 42 -+ foo=bar -+ stop -+ end -+ diff --git a/gdb-rhbz795424-bitpos-25of25.patch b/gdb-rhbz795424-bitpos-25of25.patch deleted file mode 100644 index 73f057a..0000000 --- a/gdb-rhbz795424-bitpos-25of25.patch +++ /dev/null @@ -1,140 +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-rhbz795424-bitpos-25of25.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -http://sourceware.org/ml/gdb-patches/2012-08/msg00562.html - ---MP_/90J7bck2fqDySEX9JkZtaqL -Content-Type: text/plain; charset=US-ASCII -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Hi, - -Range bounds for a gdb type can have LONGEST values for low and high -bounds. Fortran range bounds functions however use only int. The larger -ranges don't compile by default on gcc, but it is possible to override -the check in the compiler by using -fno-range-check. As a result, this -check is necessary so that we don't print junk in case of an overflow. - -Attached patch does this expansion and also includes a test case that -verifies that the problem is fixed. I have also verified on x86_64 that -this patch does not cause any regressions. - -Regards, -Siddhesh - -gdb/ChangeLog: - - * f-lang.h (f77_get_upperbound): Return LONGEST. - (f77_get_lowerbound): Likewise. - * f-typeprint.c (f_type_print_varspec_suffix): Expand - UPPER_BOUND and LOWER_BOUND to LONGEST. Use plongest to format - print them. - (f_type_print_base): Expand UPPER_BOUND to LONGEST. Use - plongest to format print it. - * f-valprint.c (f77_get_lowerbound): Return LONGEST. - (f77_get_upperbound): Likewise. - (f77_get_dynamic_length_of_aggregate): Expand UPPER_BOUND, - LOWER_BOUND to LONGEST. - (f77_create_arrayprint_offset_tbl): Likewise. - -testsuite/ChangeLog: - - * gdb.fortran/array-bounds.exp: New test case. - * gdb.fortran/array-bounds.f: New test case. - ---MP_/90J7bck2fqDySEX9JkZtaqL -Content-Type: text/x-patch -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; filename=f77-bounds.patch - -diff --git a/gdb/f-lang.h b/gdb/f-lang.h ---- a/gdb/f-lang.h -+++ b/gdb/f-lang.h -@@ -50,9 +50,9 @@ struct common_block - struct symbol *contents[1]; - }; - --extern int f77_get_upperbound (struct type *); -+extern LONGEST f77_get_upperbound (struct type *); - --extern int f77_get_lowerbound (struct type *); -+extern LONGEST f77_get_lowerbound (struct type *); - - extern void f77_get_dynamic_array_length (struct type *); - -diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c ---- a/gdb/f-typeprint.c -+++ b/gdb/f-typeprint.c -@@ -149,7 +149,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, - int show, int passed_a_ptr, int demangled_args, - int arrayprint_recurse_level, int print_rank_only) - { -- int upper_bound, lower_bound; -+ LONGEST upper_bound, lower_bound; - - /* No static variables are permitted as an error call may occur during - execution of this function. */ -@@ -196,7 +196,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, - { - lower_bound = f77_get_lowerbound (type); - if (lower_bound != 1) /* Not the default. */ -- fprintf_filtered (stream, "%d:", lower_bound); -+ fprintf_filtered (stream, "%s:", plongest (lower_bound)); - - /* Make sure that, if we have an assumed size array, we - print out a warning and print the upperbound as '*'. */ -@@ -206,7 +206,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, - else - { - upper_bound = f77_get_upperbound (type); -- fprintf_filtered (stream, "%d", upper_bound); -+ fprintf_filtered (stream, "%s", plongest (upper_bound)); - } - } - -@@ -278,7 +278,7 @@ void - f_type_print_base (struct type *type, struct ui_file *stream, int show, - int level) - { -- int upper_bound; -+ LONGEST upper_bound; - int index; - - QUIT; -@@ -370,7 +370,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show, - else - { - upper_bound = f77_get_upperbound (type); -- fprintf_filtered (stream, "character*%d", upper_bound); -+ fprintf_filtered (stream, "character*%s", plongest (upper_bound)); - } - break; - -diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c ---- a/gdb/f-valprint.c -+++ b/gdb/f-valprint.c -@@ -41,7 +41,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; - /* Array which holds offsets to be applied to get a row's elements - for a given array. Array also holds the size of each subarray. */ - --int -+LONGEST - f77_get_lowerbound (struct type *type) - { - if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type)) -@@ -50,7 +50,7 @@ f77_get_lowerbound (struct type *type) - return TYPE_ARRAY_LOWER_BOUND_VALUE (type); - } - --int -+LONGEST - f77_get_upperbound (struct type *type) - { - if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) diff --git a/gdb-rhbz795424-bitpos-arrayview.patch b/gdb-rhbz795424-bitpos-arrayview.patch deleted file mode 100644 index 0529765..0000000 --- a/gdb-rhbz795424-bitpos-arrayview.patch +++ /dev/null @@ -1,60 +0,0 @@ -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; } -@@ -196,7 +196,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-rhbz795424-bitpos-lazyvalue.patch b/gdb-rhbz795424-bitpos-lazyvalue.patch deleted file mode 100644 index 0f5c2e8..0000000 --- a/gdb-rhbz795424-bitpos-lazyvalue.patch +++ /dev/null @@ -1,432 +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-rhbz795424-bitpos-lazyvalue.patch - -;; Fix `GDB cannot access struct member whose offset is larger than 256MB' -;; (RH BZ 795424). -;;=push - -diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.S b/gdb/testsuite/gdb.base/longest-types-64bit.S -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/longest-types-64bit.S -@@ -0,0 +1,249 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2012 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+ .file "longest-types-64bit.c" -+ .text -+.Ltext0: -+ .globl main -+main: -+ .comm f,8,8 -+.Letext0: -+ .file 1 "gdb.base/longest-types-64bit.c" -+ .section .debug_info,"",@progbits -+.Ldebug_info0: -+ .4byte 0x9a /* Length of Compilation Unit Info */ -+ .2byte 0x2 /* DWARF version number */ -+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */ -+ .byte 0x8 /* Pointer Size (in bytes) */ -+ .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */ -+ .4byte .LASF3 /* DW_AT_producer: "GNU C 4.7.3 20121109 (prerelease)" */ -+ .byte 0x1 /* DW_AT_language */ -+ .4byte .LASF4 /* DW_AT_name: "gdb.base/longest-types-64bit.c" */ -+ .4byte .LASF5 /* DW_AT_comp_dir: "" */ -+ .4byte .Ldebug_line0 /* DW_AT_stmt_list */ -+ .uleb128 0x2 /* (DIE (0x1d) DW_TAG_structure_type) */ -+ .ascii "foo\0" /* DW_AT_name */ -+ .4byte 0xff000002 /* DW_AT_byte_size */ -+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */ -+ .byte 0x12 /* DW_AT_decl_line */ -+ .4byte 0x4e /* DW_AT_sibling */ -+ .uleb128 0x3 /* (DIE (0x2c) DW_TAG_member) */ -+ .ascii "buf\0" /* DW_AT_name */ -+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */ -+ .byte 0x14 /* DW_AT_decl_line */ -+ .4byte 0x4e /* DW_AT_type */ -+ .byte 0x2 /* DW_AT_data_member_location */ -+ .byte 0x23 /* DW_OP_plus_uconst */ -+ .uleb128 0 -+ .uleb128 0x4 /* (DIE (0x3a) DW_TAG_member) */ -+ .4byte .LASF0 /* DW_AT_name: "buf2" */ -+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */ -+ .byte 0x15 /* DW_AT_decl_line */ -+ .4byte 0x73 /* DW_AT_type */ -+ .byte 0x7 /* DW_AT_data_member_location */ -+ .byte 0x23 /* DW_OP_plus_uconst */ -+ .uleb128 0xffff000000 -+ .byte 0 /* end of children of DIE 0x1d */ -+ .uleb128 0x5 /* (DIE (0x4e) DW_TAG_array_type) */ -+ .4byte 0x6c /* DW_AT_type */ -+ .4byte 0x65 /* DW_AT_sibling */ -+ .uleb128 0x6 /* (DIE (0x57) DW_TAG_subrange_type) */ -+ .4byte 0x65 /* DW_AT_type */ -+ .quad 0xfffeffffff /* DW_AT_upper_bound */ -+ .byte 0 /* end of children of DIE 0x4e */ -+ .uleb128 0x7 /* (DIE (0x65) DW_TAG_base_type) */ -+ .byte 0x8 /* DW_AT_byte_size */ -+ .byte 0x7 /* DW_AT_encoding */ -+ .4byte .LASF1 /* DW_AT_name: "sizetype" */ -+ .uleb128 0x7 /* (DIE (0x6c) DW_TAG_base_type) */ -+ .byte 0x1 /* DW_AT_byte_size */ -+ .byte 0x6 /* DW_AT_encoding */ -+ .4byte .LASF2 /* DW_AT_name: "char" */ -+ .uleb128 0x5 /* (DIE (0x73) DW_TAG_array_type) */ -+ .4byte 0x6c /* DW_AT_type */ -+ .4byte 0x83 /* DW_AT_sibling */ -+ .uleb128 0x8 /* (DIE (0x7c) DW_TAG_subrange_type) */ -+ .4byte 0x65 /* DW_AT_type */ -+ .byte 0x1 /* DW_AT_upper_bound */ -+ .byte 0 /* end of children of DIE 0x73 */ -+ .uleb128 0x9 /* (DIE (0x83) DW_TAG_variable) */ -+ .ascii "f\0" /* DW_AT_name */ -+ .byte 0x1 /* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */ -+ .byte 0x16 /* DW_AT_decl_line */ -+ .4byte 0x97 /* DW_AT_type */ -+ .byte 0x1 /* DW_AT_external */ -+ .byte 0x9 /* DW_AT_location */ -+ .byte 0x3 /* DW_OP_addr */ -+ .quad f -+ .uleb128 0xa /* (DIE (0x97) DW_TAG_pointer_type) */ -+ .byte 0x8 /* DW_AT_byte_size */ -+ .4byte 0x1d /* DW_AT_type */ -+ .byte 0 /* end of children of DIE 0xb */ -+ .section .debug_abbrev,"",@progbits -+.Ldebug_abbrev0: -+ .uleb128 0x1 /* (abbrev code) */ -+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */ -+ .byte 0x1 /* DW_children_yes */ -+ .uleb128 0x25 /* (DW_AT_producer) */ -+ .uleb128 0xe /* (DW_FORM_strp) */ -+ .uleb128 0x13 /* (DW_AT_language) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0xe /* (DW_FORM_strp) */ -+ .uleb128 0x1b /* (DW_AT_comp_dir) */ -+ .uleb128 0xe /* (DW_FORM_strp) */ -+ .uleb128 0x10 /* (DW_AT_stmt_list) */ -+ .uleb128 0x6 /* (DW_FORM_data4) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x2 /* (abbrev code) */ -+ .uleb128 0x13 /* (TAG: DW_TAG_structure_type) */ -+ .byte 0x1 /* DW_children_yes */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0x8 /* (DW_FORM_string) */ -+ .uleb128 0xb /* (DW_AT_byte_size) */ -+ .uleb128 0x6 /* (DW_FORM_data4) */ -+ .uleb128 0x3a /* (DW_AT_decl_file) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3b /* (DW_AT_decl_line) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x1 /* (DW_AT_sibling) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x3 /* (abbrev code) */ -+ .uleb128 0xd /* (TAG: DW_TAG_member) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0x8 /* (DW_FORM_string) */ -+ .uleb128 0x3a /* (DW_AT_decl_file) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3b /* (DW_AT_decl_line) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x38 /* (DW_AT_data_member_location) */ -+ .uleb128 0xa /* (DW_FORM_block1) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x4 /* (abbrev code) */ -+ .uleb128 0xd /* (TAG: DW_TAG_member) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0xe /* (DW_FORM_strp) */ -+ .uleb128 0x3a /* (DW_AT_decl_file) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3b /* (DW_AT_decl_line) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x38 /* (DW_AT_data_member_location) */ -+ .uleb128 0xa /* (DW_FORM_block1) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x5 /* (abbrev code) */ -+ .uleb128 0x1 /* (TAG: DW_TAG_array_type) */ -+ .byte 0x1 /* DW_children_yes */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x1 /* (DW_AT_sibling) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x6 /* (abbrev code) */ -+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x2f /* (DW_AT_upper_bound) */ -+ .uleb128 0x7 /* (DW_FORM_data8) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x7 /* (abbrev code) */ -+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0xb /* (DW_AT_byte_size) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3e /* (DW_AT_encoding) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0xe /* (DW_FORM_strp) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x8 /* (abbrev code) */ -+ .uleb128 0x21 /* (TAG: DW_TAG_subrange_type) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x2f /* (DW_AT_upper_bound) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0x9 /* (abbrev code) */ -+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0x3 /* (DW_AT_name) */ -+ .uleb128 0x8 /* (DW_FORM_string) */ -+ .uleb128 0x3a /* (DW_AT_decl_file) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x3b /* (DW_AT_decl_line) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .uleb128 0x3f /* (DW_AT_external) */ -+ .uleb128 0xc /* (DW_FORM_flag) */ -+ .uleb128 0x2 /* (DW_AT_location) */ -+ .uleb128 0xa /* (DW_FORM_block1) */ -+ .byte 0 -+ .byte 0 -+ .uleb128 0xa /* (abbrev code) */ -+ .uleb128 0xf /* (TAG: DW_TAG_pointer_type) */ -+ .byte 0 /* DW_children_no */ -+ .uleb128 0xb /* (DW_AT_byte_size) */ -+ .uleb128 0xb /* (DW_FORM_data1) */ -+ .uleb128 0x49 /* (DW_AT_type) */ -+ .uleb128 0x13 /* (DW_FORM_ref4) */ -+ .byte 0 -+ .byte 0 -+ .byte 0 -+ .section .debug_aranges,"",@progbits -+ .4byte 0x1c /* Length of Address Ranges Info */ -+ .2byte 0x2 /* DWARF Version */ -+ .4byte .Ldebug_info0 /* Offset of Compilation Unit Info */ -+ .byte 0x8 /* Size of Address */ -+ .byte 0 /* Size of Segment Descriptor */ -+ .2byte 0 /* Pad to 16 byte boundary */ -+ .2byte 0 -+ .quad 0 -+ .quad 0 -+ .section .debug_line,"",@progbits -+.Ldebug_line0: -+ .section .debug_str,"MS",@progbits,1 -+.LASF4: -+ .string "gdb.base/longest-types-64bit.c" -+.LASF3: -+ .string "GNU C 4.7.3 20121109 (prerelease)" -+.LASF0: -+ .string "buf2" -+.LASF1: -+ .string "sizetype" -+.LASF5: -+ .string "" -+.LASF2: -+ .string "char" -+ .ident "GCC: (GNU) 4.7.3 20121109 (prerelease)" -+ .section .note.GNU-stack,"",@progbits -diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu -@@ -0,0 +1,67 @@ -+begin 755 gdb.base/longest-types-64bit.bz2 -+M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_% -+M=VY7?F_[X`F]]SG7531-==V:Z-.FW;M.U7=';:UH@<&FD31,E3]J'HE-/TR@ -+M]4_5/32;%/U3]1--HU/U$#$R'I'J,FC0T-,)B'J#:CU,F@]0`/4:>F@CU/4, -+MA@$S2>IH!H`TR/0-$$:9`C(&FHU3VE-J;4\%,@>4T:#]49-J/4`>HT!H#3)^ -+MJ`!H-``T]0&@-```:'J``&@`:9!`R9,@&3(`#3!#0!H``-#$--`,@``T`T#( -+M:`:`&0&@::,0:-```:``-`E-$1#4-3:4]3R9-39(Q/)#3R-30:9#$T!D!H&@ -+M,CTGI!H#(#0T`#0``T`T`:``-``T`0,F3(!DR``TP0T`:``#0Q#30#(``-`- -+M`R&@&@!D!H&FC$&C0``&@`#0)%)H32>JGZ&!)Z1B1X@)DTVC4>H`&0:``R&@ -+M,C0:``T``,C0``!H``#(`T`:#0U^\?]7K8M.96V/2[?M*DC)>WIUF)H7T\$:KKRE&\Q -+M..M]L1*,!>D!X)RW,[,1I,9N%X-N&2+*:&)DJY4(VFQG%9K[/?J06WACF6-I -+MJ&JJ9,ZK4;X28M@[==%ME(A54:%>+3->MRK(G!8#TY>@E$6DR&<_5:C&/RZE -+MI,!E6#`;*8R*E@++*))U)[6=OKFM%'+$-H5\X@1D)_Y*"NKV. -+M&\F8?SXW^HQ:Y@(Q[.>PEG=]@^ -+M%C"3EZ/1X'H*02ZQH":6"@;8Z0LEW6)> -+M6^V=*`FB'5G4MD8L3J5XT#SW;J1]ZO+"SPIS%J(P46+Q=CC2$H-`-B&TD)M` -+M&A:066DA%AB0C6,460>M8B+$:-BR&@NM()F`S',,F8+#&0.SMOK@.G<'83N. -+MDA"#5-`JVC("1*TA;/M()&8J0+YH%IFV)+OA@4,`E?3M$[$@&Q`3]A!$&A(- -+M$PBT+2,@PU+2H9(T-H3N6'(2;""%2T*1I2P@`L?AG8&A!=31J7)1(9FB'8X= -+MWJ0S#YEG9K$.#.[L.[CNA"4JSJ^GK2*)UH=MC0.R8+E75'.09[G -+MMQ1*[GI:>#>K`_NZS:V6>$K;OX6#!!N'"2413$DTL&]7KY>B<3V5!!C8#X5+ -+MF%9X!8NOKM5 -+M+"N&P4.75C16!A9Q;:C.6N`WZDV=-]!,5PG]SNP[GV^L?YGI]7_'D8N?XV -+M'[7KZJWYVMXGBQS[`!)YI%3:D)I2!;%'R`W&YB<`9O2#F"C/)F;JK9P+@3&( -+MAH31[W)=YCODQDUKNM7A"3.C!2%CHTJNZ"Z\+#F-?(DLE>XAC%07B8;$%J_L -+MJPK48QC&,916=IM+<1&WRKLB6&Q2O79*!7S$,`7J8*!`!=K:5W550[NH9M#_ -+MKL!LT,&;59GZW7S"5Z4%`%&!`9"J9`0:IR&H=MTKT=PEYC$,4K90M9AT'%;_ -+MB0HVLE)(W&YWF,C:TURXO:`M[RX(A-GT97456Q4Z*HPU*4J:*[WU-4GD.9UV -+MSA#L4X[[*Y+)8IF.EO<.TP4IC2?(4HX)W1#:GOMOD2F;HM1BV#;PH[ -+M7:PJ-!#,!6N<3')-0C,>15'IZ>@U^CJJJ+>+>%%)%BBATD\)*F6&BLMIR&?\ -+MQ2_?33@"NR1/CN\:)>5DG6`>$;$3QA94'-3]*CU6YG])<=2)'GC"RP-RK&-3 -+MZDT-M_)R+F06DS?CR>E@^!,33"U6X<@OXO$Q>U$\T@IU'@T=>K`G7H8K5GLXMS3*^@JLVBHHE'.&?9RKC?Y`&&3J5!/C$++<@U#Q' -+M9R3I.$+S`%]-.UO>WH^C73F<&;RIJR+(Q@7(3PP*W[-O,,DD3S7BUK^I@D%* -+M`Y<*2TXJ&7;2'6'R.U>]0-="M`K+&N%/==N4U@9%@M1)U&251C($^S"WL"]T -+M-XN'D2[II3-$K%+&`3['O)%,8G*E%_8RV6A5B_4(2/?-AIC.\/>,YFJ<(G.8 -+MAVP?UN*=ME:7&T!C%)I:&4H:-5>&^!&0>A.O'0G'/6&ZZ964@04&=#DC`%&: -+MUNLOS?,?'T:T!8L80='M:96K4;JX)6.('1#J$.1/L)$IS<4/*'2D34 -+M/@J\BA(I2T40JS%9G8F!7U5_!#'U!+[7$ES&)@:*QAET-IBX6'_N5^7/#>@V -+MN3&,-6(AG[8&!8LV+F_U"W?/)+Y^,;=1K:SW28<0WA2"UPHP^8FG#R$!`Y`, -+MLF<`U*NNU\[6N03"*?I8D=K7.Z*H=A_37;S=LVC(BQ,58Q_\#G`'P*_-]T!G4$`V0BS]'S)D/;V7R?.2F?SF)N+2+#P2_G(49TCE&*UIVT-MP808VTVV-$(*`VT<%>%96AHOL`(7%SI2%-R -+M#G2F02VQQH-7KT3E05I9Z)E\$Y8ED1KU`(4QHT%B]1$F:F1&8DAN.Q4&*?F@ -+M.8D965.$PRHT5HD,G=G!KTF3D -+M94"&ZA-F,.19=8`\(Q;A07Q%!19*3#*F9Q+D(0K@V87@O.=7EJIM6`!4`>D! -+M)49QHA!BV+:4O@K00$$!5*6>A@2@4D)@R\"%$2F"O:24J*L(RP#N;O4K7I&2 -+M[#)KR47H-N[VJ%3>$`9,AF8QID&I3G+D`*]BX98B$2K":A7_\ -+M_]7LT!4,$NL5)NE>9[:MK2_/'GO:7"P`=P(\L]O?"-APH(834$,W!IJS+U1F1C.!D$!&KS^-6%F90PQ[F]F=$^QE\X+- -+M@.W*LPH_78B>MHH@69RU[*'1J@8QAC\KSV@IG\(;_CUW:ZR2.,0$E3LZ_^P= -+M<_DCP"Q<`;+_;YP#^U%&E^#2M%,T?F3UN^>TSH)GFL"\%RF[KNZ+[R+@<&.$ -+MC42)B96\1-.O_I).K7)X]W>EQ):4C(XB*+:S%0_37D^EBP+1HU(D?3"%_O2R -+M6-#X>AU#<$*!/,W6QC^;O^%]LR&_X'<8X$<3CUU_QFAJ;">H)2443GD4W!4# -+?<55!2^6_8J$)-O<>\H0U/6Q^>UG0%W)%.%"0P>X.^@`` -+` -+end -diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.c b/gdb/testsuite/gdb.base/longest-types-64bit.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/longest-types-64bit.c -@@ -0,0 +1,28 @@ -+/* This testcase is part of GDB, the GNU debugger. -+ -+ Copyright 2012 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+struct foo -+{ -+ char buf[0xffff000000]; -+ char buf2[2]; -+} *f; -+ -+int -+main (void) -+{ -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.base/longest-types-64bit.exp b/gdb/testsuite/gdb.base/longest-types-64bit.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/longest-types-64bit.exp -@@ -0,0 +1,59 @@ -+# This testcase is part of GDB, the GNU debugger. -+ -+# Copyright 2012 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+standard_testfile .c longest-types-64bit.S -+ -+proc test { name } { with_test_prefix $name { -+ # 64-bit array size should not overflow -+ gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0} -+ -+ # The offset should not overflow -+ gdb_test "print &f->buf2" {= \(char \(\*\)\[2\]\) 0xffff000000} -+}} -+ -+ -+# Test 64-bit file first as it is not compiled so its compilation never fails. -+ -+set file64bitbz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu -+set file64bit [standard_output_file ${testfile}] -+ -+if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} { -+ untested "failed uudecode or bzip2" -+ return -1 -+} -+file stat ${file64bit} file64bitstat -+if {$file64bitstat(size) != 9501} { -+ untested "uudecode or bzip2 produce invalid result" -+ return -1 -+} -+ -+clean_restart ${file64bit} -+ -+#if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile2 {nodebug}] } { -+# return -1 -+#} -+ -+test "64bit" -+ -+ -+# And here is the native build test. -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } { -+ return -1 -+} -+ -+test "native" diff --git a/gdb-vla-intel-fix-print-char-array.patch b/gdb-vla-intel-fix-print-char-array.patch index 944f82b..22d4553 100644 --- a/gdb-vla-intel-fix-print-char-array.patch +++ b/gdb-vla-intel-fix-print-char-array.patch @@ -22,7 +22,7 @@ And adjust its testcase. diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c -@@ -313,8 +313,22 @@ f_val_print (struct type *type, LONGEST embedded_offset, +@@ -313,8 +313,22 @@ f_val_print (struct type *type, int embedded_offset, original_value, &opts, 0, stream); } else diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index 7b0fbe3..3016e27 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 -@@ -2428,11 +2428,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, +@@ -2425,11 +2425,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, /* See dwarf2loc.h. */ int @@ -54,7 +54,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (prop == NULL) return 0; -@@ -2456,7 +2459,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2453,7 +2456,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, *value = value_as_address (val); } @@ -63,7 +63,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } break; -@@ -2478,7 +2481,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2475,7 +2478,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, if (!value_optimized_out (val)) { *value = value_as_address (val); @@ -72,7 +72,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } } -@@ -2486,8 +2489,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2483,8 +2486,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, case PROP_CONST: *value = prop->data.const_val; @@ -83,7 +83,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c case PROP_ADDR_OFFSET: { struct dwarf2_property_baton *baton -@@ -2508,11 +2511,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2505,11 +2508,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, val = value_at (baton->offset_info.type, pinfo->addr + baton->offset_info.offset); *value = value_as_address (val); @@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17751,7 +17751,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17784,7 +17784,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -17771,7 +17771,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17804,7 +17804,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -17804,6 +17806,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17837,6 +17839,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -17896,7 +17906,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17929,7 +17939,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -189,7 +189,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/eval.c b/gdb/eval.c --- a/gdb/eval.c +++ b/gdb/eval.c -@@ -377,29 +377,324 @@ init_array_element (struct value *array, struct value *element, +@@ -375,29 +375,324 @@ init_array_element (struct value *array, struct value *element, return index; } @@ -533,7 +533,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c } -@@ -1242,19 +1537,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, +@@ -1238,19 +1533,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, return eval_call (exp, noside, nargs, argvec, var_func_name, expect_type); } @@ -553,7 +553,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c struct value * evaluate_subexp_standard (struct type *expect_type, struct expression *exp, int *pos, -@@ -1949,33 +2231,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1945,33 +2227,8 @@ evaluate_subexp_standard (struct type *expect_type, switch (code) { case TYPE_CODE_ARRAY: @@ -588,7 +588,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2385,49 +2642,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2384,49 +2641,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -638,7 +638,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -3347,6 +3561,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3346,6 +3560,9 @@ calc_f77_array_dims (struct type *array_type) int ndimen = 1; struct type *tmp_type; @@ -723,7 +723,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c diff --git a/gdb/expression.h b/gdb/expression.h --- a/gdb/expression.h +++ b/gdb/expression.h -@@ -150,28 +150,27 @@ extern void dump_raw_expression (struct expression *, +@@ -164,28 +164,27 @@ extern void dump_raw_expression (struct expression *, struct ui_file *, const char *); extern void dump_prefix_expression (struct expression *, struct ui_file *); @@ -775,12 +775,12 @@ diff --git a/gdb/expression.h b/gdb/expression.h diff --git a/gdb/f-exp.y b/gdb/f-exp.y --- a/gdb/f-exp.y +++ b/gdb/f-exp.y -@@ -270,31 +270,63 @@ arglist : subrange +@@ -276,31 +276,63 @@ arglist : subrange arglist : arglist ',' exp %prec ABOVE_COMMA - { arglist_len++; } + { pstate->arglist_len++; } + | arglist ',' subrange %prec ABOVE_COMMA -+ { arglist_len++; } ++ { pstate->arglist_len++; } ; /* There are four sorts of subrange types in F90. */ @@ -1033,7 +1033,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/parse.c b/gdb/parse.c --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -990,24 +990,20 @@ operator_length_standard (const struct expression *expr, int endpos, +@@ -939,24 +939,20 @@ operator_length_standard (const struct expression *expr, int endpos, case OP_RANGE: oplen = 3; @@ -1072,7 +1072,7 @@ diff --git a/gdb/parse.c b/gdb/parse.c diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y -@@ -2475,24 +2475,28 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation, +@@ -2492,24 +2492,28 @@ rust_parser::convert_ast_to_expression (const struct rust_op *operation, case OP_RANGE: { @@ -1818,7 +1818,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -3792,56 +3792,195 @@ value_of_this_silent (const struct language_defn *lang) +@@ -3790,56 +3790,195 @@ value_of_this_silent (const struct language_defn *lang) struct value * value_slice (struct value *array, int lowbound, int length) diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index c2494e0..ead0b5f 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 -@@ -352,6 +352,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* +@@ -376,6 +376,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -45,7 +45,7 @@ diff --git a/gdb/NEWS b/gdb/NEWS diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c -@@ -652,6 +652,28 @@ c_value_print (struct value *val, struct ui_file *stream, +@@ -651,6 +651,28 @@ c_value_print (struct value *val, struct ui_file *stream, else { /* normal case */ @@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* memory allocation interface */ -@@ -13756,7 +13757,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13755,7 +13756,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -96,7 +96,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } cu->list_in_scope = cu->get_builder ()->get_local_symbols (); -@@ -16494,7 +16495,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -16493,7 +16494,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); @@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (!stride_ok) { complaint (_("unable to read array DW_AT_byte_stride " -@@ -17255,29 +17257,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17254,29 +17256,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -17645,7 +17708,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17678,7 +17741,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack -@@ -17656,14 +17720,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17689,14 +17753,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, if (attr_form_is_block (attr)) { @@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -17696,8 +17779,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17729,8 +17812,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -17808,7 +17911,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17841,7 +17944,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c complaint (_("Missing DW_AT_byte_stride " "- DIE at 0x%s [in module %s]"), sect_offset_str (die->sect_off), -@@ -17816,7 +17919,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17849,7 +17952,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -305,7 +305,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c else if (!low_default_is_valid) complaint (_("Missing DW_AT_lower_bound " "- DIE at %s [in module %s]"), -@@ -17825,10 +17928,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17858,10 +17961,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct attribute *attr_ub, *attr_count; attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu); @@ -318,7 +318,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -25394,7 +25497,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25446,7 +25549,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25408,7 +25511,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25460,7 +25563,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25420,7 +25523,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25472,7 +25575,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); @@ -392,9 +392,9 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c - int arrayprint_recurse_level) + int arrayprint_recurse_level, int print_rank_only) { - int upper_bound, lower_bound; - -@@ -183,34 +171,50 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, + /* No static variables are permitted as an error call may occur during + execution of this function. */ +@@ -181,36 +169,52 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, fprintf_filtered (stream, "("); if (type_not_associated (type)) @@ -426,48 +426,46 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c - if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY) - f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, - 0, 0, arrayprint_recurse_level); -- -- lower_bound = f77_get_lowerbound (type); -- if (lower_bound != 1) /* Not the default. */ -- fprintf_filtered (stream, "%d:", lower_bound); -- -- /* Make sure that, if we have an assumed size array, we -- print out a warning and print the upperbound as '*'. */ -- -- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) -- fprintf_filtered (stream, "*"); -- else -- { -- upper_bound = f77_get_upperbound (type); -- fprintf_filtered (stream, "%d", upper_bound); -- } -- -- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) -- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, -- 0, 0, arrayprint_recurse_level); -- } + { -+ lower_bound = f77_get_lowerbound (type); ++ LONGEST lower_bound = f77_get_lowerbound (type); + +- LONGEST lower_bound = f77_get_lowerbound (type); + if (lower_bound != 1) /* Not the default. */ -+ fprintf_filtered (stream, "%d:", lower_bound); -+ ++ fprintf_filtered (stream, "%s:", plongest (lower_bound)); + +- if (lower_bound != 1) /* Not the default. */ +- fprintf_filtered (stream, "%s:", plongest (lower_bound)); + /* Make sure that, if we have an assumed size array, we + print out a warning and print the upperbound as '*'. */ -+ + +- /* Make sure that, if we have an assumed size array, we +- print out a warning and print the upperbound as '*'. */ + if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) + fprintf_filtered (stream, "*"); + else + { -+ upper_bound = f77_get_upperbound (type); -+ fprintf_filtered (stream, "%d", upper_bound); ++ LONGEST upper_bound = f77_get_upperbound (type); + +- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) +- fprintf_filtered (stream, "*"); +- else +- { +- LONGEST upper_bound = f77_get_upperbound (type); ++ fprintf_filtered (stream, "%s", plongest (upper_bound)); + } + } -+ + +- fputs_filtered (plongest (upper_bound), stream); +- } + if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) + f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, + 0, 0, arrayprint_recurse_level, + print_rank_only); -+ + +- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) +- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, +- 0, 0, arrayprint_recurse_level); +- } if (arrayprint_recurse_level == 1) fprintf_filtered (stream, ")"); else @@ -1339,7 +1337,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valprint.c b/gdb/valprint.c --- a/gdb/valprint.c +++ b/gdb/valprint.c -@@ -1106,12 +1106,6 @@ value_check_printable (struct value *val, struct ui_file *stream, +@@ -1105,12 +1105,6 @@ value_check_printable (struct value *val, struct ui_file *stream, return 0; } diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index 63be80a..0a02caa 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -30,15 +30,7 @@ Jan diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - #include "common/underlying.h" - #include "common/byte-vector.h" - -@@ -2157,6 +2158,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2156,6 +2156,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, ctx.per_cu = per_cu; ctx.obj_address = 0; diff --git a/gdb.spec b/gdb.spec index 0b753c0..ba3cb01 100644 --- a/gdb.spec +++ b/gdb.spec @@ -22,7 +22,7 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20190321 +%global snapsrc 20190412 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} @@ -30,7 +30,7 @@ Version: 8.3.50.%{snapsrc} # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -1025,6 +1025,20 @@ fi %endif %changelog +* Fri Apr 12 2019 Sergio Durigan Junior - 8.3.50.20190412-5 +- Rebase to FSF GDB 8.3.50.20190412 (8.4pre). +- Adjust 'gdb-6.3-rh-testversion-20041202.patch'. +- Remove 'gdb-follow-child-stale-parent.patch'. +- Remove 'gdb-rhbz795424-bitpos-20of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-21of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-22of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-23of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-25of25.patch'. +- Remove 'gdb-rhbz795424-bitpos-25of25-test.patch'. +- Remove 'gdb-rhbz795424-bitpos-arrayview.patch'. +- Remove 'gdb-rhbz795424-bitpos-lazyvalue.patch'. +- Remove 'gdb-bz541866-rwatch-before-run.patch'. + * Fri Mar 29 2019 Sergio Durigan Junior - 8.3.50.20190321-4 - Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091). diff --git a/sources b/sources index eea1219..237db59 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 -SHA512 (gdb-8.3.50.20190321.tar.xz) = 4ab37571398418a3b5bc43cfe103ee585330bc3b076b113e3bf6c6c3ce5266b6e6b5040c1303ad0de62b8f4211df27e75795d7fce4fd1d9a96ec0308ace2fcf8 +SHA512 (gdb-8.3.50.20190412.tar.xz) = fbdc83b6e88d2d9489a25c1fbdf08764708e1558eb187f9a3a72bcc8fd058e98e9810f8f889044cf55b4165b9a3ac5d996d0a13a4e4d54823e485b354c1a2b0e