diff --git a/.gitignore b/.gitignore index f251f23..6f2afb0 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.20190802.tar.xz +/v2.0.1.tar.gz +/gdb-9.0.50.20191018.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 6ba54ef..9e6cfc0 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -399,18 +399,14 @@ Patch097: gdb-libexec-add-index.patch #=fedoratest Patch098: gdb-rhbz1398387-tab-crash-test.patch -# [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). -#=fedoratest -Patch099: gdb-testsuite-readline63-sigint.patch - # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher #=push -Patch100: gdb-archer.patch +Patch099: gdb-archer.patch # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd -Patch101: gdb-vla-intel-fix-print-char-array.patch +Patch100: gdb-vla-intel-fix-print-char-array.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch102: gdb-rhbz1553104-s390x-arch12-test.patch +Patch101: gdb-rhbz1553104-s390x-arch12-test.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index 48f09cd..202a5cc 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -99,4 +99,3 @@ %patch099 -p1 %patch100 -p1 %patch101 -p1 -%patch102 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index a94b831..dcedc4b 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -371367a95037cac795af5cdc589a2aa0c7a4dcd3 +39849b0503152de7447b3da67ed9fa45fa9ba5fd diff --git a/_patch_order b/_patch_order index 8af4c18..d76ea7f 100644 --- a/_patch_order +++ b/_patch_order @@ -96,7 +96,6 @@ gdb-rhbz1325795-framefilters-test.patch gdb-linux_perf-bundle.patch gdb-libexec-add-index.patch gdb-rhbz1398387-tab-crash-test.patch -gdb-testsuite-readline63-sigint.patch gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch index 5989399..0f37be1 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 -@@ -1745,7 +1745,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force +@@ -1744,7 +1744,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 \ -@@ -1794,7 +1794,25 @@ install-guile: +@@ -1793,7 +1793,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 \ -@@ -1817,6 +1835,18 @@ uninstall: force $(CONFIG_UNINSTALL) +@@ -1816,6 +1834,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 22c3c5c..1de3474 100644 --- a/gdb-6.3-rh-testversion-20041202.patch +++ b/gdb-6.3-rh-testversion-20041202.patch @@ -27,7 +27,7 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest diff --git a/gdb/top.c b/gdb/top.c --- a/gdb/top.c +++ b/gdb/top.c -@@ -2068,7 +2068,7 @@ init_gdb_version_vars (void) +@@ -2057,7 +2057,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; diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index 898c87a..ca476c4 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: diff --git a/gdb/printcmd.c b/gdb/printcmd.c --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -1202,6 +1202,10 @@ print_command_1 (const char *args, int voidprint) +@@ -1212,6 +1212,10 @@ print_command_1 (const char *args, int voidprint) if (exp != nullptr && *exp) { diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index e74c07f..655c4f1 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 -@@ -2624,6 +2624,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2647,6 +2647,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; -@@ -2632,6 +2633,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame, +@@ -2655,6 +2656,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; } -@@ -2765,6 +2770,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2788,6 +2793,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)); -@@ -2773,6 +2779,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, +@@ -2796,6 +2802,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame, /* This marks the outermost frame. */ return; } 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 5a4d7aa..8fdf169 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 -@@ -3155,6 +3155,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) +@@ -3133,6 +3133,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 78604b6..1e35eaa 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -120,7 +120,7 @@ diff --git a/gdb/gdbsupport/common-exceptions.h b/gdb/gdbsupport/common-exceptio diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -439,6 +439,34 @@ struct cmdarg +@@ -447,6 +447,34 @@ struct cmdarg char *string; }; @@ -155,7 +155,7 @@ diff --git a/gdb/main.c b/gdb/main.c static void captured_main_1 (struct captured_main_args *context) { -@@ -882,6 +910,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -887,6 +915,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++; } -@@ -1032,12 +1062,25 @@ captured_main_1 (struct captured_main_args *context) +@@ -1040,12 +1070,25 @@ captured_main_1 (struct captured_main_args *context) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 3a5e442..7b7a880 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -98,7 +98,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -3462,6 +3462,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, +@@ -3472,6 +3472,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { @@ -115,7 +115,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c static int warning_printed = 0; if (!warning_printed) { -@@ -3473,6 +3483,10 @@ to use the section anyway."), +@@ -3483,6 +3493,10 @@ to use the section anyway."), warning_printed = 1; } return 0; diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 7182246..02fc6d0 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -682,7 +682,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -255,6 +258,9 @@ +@@ -252,6 +255,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 @@ -715,7 +715,7 @@ diff --git a/gdb/configure b/gdb/configure enable_targets enable_64_bit_bfd enable_gdbmi -@@ -914,6 +920,11 @@ CCC +@@ -913,6 +919,11 @@ CCC CPP MAKEINFO MAKEINFOFLAGS @@ -727,7 +727,7 @@ diff --git a/gdb/configure b/gdb/configure YACC YFLAGS XMKMF' -@@ -1587,6 +1598,8 @@ Optional Packages: +@@ -1585,6 +1596,8 @@ Optional Packages: [--with-auto-load-dir] --without-auto-load-safe-path do not restrict auto-loaded files locations @@ -736,7 +736,7 @@ diff --git a/gdb/configure b/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1644,6 +1657,13 @@ Some influential environment variables: +@@ -1642,6 +1655,13 @@ Some influential environment variables: MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFOFLAGS Parameters for MAKEINFO. @@ -750,7 +750,7 @@ diff --git a/gdb/configure b/gdb/configure YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. -@@ -6503,6 +6523,494 @@ _ACEOF +@@ -6501,6 +6521,494 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -1451,7 +1451,7 @@ 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 -@@ -362,7 +362,7 @@ build_id_locate_exec (int from_tty) +@@ -363,7 +363,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index 66fe4a5..73b763a 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 -@@ -1342,14 +1342,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1346,14 +1346,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, } { @@ -44,7 +44,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c if (build_id != NULL) { char *name, *build_id_filename; -@@ -1364,23 +1377,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1368,23 +1381,7 @@ svr4_read_so_list (svr4_info *info, 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 48e59c1..25ce223 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -6,6 +6,30 @@ Subject: gdb-6.6-buildid-locate.patch ;; New locating of the matching binaries from the pure core file (build-id). ;;=push+jan +diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h +--- a/bfd/libbfd-in.h ++++ b/bfd/libbfd-in.h +@@ -127,7 +127,7 @@ static inline char * + bfd_strdup (const char *str) + { + size_t len = strlen (str) + 1; +- char *buf = bfd_malloc (len); ++ char *buf = (char *) bfd_malloc (len); + if (buf != NULL) + memcpy (buf, str, len); + return buf; +diff --git a/bfd/libbfd.h b/bfd/libbfd.h +--- a/bfd/libbfd.h ++++ b/bfd/libbfd.h +@@ -132,7 +132,7 @@ static inline char * + bfd_strdup (const char *str) + { + size_t len = strlen (str) + 1; +- char *buf = bfd_malloc (len); ++ char *buf = (char *) bfd_malloc (len); + if (buf != NULL) + memcpy (buf, str, len); + return buf; diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c @@ -371,7 +395,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + +static void build_id_addr_candidate (bfd *abfd, asection *sect, void *obj) +{ -+ if (build_id_addr >= bfd_section_vma (abfd, sect)) ++ if (build_id_addr >= bfd_section_vma (sect)) + { + struct build_id_addr_sect *candidate; + @@ -406,7 +430,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + candidate = candidate->next) + { + i_phdr = elf_get_phdr (core_bfd, -+ bfd_section_vma (core_bfd, candidate->sect), ++ bfd_section_vma (candidate->sect), + &e_phnum, &loadbase); + if (i_phdr != NULL) + break; @@ -687,7 +711,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + if (abfd == NULL) + return NULL; + -+ result = xstrdup (bfd_get_filename (abfd)); ++ result = xstrdup (bfd_get_filename (abfd.get ())); + return result; +} + @@ -954,11 +978,11 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c #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) +@@ -321,6 +325,49 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg) inferior_ptid = ptid; /* Yes, make it current. */ } -+static int build_id_core_loads = 1; ++static bool build_id_core_loads = true; + +static void +build_id_locate_exec (int from_tty) @@ -1004,7 +1028,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c /* Issue a message saying we have no core to debug, if FROM_TTY. */ static void -@@ -455,6 +502,14 @@ core_target_open (const char *arg, int from_tty) +@@ -456,6 +503,14 @@ core_target_open (const char *arg, int from_tty) switch_to_thread (thread); } @@ -1013,13 +1037,13 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c + loaded VDSO symbols. If it gets executed before bfd_map_over_sections + INFERIOR_PTID is still not set and libthread_db initialization crashes on + PID == 0 in ps_pglobal_lookup. */ -+ if (build_id_core_loads != 0) ++ if (build_id_core_loads != false) + build_id_locate_exec (from_tty); + post_create_inferior (target, from_tty); /* Now go through the target stack looking for threads since there -@@ -1061,4 +1116,11 @@ void +@@ -973,4 +1028,11 @@ void _initialize_corelow (void) { add_target (core_target_info, core_target_open, filename_completer); @@ -1034,7 +1058,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 -@@ -20581,6 +20581,27 @@ information files. +@@ -20699,6 +20699,27 @@ information files. @end table @@ -1087,7 +1111,7 @@ diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2683,7 +2683,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) +@@ -2693,7 +2693,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) } if (dwz_bfd == NULL) @@ -1096,7 +1120,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), -@@ -6192,7 +6192,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) +@@ -6227,7 +6227,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) static gdb::array_view get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) { @@ -1105,7 +1129,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (build_id == nullptr) return {}; -@@ -6205,7 +6205,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) +@@ -6240,7 +6240,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) static gdb::array_view get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) { @@ -1117,7 +1141,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/elfread.c b/gdb/elfread.c --- a/gdb/elfread.c +++ b/gdb/elfread.c -@@ -1284,7 +1284,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1298,7 +1298,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -1128,21 +1152,25 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c if (debugfile.empty ()) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1296,6 +1298,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -1310,8 +1312,12 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) symbol_file_add_separate (debug_bfd.get (), debugfile.c_str (), symfile_flags, objfile); } +- else +- has_dwarf2 = false; + /* Check if any separate debug info has been extracted out. */ + else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink") + != NULL) + debug_print_missing (objfile_name (objfile), build_id_filename.get ()); ++ else ++ has_dwarf2 = false; } - } + /* Read the CTF section only if there is no DWARF info. */ diff --git a/gdb/objfiles.h b/gdb/objfiles.h --- a/gdb/objfiles.h +++ b/gdb/objfiles.h -@@ -619,6 +619,10 @@ struct objfile +@@ -627,6 +627,10 @@ struct objfile htab_up static_links; }; @@ -1165,7 +1193,7 @@ diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c } catch (const gdb_exception &except) { -@@ -601,7 +601,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) +@@ -600,7 +600,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; @@ -1185,7 +1213,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); -@@ -1340,9 +1341,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1344,9 +1345,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm, continue; } @@ -1312,7 +1340,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 -@@ -1793,6 +1793,17 @@ proc default_gdb_start { } { +@@ -1841,6 +1841,17 @@ proc default_gdb_start { } { } } diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index 8bf061c..5d11284 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[] = { +@@ -2063,7 +2063,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 6dc98a2..13394af 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 -@@ -1675,7 +1675,13 @@ quit_force (int *exit_arg, int from_tty) +@@ -1664,7 +1664,13 @@ quit_force (int *exit_arg, int from_tty) qt.from_tty = from_tty; @@ -62,9 +62,9 @@ diff --git a/gdb/top.c b/gdb/top.c diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -101,6 +101,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; +@@ -102,6 +102,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; - static int debug_timestamp = 0; + static bool debug_timestamp = false; +#ifdef NEED_DETACH_SIGSTOP +/* Nonzero means we are already processing the quitting cleanups and we should @@ -73,6 +73,6 @@ diff --git a/gdb/utils.c b/gdb/utils.c +int quit_flag_cleanup; +#endif + - /* Nonzero means that strings with character values >0x7F should be printed - as octal escapes. Zero means just print the value (e.g. it's an + /* True means that strings with character values >0x7F should be printed + as octal escapes. False means just print the value (e.g. it's an international character, and the terminal or window can cope.) */ diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index 35f8cef..a3c3c87 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 -@@ -15386,6 +15386,50 @@ static struct cmd_list_element *enablebreaklist = NULL; +@@ -15377,6 +15377,50 @@ static struct cmd_list_element *enablebreaklist = NULL; cmd_list_element *commands_cmd_element = nullptr; @@ -75,7 +75,7 @@ diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h diff --git a/gdb/objfiles.c b/gdb/objfiles.c --- a/gdb/objfiles.c +++ b/gdb/objfiles.c -@@ -829,6 +829,11 @@ objfile_relocate1 (struct objfile *objfile, +@@ -827,6 +827,11 @@ objfile_relocate1 (struct objfile *objfile, obj_section_addr (s)); } diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index 5ed943f..de50795 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -24,7 +24,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h CORE_ADDR physaddr; const char *physname; -@@ -1450,6 +1452,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1455,6 +1457,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval) #define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname) @@ -32,7 +32,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block) #define SET_FIELD_BITPOS(thisfld, bitpos) \ -@@ -1461,6 +1464,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1466,6 +1469,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define SET_FIELD_PHYSNAME(thisfld, name) \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \ FIELD_STATIC_PHYSNAME (thisfld) = (name)) @@ -40,7 +40,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define SET_FIELD_PHYSADDR(thisfld, addr) \ (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \ FIELD_STATIC_PHYSADDR (thisfld) = (addr)) -@@ -1477,6 +1481,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); +@@ -1482,6 +1486,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n)) @@ -51,7 +51,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/value.c b/gdb/value.c --- a/gdb/value.c +++ b/gdb/value.c -@@ -2821,7 +2821,8 @@ value_static_field (struct type *type, int fieldno) +@@ -2829,7 +2829,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 4c93bbe..3d59f4f 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -33,26 +33,6 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in gdb/printer/__init__.py \ gdb/printer/bound_registers.py -diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo ---- a/gdb/doc/gdb.texinfo -+++ b/gdb/doc/gdb.texinfo -@@ -1252,6 +1252,16 @@ for remote debugging. - Run using @var{device} for your program's standard input and output. - @c FIXME: kingdon thinks there is more to -tty. Investigate. - -+@item -P -+@cindex @code{-P} -+@itemx --python -+@cindex @code{--python} -+Change interpretation of command line so that the argument immediately -+following this switch is taken to be the name of a Python script file. -+This option stops option processing; subsequent options are passed to -+Python as @code{sys.argv}. This option is only available if Python -+scripting support was enabled when @value{GDBN} was configured. -+ - @c resolve the situation of these eventually - @item -tui - @cindex @code{--tui} diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in --- a/gdb/gdb-gdb.gdb.in +++ b/gdb/gdb-gdb.gdb.in @@ -72,170 +52,6 @@ diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in if !$gdb_init_done set variable $gdb_init_done = 1 -diff --git a/gdb/main.c b/gdb/main.c ---- a/gdb/main.c -+++ b/gdb/main.c -@@ -33,6 +33,7 @@ - - #include "interps.h" - #include "main.h" -+#include "python/python.h" - #include "source.h" - #include "cli/cli-cmds.h" - #include "objfiles.h" -@@ -468,7 +469,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) - } - - static void --captured_main_1 (struct captured_main_args *context) -+captured_main_1 (struct captured_main_args *context, int &python_script) - { - int argc = context->argc; - char **argv = context->argv; -@@ -686,10 +687,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}, -+#if HAVE_PYTHON -+ {"python", no_argument, 0, 'P'}, -+ {"P", no_argument, 0, 'P'}, -+#endif - {0, no_argument, 0, 0} - }; - -- while (1) -+ while (!python_script) - { - int option_index; - -@@ -707,6 +712,9 @@ captured_main_1 (struct captured_main_args *context) - case 0: - /* Long option that just sets a flag. */ - break; -+ case 'P': -+ python_script = 1; -+ break; - case OPT_SE: - symarg = optarg; - execarg = optarg; -@@ -886,7 +894,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. */ -- if (set_args) -+ if (python_script) -+ { -+ /* The first argument is a python script to evaluate, and -+ subsequent arguments are passed to the script for -+ processing there. */ -+ if (optind >= argc) -+ { -+ fprintf_unfiltered (gdb_stderr, -+ _("%s: Python script file name required\n"), -+ argv[0]); -+ exit (1); -+ } -+ -+ /* FIXME: should handle inferior I/O intelligently here. -+ E.g., should be possible to run gdb in pipeline and have -+ Python (and gdb) output go to stderr or file; and if a -+ prompt is needed, open the tty. */ -+ quiet = 1; -+ /* FIXME: should read .gdbinit if, and only if, a prompt is -+ requested by the script. Though... maybe this is not -+ ideal? */ -+ /* FIXME: likewise, reading in history. */ -+ inhibit_gdbinit = 1; -+ } -+ else if (set_args) - { - /* The remaining options are the command-line options for the - inferior. The first one is the sym/exec file, and the rest -@@ -1187,7 +1219,8 @@ captured_main_1 (struct captured_main_args *context) - - /* Read in the old history after all the command files have been - read. */ -- init_history (); -+ if (!python_script) -+ init_history (); - - if (batch_flag) - { -@@ -1203,22 +1236,35 @@ static void - captured_main (void *data) - { - struct captured_main_args *context = (struct captured_main_args *) data; -+ int python_script = 0; - -- captured_main_1 (context); -+ captured_main_1 (context, python_script); - -- /* NOTE: cagney/1999-11-07: There is probably no reason for not -- moving this loop and the code found in captured_command_loop() -- into the command_loop() proper. The main thing holding back that -- change - SET_TOP_LEVEL() - has been eliminated. */ -- while (1) -+#if HAVE_PYTHON -+ if (python_script) - { -- try -- { -- captured_command_loop (); -- } -- catch (const gdb_exception &ex) -+ extern int pagination_enabled; -+ pagination_enabled = 0; -+ run_python_script (context->argc - optind, &context->argv[optind]); -+ return; -+ } -+ else -+#endif -+ { -+ /* NOTE: cagney/1999-11-07: There is probably no reason for not -+ moving this loop and the code found in captured_command_loop() -+ into the command_loop() proper. The main thing holding back that -+ change - SET_TOP_LEVEL() - has been eliminated. */ -+ while (1) - { -- exception_print (gdb_stderr, ex); -+ try -+ { -+ captured_command_loop (); -+ } -+ catch (const gdb_exception &ex) -+ { -+ exception_print (gdb_stderr, ex); -+ } - } - } - /* No exit -- exit is through quit_command. */ -@@ -1261,6 +1307,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\ -+ gdb [options] --args executable-file [inferior-arguments ...]\n"), stream); -+#if HAVE_PYTHON -+ fputs_unfiltered (_("\ -+ gdb [options] [--python|-P] script-file [script-arguments ...]\n"), stream); -+#endif -+ fputs_unfiltered (_("\n\ - gdb [options] --args executable-file [inferior-arguments ...]\n\n\ - "), stream); - fputs_unfiltered (_("\ -@@ -1306,6 +1358,13 @@ Output and user interface control:\n\n\ - #endif - fputs_unfiltered (_("\ - --dbx DBX compatibility mode.\n\ -+"), stream); -+#if HAVE_PYTHON -+ fputs_unfiltered (_("\ -+ --python, -P Following argument is Python script file; remaining\n\ -+ arguments are passed to script.\n"), stream); -+#endif -+ fputs_unfiltered (_("\ - -q, --quiet, --silent\n\ - Do not print version number on startup.\n\n\ - "), stream); diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py new file mode 100644 --- /dev/null @@ -330,132 +146,6 @@ new file mode 100644 + return wanted == found + +InScope () -diff --git a/gdb/python/python.c b/gdb/python/python.c ---- a/gdb/python/python.c -+++ b/gdb/python/python.c -@@ -94,6 +94,8 @@ const struct extension_language_defn extension_language_python = - #include "linespec.h" - #include "source.h" - #include "gdbsupport/version.h" -+#include "inferior.h" -+#include "gdbthread.h" - #include "target.h" - #include "gdbthread.h" - #include "interps.h" -@@ -1276,6 +1278,94 @@ gdbpy_print_stack_or_quit () - - - -+/* True if 'gdb -P' was used, false otherwise. */ -+static int running_python_script; -+ -+/* True if we are currently in a call to 'gdb.cli', false otherwise. */ -+static int in_cli; -+ -+/* Enter the command loop. */ -+ -+static PyObject * -+gdbpy_cli (PyObject *unused1, PyObject *unused2) -+{ -+ if (! running_python_script || in_cli) -+ return PyErr_Format (PyExc_RuntimeError, "cannot invoke CLI recursively"); -+ -+ if (current_uiout->is_mi_like_p ()) -+ return PyErr_Format (PyExc_RuntimeError, _("Cannot invoke CLI from MI.")); -+ -+ in_cli = 1; -+ /* See captured_command_loop. */ -+ -+ /* Give the interpreter a chance to print a prompt. */ -+ interp_pre_command_loop (top_level_interpreter ()); -+ -+ /* Now it's time to start the event loop. */ -+ start_event_loop (); -+ -+ in_cli = 0; -+ -+ Py_RETURN_NONE; -+} -+ -+/* Set up the Python argument vector and evaluate a script. This is -+ used to implement 'gdb -P'. */ -+ -+void -+run_python_script (int argc, char **argv) -+{ -+ FILE *input; -+ -+ /* We never free this, since we plan to exit at the end. */ -+ gdbpy_enter *env = new gdbpy_enter (get_current_arch (), current_language); -+ /* "Use" env, to suppress GCC warnings. */ -+ (void) env; -+ -+ running_python_script = 1; -+ -+#if PYTHON_ABI_VERSION < 3 -+ PySys_SetArgv (argc - 1, argv + 1); -+#else -+ { -+ wchar_t **wargv = (wchar_t **) alloca (sizeof (*wargv) * (argc + 1)); -+ int i; -+ -+ for (i = 1; i < argc; i++) -+ { -+ size_t len = mbstowcs (NULL, argv[i], 0); -+ /* Python-related GDB sources are built with -DNDEBUG -+ https://sourceware.org/bugzilla/show_bug.cgi?id=20445 */ -+ size_t len2 ATTRIBUTE_UNUSED; -+ -+ if (len == (size_t) -1) -+ { -+ fprintf (stderr, "Invalid multibyte argument #%d \"%s\"\n", -+ i, argv[i]); -+ exit (1); -+ } -+ wargv[i] = (wchar_t *) alloca (sizeof (**wargv) * (len + 1)); -+ len2 = mbstowcs (wargv[i], argv[i], len + 1); -+ assert (len2 == len); -+ } -+ wargv[argc] = NULL; -+ PySys_SetArgv (argc - 1, wargv + 1); -+ } -+#endif -+ -+ input = fopen (argv[0], "r"); -+ if (! input) -+ { -+ fprintf (stderr, "could not open %s: %s\n", argv[0], strerror (errno)); -+ exit (1); -+ } -+ PyRun_SimpleFile (input, argv[0]); -+ fclose (input); -+ exit (0); -+} -+ -+ -+ - /* Return a sequence holding all the Progspaces. */ - - static PyObject * -@@ -1927,6 +2017,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." }, -+ { "cli", gdbpy_cli, METH_NOARGS, -+ "Enter the gdb CLI" }, - { "parameter", gdbpy_parameter, METH_VARARGS, - "Return a gdb parameter's value" }, - -diff --git a/gdb/python/python.h b/gdb/python/python.h ---- a/gdb/python/python.h -+++ b/gdb/python/python.h -@@ -28,4 +28,6 @@ extern const struct extension_language_defn extension_language_python; - /* Command element for the 'python' command. */ - extern cmd_list_element *python_cmd_element; - -+extern void run_python_script (int argc, char **argv); -+ - #endif /* PYTHON_PYTHON_H */ diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -471,7 +161,7 @@ diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp -@@ -412,6 +412,15 @@ proc test_value_after_death {} { +@@ -419,6 +419,15 @@ proc test_value_after_death {} { "print value's type" } @@ -487,7 +177,7 @@ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py # Regression test for invalid subscript operations. The bug was that # the type of the value was not being checked before allowing a # subscript operation to proceed. -@@ -598,6 +607,7 @@ test_value_in_inferior +@@ -606,6 +615,7 @@ test_value_in_inferior test_value_from_buffer test_inferior_function_call test_value_after_death diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index c7f88d6..8186277 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -45,7 +45,7 @@ gdb/gdbserver/ diff --git a/gdb/config.in b/gdb/config.in --- a/gdb/config.in +++ b/gdb/config.in -@@ -261,6 +261,9 @@ +@@ -258,6 +258,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -55,7 +55,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -384,6 +387,9 @@ +@@ -381,6 +384,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -68,7 +68,7 @@ diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -15691,6 +15691,64 @@ cat >>confdefs.h <<_ACEOF +@@ -15647,6 +15647,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -136,7 +136,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -2017,6 +2017,10 @@ case $host_os in +@@ -2016,6 +2016,10 @@ case $host_os in esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -151,8 +151,8 @@ diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in --- a/gdb/gdbserver/config.in +++ b/gdb/gdbserver/config.in @@ -126,6 +126,9 @@ - /* Define to 1 if you have the `mcheck' library (-lmcheck). */ - #undef HAVE_LIBMCHECK + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL +/* Define to 1 if you have the `selinux' library (-lselinux). */ +#undef HAVE_LIBSELINUX @@ -173,7 +173,7 @@ diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure -@@ -8592,6 +8592,64 @@ if $want_ipa ; then +@@ -8525,6 +8525,64 @@ if $want_ipa ; then fi fi @@ -241,7 +241,7 @@ diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac -@@ -478,6 +478,10 @@ if $want_ipa ; then +@@ -469,6 +469,10 @@ if $want_ipa ; then fi fi @@ -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 -@@ -971,7 +971,16 @@ linux_ptrace_fun () +@@ -967,7 +967,16 @@ linux_ptrace_fun () { if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) < 0) @@ -276,7 +276,7 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -1095,7 +1095,16 @@ linux_nat_target::create_inferior (const char *exec_file, +@@ -1091,7 +1091,16 @@ linux_nat_target::create_inferior (const char *exec_file, /* Make sure we report all signals during startup. */ pass_signals ({}); diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 1630ff1..efbc91c 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 -@@ -1117,7 +1117,10 @@ captured_main_1 (struct captured_main_args *context) +@@ -1125,7 +1125,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 864152c..3fd1a32 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 -@@ -6462,6 +6462,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6460,6 +6460,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 -@@ -6495,6 +6505,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6493,6 +6503,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch index 73955f0..35eb798 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) +@@ -13904,7 +13904,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/gdb-fedora-libncursesw.patch b/gdb-fedora-libncursesw.patch index 5536b9a..b046633 100644 --- a/gdb-fedora-libncursesw.patch +++ b/gdb-fedora-libncursesw.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534 diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -9295,6 +9295,7 @@ if test x"$prefer_curses" = xyes; then +@@ -9293,6 +9293,7 @@ if test x"$prefer_curses" = xyes; then # search /usr/local/include, if ncurses is installed in /usr/local. A # default installation of ncurses on alpha*-dec-osf* will lead to such # a situation. @@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 $as_echo_n "checking for library containing waddstr... " >&6; } if ${ac_cv_search_waddstr+:} false; then : -@@ -9319,7 +9320,7 @@ return waddstr (); +@@ -9317,7 +9318,7 @@ return waddstr (); return 0; } _ACEOF @@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure if test -z "$ac_lib"; then ac_res="none required" else -@@ -9393,6 +9394,7 @@ case $host_os in +@@ -9391,6 +9392,7 @@ case $host_os in esac # These are the libraries checked by Readline. @@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 $as_echo_n "checking for library containing tgetent... " >&6; } if ${ac_cv_search_tgetent+:} false; then : -@@ -9417,7 +9419,7 @@ return tgetent (); +@@ -9415,7 +9417,7 @@ return tgetent (); return 0; } _ACEOF diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch index 1fa68f6..54196bc 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 -@@ -10546,6 +10546,13 @@ private: +@@ -10608,6 +10608,13 @@ private: static void process_die (struct die_info *die, struct dwarf2_cu *cu) { @@ -59,7 +59,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -610,6 +610,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ +@@ -608,6 +608,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ target_pid_to_str (process_ptid).c_str ()); } @@ -76,7 +76,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -192,6 +192,12 @@ struct linux_nat_target *linux_target; +@@ -188,6 +188,12 @@ struct linux_nat_target *linux_target; /* Does the current host support PTRACE_GETREGSET? */ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN; @@ -89,7 +89,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c static unsigned int debug_linux_nat; static void show_debug_linux_nat (struct ui_file *file, int from_tty, -@@ -1033,6 +1039,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) +@@ -1029,6 +1035,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LNPAW: Attaching to a stopped process\n"); @@ -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 / -@@ -1364,6 +1373,25 @@ get_detach_signal (struct lwp_info *lp) +@@ -1360,6 +1369,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; } -@@ -1512,6 +1540,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) +@@ -1508,6 +1536,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 } } -@@ -1769,6 +1801,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) +@@ -1765,6 +1797,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) { -@@ -3770,6 +3812,10 @@ linux_nat_target::mourn_inferior () +@@ -3769,6 +3811,10 @@ linux_nat_target::mourn_inferior () /* Let the arch-specific native code know this process is gone. */ linux_target->low_forget_process (pid); diff --git a/gdb-jit-reader-multilib.patch b/gdb-jit-reader-multilib.patch index 89eab10..1dc8ce8 100644 --- a/gdb-jit-reader-multilib.patch +++ b/gdb-jit-reader-multilib.patch @@ -9,7 +9,7 @@ Subject: gdb-jit-reader-multilib.patch diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -9582,10 +9582,12 @@ _ACEOF +@@ -9612,10 +9612,12 @@ _ACEOF @@ -28,7 +28,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -798,10 +798,12 @@ AC_CHECK_SIZEOF(unsigned long long) +@@ -812,10 +812,12 @@ AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned __int128) diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch index 552b8dc..d53248e 100644 --- a/gdb-linux_perf-bundle.patch +++ b/gdb-linux_perf-bundle.patch @@ -9,7 +9,7 @@ Subject: gdb-linux_perf-bundle.patch diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -11930,7 +11930,7 @@ else +@@ -11887,7 +11887,7 @@ else #include #ifndef PERF_ATTR_SIZE_VER5 @@ -56,7 +56,7 @@ diff --git a/gdb/gdb.c b/gdb/gdb.c diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h --- a/gdb/nat/linux-btrace.h +++ b/gdb/nat/linux-btrace.h -@@ -28,6 +28,177 @@ +@@ -27,6 +27,177 @@ # include #endif diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch index 7419b9a..7a0f821 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 -@@ -11881,6 +11881,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) +@@ -11877,6 +11877,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-testsuite-readline63-sigint.patch b/gdb-testsuite-readline63-sigint.patch deleted file mode 100644 index 338895a..0000000 --- a/gdb-testsuite-readline63-sigint.patch +++ /dev/null @@ -1,46 +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-testsuite-readline63-sigint.patch - -;; [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). -;;=fedoratest - -gdb/users/ppalka/readline-7.0-update -commit 379059215e823555a37a8dc7e02cef8fd86566e4 -https://sourceware.org/ml/gdb-patches/2015-07/msg00422.html -Message-Id: <1436927724-4059-1-git-send-email-patrick@parcs.ath.cx> -https://bugzilla.redhat.com/show_bug.cgi?id=1301175 - -diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp ---- a/gdb/testsuite/gdb.gdb/selftest.exp -+++ b/gdb/testsuite/gdb.gdb/selftest.exp -@@ -113,9 +113,25 @@ proc test_with_self { } { - } - - set description "send SIGINT signal to child process" -- gdb_test "signal SIGINT" \ -- "Continuing with signal SIGINT.*" \ -- "$description" -+ gdb_test_multiple "signal SIGINT" "$description" { -+ -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n" { -+ pass "$description" -+ } -+ } -+ -+ set description "send ^C to child process again" -+ send_gdb "\003" -+ gdb_expect { -+ -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" { -+ pass "$description" -+ } -+ -re ".*$gdb_prompt $" { -+ fail "$description" -+ } -+ timeout { -+ fail "$description (timeout)" -+ } -+ } - - # Switch back to the GDB thread if Guile support is linked in. - # "signal SIGINT" could also switch the current thread. diff --git a/gdb-vla-intel-fix-print-char-array.patch b/gdb-vla-intel-fix-print-char-array.patch index 22d4553..c689058 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, int embedded_offset, +@@ -314,8 +314,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 95caf46..de3ddcb 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -37,7 +37,7 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922 diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17831,7 +17831,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17890,7 +17890,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; @@ -46,7 +46,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; -@@ -17852,7 +17852,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17911,7 +17911,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -56,7 +56,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. */ -@@ -17885,6 +17887,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17944,6 +17946,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -71,19 +71,20 @@ 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, base_type); -@@ -17938,7 +17948,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -18002,7 +18012,8 @@ 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; -- range_type = create_range_type (NULL, orig_base_type, &low, &high); -+ range_type = create_range_type (NULL, orig_base_type, &low, &high, &stride); +- range_type = create_range_type (NULL, orig_base_type, &low, &high, bias); ++ range_type = create_range_type (NULL, orig_base_type, &low, &high, bias, ++ &stride); if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; diff --git a/gdb/eval.c b/gdb/eval.c --- a/gdb/eval.c +++ b/gdb/eval.c -@@ -375,29 +375,324 @@ init_array_element (struct value *array, struct value *element, +@@ -372,29 +372,324 @@ init_array_element (struct value *array, struct value *element, return index; } @@ -427,7 +428,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c } -@@ -1238,19 +1533,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, +@@ -1235,19 +1530,6 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, return eval_call (exp, noside, nargs, argvec, var_func_name, expect_type); } @@ -447,7 +448,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, -@@ -1945,33 +2227,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1942,33 +2224,8 @@ evaluate_subexp_standard (struct type *expect_type, switch (code) { case TYPE_CODE_ARRAY: @@ -482,7 +483,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2384,49 +2641,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2381,49 +2638,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -532,7 +533,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) -@@ -3346,6 +3560,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3343,6 +3557,9 @@ calc_f77_array_dims (struct type *array_type) int ndimen = 1; struct type *tmp_type; @@ -545,7 +546,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c diff --git a/gdb/expprint.c b/gdb/expprint.c --- a/gdb/expprint.c +++ b/gdb/expprint.c -@@ -578,17 +578,14 @@ print_subexp_standard (struct expression *exp, int *pos, +@@ -580,17 +580,14 @@ print_subexp_standard (struct expression *exp, int *pos, longest_to_int (exp->elts[pc + 1].longconst); *pos += 2; @@ -567,7 +568,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered (")", stream); return; -@@ -1105,22 +1102,24 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1107,22 +1104,24 @@ dump_subexp_body_standard (struct expression *exp, switch (range_type) { @@ -600,7 +601,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream); break; default: -@@ -1128,11 +1127,9 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1130,11 +1129,9 @@ dump_subexp_body_standard (struct expression *exp, break; } @@ -741,7 +742,7 @@ diff --git a/gdb/f-exp.y b/gdb/f-exp.y diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c -@@ -119,8 +119,14 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, +@@ -120,8 +120,14 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, if (nss != ndimensions) { @@ -760,25 +761,25 @@ diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -912,7 +912,8 @@ operator== (const range_bounds &l, const range_bounds &r) - struct type * +@@ -913,7 +913,8 @@ struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, -- const struct dynamic_prop *high_bound) -+ const struct dynamic_prop *high_bound, + const struct dynamic_prop *high_bound, +- LONGEST bias) ++ LONGEST bias, + const struct dynamic_prop *stride) { /* The INDEX_TYPE should be a type capable of holding the upper and lower bounds, as such a zero sized, or void type makes no sense. */ -@@ -932,6 +933,7 @@ create_range_type (struct type *result_type, struct type *index_type, - TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); +@@ -934,6 +935,7 @@ create_range_type (struct type *result_type, struct type *index_type, TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; + TYPE_RANGE_DATA (result_type)->bias = bias; + TYPE_RANGE_DATA (result_type)->stride = *stride; if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -960,7 +962,7 @@ struct type * +@@ -962,7 +964,7 @@ struct type * create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -787,20 +788,20 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -968,7 +970,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, +@@ -970,7 +972,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, high.kind = PROP_CONST; high.data.const_val = high_bound; -- result_type = create_range_type (result_type, index_type, &low, &high); +- result_type = create_range_type (result_type, index_type, &low, &high, 0); + stride.kind = PROP_CONST; + stride.data.const_val = 0; + + result_type = create_range_type (result_type, index_type, -+ &low, &high, &stride); ++ &low, &high, 0, &stride); return result_type; } -@@ -1186,16 +1192,20 @@ create_array_type_with_stride (struct type *result_type, +@@ -1188,16 +1194,20 @@ create_array_type_with_stride (struct type *result_type, && (!type_not_associated (result_type) && !type_not_allocated (result_type))) { @@ -822,7 +823,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1980,7 +1990,7 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1982,7 +1992,7 @@ resolve_dynamic_range (struct type *dyn_range_type, CORE_ADDR value; struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; @@ -831,7 +832,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE); -@@ -2012,12 +2022,20 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2014,13 +2024,21 @@ resolve_dynamic_range (struct type *dyn_range_type, high_bound.data.const_val = 0; } @@ -845,20 +846,21 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c static_target_type = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (dyn_range_type), addr_stack, 0); + LONGEST bias = TYPE_RANGE_DATA (dyn_range_type)->bias; static_range_type = create_range_type (copy_type (dyn_range_type), static_target_type, -- &low_bound, &high_bound); -+ &low_bound, &high_bound, &stride); -+ +- &low_bound, &high_bound, bias); ++ &low_bound, &high_bound, bias, ++ &stride); TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; return static_range_type; } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h -@@ -617,6 +617,10 @@ struct range_bounds +@@ -622,6 +622,10 @@ struct range_bounds - struct dynamic_prop high; + LONGEST bias; + /* * Stride of range. */ + @@ -867,7 +869,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final high bound is computed. */ -@@ -781,7 +785,6 @@ struct main_type +@@ -786,7 +790,6 @@ struct main_type /* * Union member used for range types. */ struct range_bounds *bounds; @@ -875,7 +877,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h } flds_bnds; /* * Slot to point to additional language-specific fields of this -@@ -1340,6 +1343,15 @@ extern bool set_type_align (struct type *, ULONGEST); +@@ -1345,6 +1348,15 @@ extern bool set_type_align (struct type *, ULONGEST); TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -891,7 +893,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1375,6 +1387,9 @@ extern bool set_type_align (struct type *, ULONGEST); +@@ -1380,6 +1392,9 @@ extern bool set_type_align (struct type *, ULONGEST); TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -901,14 +903,16 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1950,6 +1965,7 @@ extern struct type *create_array_type_with_stride - struct dynamic_prop *, unsigned int); - +@@ -1957,7 +1972,8 @@ extern struct type *create_array_type_with_stride extern struct type *create_range_type (struct type *, struct type *, -+ const struct dynamic_prop *, const struct dynamic_prop *, - const struct dynamic_prop *); + const struct dynamic_prop *, +- LONGEST); ++ LONGEST, ++ const struct dynamic_prop *); + extern struct type *create_array_type (struct type *, struct type *, + struct type *); diff --git a/gdb/parse.c b/gdb/parse.c --- a/gdb/parse.c +++ b/gdb/parse.c @@ -951,7 +955,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 -@@ -2493,24 +2493,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: { @@ -991,7 +995,7 @@ diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c -@@ -1221,13 +1221,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside) +@@ -1224,13 +1224,11 @@ rust_range (struct expression *exp, int *pos, enum noside noside) kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst); *pos += 3; @@ -1008,7 +1012,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c if (noside == EVAL_SKIP) return value_from_longest (builtin_type (exp->gdbarch)->builtin_int, 1); -@@ -1316,7 +1314,7 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1319,7 +1317,7 @@ rust_compute_range (struct type *type, struct value *range, *low = 0; *high = 0; @@ -1017,7 +1021,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c if (TYPE_NFIELDS (type) == 0) return; -@@ -1324,15 +1322,14 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1327,15 +1325,14 @@ rust_compute_range (struct type *type, struct value *range, i = 0; if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0) { @@ -1035,7 +1039,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c *high = value_as_long (value_field (range, i)); if (rust_inclusive_range_type_p (type)) -@@ -1350,7 +1347,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1353,7 +1350,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, struct type *rhstype; LONGEST low, high_bound; /* Initialized to appease the compiler. */ @@ -1044,7 +1048,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c LONGEST high = 0; int want_slice = 0; -@@ -1448,7 +1445,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1451,7 +1448,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, error (_("Cannot subscript non-array type")); if (want_slice @@ -1053,7 +1057,7 @@ diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c low = low_bound; if (low < 0) error (_("Index less than zero")); -@@ -1466,7 +1463,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1469,7 +1466,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, CORE_ADDR addr; struct value *addrval, *tem; @@ -1931,7 +1935,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/value.h b/gdb/value.h --- a/gdb/value.h +++ b/gdb/value.h -@@ -1143,6 +1143,8 @@ extern struct value *varying_to_slice (struct value *); +@@ -1145,6 +1145,8 @@ extern struct value *varying_to_slice (struct value *); extern struct value *value_slice (struct value *, int, int); diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index 9ea44ae..ccee68b 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 -@@ -634,6 +634,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* +@@ -701,6 +701,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -77,7 +77,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1810,7 +1810,10 @@ static void read_signatured_type (struct signatured_type *); +@@ -1805,7 +1805,10 @@ static void read_signatured_type (struct signatured_type *); static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, struct dwarf2_cu *cu, @@ -89,7 +89,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* memory allocation interface */ -@@ -13688,7 +13691,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13747,7 +13750,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); attr_to_dynamic_prop (attr, die, cu, newobj->static_link, @@ -98,7 +98,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } cu->list_in_scope = cu->get_builder ()->get_local_symbols (); -@@ -16450,7 +16453,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -16509,7 +16512,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); stride_ok = attr_to_dynamic_prop (attr, die, cu, byte_stride_prop, @@ -107,7 +107,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (!stride_ok) { complaint (_("unable to read array DW_AT_byte_stride " -@@ -17208,29 +17211,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17267,29 +17270,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; @@ -209,7 +209,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); -@@ -17663,7 +17727,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17722,7 +17786,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, struct dwarf2_cu *cu, struct dynamic_prop *prop, @@ -219,7 +219,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack -@@ -17682,9 +17747,30 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17741,9 +17806,30 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton->locexpr.size = DW_BLOCK (attr)->size; baton->locexpr.data = DW_BLOCK (attr)->data; baton->locexpr.is_reference = false; @@ -251,7 +251,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -17717,9 +17803,29 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17776,9 +17862,29 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->property_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -283,7 +283,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); -@@ -17889,7 +17995,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17948,7 +18054,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -293,7 +293,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), -@@ -17897,7 +18004,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17956,7 +18063,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -302,7 +302,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]"), -@@ -17906,10 +18013,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17965,10 +18072,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); @@ -315,7 +315,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) -@@ -25558,7 +25665,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25679,7 +25786,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) { struct type *prop_type = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); @@ -324,7 +324,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25574,7 +25681,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25695,7 +25802,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) { struct type *prop_type = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false); @@ -333,7 +333,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25587,7 +25694,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25708,7 +25815,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); if (attr_to_dynamic_prop (attr, die, cu, &prop, @@ -345,7 +345,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c -@@ -186,15 +186,14 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -198,15 +198,14 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, print_rank_only = true; else if ((TYPE_ASSOCIATED_PROP (type) && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ASSOCIATED_PROP (type))) @@ -369,7 +369,7 @@ 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, -@@ -206,8 +205,9 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -218,8 +217,9 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, else { LONGEST lower_bound = f77_get_lowerbound (type); @@ -380,7 +380,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c /* Make sure that, if we have an assumed size array, we print out a warning and print the upperbound as '*'. */ -@@ -218,7 +218,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -230,7 +230,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, { LONGEST upper_bound = f77_get_upperbound (type); @@ -389,7 +389,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c } } -@@ -238,7 +238,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, +@@ -250,7 +250,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, case TYPE_CODE_REF: f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0, arrayprint_recurse_level, false); @@ -401,7 +401,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -1903,7 +1903,8 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1905,7 +1905,8 @@ is_dynamic_type_internal (struct type *type, int top_level) type = check_typedef (type); /* We only want to recognize references at the outermost level. */ @@ -411,7 +411,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = check_typedef (TYPE_TARGET_TYPE (type)); /* Types that have a dynamic TYPE_DATA_LOCATION are considered -@@ -1937,6 +1938,7 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1939,6 +1940,7 @@ is_dynamic_type_internal (struct type *type, int top_level) } case TYPE_CODE_ARRAY: @@ -419,7 +419,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { gdb_assert (TYPE_NFIELDS (type) == 1); -@@ -2055,7 +2057,8 @@ resolve_dynamic_array (struct type *type, +@@ -2058,7 +2060,8 @@ resolve_dynamic_array (struct type *type, struct dynamic_prop *prop; unsigned int bit_stride = 0; @@ -429,7 +429,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = copy_type (type); -@@ -2080,11 +2083,15 @@ resolve_dynamic_array (struct type *type, +@@ -2083,11 +2086,15 @@ resolve_dynamic_array (struct type *type, ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -446,7 +446,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type); if (prop != NULL) { -@@ -2236,6 +2243,28 @@ resolve_dynamic_struct (struct type *type, +@@ -2239,6 +2246,28 @@ resolve_dynamic_struct (struct type *type, return resolved_type; } @@ -475,7 +475,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c /* Worker for resolved_dynamic_type. */ static struct type * -@@ -2284,7 +2313,12 @@ resolve_dynamic_type_internal (struct type *type, +@@ -2287,7 +2316,12 @@ resolve_dynamic_type_internal (struct type *type, break; } @@ -1019,7 +1019,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran diff --git a/gdb/typeprint.c b/gdb/typeprint.c --- a/gdb/typeprint.c +++ b/gdb/typeprint.c -@@ -573,6 +573,25 @@ whatis_exp (const char *exp, int show) +@@ -574,6 +574,25 @@ whatis_exp (const char *exp, int show) printf_filtered (" */\n"); } @@ -1081,7 +1081,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 -@@ -1144,12 +1144,6 @@ value_check_printable (struct value *val, struct ui_file *stream, +@@ -1149,12 +1149,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 9112347..084b747 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -30,7 +30,7 @@ Jan diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -2157,6 +2157,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2155,6 +2155,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 69f5341..e43e339 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,15 +27,15 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20190802 +%global snapsrc 20191018 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} -Version: 8.3.50.%{snapsrc} +Version: 9.0.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: 21.0.riscv64%{?dist} +Release: 1.0.riscv64%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -101,6 +101,9 @@ Conflicts: elfutils < 0.149 # https://fedorahosted.org/fpc/ticket/43 https://fedorahosted.org/fpc/ticket/109 Provides: bundled(libiberty) = %{snapsrc} Provides: bundled(gnulib) = %{snapgnulib} +# The libraries in the top-level directory (libbfd, libopcodes, +# libctf) are covered by the "bundled(binutils)" below. See ticket +# #109, as mentioned above. Provides: bundled(binutils) = %{snapsrc} # https://fedorahosted.org/fpc/ticket/130 Provides: bundled(md5-gcc) = %{snapsrc} @@ -182,7 +185,7 @@ Source5: %{libstdcxxpython}.tar.xz Source6: gdbtui # libipt: Intel Processor Trace Decoder Library -%global libipt_version 2.0 +%global libipt_version 2.0.1 #=fedora Source7: v%{libipt_version}.tar.gz #=fedora @@ -253,7 +256,8 @@ BuildRequires: libipt-devel%{buildisa} %endif %if 0%{!?rhel:1} || 0%{?rhel} > 6 # See https://bugzilla.redhat.com/show_bug.cgi?id=1593280 -# DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3. +# DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3 on RHEL-7, RHEL-8, and +# Fedora < 32, and mpfr-4 on Fedora 32+ and RHEL-9+. BuildRequires: mpfr-devel%{buildisa} %endif BuildRequires: source-highlight-devel @@ -442,7 +446,7 @@ tar xJf %{SOURCE5} %if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1} tar xzf %{SOURCE7} ( - cd processor-trace-%{libipt_version} + cd libipt-%{libipt_version} %patch1142 -p1 ) %endif @@ -649,21 +653,22 @@ CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP" %if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1} ( - mkdir processor-trace-%{libipt_version}-root - mkdir processor-trace-%{libipt_version}-build - cd processor-trace-%{libipt_version}-build + mkdir libipt-%{libipt_version}-root + mkdir libipt-%{libipt_version}-build + cd libipt-%{libipt_version}-build # -DPTUNIT:BOOL=ON has no effect on ctest. %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPTUNIT:BOOL=OFF \ -DDEVBUILD:BOOL=ON \ - ../../processor-trace-%{libipt_version} + -DBUILD_SHARED_LIBS=OFF \ + ../../libipt-%{libipt_version} make VERBOSE=1 %{?_smp_mflags} ctest -V %{?_smp_mflags} - make install DESTDIR=../processor-trace-%{libipt_version}-root + make install DESTDIR=../libipt-%{libipt_version}-root ) # There is also: --with-libipt-prefix -CFLAGS="$CFLAGS -I$PWD/processor-trace-%{libipt_version}-root%{_includedir}" -LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}" +CFLAGS="$CFLAGS -I$PWD/libipt-%{libipt_version}-root%{_includedir}" +LDFLAGS="$LDFLAGS -L$PWD/libipt-%{libipt_version}-root%{_libdir}" %endif export CXXFLAGS="$CFLAGS" @@ -986,7 +991,7 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/configure* # Just exclude the header files in the top directory, and don't exclude # the gdb/ directory, as it contains jit-reader.h. rm -rf $RPM_BUILD_ROOT%{_includedir}/*.h -rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*} +rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*} # pstack obsoletion @@ -1146,9 +1151,39 @@ fi %endif %changelog -* Fri Aug 9 2019 David Abdurachmanov - 8.3.50.20190802-21.0.riscv64 +* Fri Nov 08 2019 David Abdurachmanov - 9.0.50.20191018-1.0.riscv64 - Add support for RISC-V (riscv64) +* Fri Oct 18 2019 Sergio Durigan Junior - 9.0.50.20191018-1 +- Rebase to FSF GDB 9.0.50.20191018 (9.1pre). +- Expand comment on "bundled(binutils)". +- Remove libctf's files from RPM_BUILD_ROOT. + +* Wed Oct 9 2019 Jerry James - 8.3.50.20190924-28 +- Rebuild for mpfr 4 + +* Wed Sep 25 2019 Sergio Durigan Junior - 8.3.50.20190924-27 +- Rebase to FSF GDB 8.3.50.20190924 (8.4pre). +- Update 'gdb-6.6-buildid-locate.patch'. + +* Sat Aug 24 2019 Sergio Durigan Junior - 8.3.50.20190824-26 +- Rebase to FSF GDB 8.3.50.20190824 (8.4pre). +- Update 'v1.5-libipt-static.patch'. + +* Wed Aug 21 2019 Miro Hrončok +- Rebuilt for Python 3.8 + +* Sun Aug 18 2019 Sergio Durigan Junior - 8.3.50.20190816-24 +- Update bundled libipt copy to v2.0.1. + +* Fri Aug 16 2019 Sergio Durigan Junior - 8.3.50.20190816-23 +- Rebase to FSF GDB 8.3.50.20190816 (8.4pre). +- Drop 'gdb-testsuite-readline63-sigint.patch'. +- Cleanup 'gdb-archer.patch' and remove several things, like the '-P' feature. + +* Wed Aug 14 2019 Miro Hrončok +- Rebuilt for Python 3.8 + * Fri Aug 2 2019 Sergio Durigan Junior - 8.3.50.20190802-21 - Rebase to FSF GDB 8.3.50.20190802 (8.4pre). diff --git a/sources b/sources index 2a0615e..ffc1cfd 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.20190802.tar.xz) = 464c06de734d7ea724e7a09b35044681872bc05162fc852c47c7eede51930ede655306a80f8518fc8e0845eee13525a48f033a3623f16b6b400eaf49b90b3ac7 +SHA512 (v2.0.1.tar.gz) = e38e93908c3fbf1f2384cfca381eaf4bf667033de678041bd440adac8bbce4757b77304868896256ed72c202ee22ba1646aada90125029f14f5bffaf828a7df4 +SHA512 (gdb-9.0.50.20191018.tar.xz) = a0fdf66d42f766c468b6a084c0e716a39fc28afd60227e95e15b0a1aa19fe132d17f7ec2ba6fb9ad296e3e140561835896ccdac48507c31fae498341bc397e93 diff --git a/v1.5-libipt-static.patch b/v1.5-libipt-static.patch index 6599445..69e1d1a 100644 --- a/v1.5-libipt-static.patch +++ b/v1.5-libipt-static.patch @@ -1,16 +1,3 @@ -Index: processor-trace-2.0/libipt/CMakeLists.txt -=================================================================== ---- processor-trace-2.0.orig/libipt/CMakeLists.txt -+++ processor-trace-2.0/libipt/CMakeLists.txt -@@ -85,7 +85,7 @@ endif (CMAKE_HOST_WIN32) - - set(LIBIPT_FILES ${LIBIPT_FILES} ${LIBIPT_SECTION_FILES}) - --add_library(libipt SHARED -+add_library(libipt STATIC - ${LIBIPT_FILES} - ) - Index: processor-trace-2.0/libipt/src/posix/init.c =================================================================== --- processor-trace-2.0.orig/libipt/src/posix/init.c