diff --git a/.gitignore b/.gitignore index 640548b..cc6a659 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /gdb-libstdc++-v3-python-6.3.1-20170212.tar.xz /v1.5.tar.gz -/gdb-7.12.1.tar.xz +/gdb-7.12.50.20170226.tar.xz diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch index ef8cf51..670b505 100644 --- a/gdb-6.3-readnever-20050907.patch +++ b/gdb-6.3-readnever-20050907.patch @@ -11,11 +11,11 @@ * gdb.texinfo (File Options): Document --readnever. -Index: gdb-7.10.50.20151022/gdb/doc/gdb.texinfo +Index: gdb-7.12.50.20170226/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/doc/gdb.texinfo 2015-10-22 22:16:50.483482288 +0200 -+++ gdb-7.10.50.20151022/gdb/doc/gdb.texinfo 2015-10-22 22:28:22.042554142 +0200 -@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta +--- gdb-7.12.50.20170226.orig/gdb/doc/gdb.texinfo 2017-02-26 21:26:43.609788662 +0100 ++++ gdb-7.12.50.20170226/gdb/doc/gdb.texinfo 2017-02-26 21:26:46.582809721 +0100 +@@ -1037,6 +1037,12 @@ the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster. @@ -28,11 +28,11 @@ Index: gdb-7.10.50.20151022/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.10.50.20151022/gdb/main.c +Index: gdb-7.12.50.20170226/gdb/main.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/main.c 2015-10-22 22:16:50.485482299 +0200 -+++ gdb-7.10.50.20151022/gdb/main.c 2015-10-22 22:28:22.042554142 +0200 -@@ -604,6 +604,7 @@ captured_main (void *data) +--- gdb-7.12.50.20170226.orig/gdb/main.c 2017-02-26 21:26:43.612788684 +0100 ++++ gdb-7.12.50.20170226/gdb/main.c 2017-02-26 21:26:46.582809721 +0100 +@@ -615,6 +615,7 @@ {"tui", no_argument, 0, OPT_TUI}, {"dbx", no_argument, &dbx_commands, 1}, {"readnow", no_argument, &readnow_symbol_files, 1}, @@ -40,7 +40,7 @@ Index: gdb-7.10.50.20151022/gdb/main.c {"r", no_argument, &readnow_symbol_files, 1}, {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, -@@ -1253,6 +1254,7 @@ Selection of debuggee and its files:\n\n +@@ -1253,6 +1254,7 @@ --se=FILE Use FILE as symbol file and executable file.\n\ --symbols=SYMFILE Read symbols from SYMFILE.\n\ --readnow Fully read symbol files on first access.\n\ @@ -48,11 +48,11 @@ Index: gdb-7.10.50.20151022/gdb/main.c --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ -Index: gdb-7.10.50.20151022/gdb/symfile.c +Index: gdb-7.12.50.20170226/gdb/symfile.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/symfile.c 2015-10-22 22:16:50.486482305 +0200 -+++ gdb-7.10.50.20151022/gdb/symfile.c 2015-10-22 22:28:22.043554148 +0200 -@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup ( +--- gdb-7.12.50.20170226.orig/gdb/symfile.c 2017-02-26 21:26:43.613788691 +0100 ++++ gdb-7.12.50.20170226/gdb/symfile.c 2017-02-26 21:26:46.583809728 +0100 +@@ -79,6 +79,7 @@ /* Global variables owned by this file. */ int readnow_symbol_files; /* Read full symbols immediately. */ @@ -60,19 +60,19 @@ Index: gdb-7.10.50.20151022/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.10.50.20151022/gdb/dwarf2read.c +Index: gdb-7.12.50.20170226/gdb/dwarf2read.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/dwarf2read.c 2015-10-22 22:28:22.046554165 +0200 -+++ gdb-7.10.50.20151022/gdb/dwarf2read.c 2015-10-22 22:29:17.664881642 +0200 -@@ -70,6 +70,7 @@ - #include "filestuff.h" - #include "build-id.h" +--- gdb-7.12.50.20170226.orig/gdb/dwarf2read.c 2017-02-26 21:26:43.620788740 +0100 ++++ gdb-7.12.50.20170226/gdb/dwarf2read.c 2017-02-26 21:26:59.078898234 +0100 +@@ -71,6 +71,7 @@ #include "namespace.h" + #include "common/gdb_unlinker.h" + #include "common/function-view.h" +#include "top.h" #include #include -@@ -2059,7 +2060,8 @@ dwarf2_has_info (struct objfile *objfile +@@ -2113,7 +2114,8 @@ (void *) names); dwarf2_per_objfile->objfile = objfile; } @@ -82,11 +82,11 @@ Index: gdb-7.10.50.20151022/gdb/dwarf2read.c && dwarf2_per_objfile->info.s.section != NULL && !dwarf2_per_objfile->abbrev.is_virtual && dwarf2_per_objfile->abbrev.s.section != NULL); -Index: gdb-7.10.50.20151022/gdb/top.h +Index: gdb-7.12.50.20170226/gdb/top.h =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/top.h 2015-10-22 22:16:50.490482329 +0200 -+++ gdb-7.10.50.20151022/gdb/top.h 2015-10-22 22:28:22.047554171 +0200 -@@ -74,6 +74,7 @@ extern int gdb_in_secondary_prompt_p (vo +--- gdb-7.12.50.20170226.orig/gdb/top.h 2017-02-26 21:26:43.622788754 +0100 ++++ gdb-7.12.50.20170226/gdb/top.h 2017-02-26 21:26:46.589809771 +0100 +@@ -269,6 +269,7 @@ /* From random places. */ extern int readnow_symbol_files; diff --git a/gdb-6.3-rh-testversion-20041202.patch b/gdb-6.3-rh-testversion-20041202.patch index 7839200..8b9a4bf 100644 --- a/gdb-6.3-rh-testversion-20041202.patch +++ b/gdb-6.3-rh-testversion-20041202.patch @@ -3,11 +3,11 @@ * gdb.gdb/selftest.exp: Add matching on specific Red Hat only version string. -Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.gdb/selftest.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp =================================================================== ---- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.gdb/selftest.exp 2010-06-26 08:44:47.000000000 +0200 -+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.gdb/selftest.exp 2010-07-12 09:59:42.000000000 +0200 -@@ -342,6 +342,9 @@ proc test_with_self { executable } { +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:47:06.472874620 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:48:12.593380575 +0100 +@@ -53,6 +53,9 @@ -re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" { pass "printed version with cast" } @@ -16,4 +16,4 @@ Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.gdb/selftest.exp + } } - do_steps_and_nexts + # start the "xgdb" process 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 d8c1982..aa1a646 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -34,11 +34,11 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: <81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location <81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location -Index: gdb-7.10.90.20160211/gdb/printcmd.c +Index: gdb-7.12.50.20170207/gdb/printcmd.c =================================================================== ---- gdb-7.10.90.20160211.orig/gdb/printcmd.c 2016-02-15 23:29:53.062420893 +0100 -+++ gdb-7.10.90.20160211/gdb/printcmd.c 2016-02-15 23:33:31.068968762 +0100 -@@ -1003,6 +1003,10 @@ +--- gdb-7.12.50.20170207.orig/gdb/printcmd.c 2017-02-07 21:06:20.196593884 +0100 ++++ gdb-7.12.50.20170207/gdb/printcmd.c 2017-02-07 21:07:10.230973906 +0100 +@@ -1258,6 +1258,10 @@ if (exp && *exp) { @@ -46,13 +46,13 @@ Index: gdb-7.10.90.20160211/gdb/printcmd.c + function descriptors. */ + if (target_has_execution && strcmp (exp, "errno") == 0) + exp = "*(*(int *(*)(void)) __errno_location) ()"; - expr = parse_expression (exp); - make_cleanup (free_current_contents, &expr); - val = evaluate_expression (expr); -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.c + expression_up expr = parse_expression (exp); + val = evaluate_expression (expr.get ()); + } +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2016-02-15 23:30:20.703617148 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2017-02-07 21:06:20.196593884 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -82,10 +82,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.c + + return 0; /* breakpoint */ +} -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2016-02-15 23:35:25.582781821 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2017-02-07 21:06:20.196593884 +0100 @@ -0,0 +1,60 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -147,10 +147,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.exp + +# TODO: Test the error on resolving ERRNO with only libc loaded. +# Just how to find the current libc filename? -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2016-02-15 23:30:20.703617148 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2017-02-07 21:06:20.196593884 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -180,10 +180,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.c + + return 0; /* breakpoint */ +} -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2016-02-15 23:35:25.582781821 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2017-02-07 21:06:20.197593892 +0100 @@ -0,0 +1,71 @@ +# Copyright 2007 Free Software Foundation, Inc. + diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index 523b7e0..85d4fe5 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -58,10 +58,10 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html * exec.c (exec_file_attach): Print a more useful error message if the user did "gdb core". -Index: gdb-7.9.50.20150531/gdb/exec.c +Index: gdb-7.12.50.20170226/gdb/exec.c =================================================================== ---- gdb-7.9.50.20150531.orig/gdb/exec.c 2015-05-31 03:48:29.000000000 +0200 -+++ gdb-7.9.50.20150531/gdb/exec.c 2015-05-31 20:07:35.092878685 +0200 +--- gdb-7.12.50.20170226.orig/gdb/exec.c 2017-02-27 22:18:00.945026211 +0100 ++++ gdb-7.12.50.20170226/gdb/exec.c 2017-02-27 22:18:08.111076350 +0100 @@ -35,6 +35,7 @@ #include "progspace.h" #include "gdb_bfd.h" @@ -70,7 +70,7 @@ Index: gdb-7.9.50.20150531/gdb/exec.c #include #include "readline/readline.h" -@@ -298,12 +299,27 @@ exec_file_attach (const char *filename, +@@ -359,12 +360,27 @@ if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching)) { @@ -101,13 +101,13 @@ Index: gdb-7.9.50.20150531/gdb/exec.c } if (build_section_table (exec_bfd, §ions, §ions_end)) -Index: gdb-7.9.50.20150531/gdb/main.c +Index: gdb-7.12.50.20170226/gdb/main.c =================================================================== ---- gdb-7.9.50.20150531.orig/gdb/main.c 2015-05-31 20:07:34.183872824 +0200 -+++ gdb-7.9.50.20150531/gdb/main.c 2015-05-31 20:10:05.095845935 +0200 -@@ -435,6 +435,37 @@ typedef struct cmdarg { - /* Define type VEC (cmdarg_s). */ - DEF_VEC_O (cmdarg_s); +--- gdb-7.12.50.20170226.orig/gdb/main.c 2017-02-27 22:18:00.945026211 +0100 ++++ gdb-7.12.50.20170226/gdb/main.c 2017-02-27 22:18:08.112076357 +0100 +@@ -459,6 +459,37 @@ + char *string; + }; +/* Call exec_file_attach. If it detected FILENAME is a core file call + core_file_command. Print the original exec_file_attach error only if @@ -140,10 +140,10 @@ Index: gdb-7.9.50.20150531/gdb/main.c + END_CATCH +} + - static int - captured_main (void *data) + static void + captured_main_1 (struct captured_main_args *context, int &python_script) { -@@ -923,6 +954,8 @@ captured_main (void *data) +@@ -910,6 +941,8 @@ { symarg = argv[optind]; execarg = argv[optind]; @@ -152,7 +152,7 @@ Index: gdb-7.9.50.20150531/gdb/main.c optind++; } -@@ -1080,11 +1113,25 @@ captured_main (void *data) +@@ -1060,11 +1093,25 @@ && symarg != NULL && strcmp (execarg, symarg) == 0) { @@ -178,14 +178,14 @@ Index: gdb-7.9.50.20150531/gdb/main.c + as a core file. */ + if (catch_command_errors_const (func, execarg, !batch_flag) + && core_bfd == NULL) - catch_command_errors_const (symbol_file_add_main, symarg, + catch_command_errors_const (symbol_file_add_main_adapter, symarg, !batch_flag); } -Index: gdb-7.9.50.20150531/gdb/common/common-exceptions.h +Index: gdb-7.12.50.20170226/gdb/common/common-exceptions.h =================================================================== ---- gdb-7.9.50.20150531.orig/gdb/common/common-exceptions.h 2015-05-31 03:48:29.000000000 +0200 -+++ gdb-7.9.50.20150531/gdb/common/common-exceptions.h 2015-05-31 20:07:35.093878692 +0200 -@@ -105,6 +105,9 @@ enum errors { +--- gdb-7.12.50.20170226.orig/gdb/common/common-exceptions.h 2017-02-27 22:18:00.946026218 +0100 ++++ gdb-7.12.50.20170226/gdb/common/common-exceptions.h 2017-02-27 22:18:08.112076357 +0100 +@@ -106,6 +106,9 @@ "_ERROR" is appended to the name. */ MAX_COMPLETIONS_REACHED_ERROR, diff --git a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch index 64fe1d0..32f2a83 100644 --- a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +++ b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch @@ -15,10 +15,10 @@ Comments by Sergio Durigan Junior : NULL after it is free'd, otherwise the code below thinks that it is still valid and doesn't print the necessary warning ("Try: yum install ..."). -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2016-02-15 23:31:06.327941085 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2017-02-26 19:14:58.492609659 +0100 @@ -0,0 +1,97 @@ +# Copyright (C) 2014 Free Software Foundation, Inc. + @@ -117,10 +117,10 @@ Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-ins + +# Leaving the link there will cause breakage in the next run. +remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]" -Index: gdb-7.10.90.20160211/gdb/build-id.c +Index: gdb-7.12.50.20170207/gdb/build-id.c =================================================================== ---- gdb-7.10.90.20160211.orig/gdb/build-id.c 2016-02-15 23:30:55.389863424 +0100 -+++ gdb-7.10.90.20160211/gdb/build-id.c 2016-02-15 23:30:55.778866186 +0100 +--- gdb-7.12.50.20170207.orig/gdb/build-id.c 2017-02-26 19:14:51.943562799 +0100 ++++ gdb-7.12.50.20170207/gdb/build-id.c 2017-02-26 19:14:58.492609659 +0100 @@ -589,7 +589,10 @@ do_cleanups (inner); @@ -131,5 +131,5 @@ Index: gdb-7.10.90.20160211/gdb/build-id.c + continue; + } - if (build_id_verify (abfd, build_id_len, build_id)) + if (build_id_verify (abfd.get(), build_id_len, build_id)) break; diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 28773ec..0f5fa8a 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -1,7 +1,7 @@ -Index: gdb-7.11.50.20160630/gdb/corelow.c +Index: gdb-7.12.50.20170207/gdb/corelow.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/corelow.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/corelow.c 2016-07-03 14:34:32.022753582 +0200 +--- gdb-7.12.50.20170207.orig/gdb/corelow.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/corelow.c 2017-02-24 22:32:38.793264396 +0100 @@ -45,6 +45,10 @@ #include "gdb_bfd.h" #include "completer.h" @@ -13,7 +13,7 @@ Index: gdb-7.11.50.20160630/gdb/corelow.c #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -266,6 +270,53 @@ +@@ -266,6 +270,54 @@ inferior_ptid = ptid; /* Yes, make it current. */ } @@ -52,7 +52,8 @@ Index: gdb-7.11.50.20160630/gdb/corelow.c + { + make_cleanup (xfree, execfilename); + exec_file_attach (execfilename, from_tty); -+ symbol_file_add_main (execfilename, from_tty); ++ symbol_file_add_main (execfilename, ++ symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE)); + if (symfile_objfile != NULL) + symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; + } @@ -67,7 +68,7 @@ Index: gdb-7.11.50.20160630/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -404,6 +455,14 @@ +@@ -402,6 +454,14 @@ switch_to_thread (thread->ptid); } @@ -82,7 +83,7 @@ Index: gdb-7.11.50.20160630/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -1068,4 +1127,11 @@ +@@ -1078,4 +1138,11 @@ init_core_ops (); add_target_with_completer (&core_ops, filename_completer); @@ -94,11 +95,11 @@ Index: gdb-7.11.50.20160630/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.11.50.20160630/gdb/doc/gdb.texinfo +Index: gdb-7.12.50.20170207/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/doc/gdb.texinfo 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/doc/gdb.texinfo 2016-07-03 14:34:32.030753651 +0200 -@@ -18916,6 +18916,27 @@ +--- gdb-7.12.50.20170207.orig/gdb/doc/gdb.texinfo 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/doc/gdb.texinfo 2017-02-24 22:32:38.803264463 +0100 +@@ -18962,6 +18962,27 @@ @end table @@ -126,10 +127,10 @@ Index: gdb-7.11.50.20160630/gdb/doc/gdb.texinfo @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named -Index: gdb-7.11.50.20160630/gdb/solib-svr4.c +Index: gdb-7.12.50.20170207/gdb/solib-svr4.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/solib-svr4.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/solib-svr4.c 2016-07-03 14:34:32.031753659 +0200 +--- gdb-7.12.50.20170207.orig/gdb/solib-svr4.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/solib-svr4.c 2017-02-24 22:32:38.804264469 +0100 @@ -45,6 +45,7 @@ #include "auxv.h" #include "gdb_bfd.h" @@ -138,7 +139,7 @@ Index: gdb-7.11.50.20160630/gdb/solib-svr4.c static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1416,9 +1417,52 @@ +@@ -1420,9 +1421,52 @@ continue; } @@ -194,41 +195,37 @@ Index: gdb-7.11.50.20160630/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.11.50.20160630/gdb/elfread.c +Index: gdb-7.12.50.20170207/gdb/elfread.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/elfread.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/elfread.c 2016-07-03 14:34:32.031753659 +0200 -@@ -1259,9 +1259,10 @@ +--- gdb-7.12.50.20170207.orig/gdb/elfread.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/elfread.c 2017-02-24 22:32:38.805264476 +0100 +@@ -1265,8 +1265,9 @@ && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { -- char *debugfile; -+ char *debugfile, *build_id_filename; - -- debugfile = find_separate_debug_file_by_buildid (objfile); -+ debugfile = find_separate_debug_file_by_buildid (objfile, -+ &build_id_filename); ++ gdb::unique_xmalloc_ptr build_id_filename; + gdb::unique_xmalloc_ptr debugfile +- (find_separate_debug_file_by_buildid (objfile)); ++ (find_separate_debug_file_by_buildid (objfile, &build_id_filename)); if (debugfile == NULL) - debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1275,6 +1276,12 @@ - symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile); - do_cleanups (cleanup); + debugfile.reset (find_separate_debug_file_by_debuglink (objfile)); +@@ -1278,6 +1279,10 @@ + symbol_file_add_separate (abfd.get (), debugfile.get (), + symfile_flags, objfile); } + /* 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); -+ -+ xfree (build_id_filename); ++ debug_print_missing (objfile_name (objfile), build_id_filename.get ()); } } -Index: gdb-7.11.50.20160630/gdb/symfile.h +Index: gdb-7.12.50.20170207/gdb/symfile.h =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/symfile.h 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/symfile.h 2016-07-03 14:34:32.032753668 +0200 -@@ -589,6 +589,10 @@ +--- gdb-7.12.50.20170207.orig/gdb/symfile.h 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/symfile.h 2017-02-24 22:32:38.805264476 +0100 +@@ -573,6 +573,10 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname); @@ -239,11 +236,11 @@ Index: gdb-7.11.50.20160630/gdb/symfile.h /* From dwarf2read.c */ /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.11.50.20160630/gdb/testsuite/lib/gdb.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/testsuite/lib/gdb.exp 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/testsuite/lib/gdb.exp 2016-07-03 14:34:32.033753676 +0200 -@@ -1641,6 +1641,16 @@ +--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/gdb.exp 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp 2017-02-24 22:32:38.806264483 +0100 +@@ -1646,6 +1646,16 @@ warning "Couldn't set the width to 0." } } @@ -260,11 +257,11 @@ Index: gdb-7.11.50.20160630/gdb/testsuite/lib/gdb.exp return 0 } -Index: gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/testsuite/lib/mi-support.exp 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp 2016-07-03 14:34:32.033753676 +0200 -@@ -309,6 +309,16 @@ proc default_mi_gdb_start { args } { +--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/mi-support.exp 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/lib/mi-support.exp 2017-02-24 22:32:38.807264489 +0100 +@@ -309,6 +309,16 @@ warning "Couldn't set the width to 0." } } @@ -281,9 +278,11 @@ Index: gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp if { $separate_inferior_pty } { mi_create_inferior_pty ---- gdb-7.11.90.20160907/gdb/testsuite/gdb.base/new-ui-pending-input.exp-orig 2016-09-07 04:01:15.000000000 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.base/new-ui-pending-input.exp 2016-09-07 22:35:35.818534069 +0200 -@@ -62,6 +62,7 @@ proc test_command_line_new_ui_pending_in +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/new-ui-pending-input.exp +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/new-ui-pending-input.exp 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/new-ui-pending-input.exp 2017-02-24 22:32:38.807264489 +0100 +@@ -62,6 +62,7 @@ set options "" append options " -iex \"set height 0\"" append options " -iex \"set width 0\"" @@ -291,25 +290,25 @@ Index: gdb-7.11.50.20160630/gdb/testsuite/lib/mi-support.exp append options " -iex \"new-ui console $extra_tty_name\"" append options " -ex \"b $bpline\"" append options " -ex \"run\"" -Index: gdb-7.11.50.20160630/gdb/objfiles.h +Index: gdb-7.12.50.20170207/gdb/objfiles.h =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/objfiles.h 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/objfiles.h 2016-07-03 14:34:32.034753685 +0200 -@@ -489,6 +489,10 @@ - - #define OBJF_NOT_FILENAME (1 << 6) +--- gdb-7.12.50.20170207.orig/gdb/objfiles.h 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/objfiles.h 2017-02-24 22:32:38.808264496 +0100 +@@ -444,6 +444,10 @@ + htab_t static_links; + }; +/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */ + -+#define OBJF_BUILD_ID_CORE_LOADED (1 << 12) ++#define OBJF_BUILD_ID_CORE_LOADED static_cast(1 << 12) + /* Declarations for functions defined in objfiles.c */ - extern struct objfile *allocate_objfile (bfd *, const char *name, int); -Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/corefile.exp + extern struct objfile *allocate_objfile (bfd *, const char *name, +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/testsuite/gdb.base/corefile.exp 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/testsuite/gdb.base/corefile.exp 2016-07-03 14:34:32.034753685 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/corefile.exp 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/corefile.exp 2017-02-24 22:32:38.808264496 +0100 @@ -293,3 +293,33 @@ pass $test } @@ -344,10 +343,10 @@ Index: gdb-7.11.50.20160630/gdb/testsuite/gdb.base/corefile.exp + gdb_test "info files" "Local exec file:\r\n\[ \t\]*`[string_to_regexp $debugdir/$buildid]', file type .*" + pass $wholetest +} -Index: gdb-7.11.50.20160630/gdb/build-id.c +Index: gdb-7.12.50.20170207/gdb/build-id.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/build-id.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/build-id.c 2016-07-03 14:36:50.124938187 +0200 +--- gdb-7.12.50.20170207.orig/gdb/build-id.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/build-id.c 2017-02-24 22:45:25.817403162 +0100 @@ -26,11 +26,67 @@ #include "objfiles.h" #include "filenames.h" @@ -817,7 +816,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c + /* See build-id.h. */ - bfd * + gdb_bfd_ref_ptr -build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) +build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, + char **link_return, int add_debug_suffix) @@ -827,7 +826,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c VEC (char_ptr) *debugdir_vec; struct cleanup *back_to; int ix; - bfd *abfd = NULL; + gdb_bfd_ref_ptr abfd; - int alloc_len; /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */ @@ -853,7 +852,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c memcpy (link, debugdir, debugdir_len); s = &link[debugdir_len]; -@@ -110,47 +544,281 @@ +@@ -110,45 +544,290 @@ *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); @@ -903,38 +902,36 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c + inner = make_cleanup (xfree, filename); + abfd = gdb_bfd_open (filename, gnutarget, -1); + do_cleanups (inner); ++ ++ if (abfd == NULL) ++ continue; - if (filename == NULL) - continue; -+ if (abfd == NULL) -+ continue; ++ if (build_id_verify (abfd.get(), build_id_len, build_id)) ++ break; - /* We expect to be silent on the non-existing files. */ - inner = make_cleanup (xfree, filename); - abfd = gdb_bfd_open (filename, gnutarget, -1); - do_cleanups (inner); -+ if (build_id_verify (abfd, build_id_len, build_id)) -+ break; ++ abfd.release (); - if (abfd == NULL) - continue; -+ gdb_bfd_unref (abfd); -+ abfd = NULL; - -- if (build_id_verify (abfd, build_id_len, build_id)) -- break; + filename = NULL; + } -- gdb_bfd_unref (abfd); -- abfd = NULL; +- if (build_id_verify (abfd.get(), build_id_len, build_id)) +- break; + if (filename != NULL) + { + /* LINK_ALL is not used below in this non-NULL FILENAME case. */ + xfree (link0); + break; + } -+ + +- abfd.release (); + /* 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 */ @@ -982,7 +979,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c +char * +build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +{ -+ bfd *abfd; ++ gdb_bfd_ref_ptr abfd; + char *result; + + abfd = build_id_to_debug_bfd (build_id->size, build_id->data, link_return, 0); @@ -990,7 +987,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c + return NULL; + + result = xstrdup (bfd_get_filename (abfd)); -+ gdb_bfd_unref (abfd); ++ abfd.release (); + return result; +} + @@ -1135,7 +1132,7 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c char * -find_separate_debug_file_by_buildid (struct objfile *objfile) +find_separate_debug_file_by_buildid (struct objfile *objfile, -+ char **build_id_filename_return) ++ gdb::unique_xmalloc_ptr *build_id_filename_return) { const struct bfd_build_id *build_id; @@ -1146,15 +1143,25 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c + build_id = build_id_bfd_shdr_get (objfile->obfd); if (build_id != NULL) { - bfd *abfd; - -- abfd = build_id_to_debug_bfd (build_id->size, build_id->data); -+ abfd = build_id_to_debug_bfd (build_id->size, build_id->data, -+ build_id_filename_return, 1); ++ char *build_id_filename_cstr = NULL; + gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size, +- build_id->data)); ++ build_id->data, ++ (!build_id_filename_return ? NULL : &build_id_filename_cstr), 1)); ++ if (build_id_filename_return) ++ { ++ if (!build_id_filename_cstr) ++ gdb_assert (!*build_id_filename_return); ++ else ++ { ++ *build_id_filename_return = gdb::unique_xmalloc_ptr (build_id_filename_cstr); ++ build_id_filename_cstr = NULL; ++ } ++ } /* Prevent looping on a stripped .debug file. */ if (abfd != NULL - && filename_cmp (bfd_get_filename (abfd), -@@ -170,3 +838,21 @@ + && filename_cmp (bfd_get_filename (abfd.get ()), +@@ -160,3 +839,21 @@ } return NULL; } @@ -1176,13 +1183,13 @@ Index: gdb-7.11.50.20160630/gdb/build-id.c + + observer_attach_executable_changed (debug_print_executable_changed); +} -Index: gdb-7.11.50.20160630/gdb/build-id.h +Index: gdb-7.12.50.20170207/gdb/build-id.h =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/build-id.h 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/build-id.h 2016-07-03 14:34:32.035753694 +0200 -@@ -20,9 +20,10 @@ - #ifndef BUILD_ID_H - #define BUILD_ID_H +--- gdb-7.12.50.20170207.orig/gdb/build-id.h 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/build-id.h 2017-02-24 22:32:38.809264503 +0100 +@@ -22,9 +22,10 @@ + + #include "gdb_bfd.h" -/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */ +/* Separate debuginfo files have corrupted PHDR but SHDR is correct there. @@ -1193,13 +1200,14 @@ Index: gdb-7.11.50.20160630/gdb/build-id.h /* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value. Otherwise, issue a warning and return false. */ -@@ -36,13 +37,18 @@ +@@ -38,13 +39,19 @@ the caller. */ - extern bfd *build_id_to_debug_bfd (size_t build_id_len, -- const bfd_byte *build_id); -+ const bfd_byte *build_id, char **link_return, -+ int add_debug_suffix); + extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len, +- const bfd_byte *build_id); ++ const bfd_byte *build_id, ++ char **link_return, ++ int add_debug_suffix); + +extern char *build_id_to_filename (const struct bfd_build_id *build_id, + char **link_return); @@ -1211,14 +1219,14 @@ Index: gdb-7.11.50.20160630/gdb/build-id.h -extern char *find_separate_debug_file_by_buildid (struct objfile *objfile); +extern char *find_separate_debug_file_by_buildid (struct objfile *objfile, -+ char **build_id_filename_return); ++ gdb::unique_xmalloc_ptr *build_id_filename_return); #endif /* BUILD_ID_H */ -Index: gdb-7.11.50.20160630/gdb/dwarf2read.c +Index: gdb-7.12.50.20170207/gdb/dwarf2read.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/dwarf2read.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/dwarf2read.c 2016-07-03 14:34:32.040753736 +0200 -@@ -2535,7 +2535,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/dwarf2read.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2read.c 2017-02-24 22:32:38.814264536 +0100 +@@ -2534,7 +2534,7 @@ } if (dwz_bfd == NULL) @@ -1227,10 +1235,10 @@ Index: gdb-7.11.50.20160630/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), -Index: gdb-7.11.50.20160630/gdb/python/py-objfile.c +Index: gdb-7.12.50.20170207/gdb/python/py-objfile.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/python/py-objfile.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/python/py-objfile.c 2016-07-03 14:34:32.040753736 +0200 +--- gdb-7.12.50.20170207.orig/gdb/python/py-objfile.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/python/py-objfile.c 2017-02-24 22:32:38.814264536 +0100 @@ -136,7 +136,7 @@ TRY @@ -1240,7 +1248,7 @@ Index: gdb-7.11.50.20160630/gdb/python/py-objfile.c } CATCH (except, RETURN_MASK_ALL) { -@@ -547,7 +547,7 @@ +@@ -546,7 +546,7 @@ /* Don't return separate debug files. */ if (objfile->separate_debug_objfile_backlink != NULL) continue; @@ -1249,11 +1257,11 @@ Index: gdb-7.11.50.20160630/gdb/python/py-objfile.c if (obfd_build_id == NULL) continue; if (objfpy_build_id_matches (obfd_build_id, build_id)) -Index: gdb-7.11.50.20160630/gdb/coffread.c +Index: gdb-7.12.50.20170207/gdb/coffread.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/coffread.c 2016-07-03 14:33:28.130205528 +0200 -+++ gdb-7.11.50.20160630/gdb/coffread.c 2016-07-03 14:34:32.041753745 +0200 -@@ -737,7 +737,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/coffread.c 2017-02-24 22:18:02.176391400 +0100 ++++ gdb-7.12.50.20170207/gdb/coffread.c 2017-02-24 22:32:38.815264543 +0100 +@@ -734,7 +734,7 @@ { char *debugfile; diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index 9a8ec45..ad9f643 100644 --- a/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/gdb-6.6-scheduler_locking-step-is-default.patch @@ -1,7 +1,7 @@ -Index: gdb-7.11.90.20160904/gdb/infrun.c +Index: gdb-7.12.50.20170207/gdb/infrun.c =================================================================== ---- gdb-7.11.90.20160904.orig/gdb/infrun.c 2016-09-04 17:57:12.733853848 +0200 -+++ gdb-7.11.90.20160904/gdb/infrun.c 2016-09-04 17:57:45.568145391 +0200 +--- gdb-7.12.50.20170207.orig/gdb/infrun.c 2017-02-07 21:07:40.321202448 +0100 ++++ gdb-7.12.50.20170207/gdb/infrun.c 2017-02-07 21:07:42.680220365 +0100 @@ -2218,7 +2218,7 @@ schedlock_replay, NULL @@ -11,10 +11,10 @@ Index: gdb-7.11.90.20160904/gdb/infrun.c static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) -Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-cli.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp =================================================================== ---- gdb-7.11.90.20160904.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2016-09-04 17:57:12.733853848 +0200 -+++ gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-cli.exp 2016-09-04 17:57:45.569145399 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:40.322202455 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:42.680220365 +0100 @@ -199,7 +199,7 @@ # Test that the token is output even for CLI commands # Also test that *stopped includes frame information. @@ -24,32 +24,32 @@ Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-cli.exp "34 next: run" # Test that the new current source line is output to the console -Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-logging.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp =================================================================== ---- gdb-7.11.90.20160904.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2016-09-04 17:57:12.733853848 +0200 -+++ gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-logging.exp 2016-09-04 17:57:45.569145399 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:07:42.681220372 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:09:36.950088269 +0100 @@ -53,7 +53,7 @@ set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+" -if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] { +if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] { - pass "Log file contents" + pass "log file contents" } else { - fail "Log file contents" + fail "log file contents" @@ -76,7 +76,7 @@ set logcontent [read $chan] close $chan -if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] { +if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] { - pass "Redirect log file contents" + pass "redirect log file contents" } else { - fail "Redirect log file contents" -Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-console.exp + fail "redirect log file contents" +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp =================================================================== ---- gdb-7.11.90.20160904.orig/gdb/testsuite/gdb.mi/mi-console.exp 2016-09-04 17:57:12.733853848 +0200 -+++ gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-console.exp 2016-09-04 17:57:45.569145399 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:40.323202463 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:42.681220372 +0100 @@ -60,6 +60,9 @@ mi_run_to_main @@ -60,10 +60,10 @@ Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.mi/mi-console.exp # The output we get from the target depends on how it is hosted. If # we are semihosted (e.g., the sim or a remote target that supports # the File I/O remote protocol extension), we see the target I/O -Index: gdb-7.11.90.20160904/gdb/testsuite/gdb.opt/inline-cmds.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp =================================================================== ---- gdb-7.11.90.20160904.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2016-09-04 17:59:44.600202299 +0200 -+++ gdb-7.11.90.20160904/gdb/testsuite/gdb.opt/inline-cmds.exp 2016-09-04 18:00:04.616380027 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:40.323202463 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:42.681220372 +0100 @@ -331,7 +331,7 @@ send_gdb "interpreter-exec console \"step\"\n" diff --git a/gdb-6.6-threads-static-test.patch b/gdb-6.6-threads-static-test.patch index 3f8d16e..db8c7dc 100644 --- a/gdb-6.6-threads-static-test.patch +++ b/gdb-6.6-threads-static-test.patch @@ -1,8 +1,8 @@ -Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp =================================================================== ---- gdb-7.4.50.20111219.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 21:07:01.436475201 +0100 -+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp 2011-12-19 22:08:55.444514127 +0100 -@@ -45,6 +45,13 @@ gdb_test_no_output "set print sevenbit-s +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:24:48.392316045 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:25:38.649677595 +0100 +@@ -41,6 +41,13 @@ # See if the static multi-threaded program runs. runto_main @@ -14,5 +14,5 @@ Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/staticthreads.exp +gdb_test "info threads" "^info threads\r\n\[ \t\]*Id\[ \t\]+Target Id\[ \t\]+Frame\[ \t\]*\r\n\[^\r\n\]* Thread \[^\r\n\]*" "info threads on start" + gdb_test "break sem_post" - set test "Continue to main's call of sem_post" + set test "continue to main's call of sem_post" gdb_test_multiple "continue" "$test" { diff --git a/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch b/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch deleted file mode 100644 index 16f7165..0000000 --- a/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch +++ /dev/null @@ -1,707 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html - -2007-12-22 Jan Kratochvil - - * gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files. - -2008-03-02 Jan Kratochvil - - * gdb.arch/i386-interface.exp: Fix a testcase race. - -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S 2016-02-15 23:23:03.318502357 +0100 -@@ -0,0 +1,628 @@ -+/* Copyright 2007 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . -+ -+ Please email any bugs, comments, and/or additions to this file to: -+ bug-gdb@gnu.org -+ -+ This file is part of the gdb testsuite. -+ -+ This file was produced by: -+ $ gcj -S interface.java -ggdb2 -Wall -m32 -+ from the .java file: -+ interface Interface -+ { -+ } -+ class Class implements Interface -+ { -+ } -+*/ -+ -+ .file "cc28Pp2B.jar" -+ .section .debug_abbrev,"",@progbits -+.Ldebug_abbrev0: -+ .section .debug_info,"",@progbits -+.Ldebug_info0: -+ .section .debug_line,"",@progbits -+.Ldebug_line0: -+ .text -+.Ltext0: -+ .local _MT_Interface -+ .comm _MT_Interface,0,4 -+ .data -+ .align 4 -+ .type _catch_classes_Interface, @object -+ .size _catch_classes_Interface, 24 -+_catch_classes_Interface: -+ .zero 24 -+ .section .rodata -+ .align 2 -+ .type _Utf1, @object -+ .size _Utf1, 4 -+_Utf1: -+ .value 36121 -+ .value 9 -+ .ascii "Interface" -+ .zero 1 -+.globl _ZN9Interface6class$E -+ .data -+ .align 32 -+ .type _ZN9Interface6class$E, @object -+ .size _ZN9Interface6class$E, 144 -+_ZN9Interface6class$E: -+ .long _ZTVN4java4lang5ClassE+8 -+ .long 403000 -+ .long _Utf1 -+ .value 1536 -+ .zero 2 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long _MT_Interface -+ .value 0 -+ .value 6 -+ .long 0 -+ .long 4 -+ .value 0 -+ .value 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long _catch_classes_Interface -+ .long 0 -+ .long 0 -+ .value 0 -+ .byte 1 -+ .zero 1 -+ .long 0 -+ .value 0 -+ .zero 2 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .hidden _ZN9Interface7class$$E -+.globl _ZN9Interface7class$$E -+ .section .rodata -+ .align 4 -+ .type _ZN9Interface7class$$E, @object -+ .size _ZN9Interface7class$$E, 4 -+_ZN9Interface7class$$E: -+ .long _ZN9Interface6class$E -+ .text -+ .align 2 -+.globl _ZN5ClassC1Ev -+ .type _ZN5ClassC1Ev, @function -+_ZN5ClassC1Ev: -+.LFB2: -+ pushl %ebp -+.LCFI0: -+ movl %esp, %ebp -+.LCFI1: -+ subl $24, %esp -+.LCFI2: -+.LBB2: -+#if 0 -+ .file 1 "interface.java" -+#else -+ .file "interface.java" -+#endif -+ .loc 1 4 0 -+ movl 8(%ebp), %eax -+ movl %eax, -4(%ebp) -+ movl -4(%ebp), %eax -+ movl %eax, (%esp) -+ call _ZN4java4lang6ObjectC1Ev -+.LBE2: -+ leave -+ ret -+.LFE2: -+ .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev -+ .hidden _ZTVN5ClassE -+.globl _ZTVN5ClassE -+ .data -+ .align 32 -+ .type _ZTVN5ClassE, @object -+ .size _ZTVN5ClassE, 40 -+_ZTVN5ClassE: -+ .long 0 -+ .long 0 -+ .long _ZN5Class6class$E -+ .long 4 -+ .long _ZN4java4lang6Object8finalizeEJvv -+ .long _ZN4java4lang6Object8hashCodeEJiv -+ .long _ZN4java4lang6Object6equalsEJbPS1_ -+ .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv -+ .long _ZN4java4lang6Object5cloneEJPS1_v -+ .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv -+ .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev -+ .section .rodata -+ .align 2 -+ .type _Utf2, @object -+ .size _Utf2, 4 -+_Utf2: -+ .value 626 -+ .value 6 -+ .ascii "" -+ .zero 1 -+ .align 2 -+ .type _Utf3, @object -+ .size _Utf3, 4 -+_Utf3: -+ .value 39797 -+ .value 3 -+ .ascii "()V" -+ .zero 1 -+ .data -+ .align 4 -+ .type _MT_Class, @object -+ .size _MT_Class, 20 -+_MT_Class: -+ .long _Utf2 -+ .long _Utf3 -+ .value 16384 -+ .value -1 -+ .long .L_ZN5ClassC1Ev0 -+ .long 0 -+ .align 4 -+ .type _IF_Class, @object -+ .size _IF_Class, 4 -+_IF_Class: -+ .long _ZN9Interface6class$E -+ .align 4 -+ .type _catch_classes_Class, @object -+ .size _catch_classes_Class, 24 -+_catch_classes_Class: -+ .zero 24 -+ .section .rodata -+ .align 2 -+ .type _Utf4, @object -+ .size _Utf4, 4 -+_Utf4: -+ .value 47448 -+ .value 5 -+ .ascii "Class" -+ .zero 1 -+.globl _ZN5Class6class$E -+ .data -+ .align 32 -+ .type _ZN5Class6class$E, @object -+ .size _ZN5Class6class$E, 144 -+_ZN5Class6class$E: -+ .long _ZTVN4java4lang5ClassE+8 -+ .long 403000 -+ .long _Utf4 -+ .value 32 -+ .zero 2 -+ .long _ZN4java4lang6Object6class$E -+ .long 0 -+ .long 0 -+ .long 0 -+ .long _MT_Class -+ .value 1 -+ .value 6 -+ .long 0 -+ .long 4 -+ .value 0 -+ .value 0 -+ .long _ZTVN5ClassE+8 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long _catch_classes_Class -+ .long _IF_Class -+ .long 0 -+ .value 1 -+ .byte 1 -+ .zero 1 -+ .long 0 -+ .value 0 -+ .zero 2 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .long 0 -+ .hidden _ZN5Class7class$$E -+.globl _ZN5Class7class$$E -+ .section .rodata -+ .align 4 -+ .type _ZN5Class7class$$E, @object -+ .size _ZN5Class7class$$E, 4 -+_ZN5Class7class$$E: -+ .long _ZN5Class6class$E -+ .section .jcr,"aw",@progbits -+ .align 4 -+ .long _ZN9Interface6class$E -+ .long _ZN5Class6class$E -+ .section .debug_frame,"",@progbits -+.Lframe0: -+ .long .LECIE0-.LSCIE0 -+.LSCIE0: -+ .long 0xffffffff -+ .byte 0x1 -+ .string "" -+ .uleb128 0x1 -+ .sleb128 -4 -+ .byte 0x8 -+ .byte 0xc -+ .uleb128 0x4 -+ .uleb128 0x4 -+ .byte 0x88 -+ .uleb128 0x1 -+ .align 4 -+.LECIE0: -+.LSFDE0: -+ .long .LEFDE0-.LASFDE0 -+.LASFDE0: -+ .long .Lframe0 -+ .long .LFB2 -+ .long .LFE2-.LFB2 -+ .byte 0x4 -+ .long .LCFI0-.LFB2 -+ .byte 0xe -+ .uleb128 0x8 -+ .byte 0x85 -+ .uleb128 0x2 -+ .byte 0x4 -+ .long .LCFI1-.LCFI0 -+ .byte 0xd -+ .uleb128 0x5 -+ .align 4 -+.LEFDE0: -+ .section .eh_frame,"a",@progbits -+.Lframe1: -+ .long .LECIE1-.LSCIE1 -+.LSCIE1: -+ .long 0x0 -+ .byte 0x1 -+.globl __gcj_personality_v0 -+ .string "zP" -+ .uleb128 0x1 -+ .sleb128 -4 -+ .byte 0x8 -+ .uleb128 0x5 -+ .byte 0x0 -+ .long __gcj_personality_v0 -+ .byte 0xc -+ .uleb128 0x4 -+ .uleb128 0x4 -+ .byte 0x88 -+ .uleb128 0x1 -+ .align 4 -+.LECIE1: -+.LSFDE1: -+ .long .LEFDE1-.LASFDE1 -+.LASFDE1: -+ .long .LASFDE1-.Lframe1 -+ .long .LFB2 -+ .long .LFE2-.LFB2 -+ .uleb128 0x0 -+ .byte 0x4 -+ .long .LCFI0-.LFB2 -+ .byte 0xe -+ .uleb128 0x8 -+ .byte 0x85 -+ .uleb128 0x2 -+ .byte 0x4 -+ .long .LCFI1-.LCFI0 -+ .byte 0xd -+ .uleb128 0x5 -+ .align 4 -+.LEFDE1: -+ .text -+.Letext0: -+ .section .debug_loc,"",@progbits -+.Ldebug_loc0: -+.LLST0: -+ .long .LFB2-.Ltext0 -+ .long .LCFI0-.Ltext0 -+ .value 0x2 -+ .byte 0x74 -+ .sleb128 4 -+ .long .LCFI0-.Ltext0 -+ .long .LCFI1-.Ltext0 -+ .value 0x2 -+ .byte 0x74 -+ .sleb128 8 -+ .long .LCFI1-.Ltext0 -+ .long .LFE2-.Ltext0 -+ .value 0x2 -+ .byte 0x75 -+ .sleb128 8 -+ .long 0x0 -+ .long 0x0 -+ .section .debug_info -+ .long 0x117 -+ .value 0x2 -+ .long .Ldebug_abbrev0 -+ .byte 0x4 -+ .uleb128 0x1 -+ .string "GNU Java 4.3.0 20071221 (experimental)" -+ .byte 0xb -+ .string "interface.java" -+ .string "/home/jkratoch/redhat/bz371831" -+ .long .Ltext0 -+ .long .Letext0 -+ .long .Ldebug_line0 -+ .uleb128 0x2 -+ .string "Interface" -+ .byte 0x4 -+ .byte 0x1 -+ .byte 0x0 -+ .long 0x8e -+ .long 0x8e -+ .uleb128 0x3 -+ .long 0x8e -+ .byte 0x2 -+ .byte 0x23 -+ .uleb128 0x0 -+ .byte 0x1 -+ .byte 0x0 -+ .uleb128 0x4 -+ .string "java.lang.Object" -+ .byte 0x1 -+ .uleb128 0x5 -+ .string "Class" -+ .byte 0x4 -+ .byte 0x1 -+ .byte 0x0 -+ .long 0x8e -+ .long 0xe8 -+ .uleb128 0x3 -+ .long 0x8e -+ .byte 0x2 -+ .byte 0x23 -+ .uleb128 0x0 -+ .byte 0x1 -+ .uleb128 0x6 -+ .long 0x6e -+ .byte 0x2 -+ .byte 0x23 -+ .uleb128 0x0 -+ .byte 0x1 -+ .byte 0x1 -+ .uleb128 0x7 -+ .byte 0x1 -+ .string "" -+ .byte 0x1 -+ .byte 0x0 -+ .string "_ZN5ClassC1Ev" -+ .byte 0x1 -+ .uleb128 0x8 -+ .long 0xe8 -+ .byte 0x1 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x9 -+ .byte 0x4 -+ .long 0xa1 -+ .uleb128 0xa -+ .long 0xc6 -+ .long .LFB2 -+ .long .LFE2 -+ .long .LLST0 -+ .long 0x114 -+ .uleb128 0xb -+ .long 0xe8 -+ .byte 0x2 -+ .byte 0x91 -+ .sleb128 0 -+ .uleb128 0xc -+ .long 0x114 -+ .byte 0x2 -+ .byte 0x91 -+ .sleb128 -12 -+ .byte 0x0 -+ .uleb128 0x9 -+ .byte 0x4 -+ .long 0x8e -+ .byte 0x0 -+ .section .debug_abbrev -+ .uleb128 0x1 -+ .uleb128 0x11 -+ .byte 0x1 -+ .uleb128 0x25 -+ .uleb128 0x8 -+ .uleb128 0x13 -+ .uleb128 0xb -+ .uleb128 0x3 -+ .uleb128 0x8 -+ .uleb128 0x1b -+ .uleb128 0x8 -+ .uleb128 0x11 -+ .uleb128 0x1 -+ .uleb128 0x12 -+ .uleb128 0x1 -+ .uleb128 0x10 -+ .uleb128 0x6 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x2 -+ .uleb128 0x38 -+ .byte 0x1 -+ .uleb128 0x3 -+ .uleb128 0x8 -+ .uleb128 0xb -+ .uleb128 0xb -+ .uleb128 0x3a -+ .uleb128 0xb -+ .uleb128 0x3b -+ .uleb128 0xb -+ .uleb128 0x1d -+ .uleb128 0x13 -+ .uleb128 0x1 -+ .uleb128 0x13 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x3 -+ .uleb128 0x1c -+ .byte 0x0 -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .uleb128 0x38 -+ .uleb128 0xa -+ .uleb128 0x32 -+ .uleb128 0xb -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x4 -+ .uleb128 0x2 -+ .byte 0x0 -+ .uleb128 0x3 -+ .uleb128 0x8 -+ .uleb128 0x3c -+ .uleb128 0xc -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x5 -+ .uleb128 0x2 -+ .byte 0x1 -+ .uleb128 0x3 -+ .uleb128 0x8 -+ .uleb128 0xb -+ .uleb128 0xb -+ .uleb128 0x3a -+ .uleb128 0xb -+ .uleb128 0x3b -+ .uleb128 0xb -+ .uleb128 0x1d -+ .uleb128 0x13 -+ .uleb128 0x1 -+ .uleb128 0x13 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x6 -+ .uleb128 0x1c -+ .byte 0x0 -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .uleb128 0x38 -+ .uleb128 0xa -+ .uleb128 0x4c -+ .uleb128 0xb -+ .uleb128 0x32 -+ .uleb128 0xb -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x7 -+ .uleb128 0x2e -+ .byte 0x1 -+ .uleb128 0x3f -+ .uleb128 0xc -+ .uleb128 0x3 -+ .uleb128 0x8 -+ .uleb128 0x3a -+ .uleb128 0xb -+ .uleb128 0x3b -+ .uleb128 0xb -+ .uleb128 0x2007 -+ .uleb128 0x8 -+ .uleb128 0x3c -+ .uleb128 0xc -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x8 -+ .uleb128 0x5 -+ .byte 0x0 -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .uleb128 0x34 -+ .uleb128 0xc -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0x9 -+ .uleb128 0xf -+ .byte 0x0 -+ .uleb128 0xb -+ .uleb128 0xb -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0xa -+ .uleb128 0x2e -+ .byte 0x1 -+ .uleb128 0x47 -+ .uleb128 0x13 -+ .uleb128 0x11 -+ .uleb128 0x1 -+ .uleb128 0x12 -+ .uleb128 0x1 -+ .uleb128 0x40 -+ .uleb128 0x6 -+ .uleb128 0x1 -+ .uleb128 0x13 -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0xb -+ .uleb128 0x5 -+ .byte 0x0 -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .uleb128 0x2 -+ .uleb128 0xa -+ .byte 0x0 -+ .byte 0x0 -+ .uleb128 0xc -+ .uleb128 0x34 -+ .byte 0x0 -+ .uleb128 0x49 -+ .uleb128 0x13 -+ .uleb128 0x2 -+ .uleb128 0xa -+ .byte 0x0 -+ .byte 0x0 -+ .byte 0x0 -+ .section .debug_pubnames,"",@progbits -+ .long 0x15 -+ .value 0x2 -+ .long .Ldebug_info0 -+ .long 0x11b -+ .long 0xee -+ .string "()" -+ .long 0x0 -+ .section .debug_aranges,"",@progbits -+ .long 0x1c -+ .value 0x2 -+ .long .Ldebug_info0 -+ .byte 0x4 -+ .byte 0x0 -+ .value 0x0 -+ .value 0x0 -+ .long .Ltext0 -+ .long .Letext0-.Ltext0 -+ .long 0x0 -+ .long 0x0 -+ .ident "GCC: (GNU) 4.3.0 20071221 (experimental)" -+ .section .note.GNU-stack,"",@progbits -Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp 2016-02-15 23:23:15.978593556 +0100 -@@ -0,0 +1,59 @@ -+# Copyright 2007 Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+# Please email any bugs, comments, and/or additions to this file to: -+# bug-gdb@gnu.org -+ -+# This file is part of the gdb testsuite. -+ -+# Test basis recognization of DW_TAG_interface_type. -+# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE. -+ -+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then { -+ verbose "Skipping i386 Java DW_TAG_interface_type test." -+ return -+} -+ -+set testfile "i386-interface" -+set srcfile ${testfile}.S -+set binfile [standard_output_file ${testfile}.o] -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } { -+ untested i386-gnu-cfi.exp -+ return -1 -+} -+ -+# Get things started. -+ -+gdb_exit -+gdb_start -+gdb_reinitialize_dir $srcdir/$subdir -+gdb_load ${binfile} -+ -+gdb_test "set language java" -+ -+set test "ptype Interface" -+gdb_test_multiple $test $test { -+ -re "type = class Interface *extends java.lang.Object \{.*$gdb_prompt $" { -+ pass $test -+ } -+} -+ -+set test "ptype Class" -+gdb_test_multiple $test $test { -+ -re "type = class Class *extends java.lang.Object implements Interface \{.*$gdb_prompt $" { -+ pass $test -+ } -+} diff --git a/gdb-6.8-bz436037-reg-no-longer-active.patch b/gdb-6.8-bz436037-reg-no-longer-active.patch index 4987714..49b225a 100644 --- a/gdb-6.8-bz436037-reg-no-longer-active.patch +++ b/gdb-6.8-bz436037-reg-no-longer-active.patch @@ -1,17 +1,22 @@ -Index: gdb-6.8.50.20090803/gdb/valops.c +Index: gdb-7.12.50.20170207/gdb/valops.c =================================================================== ---- gdb-6.8.50.20090803.orig/gdb/valops.c 2009-08-04 06:30:45.000000000 +0200 -+++ gdb-6.8.50.20090803/gdb/valops.c 2009-08-04 06:33:05.000000000 +0200 -@@ -926,10 +926,18 @@ value_assign (struct value *toval, struc +--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-26 17:26:43.839146565 +0100 ++++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-26 17:28:40.840988272 +0100 +@@ -1112,6 +1112,8 @@ struct gdbarch *gdbarch; int value_reg; -- /* Figure out which frame this is in currently. */ -- frame = frame_find_by_id (VALUE_FRAME_ID (toval)); - value_reg = VALUE_REGNUM (toval); ++ value_reg = VALUE_REGNUM (toval); ++ + /* Figure out which frame this is in currently. + + We use VALUE_FRAME_ID for obtaining the value's frame id instead of +@@ -1121,8 +1123,14 @@ + frame. */ + frame = frame_find_by_id (VALUE_FRAME_ID (toval)); -+ /* Figure out which frame this is in currently. */ -+ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); +- value_reg = VALUE_REGNUM (toval); +- + /* "set $reg+=1" should work on programs with no debug info, + but frame_find_by_id returns NULL here (RH bug 436037). + Use current frame, it represents CPU state in this case. diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch index 55e714e..0dc71b8 100644 --- a/gdb-6.8-quit-never-aborts.patch +++ b/gdb-6.8-quit-never-aborts.patch @@ -5,11 +5,11 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they should have been detached with SIGSTOP (as they are accidentally left running on the debugger termination). -Index: gdb-7.11.50.20160630/gdb/defs.h +Index: gdb-7.12.50.20170207/gdb/defs.h =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/defs.h 2016-07-03 16:40:43.423078926 +0200 -+++ gdb-7.11.50.20160630/gdb/defs.h 2016-07-03 16:41:08.568271741 +0200 -@@ -175,6 +175,10 @@ +--- gdb-7.12.50.20170207.orig/gdb/defs.h 2017-02-26 21:11:35.654350580 +0100 ++++ gdb-7.12.50.20170207/gdb/defs.h 2017-02-26 21:11:52.932473129 +0100 +@@ -169,6 +169,10 @@ /* Flag that function quit should call quit_force. */ extern volatile int sync_quit_force_run; @@ -20,10 +20,10 @@ Index: gdb-7.11.50.20160630/gdb/defs.h extern void quit (void); /* Helper for the QUIT macro. */ -Index: gdb-7.11.50.20160630/gdb/extension.c +Index: gdb-7.12.50.20170207/gdb/extension.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/extension.c 2016-07-03 16:40:41.723065890 +0200 -+++ gdb-7.11.50.20160630/gdb/extension.c 2016-07-03 16:41:44.896550309 +0200 +--- gdb-7.12.50.20170207.orig/gdb/extension.c 2017-02-26 21:11:35.655350587 +0100 ++++ gdb-7.12.50.20170207/gdb/extension.c 2017-02-26 21:11:52.933473136 +0100 @@ -830,6 +830,11 @@ int i, result = 0; const struct extension_language_defn *extlang; @@ -36,12 +36,12 @@ Index: gdb-7.11.50.20160630/gdb/extension.c ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang) { if (extlang->ops->check_quit_flag != NULL) -Index: gdb-7.11.50.20160630/gdb/top.c +Index: gdb-7.12.50.20170207/gdb/top.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/top.c 2016-07-03 16:40:41.724065898 +0200 -+++ gdb-7.11.50.20160630/gdb/top.c 2016-07-03 16:40:43.424078934 +0200 -@@ -1617,7 +1617,13 @@ - qt.args = args; +--- gdb-7.12.50.20170207.orig/gdb/top.c 2017-02-26 21:11:35.655350587 +0100 ++++ gdb-7.12.50.20170207/gdb/top.c 2017-02-26 21:11:52.933473136 +0100 +@@ -1619,7 +1619,13 @@ + qt.args = NULL; qt.from_tty = from_tty; +#ifndef NEED_DETACH_SIGSTOP @@ -54,11 +54,11 @@ Index: gdb-7.11.50.20160630/gdb/top.c /* Get out of tfind mode, and kill or detach all inferiors. */ TRY -Index: gdb-7.11.50.20160630/gdb/utils.c +Index: gdb-7.12.50.20170207/gdb/utils.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/utils.c 2016-07-03 16:40:41.725065905 +0200 -+++ gdb-7.11.50.20160630/gdb/utils.c 2016-07-03 16:41:38.961504799 +0200 -@@ -109,6 +109,13 @@ +--- gdb-7.12.50.20170207.orig/gdb/utils.c 2017-02-26 21:11:35.657350601 +0100 ++++ gdb-7.12.50.20170207/gdb/utils.c 2017-02-26 21:11:52.934473143 +0100 +@@ -106,6 +106,13 @@ int job_control; diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch index 85a6967..240b17e 100644 --- a/gdb-archer-pie-addons.patch +++ b/gdb-archer-pie-addons.patch @@ -42,30 +42,6 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n)) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n)) -Index: gdb-7.9.50.20150520/gdb/jv-lang.c -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/jv-lang.c 2015-05-31 16:55:29.724475491 +0200 -+++ gdb-7.9.50.20150520/gdb/jv-lang.c 2015-05-31 16:55:30.820482408 +0200 -@@ -427,7 +427,8 @@ java_link_class_type (struct gdbarch *gd - - fields = NULL; - nfields--; /* First set up dummy "class" field. */ -- SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas)); -+ SET_FIELD_PHYSADDR (TYPE_FIELD (type, nfields), value_address (clas) -+ - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type))))); - TYPE_FIELD_NAME (type, nfields) = "class"; - TYPE_FIELD_TYPE (type, nfields) = value_type (clas); - SET_TYPE_FIELD_PRIVATE (type, nfields); -@@ -475,7 +476,8 @@ java_link_class_type (struct gdbarch *gd - SET_TYPE_FIELD_PROTECTED (type, i); - } - if (accflags & 0x0008) /* ACC_STATIC */ -- SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset); -+ SET_FIELD_PHYSADDR (TYPE_FIELD (type, i), boffset -+ - (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type))))); - else - SET_FIELD_BITPOS (TYPE_FIELD (type, i), 8 * boffset); - if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */ Index: gdb-7.9.50.20150520/gdb/value.c =================================================================== --- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-31 16:55:29.725475497 +0200 diff --git a/gdb-archer-vla-tests.patch b/gdb-archer-vla-tests.patch index b27ef75..6c8a3a6 100644 --- a/gdb-archer-vla-tests.patch +++ b/gdb-archer-vla-tests.patch @@ -1,7 +1,7 @@ -Index: gdb-7.12/gdb/testsuite/gdb.ada/packed_array.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp =================================================================== ---- gdb-7.12.orig/gdb/testsuite/gdb.ada/packed_array.exp 2016-08-01 17:50:21.000000000 +0200 -+++ gdb-7.12/gdb/testsuite/gdb.ada/packed_array.exp 2016-10-22 09:45:15.849013467 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:28.552824751 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:36.597882316 +0100 @@ -56,5 +56,11 @@ # are. Observed with (FSF GNU Ada 4.5.3 20110124). xfail $test @@ -14,10 +14,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.ada/packed_array.exp + } } -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S 2016-10-22 09:50:38.510393903 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S 2017-02-26 19:15:36.598882323 +0100 @@ -0,0 +1,358 @@ + .file "x86_64-vla-pointer.c" + .text @@ -377,10 +377,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S + .string "array" + .ident "GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)" + .section .note.GNU-stack,"",@progbits -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c 2016-10-22 09:50:40.335407367 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c 2017-02-26 19:15:36.598882323 +0100 @@ -0,0 +1,45 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -427,10 +427,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c +} + +#endif -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp 2016-10-22 21:10:56.210413346 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp 2017-02-26 19:15:36.598882323 +0100 @@ -0,0 +1,65 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -497,10 +497,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp +gdb_test "whatis array" "type = array_t" "second: whatis array" +gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "second: whatis array_t" +gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array" -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2016-10-22 09:45:15.851013482 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2017-02-26 19:15:36.598882323 +0100 @@ -0,0 +1,455 @@ + .file "x86_64-vla-typedef.c" + .section .debug_abbrev,"",@progbits @@ -957,10 +957,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S + .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)" + .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)" + .section .note.GNU-stack,"",@progbits -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2016-10-22 09:45:15.851013482 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2017-02-26 19:15:36.599882330 +0100 @@ -0,0 +1,45 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1007,10 +1007,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c +} + +#endif -Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2016-10-22 09:45:15.851013482 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2017-02-26 19:15:36.599882330 +0100 @@ -0,0 +1,64 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -1076,10 +1076,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp +gdb_test "whatis array" "type = array_t" "second: whatis array" + +gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array" -Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c =================================================================== ---- gdb-7.12.orig/gdb/testsuite/gdb.base/arrayidx.c 2016-08-01 17:50:21.000000000 +0200 -+++ gdb-7.12/gdb/testsuite/gdb.base/arrayidx.c 2016-10-22 09:45:15.851013482 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:28.555824772 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:36.599882330 +0100 @@ -17,6 +17,13 @@ int array[] = {1, 2, 3, 4}; @@ -1094,13 +1094,13 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.c int main (void) { -Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp =================================================================== ---- gdb-7.12.orig/gdb/testsuite/gdb.base/arrayidx.exp 2016-08-01 17:50:21.000000000 +0200 -+++ gdb-7.12/gdb/testsuite/gdb.base/arrayidx.exp 2016-10-22 09:45:15.851013482 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:28.555824772 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:36.599882330 +0100 @@ -49,4 +49,12 @@ "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ - "Print array with array-indexes on" + "print array with array-indexes on" - +set test "p unbound.a == &unbound.a\[0\]" @@ -1112,10 +1112,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.exp + unsupported "$test (no GCC)" + } +} -Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.c 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c 2017-02-26 19:15:36.599882330 +0100 @@ -0,0 +1,20 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1137,10 +1137,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.c +struct { + int field; +} staticstruct = { 1 }; -Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.exp 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,26 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -1168,10 +1168,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.exp + +gdb_test {set $varstruct = staticstruct} +gdb_test {p $varstruct.field} " = 1" -Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla-frame.c 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,31 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1204,10 +1204,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.c + f (s); + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla-frame.exp 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,38 @@ +# Copyright 2011 Free Software Foundation, Inc. +# @@ -1247,10 +1247,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.exp +} + +gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*" -Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.c 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,30 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1282,10 +1282,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.c + + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.exp 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,109 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -1396,10 +1396,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.exp +gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()" + +verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]" -Index: gdb-7.12/gdb/testsuite/gdb.base/vla.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla.c 2016-10-22 09:45:15.852013490 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,55 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1456,10 +1456,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla.c + foo (78); + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.base/vla.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.base/vla.exp 2016-10-22 09:45:15.853013497 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp 2017-02-26 19:15:36.600882337 +0100 @@ -0,0 +1,62 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -1523,10 +1523,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.base/vla.exp +gdb_test "p temp1" " = '1' " "second: print temp1" +gdb_test "p temp2" " = '2' " "second: print temp2" +gdb_test "p temp3" " = '3' " "second: print temp3" -Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.cc +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.cc 2016-10-22 09:45:15.853013497 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc 2017-02-26 19:15:36.601882344 +0100 @@ -0,0 +1,180 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1708,10 +1708,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.cc + } +} + -Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.exp 2016-10-22 09:45:15.853013497 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp 2017-02-26 19:15:36.601882344 +0100 @@ -0,0 +1,182 @@ +# Copyright 2008, 2009 Free Software Foundation, Inc. + @@ -1895,10 +1895,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.exp +gdb_test "advance $line" \ + ".*catch (...).*" \ + "advance-over-throw" -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2016-10-22 09:45:15.853013497 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2017-02-26 19:15:36.601882344 +0100 @@ -0,0 +1,246 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -2146,10 +2146,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S + .string "char" +.Luint_str: + .string "unsigned int" -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,66 @@ +# Copyright 2010 Free Software Foundation, Inc. + @@ -2217,10 +2217,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp + +# The register contains unpredictable value - the array size. +gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]} -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,42 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -2264,10 +2264,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.c + func1 (1, 2); + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,79 @@ +# Copyright 2006 Free Software Foundation, Inc. + @@ -2348,10 +2348,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp +gdb_test "step" \ + "func.* \\(.*\\) at .*" \ + "step" -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,83 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -2436,10 +2436,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S + + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,37 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -2478,10 +2478,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp +clean_restart $binfile + +gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}" -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2016-10-22 09:45:15.854013504 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2017-02-26 19:15:36.602882352 +0100 @@ -0,0 +1,121 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -2604,10 +2604,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S + .byte 0x0 /* Terminator */ + + .byte 0x0 /* Terminator */ -Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2017-02-26 19:15:36.603882359 +0100 @@ -0,0 +1,39 @@ +# Copyright 2012 Free Software Foundation, Inc. + @@ -2648,10 +2648,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp + +gdb_test "ptype notype_string" {type = char \[129\]} +gdb_test "p notype_string" " = 'x' " -Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2017-02-26 19:15:36.603882359 +0100 @@ -0,0 +1,42 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -2695,10 +2695,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.exp +gdb_continue_to_breakpoint "break-here" ".*break-here.*" +gdb_test "p c40pt(1)" " = '0-hello.*" +gdb_test "p c40pt(2)" " = '1-hello.*" -Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2017-02-26 19:15:36.603882359 +0100 @@ -0,0 +1,40 @@ +! Copyright 2009 Free Software Foundation, Inc. +! @@ -2740,10 +2740,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.f90 + print *, c40pt ! break-here + +end program repro -Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.exp 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp 2017-02-26 19:15:36.603882359 +0100 @@ -0,0 +1,154 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -2899,10 +2899,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.exp +gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9" +# maps to foo::vary(1,3) +gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10" -Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.f90 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90 2017-02-26 19:15:36.603882359 +0100 @@ -0,0 +1,98 @@ +! Copyright 2007 Free Software Foundation, Inc. +! @@ -3002,10 +3002,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.f90 + if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort + if (x (3, 1) .ne. 10) call abort +end -Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/string.exp 2016-10-22 09:45:15.855013512 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,59 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -3066,10 +3066,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.exp +gdb_continue_to_breakpoint "var-finish" +gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set" +gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f2 ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\)" "p *f re-set" -Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/string.f90 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,37 @@ +! Copyright 2008 Free Software Foundation, Inc. +! @@ -3108,10 +3108,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.f90 + h = 'h' + call foo (g, h) +end -Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/subrange.exp 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,72 @@ +# Copyright 2011 Free Software Foundation, Inc. + @@ -3185,10 +3185,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.exp +gdb_unload +setup_kfail "*-*-*" "vlaregression/9999" +gdb_test {p $a (3, 2:2)} { = \(23\)} -Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.fortran/subrange.f90 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,28 @@ +! Copyright 2011 Free Software Foundation, Inc. +! @@ -3218,10 +3218,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.f90 + ptr => a + write (*,*) a ! break-static +end -Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,26 @@ +/* Copyright 2011 Free Software Foundation, Inc. + @@ -3249,10 +3249,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.c + + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,57 @@ +# Copyright 2011 Free Software Foundation, Inc. +# @@ -3311,10 +3311,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp +mi_create_varobj "vla" "vla" "create local variable vla" + +mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *" -Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register-func.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register-func.c 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c 2017-02-26 19:15:36.604882366 +0100 @@ -0,0 +1,22 @@ +/* This file is part of GDB, the GNU debugger. + @@ -3338,10 +3338,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register-func.c +{ + return arr[0]; +} -Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.c +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.c 2016-10-22 09:45:15.856013519 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,28 @@ +/* This file is part of GDB, the GNU debugger. + @@ -3371,10 +3371,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.c + + return 0; +} -Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.exp 2016-10-22 09:45:15.857013527 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,33 @@ +# Copyright 2009 Free Software Foundation, Inc. +# @@ -3409,10 +3409,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.exp +# Seen regression: +# Address requested for identifier "arr" which is in register $rdi +gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42" -Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.exp 2016-10-22 09:45:15.857013527 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,39 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -3453,10 +3453,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.exp +gdb_test "frame" ".*s='foo'.*" +gdb_test "ptype s" "type = character\\*3" +gdb_test "p s" "\\$\[0-9\]* = 'foo'" -Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.f90 2016-10-22 09:45:15.857013527 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,28 @@ +! Copyright 2009 Free Software Foundation, Inc. +! @@ -3486,10 +3486,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.f90 + program main + call f ('foo') + end -Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.pascal/arrays.exp 2016-10-22 09:45:15.857013527 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,104 @@ +# Copyright 2008, 2009 Free Software Foundation, Inc. +# @@ -3595,10 +3595,10 @@ Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.exp +} +gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char" + -Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.pas +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.12/gdb/testsuite/gdb.pascal/arrays.pas 2016-10-22 09:45:15.857013527 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas 2017-02-26 19:15:36.605882373 +0100 @@ -0,0 +1,82 @@ +{ + Copyright 2008, 2009 Free Software Foundation, Inc. @@ -3682,11 +3682,11 @@ Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.pas + s := 'test'#0'string'; + writeln(s); { set breakpoint 2 here } +end. -Index: gdb-7.12/gdb/testsuite/lib/gdb.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.12.orig/gdb/testsuite/lib/gdb.exp 2016-10-22 09:45:15.106007986 +0200 -+++ gdb-7.12/gdb/testsuite/lib/gdb.exp 2016-10-22 09:45:15.858013534 +0200 -@@ -173,6 +173,11 @@ +--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:28.564824836 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:36.607882387 +0100 +@@ -178,6 +178,11 @@ send_gdb "y\n" exp_continue } @@ -3698,10 +3698,10 @@ Index: gdb-7.12/gdb/testsuite/lib/gdb.exp -re "Discard symbol table from .*y or n.*$" { send_gdb "y\n" exp_continue -Index: gdb-7.12/gdb/testsuite/lib/pascal.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp =================================================================== ---- gdb-7.12.orig/gdb/testsuite/lib/pascal.exp 2016-08-01 17:50:21.000000000 +0200 -+++ gdb-7.12/gdb/testsuite/lib/pascal.exp 2016-10-22 09:45:15.859013541 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:28.565824844 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:36.607882387 +0100 @@ -37,6 +37,9 @@ global pascal_compiler_is_fpc global gpc_compiler diff --git a/gdb-archer.patch b/gdb-archer.patch index 8d9265f..970745d 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -2,7 +2,7 @@ http://sourceware.org/gdb/wiki/ProjectArcher http://sourceware.org/gdb/wiki/ArcherBranchManagement GIT snapshot: -commit cfee64ee869a6a6e4ab0b64af149d4cf59517d80 +commit e2c0cbf93cf20667be449a75d2ada5d377ddb090 tromey/python @@ -16,10 +16,10 @@ index 0000000..173b8ea +This branch originally held the Python code for gdb. It still exists +because a small amount of code here has not yet been merged upstream. diff --git a/gdb/Makefile.in b/gdb/Makefile.in -index 5af6103..9c69cb0 100644 +index 268c2c6..4045ef7 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in -@@ -1553,6 +1553,12 @@ stamp-h: $(srcdir)/config.in config.status +@@ -2345,6 +2345,12 @@ stamp-h: $(srcdir)/config.in config.status CONFIG_LINKS= \ $(SHELL) config.status @@ -33,21 +33,22 @@ index 5af6103..9c69cb0 100644 $(SHELL) config.status --recheck diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in -index 3f23516..b5d6390 100644 +index 304d4b0..d2007a4 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in -@@ -66,7 +66,10 @@ PYTHON_FILE_LIST = \ +@@ -77,7 +77,11 @@ PYTHON_FILE_LIST = \ + gdb/types.py \ gdb/unwinder.py \ - gdb/prompt.py \ gdb/xmethod.py \ + gdb/types.py \ gdb/command/__init__.py \ + gdb/command/ignore_errors.py \ + gdb/command/pahole.py \ - gdb/command/xmethods.py \ ++ gdb/command/xmethods.py \ + gdb/command/explore.py \ gdb/command/frame_filters.py \ - gdb/command/unwinders.py \ -@@ -78,6 +81,8 @@ PYTHON_FILE_LIST = \ + gdb/command/pretty_printers.py \ +@@ -89,6 +93,8 @@ PYTHON_FILE_LIST = \ gdb/function/as_string.py \ gdb/function/caller_is.py \ gdb/function/strfns.py \ @@ -57,10 +58,10 @@ index 3f23516..b5d6390 100644 gdb/printer/bound_registers.py diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo -index f5dde61..1d92bd6 100644 +index 962325b..589e22c 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo -@@ -1225,6 +1225,16 @@ for remote debugging. +@@ -1230,6 +1230,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. @@ -78,7 +79,7 @@ index f5dde61..1d92bd6 100644 @item -tui @cindex @code{--tui} diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi -index a17e37d..c56068b 100644 +index c3ea203..a3bdb98 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -88,8 +88,6 @@ containing @code{end}. For example: @@ -111,7 +112,7 @@ index 05a38b2..9801fdf 100644 set variable $gdb_init_done = 1 diff --git a/gdb/main.c b/gdb/main.c -index 5477379..b7e413f 100644 +index 30e27c2..0460c28 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -33,6 +33,7 @@ @@ -122,16 +123,16 @@ index 5477379..b7e413f 100644 #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -459,6 +460,8 @@ captured_main (void *data) - char *cdarg = NULL; - char *ttyarg = NULL; +@@ -459,7 +460,7 @@ struct cmdarg + }; -+ int python_script = 0; -+ - /* These are static so that we can take their address in an - initializer. */ - static int print_help; -@@ -663,10 +666,14 @@ captured_main (void *data) + 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; +@@ -674,10 +675,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}, @@ -147,7 +148,7 @@ index 5477379..b7e413f 100644 { int option_index; -@@ -684,6 +691,9 @@ captured_main (void *data) +@@ -695,6 +700,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -157,7 +158,7 @@ index 5477379..b7e413f 100644 case OPT_SE: symarg = optarg; execarg = optarg; -@@ -864,7 +874,31 @@ captured_main (void *data) +@@ -853,7 +861,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. */ @@ -190,7 +191,7 @@ index 5477379..b7e413f 100644 { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1127,7 +1161,8 @@ captured_main (void *data) +@@ -1123,7 +1155,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -200,9 +201,14 @@ index 5477379..b7e413f 100644 if (batch_flag) { -@@ -1138,13 +1173,25 @@ captured_main (void *data) - /* Show time and/or space usage. */ - do_cleanups (pre_stat_chain); +@@ -1136,16 +1169,29 @@ 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() @@ -211,16 +217,16 @@ index 5477379..b7e413f 100644 - while (1) +#if HAVE_PYTHON + if (python_script) - { -- catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); ++ { + extern int pagination_enabled; + pagination_enabled = 0; -+ run_python_script (argc - optind, &argv[optind]); -+ return 1; ++ run_python_script (context->argc - optind, &context->argv[optind]); ++ return; + } + else +#endif -+ { + { +- catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); + /* 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 @@ -232,7 +238,7 @@ index 5477379..b7e413f 100644 } /* No exit -- exit is through quit_command. */ } -@@ -1187,6 +1234,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1188,6 +1234,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\ @@ -245,7 +251,7 @@ index 5477379..b7e413f 100644 gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1231,6 +1284,13 @@ Output and user interface control:\n\n\ +@@ -1232,6 +1284,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -442,8 +448,22 @@ index 0000000..8742680 + return wanted == found + +InScope () +diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h +index 4dd413d..2ad4071 100644 +--- a/gdb/python/python-internal.h ++++ b/gdb/python/python-internal.h +@@ -551,6 +551,9 @@ class gdbpy_enter_varobj : public gdbpy_enter + + }; + ++struct cleanup *ensure_python_env (struct gdbarch *gdbarch, ++ const struct language_defn *language); ++ + extern struct gdbarch *python_gdbarch; + extern const struct language_defn *python_language; + diff --git a/gdb/python/python.c b/gdb/python/python.c -index 621e201..703a1a0 100644 +index 73fb3d0..0789c16 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python = @@ -455,7 +475,37 @@ index 621e201..703a1a0 100644 #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -1263,6 +1265,92 @@ gdbpy_print_stack (void) +@@ -242,6 +244,29 @@ gdbpy_enter::~gdbpy_enter () + restore_active_ext_lang (m_previous_active); + } + ++static void ++restore_python_env (void *p) ++{ ++ gdbpy_enter *env = (gdbpy_enter *) p; ++ ++ delete env; ++} ++ ++/* Called before entering the Python interpreter to install the ++ current language and architecture to be used for Python values. ++ Also set the active extension language for GDB so that SIGINT's ++ are directed our way, and if necessary install the right SIGINT ++ handler. */ ++ ++struct cleanup * ++ensure_python_env (struct gdbarch *gdbarch, ++ const struct language_defn *language) ++{ ++ gdbpy_enter *env = new gdbpy_enter (gdbarch, language); ++ ++ return make_cleanup (restore_python_env, env); ++} ++ + /* Set the quit flag. */ + + static void +@@ -1192,6 +1217,92 @@ gdbpy_print_stack (void) /* Return the current Progspace. There always is one. */ @@ -473,7 +523,7 @@ index 621e201..703a1a0 100644 + if (! running_python_script || in_cli) + return PyErr_Format (PyExc_RuntimeError, "cannot invoke CLI recursively"); + -+ if (ui_out_is_mi_like_p (current_uiout)) ++ if (current_uiout->is_mi_like_p ()) + return PyErr_Format (PyExc_RuntimeError, _("Cannot invoke CLI from MI.")); + + in_cli = 1; @@ -548,7 +598,7 @@ index 621e201..703a1a0 100644 static PyObject * gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2) -@@ -1981,6 +2069,8 @@ PyMethodDef python_GdbMethods[] = +@@ -1888,6 +1999,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." }, @@ -558,7 +608,7 @@ index 621e201..703a1a0 100644 "Return a gdb parameter's value" }, diff --git a/gdb/python/python.h b/gdb/python/python.h -index b810187..a3620ab 100644 +index e407faa..fc1c632 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h @@ -25,4 +25,6 @@ @@ -568,23 +618,8 @@ index b810187..a3620ab 100644 +extern void run_python_script (int argc, char **argv); + #endif /* GDB_PYTHON_H */ -diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp -index 2fdd9e3..391900d 100644 ---- a/gdb/testsuite/gdb.gdb/selftest.exp -+++ b/gdb/testsuite/gdb.gdb/selftest.exp -@@ -87,6 +87,10 @@ proc do_steps_and_nexts {} { - set description "step over cmdarg_vec initialization" - set command "step" - } -+ -re ".*python_script = 0.*$gdb_prompt $" { -+ set description "step over python_script initialization" -+ set command "step" -+ } - -re ".*pre_stat_chain = make_command_stats_cleanup.*$gdb_prompt $" { - set description "next over make_command_stats_cleanup and everything it calls" - set command "next" diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp -index b5a4682..d5451a6 100644 +index f5d4a3c..3546f7b 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r @@ -597,10 +632,10 @@ index b5a4682..d5451a6 100644 gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \ " = True" \ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp -index 57a9ba1..d90d85a 100644 +index d9a4d20..c87e4d8 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp -@@ -397,6 +397,15 @@ proc test_value_after_death {} { +@@ -407,6 +407,15 @@ proc test_value_after_death {} { "print value's type" } @@ -616,7 +651,7 @@ index 57a9ba1..d90d85a 100644 # 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. -@@ -526,6 +535,7 @@ test_value_in_inferior +@@ -536,6 +545,7 @@ test_value_in_inferior test_inferior_function_call test_lazy_strings test_value_after_death @@ -624,3 +659,35 @@ index 57a9ba1..d90d85a 100644 # Test either C or C++ values. +diff --git a/gdb/varobj.c b/gdb/varobj.c +index 173abf3..c3abf66 100644 +--- a/gdb/varobj.c ++++ b/gdb/varobj.c +@@ -226,6 +226,14 @@ is_root_p (const struct varobj *var) + } + + #ifdef HAVE_PYTHON ++/* Helper function to install a Python environment suitable for ++ use during operations on VAR. */ ++struct cleanup * ++varobj_ensure_python_env (const struct varobj *var) ++{ ++ return ensure_python_env (var->root->exp->gdbarch, ++ var->root->exp->language_defn); ++} + + /* See python-internal.h. */ + gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var) +diff --git a/gdb/varobj.h b/gdb/varobj.h +index 989c8cd..fc7f177 100644 +--- a/gdb/varobj.h ++++ b/gdb/varobj.h +@@ -320,6 +320,8 @@ extern int varobj_has_more (const struct varobj *var, int to); + + extern int varobj_is_dynamic_p (const struct varobj *var); + ++extern struct cleanup *varobj_ensure_python_env (const struct varobj *var); ++ + extern int varobj_default_value_is_changeable_p (const struct varobj *var); + extern int varobj_value_is_changeable_p (const struct varobj *var); + diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index b3027df..d9c55a9 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,13 +37,13 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.c +Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/nat/linux-ptrace.c 2016-08-29 09:35:26.798230659 +0200 -+++ gdb-7.11.90.20160829/gdb/nat/linux-ptrace.c 2016-08-29 09:35:43.162384100 +0200 -@@ -25,6 +25,10 @@ - #include "gdb_ptrace.h" +--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.c 2017-02-26 21:27:14.780009449 +0100 ++++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c 2017-02-26 21:27:18.838038193 +0100 +@@ -27,6 +27,10 @@ #include + #endif +#ifdef HAVE_SELINUX_SELINUX_H +# include @@ -52,7 +52,7 @@ Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.c /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ -@@ -49,6 +53,8 @@ +@@ -51,6 +55,8 @@ buffer_xml_printf (buffer, _("process %d is a zombie " "- the process has already terminated"), (int) pid); @@ -61,7 +61,7 @@ Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.c } /* See linux-ptrace.h. */ -@@ -592,6 +598,22 @@ +@@ -594,6 +600,22 @@ linux_ptrace_test_ret_to_nx (); } @@ -84,10 +84,10 @@ Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.c /* Extract extended ptrace event from wait status. */ int -Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.h +Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/nat/linux-ptrace.h 2016-08-29 09:35:26.798230659 +0200 -+++ gdb-7.11.90.20160829/gdb/nat/linux-ptrace.h 2016-08-29 09:35:43.162384100 +0200 +--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.h 2017-02-26 21:27:14.780009449 +0100 ++++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h 2017-02-26 21:27:18.838038193 +0100 @@ -185,6 +185,7 @@ extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); @@ -96,11 +96,11 @@ Index: gdb-7.11.90.20160829/gdb/nat/linux-ptrace.h extern void linux_check_ptrace_features (void); extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_disable_event_reporting (pid_t pid); -Index: gdb-7.11.90.20160829/gdb/configure.ac +Index: gdb-7.12.50.20170226/gdb/configure.ac =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/configure.ac 2016-08-29 09:35:26.799230668 +0200 -+++ gdb-7.11.90.20160829/gdb/configure.ac 2016-08-29 09:35:43.163384109 +0200 -@@ -2108,6 +2108,10 @@ +--- gdb-7.12.50.20170226.orig/gdb/configure.ac 2017-02-26 21:27:14.781009456 +0100 ++++ gdb-7.12.50.20170226/gdb/configure.ac 2017-02-26 21:27:18.839038200 +0100 +@@ -2092,6 +2092,10 @@ esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -111,11 +111,11 @@ Index: gdb-7.11.90.20160829/gdb/configure.ac dnl Handle optional features that can be enabled. # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, -Index: gdb-7.11.90.20160829/gdb/gdbserver/configure.ac +Index: gdb-7.12.50.20170226/gdb/gdbserver/configure.ac =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/gdbserver/configure.ac 2016-08-29 09:35:26.799230668 +0200 -+++ gdb-7.11.90.20160829/gdb/gdbserver/configure.ac 2016-08-29 09:35:43.163384109 +0200 -@@ -472,6 +472,10 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure.ac 2017-02-26 21:27:14.781009456 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbserver/configure.ac 2017-02-26 21:27:18.839038200 +0100 +@@ -469,6 +469,10 @@ fi fi @@ -126,11 +126,11 @@ Index: gdb-7.11.90.20160829/gdb/gdbserver/configure.ac AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) AC_SUBST(srv_xmlbuiltin) -Index: gdb-7.11.90.20160829/gdb/gdbserver/linux-low.c +Index: gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/gdbserver/linux-low.c 2016-08-29 09:35:26.801230687 +0200 -+++ gdb-7.11.90.20160829/gdb/gdbserver/linux-low.c 2016-08-29 09:35:43.165384128 +0200 -@@ -933,6 +933,29 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbserver/linux-low.c 2017-02-26 21:27:14.783009470 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c 2017-02-26 21:27:18.841038214 +0100 +@@ -946,6 +946,29 @@ return lwp; } @@ -160,7 +160,7 @@ Index: gdb-7.11.90.20160829/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -956,7 +979,7 @@ +@@ -969,7 +992,7 @@ if (pid == 0) { close_most_fds (); @@ -169,31 +169,11 @@ Index: gdb-7.11.90.20160829/gdb/gdbserver/linux-low.c setpgid (0, 0); -Index: gdb-7.11.90.20160829/gdb/inf-ptrace.c +Index: gdb-7.12.50.20170226/gdb/linux-nat.c =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/inf-ptrace.c 2016-08-29 09:35:26.801230687 +0200 -+++ gdb-7.11.90.20160829/gdb/inf-ptrace.c 2016-08-29 09:35:43.165384128 +0200 -@@ -79,7 +79,15 @@ - inf_ptrace_me (void) - { - /* "Trace me, Dr. Memory!" */ -+ errno = 0; - ptrace (PT_TRACE_ME, 0, (PTRACE_TYPE_ARG3)0, 0); -+ if (errno != 0) -+ { -+ fprintf_unfiltered (gdb_stderr, _("Cannot create process: %s\n"), -+ safe_strerror (errno)); -+ gdb_flush (gdb_stderr); -+ _exit (0177); -+ } - } - - /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.11.90.20160829/gdb/linux-nat.c -=================================================================== ---- gdb-7.11.90.20160829.orig/gdb/linux-nat.c 2016-08-29 09:35:26.802230697 +0200 -+++ gdb-7.11.90.20160829/gdb/linux-nat.c 2016-08-29 09:35:43.166384137 +0200 -@@ -1102,6 +1102,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/linux-nat.c 2017-02-26 21:27:14.785009484 +0100 ++++ gdb-7.12.50.20170226/gdb/linux-nat.c 2017-02-26 21:27:18.842038221 +0100 +@@ -1110,6 +1110,7 @@ { struct cleanup *restore_personality = maybe_disable_address_space_randomization (disable_randomization); @@ -201,7 +181,7 @@ Index: gdb-7.11.90.20160829/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1109,7 +1110,28 @@ +@@ -1117,7 +1118,28 @@ /* Make sure we report all signals during startup. */ linux_nat_pass_signals (ops, 0, NULL); @@ -231,11 +211,11 @@ Index: gdb-7.11.90.20160829/gdb/linux-nat.c do_cleanups (restore_personality); } -Index: gdb-7.11.90.20160829/gdb/config.in +Index: gdb-7.12.50.20170226/gdb/config.in =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/config.in 2016-08-29 09:35:26.803230706 +0200 -+++ gdb-7.11.90.20160829/gdb/config.in 2016-08-29 09:35:43.166384137 +0200 -@@ -267,6 +267,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/config.in 2017-02-26 21:27:14.786009491 +0100 ++++ gdb-7.12.50.20170226/gdb/config.in 2017-02-26 21:27:18.842038221 +0100 +@@ -270,6 +270,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -245,7 +225,7 @@ Index: gdb-7.11.90.20160829/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -399,6 +402,9 @@ +@@ -402,6 +405,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -255,11 +235,11 @@ Index: gdb-7.11.90.20160829/gdb/config.in /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -Index: gdb-7.11.90.20160829/gdb/configure +Index: gdb-7.12.50.20170226/gdb/configure =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/configure 2016-08-29 09:35:26.806230734 +0200 -+++ gdb-7.11.90.20160829/gdb/configure 2016-08-29 09:35:43.170384175 +0200 -@@ -14642,6 +14642,64 @@ +--- gdb-7.12.50.20170226.orig/gdb/configure 2017-02-26 21:27:14.790009519 +0100 ++++ gdb-7.12.50.20170226/gdb/configure 2017-02-26 21:27:18.846038249 +0100 +@@ -15492,6 +15492,64 @@ _ACEOF @@ -324,11 +304,11 @@ Index: gdb-7.11.90.20160829/gdb/configure # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # except that the argument to --with-sysroot is optional. -Index: gdb-7.11.90.20160829/gdb/gdbserver/config.in +Index: gdb-7.12.50.20170226/gdb/gdbserver/config.in =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/gdbserver/config.in 2016-08-29 09:35:26.807230743 +0200 -+++ gdb-7.11.90.20160829/gdb/gdbserver/config.in 2016-08-29 09:35:43.170384175 +0200 -@@ -120,6 +120,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbserver/config.in 2017-02-26 21:27:14.791009527 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbserver/config.in 2017-02-26 21:27:18.846038249 +0100 +@@ -123,6 +123,9 @@ /* Define to 1 if you have the `mcheck' library (-lmcheck). */ #undef HAVE_LIBMCHECK @@ -338,7 +318,7 @@ Index: gdb-7.11.90.20160829/gdb/gdbserver/config.in /* Define if the target supports branch tracing. */ #undef HAVE_LINUX_BTRACE -@@ -196,6 +199,9 @@ +@@ -199,6 +202,9 @@ /* Define to 1 if you have the `pwrite' function. */ #undef HAVE_PWRITE @@ -348,11 +328,11 @@ Index: gdb-7.11.90.20160829/gdb/gdbserver/config.in /* Define to 1 if you have the `setns' function. */ #undef HAVE_SETNS -Index: gdb-7.11.90.20160829/gdb/gdbserver/configure +Index: gdb-7.12.50.20170226/gdb/gdbserver/configure =================================================================== ---- gdb-7.11.90.20160829.orig/gdb/gdbserver/configure 2016-08-29 09:35:26.809230762 +0200 -+++ gdb-7.11.90.20160829/gdb/gdbserver/configure 2016-08-29 09:35:43.172384194 +0200 -@@ -7561,6 +7561,64 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure 2017-02-26 21:27:14.793009541 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbserver/configure 2017-02-26 21:27:18.848038263 +0100 +@@ -8429,6 +8429,64 @@ fi fi diff --git a/gdb-bison-old.patch b/gdb-bison-old.patch deleted file mode 100644 index 4fc021d..0000000 --- a/gdb-bison-old.patch +++ /dev/null @@ -1,44 +0,0 @@ -bison-3.0.4-4.fc24.x86_64 -vs. -bison-2.7-4.el7.x86_64 - -bison: -8d0b7cef7df7fead44b9574cee342de336008625 tags/v3.0.1~2 - parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex - -ada-lex.c:113:0: error: "YY_NULL" redefined [-Werror] - #define YY_NULL 0 - -ada-exp.c:158:0: note: this is the location of the previous definition - # define YY_NULL nullptr - -*-exp.c cp-name-parser.c -vs. -ada-lex.c - -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - ---- gdb-clean712/gdb/Makefile.in 2016-08-29 09:16:15.505393928 +0200 -+++ gdb-clean712/gdb/Makefile.in 2016-09-07 13:32:34.744270346 +0200 -@@ -1900,6 +1945,7 @@ po/$(PACKAGE).pot: force - -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ - -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ - -e '/^#line.*y.tab.c/d' \ -+ -e 's/\/YY_NULLPTR/g' \ - < $@.tmp > $@ - rm -f $@.tmp - .l.c: diff --git a/gdb-btrobust.patch b/gdb-btrobust.patch index b797723..dd57543 100644 --- a/gdb-btrobust.patch +++ b/gdb-btrobust.patch @@ -3,83 +3,32 @@ printed, but a default backtrace will occur in this case. -- -Index: gdb-7.9.50.20150520/gdb/python/py-framefilter.c +Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/python/py-framefilter.c 2015-05-31 17:36:34.681952530 +0200 -+++ gdb-7.9.50.20150520/gdb/python/py-framefilter.c 2015-05-31 17:55:01.884788031 +0200 -@@ -1523,6 +1523,7 @@ gdbpy_apply_frame_filter (const struct e - PyObject *iterable; - PyObject *item; - htab_t levels_printed; +--- gdb-7.12.50.20170226.orig/gdb/python/py-framefilter.c 2017-02-26 21:33:23.150618708 +0100 ++++ gdb-7.12.50.20170226/gdb/python/py-framefilter.c 2017-02-26 21:33:29.993667179 +0100 +@@ -1388,6 +1388,7 @@ + htab_eq_pointer, + NULL)); + + int count_printed = 0; - - if (!gdb_python_initialized) - return EXT_LANG_BT_NO_FILTERS; -@@ -1543,24 +1544,7 @@ gdbpy_apply_frame_filter (const struct e - iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high); - - if (iterable == NULL) -- { -- /* Normally if there is an error GDB prints the exception, -- abandons the backtrace and exits. The user can then call "bt -- no-filters", and get a default backtrace (it would be -- confusing to automatically start a standard backtrace halfway -- through a Python filtered backtrace). However in the case -- where GDB cannot initialize the frame filters (most likely -- due to incorrect auto-load paths), GDB has printed nothing. -- In this case it is OK to print the default backtrace after -- printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS -- here to signify there are no filters after printing the -- initialization error. This return code will trigger a -- default backtrace. */ -- -- gdbpy_print_stack (); -- do_cleanups (cleanups); -- return EXT_LANG_BT_NO_FILTERS; -- } -+ goto error_nothing_printed; - - /* If iterable is None, then there are no frame filters registered. - If this is the case, defer to default GDB printing routines in MI -@@ -1591,15 +1575,40 @@ gdbpy_apply_frame_filter (const struct e + while (true) + { + gdbpy_ref<> item (PyIter_Next (iterable.get ())); +@@ -1397,7 +1398,7 @@ + if (PyErr_Occurred ()) + { + gdbpy_print_stack (); +- return EXT_LANG_BT_ERROR; ++ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS; + } + break; + } +@@ -1409,6 +1410,7 @@ error and continue with other frames. */ if (success == EXT_LANG_BT_ERROR) gdbpy_print_stack (); -+ + count_printed++; } - if (item == NULL && PyErr_Occurred ()) -- goto error; -+ { -+ if (count_printed > 0) -+ goto error; -+ else -+ goto error_nothing_printed; -+ } - - done: - do_cleanups (cleanups); return success; - -+ /* Normally if there is an error GDB prints the exception, -+ abandons the backtrace and exits. The user can then call "bt -+ no-filters", and get a default backtrace (it would be -+ confusing to automatically start a standard backtrace halfway -+ through a Python filtered backtrace). However in the case -+ where GDB cannot initialize the frame filters (most likely -+ due to incorrect auto-load paths), GDB has printed nothing. -+ In this case it is OK to print the default backtrace after -+ printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS -+ here to signify there are no filters after printing the -+ initialization error. This return code will trigger a -+ default backtrace. */ -+ -+ error_nothing_printed: -+ gdbpy_print_stack (); -+ do_cleanups (cleanups); -+ return EXT_LANG_BT_NO_FILTERS; -+ - /* Exit and abandon backtrace on error, printing the exception that - is set. */ - error: diff --git a/gdb-dts-rhel6-python-compat.patch b/gdb-dts-rhel6-python-compat.patch index cba1a5b..8adf7f4 100644 --- a/gdb-dts-rhel6-python-compat.patch +++ b/gdb-dts-rhel6-python-compat.patch @@ -1,30 +1,30 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1020004 -Index: gdb-7.11.50.20160630/gdb/data-directory/Makefile.in +Index: gdb-7.12.50.20170207/gdb/data-directory/Makefile.in =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/data-directory/Makefile.in 2016-07-03 16:32:13.788164041 +0200 -+++ gdb-7.11.50.20160630/gdb/data-directory/Makefile.in 2016-07-03 16:32:17.868198850 +0200 -@@ -61,6 +61,8 @@ - gdb/frames.py \ - gdb/FrameIterator.py \ +--- gdb-7.12.50.20170207.orig/gdb/data-directory/Makefile.in 2017-02-26 21:10:31.418894975 +0100 ++++ gdb-7.12.50.20170207/gdb/data-directory/Makefile.in 2017-02-26 21:11:07.083147930 +0100 +@@ -71,6 +71,8 @@ + gdb/__init__.py \ gdb/FrameDecorator.py \ + gdb/FrameIterator.py \ + gdb/FrameWrapper.py \ + gdb/backtrace.py \ - gdb/types.py \ + gdb/frames.py \ gdb/printing.py \ - gdb/unwinder.py \ -@@ -77,6 +79,7 @@ - gdb/command/pretty_printers.py \ - gdb/command/prompt.py \ + gdb/prompt.py \ +@@ -83,6 +85,7 @@ + gdb/command/pahole.py \ + gdb/command/xmethods.py \ gdb/command/explore.py \ + gdb/command/backtrace.py \ - gdb/function/__init__.py \ - gdb/function/as_string.py \ - gdb/function/caller_is.py \ -Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py + gdb/command/frame_filters.py \ + gdb/command/pretty_printers.py \ + gdb/command/prompt.py \ +Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py 2016-07-03 16:32:17.869198859 +0200 ++++ gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py 2017-02-26 21:10:31.419894983 +0100 @@ -0,0 +1,122 @@ +# Wrapper API for frames. + @@ -62,7 +62,7 @@ Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py + if val != None: + val = str (val) + # FIXME: would be nice to have a more precise exception here. -+ except RuntimeError, text: ++ except RuntimeError as text: + val = text + if val == None: + stream.write ("???") @@ -148,10 +148,10 @@ Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/FrameWrapper.py + + def __getattr__ (self, name): + return getattr (self.frame, name) -Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/backtrace.py +Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/backtrace.py 2016-07-03 16:32:17.869198859 +0200 ++++ gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py 2017-02-26 21:10:31.419894983 +0100 @@ -0,0 +1,42 @@ +# Filtering backtrace. + @@ -195,10 +195,10 @@ Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/backtrace.py + return iter + return old_frame_filter (iter) + -Index: gdb-7.11.50.20160630/gdb/python/lib/gdb/command/backtrace.py +Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.50.20160630/gdb/python/lib/gdb/command/backtrace.py 2016-07-03 16:32:17.869198859 +0200 ++++ gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py 2017-02-26 21:10:31.419894983 +0100 @@ -0,0 +1,106 @@ +# New backtrace command. + diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch index 5a4cb0f..e07f266 100644 --- a/gdb-python-gil.patch +++ b/gdb-python-gil.patch @@ -1,7 +1,7 @@ -Index: gdb-7.11.50.20160630/gdb/doc/python.texi +Index: gdb-7.12.50.20170207/gdb/doc/python.texi =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/doc/python.texi 2016-07-03 16:30:37.009338358 +0200 -+++ gdb-7.11.50.20160630/gdb/doc/python.texi 2016-07-03 16:30:42.812387867 +0200 +--- gdb-7.12.50.20170207.orig/gdb/doc/python.texi 2017-02-26 21:03:56.414161880 +0100 ++++ gdb-7.12.50.20170207/gdb/doc/python.texi 2017-02-26 21:03:57.448169033 +0100 @@ -229,6 +229,14 @@ return value is @code{None}. If @var{to_string} is @code{True}, the @value{GDBN} virtual terminal will be temporarily set to unlimited width @@ -17,10 +17,10 @@ Index: gdb-7.11.50.20160630/gdb/doc/python.texi @end defun @findex gdb.breakpoints -Index: gdb-7.11.50.20160630/gdb/python/python-internal.h +Index: gdb-7.12.50.20170207/gdb/python/python-internal.h =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/python/python-internal.h 2016-07-03 16:30:37.010338366 +0200 -+++ gdb-7.11.50.20160630/gdb/python/python-internal.h 2016-07-03 16:30:42.812387867 +0200 +--- gdb-7.12.50.20170207.orig/gdb/python/python-internal.h 2017-02-26 21:03:56.415161887 +0100 ++++ gdb-7.12.50.20170207/gdb/python/python-internal.h 2017-02-26 21:03:57.448169033 +0100 @@ -140,6 +140,8 @@ #define PyGILState_Release(ARG) ((void)(ARG)) #define PyEval_InitThreads() @@ -30,21 +30,19 @@ Index: gdb-7.11.50.20160630/gdb/python/python-internal.h #define PyEval_ReleaseLock() #endif -Index: gdb-7.11.50.20160630/gdb/python/python.c +Index: gdb-7.12.50.20170207/gdb/python/python.c =================================================================== ---- gdb-7.11.50.20160630.orig/gdb/python/python.c 2016-07-03 16:30:37.011338375 +0200 -+++ gdb-7.11.50.20160630/gdb/python/python.c 2016-07-03 16:31:16.324673783 +0200 -@@ -619,13 +619,18 @@ +--- gdb-7.12.50.20170207.orig/gdb/python/python.c 2017-02-26 21:03:56.416161894 +0100 ++++ gdb-7.12.50.20170207/gdb/python/python.c 2017-02-26 21:09:23.252423095 +0100 +@@ -595,12 +595,16 @@ { const char *arg; PyObject *from_tty_obj = NULL, *to_string_obj = NULL; - int from_tty, to_string; - static char *keywords[] = {"command", "from_tty", "to_string", NULL }; -+ PyObject *release_gil_obj = NULL; + int from_tty, to_string, release_gil; -+ static char *keywords[] = {"command", "from_tty", "to_string", -+ "release_gil", NULL }; - char *result = NULL; ++ static char *keywords[] = {"command", "from_tty", "to_string", "release_gil", NULL }; ++ PyObject *release_gil_obj = NULL; + /* Initialize it just to avoid a GCC false warning. */ + PyThreadState *state = NULL; @@ -57,7 +55,7 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c return NULL; from_tty = 0; -@@ -646,6 +651,15 @@ +@@ -621,6 +625,15 @@ to_string = cmp; } @@ -70,11 +68,11 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c + release_gil = cmp; + } + + std::string to_string_res; + TRY - { - /* Copy the argument text in case the command modifies it. */ -@@ -653,6 +667,13 @@ - struct cleanup *cleanup = make_cleanup (xfree, copy); +@@ -629,6 +642,13 @@ + std::string copy (arg); struct interp *interp; + /* In the case of long running GDB commands, allow the user to @@ -84,18 +82,17 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c + if (release_gil) + state = PyEval_SaveThread(); + - make_cleanup_restore_integer (¤t_ui->async); - current_ui->async = 0; - -@@ -671,11 +692,23 @@ - execute_command (copy, from_tty); - } + scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); + scoped_restore save_uiout = make_scoped_restore (¤t_uiout); +@@ -643,10 +663,22 @@ + to_string_res = execute_command_to_string (©[0], from_tty); + else + execute_command (©[0], from_tty); ++ + /* Reacquire the GIL if it was released earlier. */ + if (release_gil) + PyEval_RestoreThread (state); -+ - do_cleanups (cleanup); } CATCH (except, RETURN_MASK_ALL) { @@ -112,8 +109,10 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c } END_CATCH ---- /dev/null 2016-09-12 21:37:05.332693927 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.python/py-gil-mthread.c 2016-09-12 21:51:53.750317187 +0200 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.c 2017-02-26 21:03:57.450169047 +0100 @@ -0,0 +1,13 @@ +#include +#include @@ -128,8 +127,10 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c + printf ("Sleeping %d\n", i); + } +} ---- /dev/null 2016-09-12 21:37:05.332693927 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.python/py-gil-mthread.exp 2016-09-12 21:52:38.605750360 +0200 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.exp 2017-02-26 21:03:57.450169047 +0100 @@ -0,0 +1,69 @@ +# Copyright (C) 2014 Free Software Foundation, Inc. + @@ -200,8 +201,10 @@ Index: gdb-7.11.50.20160630/gdb/python/python.c + } + } +} ---- /dev/null 2016-09-12 21:37:05.332693927 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.python/py-gil-mthread.py 2016-09-12 21:59:02.668459286 +0200 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.py +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.python/py-gil-mthread.py 2017-02-26 21:03:57.450169047 +0100 @@ -0,0 +1,28 @@ +try: + import thread diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index b37c5b9..8d15227 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -463,11 +463,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-main.patch -Index: gdb-7.11.50.20160716/gdb/ada-lang.c +Index: gdb-7.12.50.20170226/gdb/ada-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ada-lang.c 2016-07-16 14:33:42.053510117 +0200 -+++ gdb-7.11.50.20160716/gdb/ada-lang.c 2016-07-16 14:33:44.527530028 +0200 -@@ -75,7 +75,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/ada-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ada-lang.c 2017-02-26 22:04:03.415609774 +0100 +@@ -76,7 +76,7 @@ static struct value *desc_bounds (struct value *); @@ -476,7 +476,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c static int fat_pntr_bounds_bitsize (struct type *); -@@ -83,13 +83,13 @@ +@@ -84,13 +84,13 @@ static struct value *desc_data (struct value *); @@ -492,7 +492,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c static int desc_bound_bitsize (struct type *, int, int); -@@ -172,7 +172,7 @@ +@@ -173,7 +173,7 @@ static struct value *unwrap_value (struct value *); @@ -501,7 +501,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c static struct type *decode_constrained_packed_array_type (struct type *); -@@ -187,7 +187,8 @@ +@@ -188,7 +188,8 @@ static struct value *value_subscript_packed (struct value *, int, struct value **); @@ -511,7 +511,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c static struct value *coerce_unspec_val_to_type (struct value *, struct type *); -@@ -215,14 +216,14 @@ +@@ -216,14 +217,14 @@ static struct symbol *standard_lookup (const char *, const struct block *, domain_enum); @@ -530,7 +530,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR, struct value *); -@@ -236,7 +237,7 @@ +@@ -237,7 +238,7 @@ static void ada_language_arch_info (struct gdbarch *, struct language_arch_info *); @@ -539,7 +539,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *); static struct value *assign_aggregate (struct value *, struct value *, -@@ -700,7 +701,7 @@ +@@ -701,7 +702,7 @@ } static const gdb_byte * @@ -548,7 +548,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c { if (valaddr == NULL) return NULL; -@@ -709,7 +710,7 @@ +@@ -710,7 +711,7 @@ } static CORE_ADDR @@ -557,7 +557,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c { if (address == 0) return 0; -@@ -1756,7 +1757,7 @@ +@@ -1757,7 +1758,7 @@ /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the bounds data. */ @@ -566,7 +566,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c fat_pntr_bounds_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 1); -@@ -1822,7 +1823,7 @@ +@@ -1823,7 +1824,7 @@ /* If TYPE is the type of an array-descriptor (fat pointer), the bit position of the field containing the address of the data. */ @@ -575,7 +575,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c fat_pntr_data_bitpos (struct type *type) { return TYPE_FIELD_BITPOS (desc_base_type (type), 0); -@@ -1857,7 +1858,7 @@ +@@ -1858,7 +1859,7 @@ 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. */ @@ -584,7 +584,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c desc_bound_bitpos (struct type *type, int i, int which) { return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2); -@@ -2047,7 +2048,7 @@ +@@ -2048,7 +2049,7 @@ zero, and does not need to be recomputed. */ if (lo < hi) { @@ -593,7 +593,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2207,7 +2208,7 @@ +@@ -2208,7 +2209,7 @@ the length is arbitrary. */ static struct type * @@ -602,7 +602,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c { struct type *new_elt_type; struct type *new_type; -@@ -2261,7 +2262,7 @@ +@@ -2262,7 +2263,7 @@ char *name; const char *tail; struct type *shadow_type; @@ -611,7 +611,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); -@@ -2332,7 +2333,8 @@ +@@ -2333,7 +2334,8 @@ 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. */ @@ -621,7 +621,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c ULONGEST mod; mod = ada_modulus (value_type (arr)) - 1; -@@ -2560,7 +2562,7 @@ +@@ -2561,7 +2563,7 @@ struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, @@ -630,7 +630,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *type) { struct value *v; -@@ -2633,7 +2635,7 @@ +@@ -2632,7 +2634,7 @@ if (obj != NULL) { @@ -639,7 +639,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2681,7 +2683,7 @@ +@@ -2678,7 +2680,7 @@ not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -648,7 +648,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2771,7 +2773,7 @@ +@@ -2768,7 +2770,7 @@ { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; @@ -657,7 +657,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c gdb_byte *buffer = (gdb_byte *) alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2822,7 +2824,7 @@ +@@ -2819,7 +2821,7 @@ (LONGEST) (value_address (component) - value_address (container)); int bit_offset_in_container = value_bitpos (component) - value_bitpos (container); @@ -666,7 +666,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4480,7 +4482,7 @@ +@@ -4470,7 +4472,7 @@ if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -675,7 +675,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4564,7 +4566,7 @@ +@@ -4554,7 +4556,7 @@ value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -684,7 +684,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c gdb_byte *buf = (gdb_byte *) alloca (len); CORE_ADDR addr; -@@ -6799,7 +6801,7 @@ +@@ -6754,7 +6756,7 @@ const gdb_byte *valaddr, CORE_ADDR address) { @@ -693,7 +693,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -7280,7 +7282,7 @@ +@@ -7235,7 +7237,7 @@ only in that it can handle packed values of arbitrary type. */ static struct value * @@ -702,7 +702,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -7292,7 +7294,7 @@ +@@ -7247,7 +7249,7 @@ if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -711,7 +711,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7319,9 +7321,9 @@ +@@ -7274,9 +7276,9 @@ Returns 1 if found, 0 otherwise. */ static int @@ -723,7 +723,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c int *index_p) { int i; -@@ -7339,8 +7341,8 @@ +@@ -7294,8 +7296,8 @@ for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -734,7 +734,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -7410,7 +7412,7 @@ +@@ -7365,7 +7367,7 @@ Searches recursively through wrapper fields (e.g., '_parent'). */ static struct value * @@ -743,7 +743,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *type) { int i; -@@ -7443,7 +7445,7 @@ +@@ -7398,7 +7400,7 @@ int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -752,7 +752,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7461,8 +7463,8 @@ +@@ -7416,8 +7418,8 @@ return NULL; } @@ -763,7 +763,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -7471,7 +7473,7 @@ +@@ -7426,7 +7428,7 @@ * If found, return value, else return NULL. */ static struct value * @@ -772,7 +772,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7483,7 +7485,7 @@ +@@ -7438,7 +7440,7 @@ * *INDEX_P. */ static struct value * @@ -781,7 +781,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *type) { int i; -@@ -7573,7 +7575,8 @@ +@@ -7528,7 +7530,8 @@ v = ada_search_struct_field (name, arg, 0, t); else { @@ -791,7 +791,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7904,8 +7907,8 @@ +@@ -7834,8 +7837,8 @@ /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -802,7 +802,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -8299,10 +8302,9 @@ +@@ -8229,10 +8232,9 @@ struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -815,7 +815,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -8380,7 +8382,7 @@ +@@ -8310,7 +8312,7 @@ that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -824,7 +824,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8516,11 +8518,11 @@ +@@ -8446,11 +8448,11 @@ if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -840,7 +840,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c } else { -@@ -8987,7 +8989,8 @@ +@@ -8917,7 +8919,8 @@ 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. */ @@ -850,18 +850,18 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.c int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0); TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0); -Index: gdb-7.11.50.20160716/gdb/ada-lang.h +Index: gdb-7.12.50.20170226/gdb/ada-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ada-lang.h 2016-07-16 14:33:42.054510125 +0200 -+++ gdb-7.11.50.20160716/gdb/ada-lang.h 2016-07-16 14:33:44.528530036 +0200 +--- gdb-7.12.50.20170226.orig/gdb/ada-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ada-lang.h 2017-02-26 22:04:03.416609782 +0100 @@ -168,7 +168,7 @@ extern void ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream); --extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, -+extern void ada_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR, +-extern void ada_val_print (struct type *, int, CORE_ADDR, ++extern void ada_val_print (struct type *, LONGEST, CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *); @@ -183,7 +183,7 @@ extern void ada_printchar (int, struct type *, struct ui_file *); @@ -881,10 +881,10 @@ Index: gdb-7.11.50.20160716/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.11.50.20160716/gdb/ada-typeprint.c +Index: gdb-7.12.50.20170226/gdb/ada-typeprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ada-typeprint.c 2016-07-16 14:33:42.055510133 +0200 -+++ gdb-7.11.50.20160716/gdb/ada-typeprint.c 2016-07-16 14:33:44.528530036 +0200 +--- gdb-7.12.50.20170226.orig/gdb/ada-typeprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ada-typeprint.c 2017-02-26 22:04:03.416609782 +0100 @@ -891,8 +891,8 @@ const char *name = ada_type_name (type); @@ -906,10 +906,10 @@ Index: gdb-7.11.50.20160716/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.11.50.20160716/gdb/ada-valprint.c +Index: gdb-7.12.50.20170226/gdb/ada-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ada-valprint.c 2016-07-16 14:33:42.056510141 +0200 -+++ gdb-7.11.50.20160716/gdb/ada-valprint.c 2016-07-16 14:33:44.528530036 +0200 +--- gdb-7.12.50.20170226.orig/gdb/ada-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ada-valprint.c 2017-02-26 22:04:03.417609789 +0100 @@ -33,11 +33,11 @@ #include "objfiles.h" @@ -917,7 +917,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c - int, + LONGEST, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *, - int, struct type *, int, + int, struct type *, LONGEST, @@ -933,7 +933,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c enum bfd_endian byte_order) { if (type_len == 1) -@@ -441,11 +441,11 @@ +@@ -439,11 +439,11 @@ static void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, @@ -947,7 +947,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -460,9 +460,9 @@ +@@ -458,9 +458,9 @@ { /* Position of the character we are examining to see whether it is repeated. */ @@ -959,7 +959,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c QUIT; -@@ -493,7 +493,8 @@ +@@ -491,7 +491,8 @@ ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); @@ -969,7 +969,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -@@ -521,7 +522,7 @@ +@@ -519,7 +520,7 @@ void ada_printstr (struct ui_file *stream, struct type *type, @@ -978,14 +978,14 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -531,12 +532,12 @@ +@@ -529,12 +530,12 @@ 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, - const struct value *val, + struct value *val, const struct value_print_options *options, int comma_needed, - struct type *outer_type, int outer_offset, @@ -993,13 +993,13 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c const struct language_defn *language) { struct type *var_type = TYPE_FIELD_TYPE (type, field_num); -@@ -572,11 +573,11 @@ +@@ -570,11 +571,11 @@ 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, - const struct value *val, + struct value *val, const struct value_print_options *options, int comma_needed, - struct type *outer_type, int outer_offset, @@ -1007,16 +1007,16 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c const struct language_defn *language) { int i, len; -@@ -643,7 +644,7 @@ - } +@@ -640,7 +641,7 @@ 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; -@@ -689,8 +690,8 @@ +@@ -685,8 +686,8 @@ { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); struct type *elttype = TYPE_TARGET_TYPE (type); @@ -1027,7 +1027,7 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c /* We know that ELTTYPE cannot possibly be null, because we assume that we're called only when TYPE is a string-like type. -@@ -709,7 +710,7 @@ +@@ -705,7 +706,7 @@ elements up to it. */ if (options->stop_print_at_null) { @@ -1036,28 +1036,28 @@ Index: gdb-7.11.50.20160716/gdb/ada-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -@@ -1074,7 +1075,7 @@ +@@ -1069,7 +1070,7 @@ static void - ada_val_print_1 (struct type *type, const gdb_byte *valaddr, + ada_val_print_1 (struct type *type, - int offset, CORE_ADDR address, + LONGEST offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options, -@@ -1157,7 +1158,7 @@ +@@ -1153,7 +1154,7 @@ void - ada_val_print (struct type *type, const gdb_byte *valaddr, + ada_val_print (struct type *type, - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *val, + struct value *val, const struct value_print_options *options) -Index: gdb-7.11.50.20160716/gdb/annotate.c +Index: gdb-7.12.50.20170226/gdb/annotate.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/annotate.c 2016-07-16 14:33:42.057510149 +0200 -+++ gdb-7.11.50.20160716/gdb/annotate.c 2016-07-16 14:33:44.528530036 +0200 +--- gdb-7.12.50.20170226.orig/gdb/annotate.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/annotate.c 2017-02-26 22:04:03.417609789 +0100 @@ -533,21 +533,21 @@ } @@ -1084,10 +1084,10 @@ Index: gdb-7.11.50.20160716/gdb/annotate.c } void -Index: gdb-7.11.50.20160716/gdb/annotate.h +Index: gdb-7.12.50.20170226/gdb/annotate.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/annotate.h 2016-07-16 14:33:42.057510149 +0200 -+++ gdb-7.11.50.20160716/gdb/annotate.h 2016-07-16 14:33:44.528530036 +0200 +--- gdb-7.12.50.20170226.orig/gdb/annotate.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/annotate.h 2017-02-26 22:04:03.417609789 +0100 @@ -92,8 +92,8 @@ extern void annotate_frame_where (void); extern void annotate_frame_end (void); @@ -1099,11 +1099,11 @@ Index: gdb-7.11.50.20160716/gdb/annotate.h extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); -Index: gdb-7.11.50.20160716/gdb/arm-linux-nat.c +Index: gdb-7.12.50.20170226/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/arm-linux-nat.c 2016-07-16 14:33:42.057510149 +0200 -+++ gdb-7.11.50.20160716/gdb/arm-linux-nat.c 2016-07-16 14:33:44.529530044 +0200 -@@ -1063,7 +1063,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/arm-linux-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/arm-linux-nat.c 2017-02-26 22:04:03.417609789 +0100 +@@ -1065,7 +1065,7 @@ ADDR? */ static int arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -1112,10 +1112,10 @@ Index: gdb-7.11.50.20160716/gdb/arm-linux-nat.c { const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); CORE_ADDR max_wp_length, aligned_addr; -Index: gdb-7.11.50.20160716/gdb/ax-gdb.c +Index: gdb-7.12.50.20170226/gdb/ax-gdb.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ax-gdb.c 2016-07-16 14:33:42.060510173 +0200 -+++ gdb-7.11.50.20160716/gdb/ax-gdb.c 2016-07-16 14:33:44.529530044 +0200 +--- gdb-7.12.50.20170226.orig/gdb/ax-gdb.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ax-gdb.c 2017-02-26 22:04:03.418609796 +0100 @@ -83,12 +83,12 @@ static void gen_sign_extend (struct agent_expr *, struct type *); static void gen_extend (struct agent_expr *, struct type *); @@ -1169,7 +1169,7 @@ Index: gdb-7.11.50.20160716/gdb/ax-gdb.c { /* It would suffice to simply push the offset and add it, but this makes it easier to read positive and negative offsets in the -@@ -1248,7 +1249,7 @@ +@@ -1247,7 +1248,7 @@ static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, @@ -1178,7 +1178,7 @@ Index: gdb-7.11.50.20160716/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1283,13 +1284,13 @@ +@@ -1282,13 +1283,13 @@ /* The first and one-after-last bits in the field, but rounded down and up to byte boundaries. */ @@ -1197,7 +1197,7 @@ Index: gdb-7.11.50.20160716/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1408,7 +1409,7 @@ +@@ -1407,7 +1408,7 @@ static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1206,7 +1206,7 @@ Index: gdb-7.11.50.20160716/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1433,7 +1434,7 @@ +@@ -1432,7 +1433,7 @@ static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1215,11 +1215,11 @@ Index: gdb-7.11.50.20160716/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.11.50.20160716/gdb/ax-general.c +Index: gdb-7.12.50.20170226/gdb/ax-general.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ax-general.c 2016-07-16 14:33:42.060510173 +0200 -+++ gdb-7.11.50.20160716/gdb/ax-general.c 2016-07-16 14:33:44.529530044 +0200 -@@ -199,7 +199,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/ax-general.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ax-general.c 2017-02-26 22:04:03.418609796 +0100 +@@ -177,7 +177,7 @@ /* Append a trace_quick instruction to EXPR, to record N bytes. */ void @@ -1228,11 +1228,11 @@ Index: gdb-7.11.50.20160716/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.11.50.20160716/gdb/ax.h +Index: gdb-7.12.50.20170226/gdb/ax.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ax.h 2016-07-16 14:33:42.060510173 +0200 -+++ gdb-7.11.50.20160716/gdb/ax.h 2016-07-16 14:33:44.529530044 +0200 -@@ -210,7 +210,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/ax.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ax.h 2017-02-26 22:04:03.419609803 +0100 +@@ -205,7 +205,7 @@ extern void ax_zero_ext (struct agent_expr *EXPR, int N); /* Append a trace_quick instruction to EXPR, to record N bytes. */ @@ -1241,11 +1241,11 @@ Index: gdb-7.11.50.20160716/gdb/ax.h /* 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, -Index: gdb-7.11.50.20160716/gdb/breakpoint.c +Index: gdb-7.12.50.20170226/gdb/breakpoint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/breakpoint.c 2016-07-16 14:33:42.067510230 +0200 -+++ gdb-7.11.50.20160716/gdb/breakpoint.c 2016-07-16 14:33:44.531530060 +0200 -@@ -2251,9 +2251,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/breakpoint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/breakpoint.c 2017-02-26 22:04:03.422609824 +0100 +@@ -2226,9 +2226,9 @@ { fprintf_unfiltered (gdb_stdlog, "infrun: stepping past non-steppable watchpoint. " @@ -1257,7 +1257,7 @@ Index: gdb-7.11.50.20160716/gdb/breakpoint.c } return 0; } -@@ -7181,7 +7181,7 @@ +@@ -7153,7 +7153,7 @@ static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1266,7 +1266,7 @@ Index: gdb-7.11.50.20160716/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11534,7 +11534,7 @@ +@@ -11474,7 +11474,7 @@ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1275,11 +1275,11 @@ Index: gdb-7.11.50.20160716/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.11.50.20160716/gdb/breakpoint.h +Index: gdb-7.12.50.20170226/gdb/breakpoint.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/breakpoint.h 2016-07-16 14:33:42.068510238 +0200 -+++ gdb-7.11.50.20160716/gdb/breakpoint.h 2016-07-16 14:33:44.532530068 +0200 -@@ -237,7 +237,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/breakpoint.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/breakpoint.h 2017-02-26 22:04:03.423609831 +0100 +@@ -250,7 +250,7 @@ /* If this is a ranged breakpoint, then this field contains the length of the range that will be watched for execution. */ @@ -1288,7 +1288,7 @@ Index: gdb-7.11.50.20160716/gdb/breakpoint.h /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -413,7 +413,7 @@ +@@ -422,7 +422,7 @@ /* For hardware watchpoints, the size of the memory region being watched. For hardware ranged breakpoints, the size of the breakpoint range. */ @@ -1297,10 +1297,10 @@ Index: gdb-7.11.50.20160716/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.11.50.20160716/gdb/c-lang.c +Index: gdb-7.12.50.20170226/gdb/c-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/c-lang.c 2016-07-16 14:33:42.069510246 +0200 -+++ gdb-7.11.50.20160716/gdb/c-lang.c 2016-07-16 14:33:44.532530068 +0200 +--- gdb-7.12.50.20170226.orig/gdb/c-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/c-lang.c 2017-02-26 22:04:03.423609831 +0100 @@ -186,7 +186,7 @@ void @@ -1310,7 +1310,7 @@ Index: gdb-7.11.50.20160716/gdb/c-lang.c const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -675,7 +675,7 @@ +@@ -672,7 +672,7 @@ } else { @@ -1319,7 +1319,7 @@ Index: gdb-7.11.50.20160716/gdb/c-lang.c /* Write the terminating character. */ for (i = 0; i < TYPE_LENGTH (type); ++i) -@@ -684,7 +684,7 @@ +@@ -681,7 +681,7 @@ if (satisfy_expected) { LONGEST low_bound, high_bound; @@ -1328,18 +1328,18 @@ Index: gdb-7.11.50.20160716/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.11.50.20160716/gdb/c-lang.h +Index: gdb-7.12.50.20170226/gdb/c-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/c-lang.h 2016-07-16 14:33:42.069510246 +0200 -+++ gdb-7.11.50.20160716/gdb/c-lang.h 2016-07-16 14:33:44.532530068 +0200 +--- gdb-7.12.50.20170226.orig/gdb/c-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/c-lang.h 2017-02-26 22:04:03.423609831 +0100 @@ -77,7 +77,7 @@ struct ui_file *); - extern void c_val_print (struct type *, const gdb_byte *, + extern void c_val_print (struct type *, - int, CORE_ADDR, + LONGEST, CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *); @@ -97,7 +97,7 @@ extern void c_printstr (struct ui_file * stream, @@ -1350,10 +1350,10 @@ Index: gdb-7.11.50.20160716/gdb/c-lang.h const char *user_encoding, int force_ellipses, const struct value_print_options *options); -Index: gdb-7.11.50.20160716/gdb/c-valprint.c +Index: gdb-7.12.50.20170226/gdb/c-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/c-valprint.c 2016-07-16 14:33:42.070510254 +0200 -+++ gdb-7.11.50.20160716/gdb/c-valprint.c 2016-07-16 14:33:44.532530068 +0200 +--- gdb-7.12.50.20170226.orig/gdb/c-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/c-valprint.c 2017-02-26 22:04:03.424609838 +0100 @@ -244,7 +244,7 @@ if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0) { @@ -1386,16 +1386,16 @@ Index: gdb-7.11.50.20160716/gdb/c-valprint.c @@ -495,7 +495,7 @@ void - c_val_print (struct type *type, const gdb_byte *valaddr, + c_val_print (struct type *type, - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options) -Index: gdb-7.11.50.20160716/gdb/cp-abi.c +Index: gdb-7.12.50.20170226/gdb/cp-abi.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/cp-abi.c 2016-07-16 14:33:42.070510254 +0200 -+++ gdb-7.11.50.20160716/gdb/cp-abi.c 2016-07-16 14:33:44.532530068 +0200 +--- gdb-7.12.50.20170226.orig/gdb/cp-abi.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/cp-abi.c 2017-02-26 22:04:03.424609838 +0100 @@ -64,12 +64,12 @@ return (*current_cp_abi.is_operator_name) (name); } @@ -1420,10 +1420,10 @@ Index: gdb-7.11.50.20160716/gdb/cp-abi.c { if ((current_cp_abi.virtual_fn_field) == NULL) return NULL; -Index: gdb-7.11.50.20160716/gdb/cp-abi.h +Index: gdb-7.12.50.20170226/gdb/cp-abi.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/cp-abi.h 2016-07-16 14:33:42.070510254 +0200 -+++ gdb-7.11.50.20160716/gdb/cp-abi.h 2016-07-16 14:33:44.532530068 +0200 +--- gdb-7.12.50.20170226.orig/gdb/cp-abi.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/cp-abi.h 2017-02-26 22:04:03.424609838 +0100 @@ -108,7 +108,7 @@ struct fn_field *f, int j, @@ -1450,7 +1450,7 @@ Index: gdb-7.11.50.20160716/gdb/cp-abi.h /* Describe the target of a pointer to method. CONTENTS is the byte pattern representing the pointer to method. TYPE is the pointer to -@@ -227,12 +227,12 @@ +@@ -226,12 +226,12 @@ struct value *(*virtual_fn_field) (struct value **arg1p, struct fn_field * f, int j, struct type * type, @@ -1467,11 +1467,11 @@ Index: gdb-7.11.50.20160716/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.11.50.20160716/gdb/cp-valprint.c +Index: gdb-7.12.50.20170226/gdb/cp-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/cp-valprint.c 2016-07-16 14:33:42.071510262 +0200 -+++ gdb-7.11.50.20160716/gdb/cp-valprint.c 2016-07-16 14:33:44.532530068 +0200 -@@ -334,7 +334,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/cp-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/cp-valprint.c 2017-02-26 22:04:03.424609838 +0100 +@@ -336,7 +336,7 @@ } else if (i == vptr_fieldno && type == vptr_basetype) { @@ -1480,91 +1480,37 @@ Index: gdb-7.11.50.20160716/gdb/cp-valprint.c struct type *i_type = TYPE_FIELD_TYPE (type, i); if (valprint_check_validity (stream, i_type, i_offset, val)) -Index: gdb-7.11.50.20160716/gdb/d-lang.h +Index: gdb-7.12.50.20170226/gdb/d-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/d-lang.h 2016-07-16 14:33:42.071510262 +0200 -+++ gdb-7.11.50.20160716/gdb/d-lang.h 2016-07-16 14:33:44.533530076 +0200 +--- gdb-7.12.50.20170226.orig/gdb/d-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/d-lang.h 2017-02-26 22:04:03.424609838 +0100 @@ -81,7 +81,7 @@ /* Defined in d-valprint.c */ - extern void d_val_print (struct type *type, const gdb_byte *valaddr, + 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, - const struct value *val, + struct value *val, const struct value_print_options *options); -Index: gdb-7.11.50.20160716/gdb/d-valprint.c +Index: gdb-7.12.50.20170226/gdb/d-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/d-valprint.c 2016-07-16 14:33:42.071510262 +0200 -+++ gdb-7.11.50.20160716/gdb/d-valprint.c 2016-07-16 14:33:44.533530076 +0200 -@@ -73,9 +73,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/d-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/d-valprint.c 2017-02-26 22:04:03.424609838 +0100 +@@ -73,7 +73,7 @@ /* Implements the la_val_print routine for language D. */ void --d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, -- CORE_ADDR address, struct ui_file *stream, int recurse, -- const struct value *val, -+d_val_print (struct type *type, const gdb_byte *valaddr, -+ LONGEST embedded_offset, CORE_ADDR address, -+ struct ui_file *stream, int recurse, const struct value *val, +-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) - { - int ret; -Index: gdb-7.11.50.20160716/gdb/doublest.c +Index: gdb-7.12.50.20170226/gdb/dwarf2loc.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/doublest.c 2016-07-16 14:33:42.072510270 +0200 -+++ gdb-7.11.50.20160716/gdb/doublest.c 2016-07-16 14:33:44.533530076 +0200 -@@ -784,7 +784,7 @@ - but not passed on by GDB. This should be fixed. */ - - static const struct floatformat * --floatformat_from_length (struct gdbarch *gdbarch, int len) -+floatformat_from_length (struct gdbarch *gdbarch, LONGEST len) - { - const struct floatformat *format; - -@@ -812,8 +812,8 @@ - else - format = NULL; - if (format == NULL) -- error (_("Unrecognized %d-bit floating-point type."), -- len * TARGET_CHAR_BIT); -+ error (_("Unrecognized %s-bit floating-point type."), -+ plongest (len * TARGET_CHAR_BIT)); - return format; - } - -Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c -=================================================================== ---- gdb-7.11.50.20160716.orig/gdb/dwarf2loc.c 2016-07-16 14:33:42.076510302 +0200 -+++ gdb-7.11.50.20160716/gdb/dwarf2loc.c 2016-07-16 14:33:44.533530076 +0200 -@@ -1638,19 +1638,19 @@ - BITS_BIG_ENDIAN is taken directly from gdbarch. */ - - static void --copy_bitwise (gdb_byte *dest, unsigned int dest_offset_bits, -- const gdb_byte *source, unsigned int source_offset_bits, -- unsigned int bit_count, -+copy_bitwise (gdb_byte *dest, ULONGEST dest_offset_bits, -+ const gdb_byte *source, ULONGEST source_offset, -+ ULONGEST bit_count, - int bits_big_endian) - { -- unsigned int dest_avail; -+ unsigned int dest_avail, source_offset_bits; - int datum; - - /* Reduce everything to byte-size pieces. */ - dest += dest_offset_bits / 8; - dest_offset_bits %= 8; -- source += source_offset_bits / 8; -- source_offset_bits %= 8; -+ source += source_offset / 8; -+ source_offset_bits = source_offset % 8; - - dest_avail = 8 - dest_offset_bits % 8; - -@@ -1688,13 +1688,13 @@ +--- gdb-7.12.50.20170226.orig/gdb/dwarf2loc.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/dwarf2loc.c 2017-02-26 22:04:03.426609852 +0100 +@@ -1758,12 +1758,12 @@ read_pieced_value (struct value *v) { int i; @@ -1574,13 +1520,12 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c gdb_byte *contents; struct piece_closure *c = (struct piece_closure *) value_computed_closure (v); - struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v)); - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - gdb_byte *buffer = NULL; - struct cleanup *cleanup; -@@ -1721,8 +1721,8 @@ + std::vector buffer; + int bits_big_endian +@@ -1787,8 +1787,8 @@ for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1591,7 +1536,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1862,13 +1862,13 @@ +@@ -1927,12 +1927,12 @@ write_pieced_value (struct value *to, struct value *from) { int i; @@ -1601,13 +1546,12 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c const gdb_byte *contents; struct piece_closure *c = (struct piece_closure *) value_computed_closure (to); - struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to)); - size_t type_len; + ULONGEST type_len; size_t buffer_size = 0; - gdb_byte *buffer = NULL; - struct cleanup *cleanup; -@@ -1896,8 +1896,8 @@ + std::vector buffer; + int bits_big_endian +@@ -1951,8 +1951,8 @@ for (i = 0; i < c->n_pieces && offset < type_len; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1618,7 +1562,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -2017,7 +2017,7 @@ +@@ -2071,7 +2071,7 @@ static int check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, @@ -1627,7 +1571,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c { struct piece_closure *c = (struct piece_closure *) value_computed_closure (value); -@@ -2030,7 +2030,7 @@ +@@ -2084,7 +2084,7 @@ for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1636,7 +1580,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2132,8 +2132,8 @@ +@@ -2186,8 +2186,8 @@ struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1647,7 +1591,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c struct dwarf_expr_piece *piece = NULL; LONGEST byte_offset; enum bfd_endian byte_order; -@@ -2150,7 +2150,7 @@ +@@ -2204,7 +2204,7 @@ for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1656,20 +1600,20 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2444,7 +2444,7 @@ - struct value *value = dwarf_expr_fetch (ctx, 0); +@@ -2477,7 +2477,7 @@ + struct value *value = ctx.fetch (0); gdb_byte *contents; const gdb_byte *val_bytes; - size_t n = TYPE_LENGTH (value_type (value)); + ULONGEST n = TYPE_LENGTH (value_type (value)); + struct cleanup *cleanup; if (byte_offset + TYPE_LENGTH (type) > n) - invalid_synthetic_pointer (); -Index: gdb-7.11.50.20160716/gdb/dwarf2read.c +Index: gdb-7.12.50.20170226/gdb/dwarf2read.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/dwarf2read.c 2016-07-16 14:33:42.083510358 +0200 -+++ gdb-7.11.50.20160716/gdb/dwarf2read.c 2016-07-16 14:33:44.536530100 +0200 -@@ -1935,12 +1935,12 @@ +--- gdb-7.12.50.20170226.orig/gdb/dwarf2read.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/dwarf2read.c 2017-02-26 22:04:03.431609888 +0100 +@@ -1969,12 +1969,12 @@ } static void @@ -1686,7 +1630,7 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2read.c } static void -@@ -12573,8 +12573,8 @@ +@@ -12789,8 +12789,8 @@ 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. */ @@ -1697,11 +1641,11 @@ Index: gdb-7.11.50.20160716/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.11.50.20160716/gdb/eval.c +Index: gdb-7.12.50.20170226/gdb/eval.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/eval.c 2016-07-16 14:33:42.086510383 +0200 -+++ gdb-7.11.50.20160716/gdb/eval.c 2016-07-16 14:33:44.537530108 +0200 -@@ -317,7 +317,8 @@ +--- gdb-7.12.50.20170226.orig/gdb/eval.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/eval.c 2017-02-26 22:04:03.431609888 +0100 +@@ -297,7 +297,8 @@ while (--nargs >= 0) { struct value *val = NULL; @@ -1711,7 +1655,7 @@ Index: gdb-7.11.50.20160716/gdb/eval.c bfd_byte *addr; fieldno++; -@@ -378,7 +379,7 @@ +@@ -358,7 +359,7 @@ enum noside noside, LONGEST low_bound, LONGEST high_bound) { LONGEST index; @@ -1720,7 +1664,7 @@ Index: gdb-7.11.50.20160716/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -822,11 +823,11 @@ +@@ -802,11 +803,11 @@ /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1735,7 +1679,7 @@ Index: gdb-7.11.50.20160716/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -1008,7 +1009,7 @@ +@@ -988,7 +989,7 @@ struct value **argvec; int code; int ix; @@ -1744,7 +1688,7 @@ Index: gdb-7.11.50.20160716/gdb/eval.c struct type **arg_types; int save_pos1; struct symbol *function = NULL; -@@ -1187,7 +1188,7 @@ +@@ -1167,7 +1168,7 @@ struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1753,10 +1697,10 @@ Index: gdb-7.11.50.20160716/gdb/eval.c LONGEST low_bound, high_bound, index; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) -Index: gdb-7.11.50.20160716/gdb/f-lang.c +Index: gdb-7.12.50.20170226/gdb/f-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/f-lang.c 2016-07-16 14:33:42.087510391 +0200 -+++ gdb-7.11.50.20160716/gdb/f-lang.c 2016-07-16 14:33:44.537530108 +0200 +--- gdb-7.12.50.20170226.orig/gdb/f-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/f-lang.c 2017-02-26 22:04:03.432609895 +0100 @@ -103,7 +103,7 @@ static void @@ -1766,23 +1710,23 @@ Index: gdb-7.11.50.20160716/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.11.50.20160716/gdb/f-lang.h +Index: gdb-7.12.50.20170226/gdb/f-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/f-lang.h 2016-07-16 14:33:42.087510391 +0200 -+++ gdb-7.11.50.20160716/gdb/f-lang.h 2016-07-16 14:33:44.537530108 +0200 +--- gdb-7.12.50.20170226.orig/gdb/f-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/f-lang.h 2017-02-26 22:04:03.432609895 +0100 @@ -30,7 +30,7 @@ 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 *, const gdb_byte *, int, CORE_ADDR, -+extern void f_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR, +-extern void f_val_print (struct type *, int, CORE_ADDR, ++extern void f_val_print (struct type *, LONGEST, CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *); -Index: gdb-7.11.50.20160716/gdb/f-valprint.c +Index: gdb-7.12.50.20170226/gdb/f-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/f-valprint.c 2016-07-16 14:33:42.087510391 +0200 -+++ gdb-7.11.50.20160716/gdb/f-valprint.c 2016-07-16 14:33:44.537530108 +0200 +--- gdb-7.12.50.20170226.orig/gdb/f-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/f-valprint.c 2017-02-26 22:04:03.432609895 +0100 @@ -38,7 +38,7 @@ static void info_common_command (char *, int); static void f77_get_dynamic_length_of_aggregate (struct type *); @@ -1821,7 +1765,7 @@ Index: gdb-7.11.50.20160716/gdb/f-valprint.c get_discrete_bounds (range_type, &lowerbound, &upperbound); -@@ -172,7 +172,7 @@ +@@ -177,7 +177,7 @@ static void f77_print_array (struct type *type, const gdb_byte *valaddr, @@ -1830,32 +1774,29 @@ Index: gdb-7.11.50.20160716/gdb/f-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -211,8 +211,9 @@ +@@ -216,7 +216,7 @@ function; they are identical. */ void --f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, -- CORE_ADDR address, struct ui_file *stream, int recurse, -+f_val_print (struct type *type, const gdb_byte *valaddr, -+ LONGEST embedded_offset, CORE_ADDR address, -+ struct ui_file *stream, int recurse, - const struct value *original_value, +-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) - { -Index: gdb-7.11.50.20160716/gdb/findvar.c +Index: gdb-7.12.50.20170226/gdb/findvar.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/findvar.c 2016-07-16 14:33:42.088510399 +0200 -+++ gdb-7.11.50.20160716/gdb/findvar.c 2016-07-16 14:33:44.537530108 +0200 -@@ -802,7 +802,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/findvar.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/findvar.c 2017-02-26 22:04:03.432609895 +0100 +@@ -819,7 +819,7 @@ 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; - VALUE_LVAL (value) = lval_register; -@@ -838,7 +838,7 @@ +@@ -863,7 +863,7 @@ LONGEST offset = 0; LONGEST reg_offset = value_offset (value); int regnum = VALUE_REGNUM (value); @@ -1864,7 +1805,7 @@ Index: gdb-7.11.50.20160716/gdb/findvar.c gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -853,7 +853,7 @@ +@@ -878,7 +878,7 @@ while (len > 0) { struct value *regval = get_frame_register_value (frame, regnum); @@ -1873,11 +1814,11 @@ Index: gdb-7.11.50.20160716/gdb/findvar.c /* If the register length is larger than the number of bytes remaining to copy, then only copy the appropriate bytes. */ -Index: gdb-7.11.50.20160716/gdb/frame.c +Index: gdb-7.12.50.20170226/gdb/frame.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/frame.c 2016-07-16 14:33:42.089510407 +0200 -+++ gdb-7.11.50.20160716/gdb/frame.c 2016-07-16 14:33:44.538530116 +0200 -@@ -1320,7 +1320,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/frame.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/frame.c 2017-02-26 22:04:03.433609902 +0100 +@@ -1358,7 +1358,7 @@ int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -1886,7 +1827,7 @@ Index: gdb-7.11.50.20160716/gdb/frame.c int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -1349,7 +1349,7 @@ +@@ -1387,7 +1387,7 @@ } if (len > maxsize) error (_("Bad debug information detected: " @@ -1895,11 +1836,11 @@ Index: gdb-7.11.50.20160716/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.11.50.20160716/gdb/frame.h +Index: gdb-7.12.50.20170226/gdb/frame.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/frame.h 2016-07-16 14:33:42.090510415 +0200 -+++ gdb-7.11.50.20160716/gdb/frame.h 2016-07-16 14:33:44.538530116 +0200 -@@ -585,7 +585,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/frame.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/frame.h 2017-02-26 22:04:03.433609902 +0100 +@@ -600,7 +600,7 @@ contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ extern int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -1908,20 +1849,20 @@ Index: gdb-7.11.50.20160716/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.11.50.20160716/gdb/gdbtypes.c +Index: gdb-7.12.50.20170226/gdb/gdbtypes.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/gdbtypes.c 2016-07-16 14:33:42.092510431 +0200 -+++ gdb-7.11.50.20160716/gdb/gdbtypes.c 2016-07-16 14:33:44.539530124 +0200 -@@ -2722,7 +2722,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbtypes.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbtypes.c 2017-02-26 22:04:03.434609909 +0100 +@@ -2782,7 +2782,7 @@ least as long as OBJFILE. */ struct type * --init_type (enum type_code code, int length, int flags, -+init_type (enum type_code code, LONGEST length, int flags, - const char *name, struct objfile *objfile) +-init_type (struct objfile *objfile, enum type_code code, int length, ++init_type (struct objfile *objfile, enum type_code code, LONGEST length, + const char *name) { struct type *type; -@@ -2962,8 +2962,8 @@ +@@ -3091,8 +3091,8 @@ static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -1932,7 +1873,7 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2974,7 +2974,7 @@ +@@ -3103,7 +3103,7 @@ for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -1941,7 +1882,7 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -3015,7 +3015,7 @@ +@@ -3144,7 +3144,7 @@ int is_unique_ancestor (struct type *base, struct value *val) { @@ -1950,7 +1891,7 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4203,7 +4203,7 @@ +@@ -4332,7 +4332,7 @@ break; } puts_filtered ("\n"); @@ -1959,7 +1900,7 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -4663,7 +4663,7 @@ +@@ -4792,7 +4792,7 @@ struct type * arch_type (struct gdbarch *gdbarch, @@ -1968,11 +1909,11 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.11.50.20160716/gdb/gdbtypes.h +Index: gdb-7.12.50.20170226/gdb/gdbtypes.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/gdbtypes.h 2016-07-16 14:33:42.093510439 +0200 -+++ gdb-7.11.50.20160716/gdb/gdbtypes.h 2016-07-16 14:33:44.539530124 +0200 -@@ -806,7 +806,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/gdbtypes.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbtypes.h 2017-02-26 22:04:03.435609916 +0100 +@@ -782,7 +782,7 @@ type_length_units function should be used in order to get the length expressed in target addressable memory units. */ @@ -1981,13 +1922,17 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.h /* * Core type, shared by a group of qualified types. */ -@@ -1677,11 +1677,11 @@ +@@ -1658,7 +1658,7 @@ /* * Helper function to construct objfile-owned types. */ --extern struct type *init_type (enum type_code, int, int, const char *, -+extern struct type *init_type (enum type_code, LONGEST, int, const char *, - struct objfile *); +-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 *); +@@ -1675,7 +1675,7 @@ + struct type *); /* Helper functions to construct architecture-owned types. */ -extern struct type *arch_type (struct gdbarch *, enum type_code, int, @@ -1995,10 +1940,10 @@ Index: gdb-7.11.50.20160716/gdb/gdbtypes.h const char *); extern struct type *arch_integer_type (struct gdbarch *, int, int, const char *); -Index: gdb-7.11.50.20160716/gdb/gnu-v2-abi.c +Index: gdb-7.12.50.20170226/gdb/gnu-v2-abi.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/gnu-v2-abi.c 2016-07-16 14:33:42.093510439 +0200 -+++ gdb-7.11.50.20160716/gdb/gnu-v2-abi.c 2016-07-16 14:33:44.539530124 +0200 +--- gdb-7.12.50.20170226.orig/gdb/gnu-v2-abi.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gnu-v2-abi.c 2017-02-26 22:04:03.435609916 +0100 @@ -82,7 +82,7 @@ TYPE is the type in which F is located. */ static struct value * @@ -2036,10 +1981,10 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c +Index: gdb-7.12.50.20170226/gdb/gnu-v3-abi.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/gnu-v3-abi.c 2016-07-16 14:33:42.094510447 +0200 -+++ gdb-7.11.50.20160716/gdb/gnu-v3-abi.c 2016-07-16 14:33:44.539530124 +0200 +--- gdb-7.12.50.20170226.orig/gdb/gnu-v3-abi.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gnu-v3-abi.c 2017-02-26 22:04:03.435609916 +0100 @@ -108,7 +108,7 @@ { struct type *t; @@ -2058,7 +2003,7 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c vtable_address_point_offset (struct gdbarch *gdbarch) { struct type *vtable_type -@@ -411,7 +411,7 @@ +@@ -407,7 +407,7 @@ static struct value * gnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, @@ -2067,7 +2012,7 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -441,7 +441,7 @@ +@@ -437,7 +437,7 @@ -1 is returned on error. */ @@ -2076,7 +2021,7 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val) -@@ -450,7 +450,7 @@ +@@ -446,7 +446,7 @@ struct type *ptr_type; struct value *vtable; struct value *vbase_array; @@ -2085,7 +2030,7 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -474,7 +474,7 @@ +@@ -469,7 +469,7 @@ cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch); if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0) error (_("Misaligned vbase offset.")); @@ -2094,7 +2039,7 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -518,7 +518,7 @@ +@@ -513,7 +513,7 @@ we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2103,91 +2048,37 @@ Index: gdb-7.11.50.20160716/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.11.50.20160716/gdb/go-lang.h +Index: gdb-7.12.50.20170226/gdb/go-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/go-lang.h 2016-07-16 14:33:42.094510447 +0200 -+++ gdb-7.11.50.20160716/gdb/go-lang.h 2016-07-16 14:33:44.539530124 +0200 +--- gdb-7.12.50.20170226.orig/gdb/go-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/go-lang.h 2017-02-26 22:04:03.436609923 +0100 @@ -85,7 +85,7 @@ /* Defined in go-valprint.c. */ - extern void go_val_print (struct type *type, const gdb_byte *valaddr, + 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, - const struct value *val, + struct value *val, const struct value_print_options *options); -Index: gdb-7.11.50.20160716/gdb/go-valprint.c +Index: gdb-7.12.50.20170226/gdb/go-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/go-valprint.c 2016-07-16 14:33:42.094510447 +0200 -+++ gdb-7.11.50.20160716/gdb/go-valprint.c 2016-07-16 14:33:44.539530124 +0200 -@@ -86,9 +86,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/go-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/go-valprint.c 2017-02-26 22:04:03.436609923 +0100 +@@ -86,7 +86,7 @@ /* Implements the la_val_print routine for language Go. */ void --go_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, -- CORE_ADDR address, struct ui_file *stream, int recurse, -- const struct value *val, -+go_val_print (struct type *type, const gdb_byte *valaddr, -+ LONGEST embedded_offset, CORE_ADDR address, -+ struct ui_file *stream, int recurse, const struct value *val, +-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) - { - type = check_typedef (type); -Index: gdb-7.11.50.20160716/gdb/jv-lang.c +Index: gdb-7.12.50.20170226/gdb/language.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/jv-lang.c 2016-07-16 14:33:42.094510447 +0200 -+++ gdb-7.11.50.20160716/gdb/jv-lang.c 2016-07-16 14:33:44.540530132 +0200 -@@ -440,7 +440,7 @@ - for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) - { - int accflags; -- int boffset; -+ LONGEST boffset; - - if (fields == NULL) - { -@@ -890,7 +890,7 @@ - static void - java_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 = java_get_encoding (type); -Index: gdb-7.11.50.20160716/gdb/jv-lang.h -=================================================================== ---- gdb-7.11.50.20160716.orig/gdb/jv-lang.h 2016-07-16 14:33:42.094510447 +0200 -+++ gdb-7.11.50.20160716/gdb/jv-lang.h 2016-07-16 14:33:44.540530132 +0200 -@@ -43,8 +43,8 @@ - - extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); - --extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, -- struct ui_file *, int, -+extern void java_val_print (struct type *, const gdb_byte *, LONGEST, -+ CORE_ADDR, struct ui_file *, int, - const struct value *, - const struct value_print_options *); - -Index: gdb-7.11.50.20160716/gdb/jv-valprint.c -=================================================================== ---- gdb-7.11.50.20160716.orig/gdb/jv-valprint.c 2016-07-16 14:33:42.095510455 +0200 -+++ gdb-7.11.50.20160716/gdb/jv-valprint.c 2016-07-16 14:33:44.540530132 +0200 -@@ -454,7 +454,7 @@ - - void - java_val_print (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) -Index: gdb-7.11.50.20160716/gdb/language.c -=================================================================== ---- gdb-7.11.50.20160716.orig/gdb/language.c 2016-07-16 14:33:42.095510455 +0200 -+++ gdb-7.11.50.20160716/gdb/language.c 2016-07-16 14:33:44.540530132 +0200 -@@ -766,7 +766,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/language.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/language.c 2017-02-26 22:04:03.436609923 +0100 +@@ -754,7 +754,7 @@ static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2196,20 +2087,20 @@ Index: gdb-7.11.50.20160716/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -785,7 +785,7 @@ +@@ -773,7 +773,7 @@ static void - unk_lang_val_print (struct type *type, const gdb_byte *valaddr, + 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, - const struct value *val, + struct value *val, const struct value_print_options *options) -Index: gdb-7.11.50.20160716/gdb/language.h +Index: gdb-7.12.50.20170226/gdb/language.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/language.h 2016-07-16 14:33:42.095510455 +0200 -+++ gdb-7.11.50.20160716/gdb/language.h 2016-07-16 14:33:44.540530132 +0200 -@@ -196,7 +196,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/language.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/language.h 2017-02-26 22:04:03.436609923 +0100 +@@ -197,7 +197,7 @@ struct ui_file * stream); void (*la_printstr) (struct ui_file * stream, struct type *elttype, @@ -2218,19 +2109,19 @@ Index: gdb-7.11.50.20160716/gdb/language.h const char *encoding, int force_ellipses, const struct value_print_options *); -@@ -238,7 +238,7 @@ +@@ -235,7 +235,7 @@ + printing. */ void (*la_val_print) (struct type *type, - const gdb_byte *contents, - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *val, + struct value *val, const struct value_print_options *options); -Index: gdb-7.11.50.20160716/gdb/m2-lang.c +Index: gdb-7.12.50.20170226/gdb/m2-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m2-lang.c 2016-07-16 14:33:42.096510463 +0200 -+++ gdb-7.11.50.20160716/gdb/m2-lang.c 2016-07-16 14:33:44.540530132 +0200 +--- gdb-7.12.50.20170226.orig/gdb/m2-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/m2-lang.c 2017-02-26 22:04:03.436609923 +0100 @@ -104,10 +104,10 @@ static void @@ -2265,23 +2156,23 @@ Index: gdb-7.11.50.20160716/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.11.50.20160716/gdb/m2-lang.h +Index: gdb-7.12.50.20170226/gdb/m2-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m2-lang.h 2016-07-16 14:33:42.096510463 +0200 -+++ gdb-7.11.50.20160716/gdb/m2-lang.h 2016-07-16 14:33:44.540530132 +0200 +--- gdb-7.12.50.20170226.orig/gdb/m2-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/m2-lang.h 2017-02-26 22:04:03.437609930 +0100 @@ -34,7 +34,7 @@ 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 *, const gdb_byte *, int, CORE_ADDR, -+extern void m2_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR, +-extern void m2_val_print (struct type *, int, CORE_ADDR, ++extern void m2_val_print (struct type *, LONGEST, CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *); -Index: gdb-7.11.50.20160716/gdb/m2-typeprint.c +Index: gdb-7.12.50.20170226/gdb/m2-typeprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m2-typeprint.c 2016-07-16 14:33:42.096510463 +0200 -+++ gdb-7.11.50.20160716/gdb/m2-typeprint.c 2016-07-16 14:33:44.541530140 +0200 +--- gdb-7.12.50.20170226.orig/gdb/m2-typeprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/m2-typeprint.c 2017-02-26 22:04:03.437609930 +0100 @@ -234,9 +234,12 @@ m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } @@ -2298,10 +2189,10 @@ Index: gdb-7.11.50.20160716/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.11.50.20160716/gdb/m2-valprint.c +Index: gdb-7.12.50.20170226/gdb/m2-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m2-valprint.c 2016-07-16 14:33:42.096510463 +0200 -+++ gdb-7.11.50.20160716/gdb/m2-valprint.c 2016-07-16 14:35:19.830297013 +0200 +--- gdb-7.12.50.20170226.orig/gdb/m2-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/m2-valprint.c 2017-02-26 22:04:03.437609930 +0100 @@ -35,7 +35,7 @@ struct ui_file *stream); static void @@ -2309,7 +2200,7 @@ Index: gdb-7.11.50.20160716/gdb/m2-valprint.c - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *val, + struct value *val, const struct value_print_options *options, @@ -67,7 +67,7 @@ @@ -2336,16 +2227,16 @@ Index: gdb-7.11.50.20160716/gdb/m2-valprint.c - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *val, + struct value *val, const struct value_print_options *options, @@ -308,13 +308,13 @@ function; they are identical. */ void --m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, -+m2_val_print (struct type *type, const gdb_byte *valaddr, LONGEST embedded_offset, +-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, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options) { struct gdbarch *gdbarch = get_type_arch (type); @@ -2353,8 +2244,8 @@ Index: gdb-7.11.50.20160716/gdb/m2-valprint.c + ULONGEST len; struct type *elttype; CORE_ADDR addr; - -@@ -339,7 +339,7 @@ + const gdb_byte *valaddr = value_contents_for_printing (original_value); +@@ -340,7 +340,7 @@ elements up to it. */ if (options->stop_print_at_null) { @@ -2363,7 +2254,7 @@ Index: gdb-7.11.50.20160716/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -@@ -415,7 +415,7 @@ +@@ -416,7 +416,7 @@ { struct type *range = elttype; LONGEST low_bound, high_bound; @@ -2372,12 +2263,12 @@ Index: gdb-7.11.50.20160716/gdb/m2-valprint.c int need_comma = 0; fputs_filtered ("{", stream); -Index: gdb-7.11.50.20160716/gdb/memrange.c +Index: gdb-7.12.50.20170226/gdb/memrange.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/memrange.c 2016-07-16 14:33:42.096510463 +0200 -+++ gdb-7.11.50.20160716/gdb/memrange.c 2016-07-16 14:33:44.541530140 +0200 -@@ -21,8 +21,8 @@ - #include "memrange.h" +--- gdb-7.12.50.20170226.orig/gdb/memrange.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/memrange.c 2017-02-26 22:04:03.437609930 +0100 +@@ -22,8 +22,8 @@ + #include int -mem_ranges_overlap (CORE_ADDR start1, int len1, @@ -2387,10 +2278,10 @@ Index: gdb-7.11.50.20160716/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.11.50.20160716/gdb/memrange.h +Index: gdb-7.12.50.20170226/gdb/memrange.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/memrange.h 2016-07-16 14:33:42.097510471 +0200 -+++ gdb-7.11.50.20160716/gdb/memrange.h 2016-07-16 14:33:44.541530140 +0200 +--- gdb-7.12.50.20170226.orig/gdb/memrange.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/memrange.h 2017-02-26 22:04:03.437609930 +0100 @@ -30,7 +30,7 @@ CORE_ADDR start; @@ -2411,10 +2302,10 @@ Index: gdb-7.11.50.20160716/gdb/memrange.h /* Returns true if ADDR is in RANGE. */ -Index: gdb-7.11.50.20160716/gdb/mips-linux-nat.c +Index: gdb-7.12.50.20170226/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/mips-linux-nat.c 2016-07-16 14:33:42.097510471 +0200 -+++ gdb-7.11.50.20160716/gdb/mips-linux-nat.c 2016-07-16 14:33:44.541530140 +0200 +--- gdb-7.12.50.20170226.orig/gdb/mips-linux-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/mips-linux-nat.c 2017-02-26 22:04:03.438609937 +0100 @@ -587,7 +587,7 @@ static int @@ -2424,10 +2315,10 @@ Index: gdb-7.11.50.20160716/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.11.50.20160716/gdb/opencl-lang.c +Index: gdb-7.12.50.20170226/gdb/opencl-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/opencl-lang.c 2016-07-16 14:33:42.097510471 +0200 -+++ gdb-7.11.50.20160716/gdb/opencl-lang.c 2016-07-16 14:33:44.541530140 +0200 +--- gdb-7.12.50.20170226.orig/gdb/opencl-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/opencl-lang.c 2017-02-26 22:04:03.438609937 +0100 @@ -78,11 +78,11 @@ static struct type * @@ -2496,10 +2387,10 @@ Index: gdb-7.11.50.20160716/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.11.50.20160716/gdb/p-lang.c +Index: gdb-7.12.50.20170226/gdb/p-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/p-lang.c 2016-07-16 14:33:42.098510479 +0200 -+++ gdb-7.11.50.20160716/gdb/p-lang.c 2016-07-16 14:33:44.542530148 +0200 +--- gdb-7.12.50.20170226.orig/gdb/p-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/p-lang.c 2017-02-26 22:04:03.438609937 +0100 @@ -95,8 +95,8 @@ are not multiple of TARGET_CHAR_BIT then the results are wrong but this does not happen for Free Pascal nor for GPC. */ @@ -2547,18 +2438,18 @@ Index: gdb-7.11.50.20160716/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.11.50.20160716/gdb/p-lang.h +Index: gdb-7.12.50.20170226/gdb/p-lang.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/p-lang.h 2016-07-16 14:33:42.098510479 +0200 -+++ gdb-7.11.50.20160716/gdb/p-lang.h 2016-07-16 14:33:44.542530148 +0200 +--- gdb-7.12.50.20170226.orig/gdb/p-lang.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/p-lang.h 2017-02-26 22:04:03.438609937 +0100 @@ -36,7 +36,7 @@ extern void pascal_print_typedef (struct type *, struct symbol *, struct ui_file *); --extern void pascal_val_print (struct type *, const gdb_byte *, int, -+extern void pascal_val_print (struct type *, const gdb_byte *, LONGEST, +-extern void pascal_val_print (struct type *, int, ++extern void pascal_val_print (struct type *, LONGEST, CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *); @@ -50,13 +50,13 @@ /* These are in p-lang.c: */ @@ -2576,18 +2467,18 @@ Index: gdb-7.11.50.20160716/gdb/p-lang.h const struct value_print_options *); extern struct type **const (pascal_builtin_types[]); -Index: gdb-7.11.50.20160716/gdb/p-valprint.c +Index: gdb-7.12.50.20170226/gdb/p-valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/p-valprint.c 2016-07-16 14:33:42.098510479 +0200 -+++ gdb-7.11.50.20160716/gdb/p-valprint.c 2016-07-16 14:33:44.542530148 +0200 +--- gdb-7.12.50.20170226.orig/gdb/p-valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/p-valprint.c 2017-02-26 22:04:03.439609944 +0100 @@ -59,7 +59,7 @@ void - pascal_val_print (struct type *type, const gdb_byte *valaddr, + pascal_val_print (struct type *type, - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options) @@ -70,8 +70,8 @@ unsigned len; @@ -2600,10 +2491,10 @@ Index: gdb-7.11.50.20160716/gdb/p-valprint.c struct type *char_type; CORE_ADDR addr; int want_space = 0; -Index: gdb-7.11.50.20160716/gdb/ppc-linux-nat.c +Index: gdb-7.12.50.20170226/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ppc-linux-nat.c 2016-07-16 14:33:42.099510487 +0200 -+++ gdb-7.11.50.20160716/gdb/ppc-linux-nat.c 2016-07-16 14:33:44.542530148 +0200 +--- gdb-7.12.50.20170226.orig/gdb/ppc-linux-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ppc-linux-nat.c 2017-02-26 22:04:03.439609944 +0100 @@ -1449,7 +1449,7 @@ static int @@ -2613,11 +2504,11 @@ Index: gdb-7.11.50.20160716/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.11.50.20160716/gdb/printcmd.c +Index: gdb-7.12.50.20170226/gdb/printcmd.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/printcmd.c 2016-07-16 14:33:42.099510487 +0200 -+++ gdb-7.11.50.20160716/gdb/printcmd.c 2016-07-16 14:33:44.543530156 +0200 -@@ -279,7 +279,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/printcmd.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/printcmd.c 2017-02-26 22:04:03.440609951 +0100 +@@ -280,7 +280,7 @@ struct ui_file *stream) { struct type *type = check_typedef (value_type (val)); @@ -2635,11 +2526,11 @@ Index: gdb-7.11.50.20160716/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.11.50.20160716/gdb/procfs.c +Index: gdb-7.12.50.20170226/gdb/procfs.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/procfs.c 2016-07-16 14:33:42.100510495 +0200 -+++ gdb-7.11.50.20160716/gdb/procfs.c 2016-07-16 14:33:44.543530156 +0200 -@@ -4863,7 +4863,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/procfs.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/procfs.c 2017-02-26 22:04:03.441609958 +0100 +@@ -4862,7 +4862,7 @@ static int procfs_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2648,11 +2539,11 @@ Index: gdb-7.11.50.20160716/gdb/procfs.c { /* The man page for proc(4) on Solaris 2.6 and up says that the system can support "thousands" of hardware watchpoints, but gives -Index: gdb-7.11.50.20160716/gdb/regcache.c +Index: gdb-7.12.50.20170226/gdb/regcache.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/regcache.c 2016-07-16 14:33:42.101510503 +0200 -+++ gdb-7.11.50.20160716/gdb/regcache.c 2016-07-16 14:33:44.544530165 +0200 -@@ -967,7 +967,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/regcache.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/regcache.c 2017-02-26 22:04:03.441609958 +0100 +@@ -980,7 +980,7 @@ static enum register_status regcache_xfer_part (struct regcache *regcache, int regnum, @@ -2661,7 +2552,7 @@ Index: gdb-7.11.50.20160716/gdb/regcache.c enum register_status (*read) (struct regcache *regcache, int regnum, gdb_byte *buf), -@@ -1011,7 +1011,7 @@ +@@ -1025,7 +1025,7 @@ enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -2670,7 +2561,7 @@ Index: gdb-7.11.50.20160716/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1022,7 +1022,7 @@ +@@ -1036,7 +1036,7 @@ void regcache_raw_write_part (struct regcache *regcache, int regnum, @@ -2679,7 +2570,7 @@ Index: gdb-7.11.50.20160716/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1033,7 +1033,7 @@ +@@ -1047,7 +1047,7 @@ enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, @@ -2688,7 +2579,7 @@ Index: gdb-7.11.50.20160716/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1044,7 +1044,7 @@ +@@ -1058,7 +1058,7 @@ void regcache_cooked_write_part (struct regcache *regcache, int regnum, @@ -2697,11 +2588,11 @@ Index: gdb-7.11.50.20160716/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.11.50.20160716/gdb/regcache.h +Index: gdb-7.12.50.20170226/gdb/regcache.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/regcache.h 2016-07-16 14:33:42.101510503 +0200 -+++ gdb-7.11.50.20160716/gdb/regcache.h 2016-07-16 14:33:44.544530165 +0200 -@@ -80,9 +80,9 @@ +--- gdb-7.12.50.20170226.orig/gdb/regcache.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/regcache.h 2017-02-26 22:04:03.441609958 +0100 +@@ -86,9 +86,9 @@ extern enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -2713,7 +2604,7 @@ Index: gdb-7.11.50.20160716/gdb/regcache.h void regcache_invalidate (struct regcache *regcache, int regnum); -@@ -119,10 +119,11 @@ +@@ -125,10 +125,11 @@ write style operations. */ enum register_status regcache_cooked_read_part (struct regcache *regcache, @@ -2728,11 +2619,11 @@ Index: gdb-7.11.50.20160716/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.11.50.20160716/gdb/remote.c +Index: gdb-7.12.50.20170226/gdb/remote.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/remote.c 2016-07-16 14:33:42.104510527 +0200 -+++ gdb-7.11.50.20160716/gdb/remote.c 2016-07-16 14:33:44.545530172 +0200 -@@ -9473,7 +9473,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/remote.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/remote.c 2017-02-26 22:04:03.444609979 +0100 +@@ -9920,7 +9920,7 @@ static int remote_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2741,10 +2632,10 @@ Index: gdb-7.11.50.20160716/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.11.50.20160716/gdb/spu-multiarch.c +Index: gdb-7.12.50.20170226/gdb/spu-multiarch.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/spu-multiarch.c 2016-07-16 14:33:42.105510536 +0200 -+++ gdb-7.11.50.20160716/gdb/spu-multiarch.c 2016-07-16 14:33:44.545530172 +0200 +--- gdb-7.12.50.20170226.orig/gdb/spu-multiarch.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/spu-multiarch.c 2017-02-26 22:04:03.444609979 +0100 @@ -127,7 +127,7 @@ /* Override the to_region_ok_for_hw_watchpoint routine. */ static int @@ -2754,11 +2645,11 @@ Index: gdb-7.11.50.20160716/gdb/spu-multiarch.c { struct target_ops *ops_beneath = find_target_beneath (self); -Index: gdb-7.11.50.20160716/gdb/stack.c +Index: gdb-7.12.50.20170226/gdb/stack.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/stack.c 2016-07-16 14:33:42.106510544 +0200 -+++ gdb-7.11.50.20160716/gdb/stack.c 2016-07-16 14:33:44.546530181 +0200 -@@ -176,7 +176,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/stack.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/stack.c 2017-02-26 22:04:03.445609987 +0100 +@@ -189,7 +189,7 @@ argument (not just the first nameless argument). */ static void @@ -2767,7 +2658,7 @@ Index: gdb-7.11.50.20160716/gdb/stack.c int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); -@@ -537,7 +537,7 @@ +@@ -546,7 +546,7 @@ /* 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. */ @@ -2775,8 +2666,8 @@ Index: gdb-7.11.50.20160716/gdb/stack.c + LONGEST highest_offset = -1; /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; - struct cleanup *old_chain; -@@ -571,8 +571,8 @@ + /* True if we should print arguments, false otherwise. */ +@@ -575,8 +575,8 @@ case LOC_ARG: case LOC_REF_ARG: { @@ -2787,7 +2678,7 @@ Index: gdb-7.11.50.20160716/gdb/stack.c /* Compute address of next argument by adding the size of this argument and rounding to an int boundary. */ -@@ -707,7 +707,7 @@ +@@ -711,7 +711,7 @@ enough about the stack to find them. */ if (num != -1) { @@ -2796,11 +2687,11 @@ Index: gdb-7.11.50.20160716/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.11.50.20160716/gdb/symmisc.c +Index: gdb-7.12.50.20170226/gdb/symmisc.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/symmisc.c 2016-07-16 14:33:42.107510552 +0200 -+++ gdb-7.11.50.20160716/gdb/symmisc.c 2016-07-16 14:33:44.546530181 +0200 -@@ -538,11 +538,11 @@ +--- gdb-7.12.50.20170226.orig/gdb/symmisc.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/symmisc.c 2017-02-26 22:04:03.445609987 +0100 +@@ -604,11 +604,11 @@ case LOC_CONST_BYTES: { @@ -2815,11 +2706,11 @@ Index: gdb-7.11.50.20160716/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.11.50.20160716/gdb/target.c +Index: gdb-7.12.50.20170226/gdb/target.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/target.c 2016-07-16 14:33:42.108510560 +0200 -+++ gdb-7.11.50.20160716/gdb/target.c 2016-07-16 14:33:44.546530181 +0200 -@@ -56,7 +56,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/target.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/target.c 2017-02-26 22:04:03.446609994 +0100 +@@ -57,7 +57,7 @@ CORE_ADDR, CORE_ADDR, int); static int default_region_ok_for_hw_watchpoint (struct target_ops *, @@ -2828,7 +2719,7 @@ Index: gdb-7.11.50.20160716/gdb/target.c static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3196,7 +3196,7 @@ +@@ -3228,7 +3228,7 @@ static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2837,11 +2728,11 @@ Index: gdb-7.11.50.20160716/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -Index: gdb-7.11.50.20160716/gdb/target.h +Index: gdb-7.12.50.20170226/gdb/target.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/target.h 2016-07-16 14:33:42.109510568 +0200 -+++ gdb-7.11.50.20160716/gdb/target.h 2016-07-16 14:33:44.547530189 +0200 -@@ -551,7 +551,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/target.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/target.h 2017-02-26 22:04:03.447610001 +0100 +@@ -555,7 +555,7 @@ /* Documentation of this routine is provided with the corresponding target_* macro. */ int (*to_region_ok_for_hw_watchpoint) (struct target_ops *, @@ -2850,80 +2741,80 @@ Index: gdb-7.11.50.20160716/gdb/target.h TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); int (*to_can_accel_watchpoint_condition) (struct target_ops *, -Index: gdb-7.11.50.20160716/gdb/tracepoint.c +Index: gdb-7.12.50.20170226/gdb/tracepoint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/tracepoint.c 2016-07-16 14:33:42.112510592 +0200 -+++ gdb-7.11.50.20160716/gdb/tracepoint.c 2016-07-16 14:33:44.547530189 +0200 -@@ -930,13 +930,13 @@ - static void - add_memrange (struct collection_list *memranges, - int type, bfd_signed_vma base, -- unsigned long len) -+ ULONGEST len) +--- gdb-7.12.50.20170226.orig/gdb/tracepoint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/tracepoint.c 2017-02-26 22:04:03.448610008 +0100 +@@ -908,10 +908,10 @@ + void + collection_list::add_memrange (struct gdbarch *gdbarch, + int type, bfd_signed_vma base, +- unsigned long len) ++ ULONGEST len) { if (info_verbose) - { - printf_filtered ("(%d,", type); - printf_vma (base); -- printf_filtered (",%ld)\n", len); -+ printf_filtered (",%s)\n", pulongest (len)); - } +- 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 */ -@@ -966,7 +966,7 @@ - CORE_ADDR scope, - int trace_string) + /* base: addr if memory, offset if reg relative. */ +@@ -931,7 +931,7 @@ + CORE_ADDR scope, + int trace_string) { - unsigned long len; + ULONGEST len; unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -990,8 +990,8 @@ - char tmp[40]; - - sprintf_vma (tmp, offset); +@@ -952,8 +952,8 @@ + 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), - tmp /* address */); + paddress (gdbarch, offset)); } /* A struct may be a C++ class with static fields, go to general -@@ -1023,8 +1023,8 @@ +@@ -985,9 +985,9 @@ offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { -- printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ", -- SYMBOL_PRINT_NAME (sym), len); -+ printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ", -+ SYMBOL_PRINT_NAME (sym), pulongest (len)); - printf_vma (offset); - printf_filtered (" from frame ptr reg %d\n", reg); +- 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); } -@@ -1035,8 +1035,8 @@ + add_memrange (gdbarch, reg, offset, len); +@@ -997,9 +997,9 @@ offset = 0; if (info_verbose) { -- printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset ", -- SYMBOL_PRINT_NAME (sym), len); -+ printf_filtered ("LOC_REGPARM_ADDR %s: Collect %s bytes at offset ", -+ SYMBOL_PRINT_NAME (sym), pulongest (len)); - printf_vma (offset); - printf_filtered (" from reg %d\n", reg); +- 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); } -@@ -1047,8 +1047,8 @@ + add_memrange (gdbarch, reg, offset, len); +@@ -1009,9 +1009,9 @@ offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { -- printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ", -- SYMBOL_PRINT_NAME (sym), len); -+ printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ", -+ SYMBOL_PRINT_NAME (sym), pulongest (len)); - printf_vma (offset); - printf_filtered (" from frame ptr reg %d\n", reg); +- 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); } -@@ -2703,7 +2703,8 @@ + add_memrange (gdbarch, reg, offset, len); +@@ -2583,7 +2583,8 @@ const char *symname; char *save_args = args; struct block_iterator iter; @@ -2933,7 +2824,7 @@ Index: gdb-7.11.50.20160716/gdb/tracepoint.c struct gdbarch *gdbarch; int regno; struct event_location *location; -@@ -2847,8 +2848,11 @@ +@@ -2727,8 +2728,11 @@ } } if (SYMBOL_TYPE (sym)) @@ -2947,10 +2838,10 @@ Index: gdb-7.11.50.20160716/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.11.50.20160716/gdb/valarith.c +Index: gdb-7.12.50.20170226/gdb/valarith.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/valarith.c 2016-07-16 14:33:42.114510608 +0200 -+++ gdb-7.11.50.20160716/gdb/valarith.c 2016-07-16 14:33:44.548530197 +0200 +--- gdb-7.12.50.20170226.orig/gdb/valarith.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/valarith.c 2017-02-26 22:04:03.448610008 +0100 @@ -188,7 +188,7 @@ to doubles, but no longer does. */ @@ -2960,7 +2851,7 @@ Index: gdb-7.11.50.20160716/gdb/valarith.c { struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); -@@ -674,7 +674,7 @@ +@@ -665,7 +665,7 @@ struct value *inval1; struct value *inval2; struct value *outval = NULL; @@ -2969,7 +2860,7 @@ Index: gdb-7.11.50.20160716/gdb/valarith.c int count, idx; char *ptr; char inchar; -@@ -1527,7 +1527,7 @@ +@@ -1518,7 +1518,7 @@ int value_logical_not (struct value *arg1) { @@ -2978,7 +2869,7 @@ Index: gdb-7.11.50.20160716/gdb/valarith.c const gdb_byte *p; struct type *type1; -@@ -1558,11 +1558,11 @@ +@@ -1549,11 +1549,11 @@ static int value_strcmp (struct value *arg1, struct value *arg2) { @@ -2993,10 +2884,10 @@ Index: gdb-7.11.50.20160716/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.11.50.20160716/gdb/valops.c +Index: gdb-7.12.50.20170226/gdb/valops.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/valops.c 2016-07-16 14:33:42.117510632 +0200 -+++ gdb-7.11.50.20160716/gdb/valops.c 2016-07-16 14:33:44.548530197 +0200 +--- gdb-7.12.50.20170226.orig/gdb/valops.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/valops.c 2017-02-26 22:04:03.449610015 +0100 @@ -79,7 +79,7 @@ int, int); @@ -3039,7 +2930,7 @@ Index: gdb-7.11.50.20160716/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -3328,7 +3328,7 @@ +@@ -3335,7 +3335,7 @@ the form "DOMAIN::NAME". */ static struct value * @@ -3048,7 +2939,7 @@ Index: gdb-7.11.50.20160716/gdb/valops.c struct type *curtype, const char *name, struct type *intype, int want_address, -@@ -3362,7 +3362,7 @@ +@@ -3369,7 +3369,7 @@ if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3057,7 +2948,7 @@ Index: gdb-7.11.50.20160716/gdb/valops.c else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3530,7 +3530,7 @@ +@@ -3537,7 +3537,7 @@ for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3066,7 +2957,7 @@ Index: gdb-7.11.50.20160716/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3679,7 +3679,7 @@ +@@ -3686,7 +3686,7 @@ struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3075,20 +2966,20 @@ Index: gdb-7.11.50.20160716/gdb/valops.c int xusing_enc) { struct type *real_type; -Index: gdb-7.11.50.20160716/gdb/valprint.c +Index: gdb-7.12.50.20170226/gdb/valprint.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/valprint.c 2016-07-16 14:33:42.118510640 +0200 -+++ gdb-7.11.50.20160716/gdb/valprint.c 2016-07-16 14:33:44.549530205 +0200 -@@ -907,7 +907,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/valprint.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/valprint.c 2017-02-26 22:04:03.450610022 +0100 +@@ -933,7 +933,7 @@ void - generic_val_print (struct type *type, const gdb_byte *valaddr, + generic_val_print (struct type *type, - int embedded_offset, CORE_ADDR address, + LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options, -@@ -1842,7 +1842,7 @@ +@@ -1869,7 +1869,7 @@ void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3097,9 +2988,9 @@ Index: gdb-7.11.50.20160716/gdb/valprint.c { const gdb_byte *p; -@@ -1964,17 +1964,17 @@ +@@ -1991,17 +1991,17 @@ int recurse, - const struct value *val, + struct value *val, const struct value_print_options *options, - unsigned int i) + ULONGEST i) @@ -3120,7 +3011,7 @@ Index: gdb-7.11.50.20160716/gdb/valprint.c LONGEST low_bound, high_bound; LONGEST low_pos, high_pos; -@@ -2064,7 +2064,7 @@ +@@ -2091,7 +2091,7 @@ address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3129,7 +3020,7 @@ Index: gdb-7.11.50.20160716/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2720,7 +2720,7 @@ +@@ -2743,7 +2743,7 @@ void generic_printstr (struct ui_file *stream, struct type *type, @@ -3138,13 +3029,13 @@ Index: gdb-7.11.50.20160716/gdb/valprint.c const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options) -Index: gdb-7.11.50.20160716/gdb/valprint.h +Index: gdb-7.12.50.20170226/gdb/valprint.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/valprint.h 2016-07-16 14:33:42.118510640 +0200 -+++ gdb-7.11.50.20160716/gdb/valprint.h 2016-07-16 14:33:44.549530205 +0200 +--- gdb-7.12.50.20170226.orig/gdb/valprint.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/valprint.h 2017-02-26 22:04:03.450610022 +0100 @@ -119,7 +119,7 @@ CORE_ADDR, struct ui_file *, int, - const struct value *, + struct value *, const struct value_print_options *, - unsigned int); + ULONGEST); @@ -3163,11 +3054,11 @@ Index: gdb-7.11.50.20160716/gdb/valprint.h @@ -194,7 +194,7 @@ - extern void generic_val_print (struct type *type, const gdb_byte *valaddr, + 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, - const struct value *original_value, + struct value *original_value, const struct value_print_options *options, @@ -204,7 +204,7 @@ int quoter, const char *encoding); @@ -3178,11 +3069,11 @@ Index: gdb-7.11.50.20160716/gdb/valprint.h const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options); -Index: gdb-7.11.50.20160716/gdb/value.c +Index: gdb-7.12.50.20170226/gdb/value.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/value.c 2016-07-16 14:33:42.119510648 +0200 -+++ gdb-7.11.50.20160716/gdb/value.c 2016-07-16 14:33:44.549530205 +0200 -@@ -366,7 +366,8 @@ +--- gdb-7.12.50.20170226.orig/gdb/value.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/value.c 2017-02-26 22:04:03.451610029 +0100 +@@ -367,7 +367,8 @@ } int @@ -3192,7 +3083,7 @@ Index: gdb-7.11.50.20160716/gdb/value.c { gdb_assert (!value->lazy); -@@ -812,9 +813,9 @@ +@@ -813,9 +814,9 @@ Return true if the available bits match. */ static int @@ -3215,10 +3106,10 @@ Index: gdb-7.11.50.20160716/gdb/value.c { mark_value_bits_optimized_out (value, offset * TARGET_CHAR_BIT, -Index: gdb-7.11.50.20160716/gdb/value.h +Index: gdb-7.12.50.20170226/gdb/value.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/value.h 2016-07-16 14:33:42.120510656 +0200 -+++ gdb-7.11.50.20160716/gdb/value.h 2016-07-16 14:33:44.550530213 +0200 +--- gdb-7.12.50.20170226.orig/gdb/value.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/value.h 2017-02-26 22:04:03.451610029 +0100 @@ -246,7 +246,7 @@ /* If non-NULL, this is used to determine whether the indicated bits of VALUE are a synthetic pointer. */ @@ -3247,7 +3138,7 @@ Index: gdb-7.11.50.20160716/gdb/value.h /* Mark VALUE's content bits starting at OFFSET and extending for LENGTH bits as optimized out. */ -@@ -771,12 +772,11 @@ +@@ -820,12 +821,11 @@ int fieldno, struct type *arg_type); @@ -3261,7 +3152,7 @@ Index: gdb-7.11.50.20160716/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -1065,10 +1065,11 @@ +@@ -1114,10 +1114,11 @@ extern struct value *find_function_in_inferior (const char *, struct objfile **); @@ -3275,11 +3166,11 @@ Index: gdb-7.11.50.20160716/gdb/value.h /* User function handler. */ -Index: gdb-7.11.50.20160716/gdb/s390-linux-nat.c +Index: gdb-7.12.50.20170226/gdb/s390-linux-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/s390-linux-nat.c 2016-07-16 14:33:42.120510656 +0200 -+++ gdb-7.11.50.20160716/gdb/s390-linux-nat.c 2016-07-16 14:33:44.550530213 +0200 -@@ -612,7 +612,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/s390-linux-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/s390-linux-nat.c 2017-02-26 22:04:03.451610029 +0100 +@@ -899,7 +899,7 @@ static int s390_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3288,11 +3179,11 @@ Index: gdb-7.11.50.20160716/gdb/s390-linux-nat.c { return 1; } -Index: gdb-7.11.50.20160716/gdb/target-delegates.c +Index: gdb-7.12.50.20170226/gdb/target-delegates.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/target-delegates.c 2016-07-16 14:33:42.121510664 +0200 -+++ gdb-7.11.50.20160716/gdb/target-delegates.c 2016-07-16 14:33:44.550530213 +0200 -@@ -736,14 +736,14 @@ +--- gdb-7.12.50.20170226.orig/gdb/target-delegates.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/target-delegates.c 2017-02-26 22:04:03.452610036 +0100 +@@ -760,14 +760,14 @@ } static int @@ -3309,7 +3200,7 @@ Index: gdb-7.11.50.20160716/gdb/target-delegates.c { int result; fprintf_unfiltered (gdb_stdlog, "-> %s->to_region_ok_for_hw_watchpoint (...)\n", debug_target.to_shortname); -@@ -753,7 +753,7 @@ +@@ -777,7 +777,7 @@ fputs_unfiltered (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); fputs_unfiltered (", ", gdb_stdlog); @@ -3318,11 +3209,11 @@ Index: gdb-7.11.50.20160716/gdb/target-delegates.c fputs_unfiltered (") = ", gdb_stdlog); target_debug_print_int (result); fputs_unfiltered ("\n", gdb_stdlog); -Index: gdb-7.11.50.20160716/gdb/aarch64-linux-nat.c +Index: gdb-7.12.50.20170226/gdb/aarch64-linux-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/aarch64-linux-nat.c 2016-07-16 14:33:42.122510672 +0200 -+++ gdb-7.11.50.20160716/gdb/aarch64-linux-nat.c 2016-07-16 14:33:44.551530221 +0200 -@@ -736,7 +736,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/aarch64-linux-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/aarch64-linux-nat.c 2017-02-26 22:04:03.452610036 +0100 +@@ -708,7 +708,7 @@ static int aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3331,10 +3222,10 @@ Index: gdb-7.11.50.20160716/gdb/aarch64-linux-nat.c { return aarch64_linux_region_ok_for_watchpoint (addr, len); } -Index: gdb-7.11.50.20160716/gdb/nat/x86-dregs.c +Index: gdb-7.12.50.20170226/gdb/nat/x86-dregs.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/nat/x86-dregs.c 2016-07-16 14:33:42.122510672 +0200 -+++ gdb-7.11.50.20160716/gdb/nat/x86-dregs.c 2016-07-16 14:33:44.551530221 +0200 +--- gdb-7.12.50.20170226.orig/gdb/nat/x86-dregs.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/nat/x86-dregs.c 2017-02-26 22:04:03.453610043 +0100 @@ -384,7 +384,7 @@ static int @@ -3353,11 +3244,11 @@ Index: gdb-7.11.50.20160716/gdb/nat/x86-dregs.c { int nregs; -Index: gdb-7.11.50.20160716/gdb/compile/compile-c-support.c +Index: gdb-7.12.50.20170226/gdb/compile/compile-c-support.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/compile/compile-c-support.c 2016-07-16 14:33:42.122510672 +0200 -+++ gdb-7.11.50.20160716/gdb/compile/compile-c-support.c 2016-07-16 14:33:44.551530221 +0200 -@@ -299,11 +299,11 @@ +--- gdb-7.12.50.20170226.orig/gdb/compile/compile-c-support.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/compile/compile-c-support.c 2017-02-26 22:04:03.453610043 +0100 +@@ -307,11 +307,11 @@ default: fprintf_unfiltered (stream, @@ -3371,10 +3262,10 @@ Index: gdb-7.11.50.20160716/gdb/compile/compile-c-support.c } fputs_unfiltered (";\n", stream); -Index: gdb-7.11.50.20160716/gdb/nat/x86-dregs.h +Index: gdb-7.12.50.20170226/gdb/nat/x86-dregs.h =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/nat/x86-dregs.h 2016-07-16 14:33:42.122510672 +0200 -+++ gdb-7.11.50.20160716/gdb/nat/x86-dregs.h 2016-07-16 14:33:44.551530221 +0200 +--- gdb-7.12.50.20170226.orig/gdb/nat/x86-dregs.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/nat/x86-dregs.h 2017-02-26 22:04:03.453610043 +0100 @@ -116,7 +116,7 @@ /* Return non-zero if we can watch a memory region that starts at address ADDR and whose length is LEN bytes. */ @@ -3384,10 +3275,10 @@ Index: gdb-7.11.50.20160716/gdb/nat/x86-dregs.h /* If the inferior has some break/watchpoint that triggered, set the address associated with that break/watchpoint and return true. -Index: gdb-7.11.50.20160716/gdb/x86-nat.c +Index: gdb-7.12.50.20170226/gdb/x86-nat.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/x86-nat.c 2016-07-16 14:33:42.123510680 +0200 -+++ gdb-7.11.50.20160716/gdb/x86-nat.c 2016-07-16 14:33:44.551530221 +0200 +--- gdb-7.12.50.20170226.orig/gdb/x86-nat.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/x86-nat.c 2017-02-26 22:04:03.453610043 +0100 @@ -174,7 +174,7 @@ static int @@ -3397,11 +3288,11 @@ Index: gdb-7.11.50.20160716/gdb/x86-nat.c { struct x86_debug_reg_state *state = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.11.50.20160716/gdb/rust-lang.c +Index: gdb-7.12.50.20170226/gdb/rust-lang.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/rust-lang.c 2016-07-16 14:33:42.123510680 +0200 -+++ gdb-7.11.50.20160716/gdb/rust-lang.c 2016-07-16 14:33:44.551530221 +0200 -@@ -410,7 +410,7 @@ +--- gdb-7.12.50.20170226.orig/gdb/rust-lang.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/rust-lang.c 2017-02-26 22:04:03.454610050 +0100 +@@ -439,7 +439,7 @@ static void rust_printstr (struct ui_file *stream, struct type *type, @@ -3410,12 +3301,131 @@ Index: gdb-7.11.50.20160716/gdb/rust-lang.c const char *user_encoding, int force_ellipses, const struct value_print_options *options) { -@@ -456,7 +456,7 @@ +@@ -563,7 +563,7 @@ /* la_val_print implementation for Rust. */ static void --rust_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, -+rust_val_print (struct type *type, const gdb_byte *valaddr, LONGEST embedded_offset, +-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, - const struct value *val, + struct value *val, const struct value_print_options *options) +Index: gdb-7.12.50.20170226/gdb/arch-utils.c +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/arch-utils.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/arch-utils.c 2017-02-26 22:04:03.454610050 +0100 +@@ -247,7 +247,7 @@ + + 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; + +Index: gdb-7.12.50.20170226/gdb/arch-utils.h +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/arch-utils.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/arch-utils.h 2017-02-26 22:04:03.454610050 +0100 +@@ -144,7 +144,7 @@ + /* 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); +Index: gdb-7.12.50.20170226/gdb/findcmd.c +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/findcmd.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/findcmd.c 2017-02-26 22:04:03.454610050 +0100 +@@ -180,7 +180,7 @@ + need to grow the pattern buf. */ + pattern_buf_size_need = (pattern_buf_end - pattern_buf + + std::max (TYPE_LENGTH (t), +- (unsigned) sizeof (int64_t))); ++ (ULONGEST) sizeof (int64_t))); + if (pattern_buf_size_need > pattern_buf_size) + { + size_t current_offset = pattern_buf_end - pattern_buf; +Index: gdb-7.12.50.20170226/gdb/gdbarch.c +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/gdbarch.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbarch.c 2017-02-26 22:04:03.455610057 +0100 +@@ -1740,7 +1740,7 @@ + } + + 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); +Index: gdb-7.12.50.20170226/gdb/gdbarch.h +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/gdbarch.h 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbarch.h 2017-02-26 22:04:03.456610064 +0100 +@@ -191,8 +191,8 @@ + 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 +Index: gdb-7.12.50.20170226/gdb/gdbarch.sh +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/gdbarch.sh 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/gdbarch.sh 2017-02-26 22:04:03.456610064 +0100 +@@ -386,7 +386,7 @@ + # 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 +Index: gdb-7.12.50.20170226/gdb/i386-tdep.c +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/i386-tdep.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/i386-tdep.c 2017-02-26 22:04:03.458610079 +0100 +@@ -8204,7 +8204,7 @@ + + 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 +Index: gdb-7.12.50.20170226/gdb/ppc-linux-tdep.c +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/ppc-linux-tdep.c 2017-02-26 21:59:36.043719369 +0100 ++++ gdb-7.12.50.20170226/gdb/ppc-linux-tdep.c 2017-02-26 22:04:03.458610079 +0100 +@@ -1632,7 +1632,7 @@ + + const struct floatformat ** + ppc_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 +Index: gdb-7.12.50.20170226/gdb/tracepoint.h +=================================================================== +--- gdb-7.12.50.20170226.orig/gdb/tracepoint.h 2017-02-26 22:05:14.775114309 +0100 ++++ gdb-7.12.50.20170226/gdb/tracepoint.h 2017-02-26 22:05:24.807185239 +0100 +@@ -254,7 +254,7 @@ + void add_register (unsigned int regno); + void add_memrange (struct gdbarch *gdbarch, + int type, bfd_signed_vma base, +- unsigned long len); ++ ULONGEST len); + void collect_symbol (struct symbol *sym, + struct gdbarch *gdbarch, + long frame_regno, long frame_offset, diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 85760db..2eff859 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -137,11 +137,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.11.50.20160716/gdb/alpha-tdep.c +Index: gdb-7.12.50.20170207/gdb/alpha-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/alpha-tdep.c 2016-07-16 14:35:45.390502718 +0200 -+++ gdb-7.11.50.20160716/gdb/alpha-tdep.c 2016-07-16 14:35:47.511519788 +0200 -@@ -299,17 +299,17 @@ +--- gdb-7.12.50.20170207.orig/gdb/alpha-tdep.c 2017-02-26 19:11:30.470121187 +0100 ++++ gdb-7.12.50.20170207/gdb/alpha-tdep.c 2017-02-26 19:11:48.269248546 +0100 +@@ -300,17 +300,17 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -163,7 +163,7 @@ Index: gdb-7.11.50.20160716/gdb/alpha-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ -@@ -429,8 +429,8 @@ +@@ -430,8 +430,8 @@ for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; @@ -174,7 +174,7 @@ Index: gdb-7.11.50.20160716/gdb/alpha-tdep.c /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) -@@ -442,7 +442,7 @@ +@@ -443,7 +443,7 @@ } else { @@ -183,11 +183,11 @@ Index: gdb-7.11.50.20160716/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.11.50.20160716/gdb/amd64-tdep.c +Index: gdb-7.12.50.20170207/gdb/amd64-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/amd64-tdep.c 2016-07-16 14:35:45.391502726 +0200 -+++ gdb-7.11.50.20160716/gdb/amd64-tdep.c 2016-07-16 14:35:47.512519796 +0200 -@@ -729,7 +729,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/amd64-tdep.c 2017-02-26 19:11:30.471121194 +0100 ++++ gdb-7.12.50.20170207/gdb/amd64-tdep.c 2017-02-26 19:12:53.685716623 +0100 +@@ -730,7 +730,7 @@ gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class theclass[2]; @@ -196,7 +196,20 @@ Index: gdb-7.11.50.20160716/gdb/amd64-tdep.c static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -880,8 +880,8 @@ +@@ -847,10 +847,10 @@ + gdb_assert (regnum != -1); + + if (readbuf) +- regcache_raw_read_part (regcache, regnum, offset, std::min (len, 8), ++ regcache_raw_read_part (regcache, regnum, offset, std::min (len, (LONGEST) 8), + readbuf + i * 8); + if (writebuf) +- regcache_raw_write_part (regcache, regnum, offset, std::min (len, 8), ++ regcache_raw_write_part (regcache, regnum, offset, std::min (len, (LONGEST) 8), + writebuf + i * 8); + } + +@@ -881,8 +881,8 @@ }; struct value **stack_args = XALLOCAVEC (struct value *, nargs); int num_stack_args = 0; @@ -207,7 +220,7 @@ Index: gdb-7.11.50.20160716/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -893,7 +893,7 @@ +@@ -894,7 +894,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -216,11 +229,20 @@ Index: gdb-7.11.50.20160716/gdb/amd64-tdep.c enum amd64_reg_class theclass[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.11.50.20160716/gdb/amd64-windows-tdep.c +@@ -958,7 +958,7 @@ + + 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 (regcache, regnum, offset, 8, buf); + } + } +Index: gdb-7.12.50.20170207/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/amd64-windows-tdep.c 2016-07-16 14:35:45.393502742 +0200 -+++ gdb-7.11.50.20160716/gdb/amd64-windows-tdep.c 2016-07-16 14:35:47.512519796 +0200 -@@ -288,7 +288,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/amd64-windows-tdep.c 2017-02-26 19:11:30.472121202 +0100 ++++ gdb-7.12.50.20170207/gdb/amd64-windows-tdep.c 2017-02-26 19:11:48.270248553 +0100 +@@ -289,7 +289,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -229,11 +251,11 @@ Index: gdb-7.11.50.20160716/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.11.50.20160716/gdb/arm-tdep.c +Index: gdb-7.12.50.20170207/gdb/arm-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/arm-tdep.c 2016-07-16 14:35:45.400502798 +0200 -+++ gdb-7.11.50.20160716/gdb/arm-tdep.c 2016-07-16 14:36:30.328864376 +0200 -@@ -3443,7 +3443,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/arm-tdep.c 2017-02-26 19:11:30.477121237 +0100 ++++ gdb-7.12.50.20170207/gdb/arm-tdep.c 2017-02-26 19:11:48.273248575 +0100 +@@ -3485,7 +3485,7 @@ array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -242,7 +264,7 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3526,7 +3526,7 @@ +@@ -3568,7 +3568,7 @@ } else { @@ -251,7 +273,7 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), -@@ -3549,12 +3549,12 @@ +@@ -3591,12 +3591,12 @@ case TYPE_CODE_STRUCT: { @@ -266,7 +288,7 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c if (!field_is_static (&TYPE_FIELD (t, i))) sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -@@ -3578,13 +3578,15 @@ +@@ -3620,13 +3620,15 @@ case TYPE_CODE_UNION: { @@ -285,7 +307,7 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3620,7 +3622,7 @@ +@@ -3662,7 +3664,7 @@ int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -294,7 +316,7 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3701,7 +3703,7 @@ +@@ -3743,7 +3745,7 @@ for (argnum = 0; argnum < nargs; argnum++) { @@ -303,11 +325,11 @@ Index: gdb-7.11.50.20160716/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.11.50.20160716/gdb/avr-tdep.c +Index: gdb-7.12.50.20170207/gdb/avr-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/avr-tdep.c 2016-07-16 14:35:45.401502806 +0200 -+++ gdb-7.11.50.20160716/gdb/avr-tdep.c 2016-07-16 14:35:47.516519828 +0200 -@@ -1195,13 +1195,13 @@ +--- gdb-7.12.50.20170207.orig/gdb/avr-tdep.c 2017-02-26 19:11:30.479121252 +0100 ++++ gdb-7.12.50.20170207/gdb/avr-tdep.c 2017-02-26 19:11:48.273248575 +0100 +@@ -1191,13 +1191,13 @@ struct stack_item { @@ -323,7 +345,7 @@ Index: gdb-7.11.50.20160716/gdb/avr-tdep.c { struct stack_item *si; si = XNEW (struct stack_item); -@@ -1289,12 +1289,12 @@ +@@ -1285,12 +1285,12 @@ for (i = 0; i < nargs; i++) { @@ -339,10 +361,10 @@ Index: gdb-7.11.50.20160716/gdb/avr-tdep.c /* Calculate the potential last register needed. E.g. For length 2, registers regnum and regnum-1 (say 25 and 24) -Index: gdb-7.11.50.20160716/gdb/bfin-tdep.c +Index: gdb-7.12.50.20170207/gdb/bfin-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/bfin-tdep.c 2016-07-16 14:35:45.401502806 +0200 -+++ gdb-7.11.50.20160716/gdb/bfin-tdep.c 2016-07-16 14:35:47.516519828 +0200 +--- gdb-7.12.50.20170207.orig/gdb/bfin-tdep.c 2017-02-26 19:11:30.479121252 +0100 ++++ gdb-7.12.50.20170207/gdb/bfin-tdep.c 2017-02-26 19:11:48.273248575 +0100 @@ -502,7 +502,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -361,10 +383,10 @@ Index: gdb-7.11.50.20160716/gdb/bfin-tdep.c sp -= container_len; write_memory (sp, value_contents (args[i]), container_len); -Index: gdb-7.11.50.20160716/gdb/cris-tdep.c +Index: gdb-7.12.50.20170207/gdb/cris-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/cris-tdep.c 2016-07-16 14:35:45.403502823 +0200 -+++ gdb-7.11.50.20160716/gdb/cris-tdep.c 2016-07-16 14:35:47.517519836 +0200 +--- gdb-7.12.50.20170207.orig/gdb/cris-tdep.c 2017-02-26 19:11:30.480121259 +0100 ++++ gdb-7.12.50.20170207/gdb/cris-tdep.c 2017-02-26 19:11:48.274248582 +0100 @@ -663,13 +663,13 @@ struct stack_item @@ -399,10 +421,10 @@ Index: gdb-7.11.50.20160716/gdb/cris-tdep.c /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -Index: gdb-7.11.50.20160716/gdb/h8300-tdep.c +Index: gdb-7.12.50.20170207/gdb/h8300-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/h8300-tdep.c 2016-07-16 14:35:45.403502823 +0200 -+++ gdb-7.11.50.20160716/gdb/h8300-tdep.c 2016-07-16 14:35:47.517519836 +0200 +--- gdb-7.12.50.20170207.orig/gdb/h8300-tdep.c 2017-02-26 19:11:30.481121266 +0100 ++++ gdb-7.12.50.20170207/gdb/h8300-tdep.c 2017-02-26 19:11:48.274248582 +0100 @@ -637,7 +637,7 @@ int struct_return, CORE_ADDR struct_addr) { @@ -435,11 +457,11 @@ Index: gdb-7.11.50.20160716/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.11.50.20160716/gdb/hppa-tdep.c +Index: gdb-7.12.50.20170207/gdb/hppa-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/hppa-tdep.c 2016-07-16 14:35:45.405502839 +0200 -+++ gdb-7.11.50.20160716/gdb/hppa-tdep.c 2016-07-16 14:35:47.518519844 +0200 -@@ -991,7 +991,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/hppa-tdep.c 2017-02-26 19:11:30.482121273 +0100 ++++ gdb-7.12.50.20170207/gdb/hppa-tdep.c 2017-02-26 19:11:48.275248589 +0100 +@@ -988,7 +988,7 @@ { struct value *arg = args[i]; struct type *type = value_type (arg); @@ -448,7 +470,7 @@ Index: gdb-7.11.50.20160716/gdb/hppa-tdep.c const bfd_byte *valbuf; bfd_byte fptrbuf[8]; int regnum; -@@ -1186,7 +1186,7 @@ +@@ -1183,7 +1183,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -457,11 +479,11 @@ Index: gdb-7.11.50.20160716/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.11.50.20160716/gdb/i386-darwin-tdep.c +Index: gdb-7.12.50.20170207/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/i386-darwin-tdep.c 2016-07-16 14:35:45.405502839 +0200 -+++ gdb-7.11.50.20160716/gdb/i386-darwin-tdep.c 2016-07-16 14:35:47.518519844 +0200 -@@ -163,7 +163,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/i386-darwin-tdep.c 2017-02-26 19:11:30.483121280 +0100 ++++ gdb-7.12.50.20170207/gdb/i386-darwin-tdep.c 2017-02-26 19:11:48.275248589 +0100 +@@ -167,7 +167,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -470,11 +492,11 @@ Index: gdb-7.11.50.20160716/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.11.50.20160716/gdb/i386-tdep.c +Index: gdb-7.12.50.20170207/gdb/i386-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/i386-tdep.c 2016-07-16 14:35:45.410502879 +0200 -+++ gdb-7.11.50.20160716/gdb/i386-tdep.c 2016-07-16 14:35:47.520519860 +0200 -@@ -2664,7 +2664,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/i386-tdep.c 2017-02-26 19:11:30.486121302 +0100 ++++ gdb-7.12.50.20170207/gdb/i386-tdep.c 2017-02-26 19:11:48.277248603 +0100 +@@ -2661,7 +2661,7 @@ gdb_byte buf[4]; int i; int write_pass; @@ -483,7 +505,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c /* Determine the total space required for arguments and struct return address in a first pass (allowing for 16-byte-aligned -@@ -2672,7 +2672,7 @@ +@@ -2669,7 +2669,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -492,7 +514,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c if (struct_return) { -@@ -2689,7 +2689,7 @@ +@@ -2686,7 +2686,7 @@ for (i = 0; i < nargs; i++) { @@ -501,7 +523,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c if (write_pass) { -@@ -2896,7 +2896,7 @@ +@@ -2893,7 +2893,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -510,7 +532,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3718,7 +3718,7 @@ +@@ -3715,7 +3715,7 @@ i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -519,7 +541,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3751,7 +3751,7 @@ +@@ -3748,7 +3748,7 @@ int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -528,7 +550,7 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3787,7 +3787,7 @@ +@@ -3784,7 +3784,7 @@ i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -537,11 +559,11 @@ Index: gdb-7.11.50.20160716/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.11.50.20160716/gdb/iq2000-tdep.c +Index: gdb-7.12.50.20170207/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/iq2000-tdep.c 2016-07-16 14:35:45.411502887 +0200 -+++ gdb-7.11.50.20160716/gdb/iq2000-tdep.c 2016-07-16 14:35:47.520519860 +0200 -@@ -646,8 +646,9 @@ +--- gdb-7.12.50.20170207.orig/gdb/iq2000-tdep.c 2017-02-26 19:11:30.487121309 +0100 ++++ gdb-7.12.50.20170207/gdb/iq2000-tdep.c 2017-02-26 19:11:48.277248603 +0100 +@@ -651,8 +651,9 @@ const bfd_byte *val; bfd_byte buf[4]; struct type *type; @@ -553,11 +575,11 @@ Index: gdb-7.11.50.20160716/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.11.50.20160716/gdb/m32r-tdep.c +Index: gdb-7.12.50.20170207/gdb/m32r-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m32r-tdep.c 2016-07-16 14:35:45.411502887 +0200 -+++ gdb-7.11.50.20160716/gdb/m32r-tdep.c 2016-07-16 14:35:47.520519860 +0200 -@@ -685,7 +685,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/m32r-tdep.c 2017-02-26 19:11:30.487121309 +0100 ++++ gdb-7.12.50.20170207/gdb/m32r-tdep.c 2017-02-26 19:11:48.278248610 +0100 +@@ -678,7 +678,7 @@ CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[MAX_REGISTER_SIZE]; @@ -566,11 +588,11 @@ Index: gdb-7.11.50.20160716/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.11.50.20160716/gdb/m68k-tdep.c +Index: gdb-7.12.50.20170207/gdb/m68k-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m68k-tdep.c 2016-07-16 14:35:45.412502895 +0200 -+++ gdb-7.11.50.20160716/gdb/m68k-tdep.c 2016-07-16 14:35:47.520519860 +0200 -@@ -382,7 +382,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/m68k-tdep.c 2017-02-26 19:11:30.488121316 +0100 ++++ gdb-7.12.50.20170207/gdb/m68k-tdep.c 2017-02-26 19:11:48.278248610 +0100 +@@ -377,7 +377,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -579,7 +601,7 @@ Index: gdb-7.11.50.20160716/gdb/m68k-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || code == TYPE_CODE_COMPLEX); -@@ -514,9 +514,9 @@ +@@ -509,9 +509,9 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -592,11 +614,11 @@ Index: gdb-7.11.50.20160716/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.11.50.20160716/gdb/m88k-tdep.c +Index: gdb-7.12.50.20170207/gdb/m88k-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/m88k-tdep.c 2016-07-16 14:35:45.412502895 +0200 -+++ gdb-7.11.50.20160716/gdb/m88k-tdep.c 2016-07-16 14:35:47.521519868 +0200 -@@ -257,13 +257,13 @@ +--- gdb-7.12.50.20170207.orig/gdb/m88k-tdep.c 2017-02-26 19:11:30.488121316 +0100 ++++ gdb-7.12.50.20170207/gdb/m88k-tdep.c 2017-02-26 19:11:48.278248610 +0100 +@@ -253,13 +253,13 @@ { struct gdbarch *gdbarch = get_regcache_arch (regcache); int num_register_words = 0; @@ -612,7 +634,7 @@ Index: gdb-7.11.50.20160716/gdb/m88k-tdep.c if (m88k_integral_or_pointer_p (type) && len < 4) { -@@ -305,8 +305,8 @@ +@@ -301,8 +301,8 @@ { const bfd_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -623,11 +645,11 @@ Index: gdb-7.11.50.20160716/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.11.50.20160716/gdb/mep-tdep.c +Index: gdb-7.12.50.20170207/gdb/mep-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/mep-tdep.c 2016-07-16 14:35:45.413502903 +0200 -+++ gdb-7.11.50.20160716/gdb/mep-tdep.c 2016-07-16 14:35:47.521519868 +0200 -@@ -2272,7 +2272,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/mep-tdep.c 2017-02-26 19:11:30.489121323 +0100 ++++ gdb-7.12.50.20170207/gdb/mep-tdep.c 2017-02-26 19:11:48.279248618 +0100 +@@ -2262,7 +2262,7 @@ for (i = 0; i < argc; i++) { @@ -636,11 +658,11 @@ Index: gdb-7.11.50.20160716/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.11.50.20160716/gdb/mips-tdep.c +Index: gdb-7.12.50.20170207/gdb/mips-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/mips-tdep.c 2016-07-16 14:35:45.421502967 +0200 -+++ gdb-7.11.50.20160716/gdb/mips-tdep.c 2016-07-16 14:35:47.523519884 +0200 -@@ -455,7 +455,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/mips-tdep.c 2017-02-26 19:11:30.493121352 +0100 ++++ gdb-7.12.50.20170207/gdb/mips-tdep.c 2017-02-26 19:11:48.281248632 +0100 +@@ -474,7 +474,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -649,7 +671,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c { int reg_offset = 0; -@@ -478,8 +478,8 @@ +@@ -497,8 +497,8 @@ } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -660,7 +682,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4529,13 +4529,13 @@ +@@ -4530,13 +4530,13 @@ gdb_byte valbuf[MAX_REGISTER_SIZE]; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -677,7 +699,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c /* The EABI passes structures that do not fit in a register by reference. */ -@@ -4804,7 +4804,7 @@ +@@ -4805,7 +4805,7 @@ static int mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, @@ -686,7 +708,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c { int i; -@@ -4819,7 +4819,7 @@ +@@ -4820,7 +4820,7 @@ for (i = 0; i < TYPE_NFIELDS (arg_type); i++) { @@ -695,7 +717,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4861,7 +4861,7 @@ +@@ -4862,7 +4862,7 @@ int argreg; int float_argreg; int argnum; @@ -704,7 +726,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5212,11 +5212,11 @@ +@@ -5213,11 +5213,11 @@ : MIPS_V0_REGNUM); field < TYPE_NFIELDS (type); field++, regnum += 2) { @@ -720,7 +742,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5258,8 +5258,8 @@ +@@ -5259,8 +5259,8 @@ if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) @@ -731,7 +753,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5317,7 +5317,7 @@ +@@ -5318,7 +5318,7 @@ int argreg; int float_argreg; int argnum; @@ -740,7 +762,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5381,13 +5381,13 @@ +@@ -5382,13 +5382,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -757,7 +779,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c val = value_contents (arg); -@@ -5842,8 +5842,8 @@ +@@ -5843,8 +5843,8 @@ int argreg; int float_argreg; int argnum; @@ -768,7 +790,7 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5903,13 +5903,13 @@ +@@ -5904,13 +5904,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -785,11 +807,11 @@ Index: gdb-7.11.50.20160716/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.11.50.20160716/gdb/mn10300-tdep.c +Index: gdb-7.12.50.20170207/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/mn10300-tdep.c 2016-07-16 14:35:45.422502976 +0200 -+++ gdb-7.11.50.20160716/gdb/mn10300-tdep.c 2016-07-16 14:35:47.524519892 +0200 -@@ -1225,7 +1225,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/mn10300-tdep.c 2017-02-26 19:11:30.494121359 +0100 ++++ gdb-7.12.50.20170207/gdb/mn10300-tdep.c 2017-02-26 19:11:48.281248632 +0100 +@@ -1219,7 +1219,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; @@ -798,11 +820,11 @@ Index: gdb-7.11.50.20160716/gdb/mn10300-tdep.c int stack_offset = 0; int argnum; const gdb_byte *val; -Index: gdb-7.11.50.20160716/gdb/mt-tdep.c +Index: gdb-7.12.50.20170207/gdb/mt-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/mt-tdep.c 2016-07-16 14:35:45.423502984 +0200 -+++ gdb-7.11.50.20160716/gdb/mt-tdep.c 2016-07-16 14:35:47.524519892 +0200 -@@ -780,9 +780,9 @@ +--- gdb-7.12.50.20170207.orig/gdb/mt-tdep.c 2017-02-26 19:11:30.495121366 +0100 ++++ gdb-7.12.50.20170207/gdb/mt-tdep.c 2017-02-26 19:11:48.281248632 +0100 +@@ -788,9 +788,9 @@ gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; int split_param_len = 0; @@ -814,11 +836,11 @@ Index: gdb-7.11.50.20160716/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c +Index: gdb-7.12.50.20170207/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/ppc-sysv-tdep.c 2016-07-16 14:35:45.424502992 +0200 -+++ gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c 2016-07-16 14:35:47.524519892 +0200 -@@ -66,7 +66,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/ppc-sysv-tdep.c 2017-02-26 19:11:30.496121373 +0100 ++++ gdb-7.12.50.20170207/gdb/ppc-sysv-tdep.c 2017-02-26 19:11:48.282248639 +0100 +@@ -67,7 +67,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); ULONGEST saved_sp; @@ -827,7 +849,7 @@ Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c int write_pass; gdb_assert (tdep->wordsize == 4); -@@ -97,9 +97,9 @@ +@@ -98,9 +98,9 @@ /* Next available vector register for vector arguments. */ int vreg = 2; /* Arguments start above the "LR save word" and "Back chain". */ @@ -839,7 +861,7 @@ Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c /* If the function is returning a `struct', then the first word (which will be passed in r3) is used for struct return -@@ -118,7 +118,7 @@ +@@ -119,7 +119,7 @@ { struct value *arg = args[argno]; struct type *type = check_typedef (value_type (arg)); @@ -848,7 +870,7 @@ Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1283,11 +1283,11 @@ +@@ -1284,11 +1284,11 @@ static void ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, @@ -862,11 +884,11 @@ Index: gdb-7.11.50.20160716/gdb/ppc-sysv-tdep.c /* Enforce alignment of stack location, if requested. */ if (align > tdep->wordsize) -Index: gdb-7.11.50.20160716/gdb/rl78-tdep.c +Index: gdb-7.12.50.20170207/gdb/rl78-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/rl78-tdep.c 2016-07-16 14:35:45.424502992 +0200 -+++ gdb-7.11.50.20160716/gdb/rl78-tdep.c 2016-07-16 14:35:47.525519900 +0200 -@@ -1336,8 +1336,8 @@ +--- gdb-7.12.50.20170207.orig/gdb/rl78-tdep.c 2017-02-26 19:11:30.496121373 +0100 ++++ gdb-7.12.50.20170207/gdb/rl78-tdep.c 2017-02-26 19:11:48.282248639 +0100 +@@ -1352,8 +1352,8 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -877,10 +899,10 @@ Index: gdb-7.11.50.20160716/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.11.50.20160716/gdb/rs6000-aix-tdep.c +Index: gdb-7.12.50.20170207/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/rs6000-aix-tdep.c 2016-07-16 14:35:45.425503000 +0200 -+++ gdb-7.11.50.20160716/gdb/rs6000-aix-tdep.c 2016-07-16 14:35:47.525519900 +0200 +--- gdb-7.12.50.20170207.orig/gdb/rs6000-aix-tdep.c 2017-02-26 19:11:30.497121380 +0100 ++++ gdb-7.12.50.20170207/gdb/rs6000-aix-tdep.c 2017-02-26 19:11:48.282248639 +0100 @@ -186,9 +186,9 @@ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -902,10 +924,10 @@ Index: gdb-7.11.50.20160716/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.11.50.20160716/gdb/s390-linux-tdep.c +Index: gdb-7.12.50.20170207/gdb/s390-linux-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/s390-linux-tdep.c 2016-07-16 14:35:45.427503016 +0200 -+++ gdb-7.11.50.20160716/gdb/s390-linux-tdep.c 2016-07-16 14:35:47.526519908 +0200 +--- gdb-7.12.50.20170207.orig/gdb/s390-linux-tdep.c 2017-02-26 19:11:30.499121395 +0100 ++++ gdb-7.12.50.20170207/gdb/s390-linux-tdep.c 2017-02-26 19:11:48.284248654 +0100 @@ -3125,7 +3125,7 @@ /* Determine whether N is a power of two. */ @@ -924,11 +946,11 @@ Index: gdb-7.11.50.20160716/gdb/s390-linux-tdep.c int write_mode = as->regcache != NULL; if (s390_function_arg_float (type)) -Index: gdb-7.11.50.20160716/gdb/score-tdep.c +Index: gdb-7.12.50.20170207/gdb/score-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/score-tdep.c 2016-07-16 14:35:45.428503024 +0200 -+++ gdb-7.11.50.20160716/gdb/score-tdep.c 2016-07-16 14:35:47.527519916 +0200 -@@ -514,7 +514,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/score-tdep.c 2017-02-26 19:11:30.499121395 +0100 ++++ gdb-7.12.50.20170207/gdb/score-tdep.c 2017-02-26 19:11:48.284248654 +0100 +@@ -525,7 +525,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; int argreg; @@ -937,11 +959,11 @@ Index: gdb-7.11.50.20160716/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.11.50.20160716/gdb/sh-tdep.c +Index: gdb-7.12.50.20170207/gdb/sh-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/sh-tdep.c 2016-07-16 14:35:45.429503032 +0200 -+++ gdb-7.11.50.20160716/gdb/sh-tdep.c 2016-07-16 14:35:47.527519916 +0200 -@@ -805,7 +805,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/sh-tdep.c 2017-02-26 19:11:30.500121402 +0100 ++++ gdb-7.12.50.20170207/gdb/sh-tdep.c 2017-02-26 19:11:48.285248661 +0100 +@@ -814,7 +814,7 @@ static int sh_use_struct_convention (int renesas_abi, struct type *type) { @@ -950,7 +972,7 @@ Index: gdb-7.11.50.20160716/gdb/sh-tdep.c int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ -@@ -907,7 +907,7 @@ +@@ -916,7 +916,7 @@ /* Helper function to justify value in register according to endianess. */ static const gdb_byte * @@ -959,7 +981,7 @@ Index: gdb-7.11.50.20160716/gdb/sh-tdep.c { static gdb_byte valbuf[4]; -@@ -1067,7 +1067,8 @@ +@@ -1076,7 +1076,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -969,7 +991,7 @@ Index: gdb-7.11.50.20160716/gdb/sh-tdep.c int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; -@@ -1208,7 +1209,8 @@ +@@ -1217,7 +1218,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -979,11 +1001,11 @@ Index: gdb-7.11.50.20160716/gdb/sh-tdep.c int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.11.50.20160716/gdb/sh64-tdep.c +Index: gdb-7.12.50.20170207/gdb/sh64-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/sh64-tdep.c 2016-07-16 14:35:45.430503040 +0200 -+++ gdb-7.11.50.20160716/gdb/sh64-tdep.c 2016-07-16 14:35:47.528519925 +0200 -@@ -1060,7 +1060,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/sh64-tdep.c 2017-02-26 19:11:30.501121409 +0100 ++++ gdb-7.12.50.20170207/gdb/sh64-tdep.c 2017-02-26 19:11:48.285248661 +0100 +@@ -1062,7 +1062,7 @@ CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -992,7 +1014,7 @@ Index: gdb-7.11.50.20160716/gdb/sh64-tdep.c int int_argreg; int float_arg_index = 0; int double_arg_index = 0; -@@ -1069,7 +1069,7 @@ +@@ -1071,7 +1071,7 @@ CORE_ADDR regval; const gdb_byte *val; gdb_byte valbuf[8]; @@ -1001,11 +1023,11 @@ Index: gdb-7.11.50.20160716/gdb/sh64-tdep.c int argreg_size; int fp_args[12]; -Index: gdb-7.11.50.20160716/gdb/sparc-tdep.c +Index: gdb-7.12.50.20170207/gdb/sparc-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/sparc-tdep.c 2016-07-16 14:35:45.431503048 +0200 -+++ gdb-7.11.50.20160716/gdb/sparc-tdep.c 2016-07-16 14:35:47.528519925 +0200 -@@ -525,7 +525,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/sparc-tdep.c 2017-02-26 19:11:30.502121416 +0100 ++++ gdb-7.12.50.20170207/gdb/sparc-tdep.c 2017-02-26 19:11:48.286248668 +0100 +@@ -566,7 +566,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1014,11 +1036,11 @@ Index: gdb-7.11.50.20160716/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c +Index: gdb-7.12.50.20170207/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/sparc64-tdep.c 2016-07-16 14:35:45.432503056 +0200 -+++ gdb-7.11.50.20160716/gdb/sparc64-tdep.c 2016-07-16 14:35:47.528519925 +0200 -@@ -636,7 +636,8 @@ +--- gdb-7.12.50.20170207.orig/gdb/sparc64-tdep.c 2017-02-26 19:11:30.503121423 +0100 ++++ gdb-7.12.50.20170207/gdb/sparc64-tdep.c 2017-02-26 19:11:48.286248668 +0100 +@@ -670,7 +670,8 @@ static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -1026,9 +1048,9 @@ Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c + const gdb_byte *valbuf, int element, + LONGEST bitpos) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); int len = TYPE_LENGTH (type); - -@@ -678,7 +679,7 @@ +@@ -714,7 +715,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1037,16 +1059,16 @@ Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -710,7 +711,7 @@ +@@ -746,7 +747,7 @@ static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, - gdb_byte *valbuf, int bitpos) + gdb_byte *valbuf, LONGEST bitpos) { - if (sparc64_floating_p (type)) - { -@@ -747,7 +748,7 @@ + struct gdbarch *gdbarch = get_regcache_arch (regcache); + +@@ -786,7 +787,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1055,7 +1077,7 @@ Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -780,7 +781,7 @@ +@@ -819,7 +820,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1064,7 +1086,7 @@ Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -880,7 +881,7 @@ +@@ -919,7 +920,7 @@ { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -1073,11 +1095,11 @@ Index: gdb-7.11.50.20160716/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.11.50.20160716/gdb/spu-tdep.c +Index: gdb-7.12.50.20170207/gdb/spu-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/spu-tdep.c 2016-07-16 14:35:45.433503064 +0200 -+++ gdb-7.11.50.20160716/gdb/spu-tdep.c 2016-07-16 14:35:47.529519932 +0200 -@@ -1429,7 +1429,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/spu-tdep.c 2017-02-26 19:11:30.503121423 +0100 ++++ gdb-7.12.50.20170207/gdb/spu-tdep.c 2017-02-26 19:11:48.287248675 +0100 +@@ -1430,7 +1430,7 @@ struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1086,7 +1108,7 @@ Index: gdb-7.11.50.20160716/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1461,7 +1461,7 @@ +@@ -1462,7 +1462,7 @@ { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1095,11 +1117,11 @@ Index: gdb-7.11.50.20160716/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c +Index: gdb-7.12.50.20170207/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/tic6x-tdep.c 2016-07-16 14:35:45.433503064 +0200 -+++ gdb-7.11.50.20160716/gdb/tic6x-tdep.c 2016-07-16 14:35:47.529519932 +0200 -@@ -892,7 +892,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/tic6x-tdep.c 2017-02-26 19:11:30.504121430 +0100 ++++ gdb-7.12.50.20170207/gdb/tic6x-tdep.c 2017-02-26 19:11:48.287248675 +0100 +@@ -899,7 +899,7 @@ int argreg = 0; int argnum; int stack_offset = 4; @@ -1108,7 +1130,7 @@ Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct type *func_type = value_type (function); -@@ -926,7 +926,7 @@ +@@ -933,7 +933,7 @@ /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1117,7 +1139,7 @@ Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; -@@ -945,7 +945,7 @@ +@@ -952,7 +952,7 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1126,7 +1148,7 @@ Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); -@@ -1105,7 +1105,8 @@ +@@ -1112,7 +1112,8 @@ } else internal_error (__FILE__, __LINE__, @@ -1136,11 +1158,11 @@ Index: gdb-7.11.50.20160716/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.11.50.20160716/gdb/tilegx-tdep.c +Index: gdb-7.12.50.20170207/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/tilegx-tdep.c 2016-07-16 14:35:45.434503072 +0200 -+++ gdb-7.11.50.20160716/gdb/tilegx-tdep.c 2016-07-16 14:35:47.530519941 +0200 -@@ -288,7 +288,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/tilegx-tdep.c 2017-02-26 19:11:30.504121430 +0100 ++++ gdb-7.12.50.20170207/gdb/tilegx-tdep.c 2017-02-26 19:11:48.287248675 +0100 +@@ -289,7 +289,7 @@ CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; @@ -1149,10 +1171,10 @@ Index: gdb-7.11.50.20160716/gdb/tilegx-tdep.c static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.11.50.20160716/gdb/v850-tdep.c +Index: gdb-7.12.50.20170207/gdb/v850-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/v850-tdep.c 2016-07-16 14:35:45.434503072 +0200 -+++ gdb-7.11.50.20160716/gdb/v850-tdep.c 2016-07-16 14:35:47.530519941 +0200 +--- gdb-7.12.50.20170207.orig/gdb/v850-tdep.c 2017-02-26 19:11:30.505121438 +0100 ++++ gdb-7.12.50.20170207/gdb/v850-tdep.c 2017-02-26 19:11:48.288248682 +0100 @@ -1019,7 +1019,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; @@ -1171,10 +1193,10 @@ Index: gdb-7.11.50.20160716/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.11.50.20160716/gdb/vax-tdep.c +Index: gdb-7.12.50.20170207/gdb/vax-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/vax-tdep.c 2016-07-16 14:35:45.435503080 +0200 -+++ gdb-7.11.50.20160716/gdb/vax-tdep.c 2016-07-16 14:35:47.530519941 +0200 +--- gdb-7.12.50.20170207.orig/gdb/vax-tdep.c 2017-02-26 19:11:30.505121438 +0100 ++++ gdb-7.12.50.20170207/gdb/vax-tdep.c 2017-02-26 19:11:48.288248682 +0100 @@ -111,7 +111,7 @@ struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -1193,10 +1215,10 @@ Index: gdb-7.11.50.20160716/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.11.50.20160716/gdb/xstormy16-tdep.c +Index: gdb-7.12.50.20170207/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/xstormy16-tdep.c 2016-07-16 14:35:45.435503080 +0200 -+++ gdb-7.11.50.20160716/gdb/xstormy16-tdep.c 2016-07-16 14:35:47.530519941 +0200 +--- gdb-7.12.50.20170207.orig/gdb/xstormy16-tdep.c 2017-02-26 19:11:30.506121445 +0100 ++++ gdb-7.12.50.20170207/gdb/xstormy16-tdep.c 2017-02-26 19:11:48.288248682 +0100 @@ -233,8 +233,9 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; @@ -1209,11 +1231,11 @@ Index: gdb-7.11.50.20160716/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c +Index: gdb-7.12.50.20170207/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.11.50.20160716.orig/gdb/xtensa-tdep.c 2016-07-16 14:35:45.437503096 +0200 -+++ gdb-7.11.50.20160716/gdb/xtensa-tdep.c 2016-07-16 14:35:47.531519949 +0200 -@@ -1638,8 +1638,7 @@ +--- gdb-7.12.50.20170207.orig/gdb/xtensa-tdep.c 2017-02-26 19:11:30.507121452 +0100 ++++ gdb-7.12.50.20170207/gdb/xtensa-tdep.c 2017-02-26 19:11:48.289248689 +0100 +@@ -1639,8 +1639,7 @@ if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1223,7 +1245,7 @@ Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1713,18 +1712,18 @@ +@@ -1714,18 +1713,18 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1245,7 +1267,7 @@ Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1748,9 +1747,10 @@ +@@ -1749,9 +1748,10 @@ { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1259,7 +1281,7 @@ Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1820,8 +1820,8 @@ +@@ -1821,8 +1821,8 @@ info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1269,7 +1291,7 @@ Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1866,7 +1866,7 @@ +@@ -1867,7 +1867,7 @@ if (info->onstack) { @@ -1278,7 +1300,7 @@ Index: gdb-7.11.50.20160716/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1882,7 +1882,7 @@ +@@ -1883,7 +1883,7 @@ } else { diff --git a/gdb-testsuite-casts.patch b/gdb-testsuite-casts.patch deleted file mode 100644 index 1ed7ecb..0000000 --- a/gdb-testsuite-casts.patch +++ /dev/null @@ -1,80 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2016-09/msg00082.html -Subject: [testsuite patch] Fix false FAIL in gdb.cp/casts.exp - - ---ikeVEW9yuYc//A+q -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -Hi, - -gcc-6.2.1-1.fc26.x86_64 - -gdb compile failed, /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected primary-expression before 'int' - decltype(int x) - ^~~ -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected ')' before 'int' -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:1: error: expected unqualified-id before 'decltype' - decltype(int x) - ^~~~~~~~ -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc: In function 'int main(int, char**)': -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:59:14: error: expected primary-expression before 'decltype' - double y = decltype(2); - ^~~~~~~~ - -'decltype' is a registered keyword since C++11 which is now a default for GCC. - -OK for check-in? - - -Jan - ---ikeVEW9yuYc//A+q -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - -gdb/testsuite/ChangeLog -2016-09-11 Jan Kratochvil - - * gdb.cp/casts.cc: Rename decltype to int_to_double. - * gdb.cp/casts.exp (whatis decltype(5)): Rename to ... - (whatis int_to_double(5)): ... here. - -diff --git a/gdb/testsuite/gdb.cp/casts.cc b/gdb/testsuite/gdb.cp/casts.cc -index 43f112f..4f68ba0 100644 ---- a/gdb/testsuite/gdb.cp/casts.cc -+++ b/gdb/testsuite/gdb.cp/casts.cc -@@ -37,7 +37,7 @@ struct DoublyDerived : public VirtuallyDerived, - // Confuse a simpler approach. - - double --decltype(int x) -+int_to_double(int x) - { - return x + 2.0; - } -@@ -56,7 +56,7 @@ main (int argc, char **argv) - Alpha *ad = &derived; - Alpha *add = &doublyderived; - -- double y = decltype(2); -+ double y = int_to_double(2); - - return 0; /* breakpoint spot: casts.exp: 1 */ - } -diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp -index 34a2492..5798098 100644 ---- a/gdb/testsuite/gdb.cp/casts.exp -+++ b/gdb/testsuite/gdb.cp/casts.exp -@@ -112,7 +112,7 @@ gdb_test "print reinterpret_cast (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \ - - # Test that keyword shadowing works. - --gdb_test "whatis decltype(5)" " = double" -+gdb_test "whatis int_to_double(5)" " = double" - - # Basic tests using typeof. - - ---ikeVEW9yuYc//A+q-- - diff --git a/gdb-testsuite-m-static.patch b/gdb-testsuite-m-static.patch deleted file mode 100644 index 49ad93b..0000000 --- a/gdb-testsuite-m-static.patch +++ /dev/null @@ -1,79 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2016-09/msg00083.html -Subject: [testsuite patch] Fix C++11 compilation failure for gdb.cp/m-static.exp - - ---y0ulUmNC+osPPQO6 -Content-Type: text/plain; charset=iso-2022-jp -Content-Disposition: inline - -Hi, - -gcc-6.2.1-1.fc26.x86_64 - -g++ -std=c++03: -no warnings - -g++: -In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:0: -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:34: error: $B!F(Bconstexpr$B!G(B needed for in-class initialization of static data member $B!F(Bconst float gnu_obj_4::somewhere$B!G(B of non-integral type [-fpermissive] - static const float somewhere = 3.14159; - ^~~~~~~ - -clang++: -In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79: -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] - static const float somewhere = 3.14159; - ^ ~~~~~~~ -1 warning generated. - -clang++ -std=c++11: -In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79: -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init] - static const float somewhere = 3.14159; - ^ ~~~~~~~ -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:3: note: add 'constexpr' - static const float somewhere = 3.14159; - ^ - constexpr -1 error generated. - -OK for check-in? - -After the fix out of the 4 combinations above only this one remains non-empty: - -clang++: -In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79: -/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init] - static const float somewhere = 3.14159; - ^ ~~~~~~~ -1 warning generated. - - -Jan - ---y0ulUmNC+osPPQO6 -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - -gdb/testsuite/ChangeLog -2016-09-11 Jan Kratochvil - - * gdb.cp/m-static.h (gnu_obj_4::somewhere): Use constexpr for C++11. - -diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h -index bcedfff..2992463 100644 ---- a/gdb/testsuite/gdb.cp/m-static.h -+++ b/gdb/testsuite/gdb.cp/m-static.h -@@ -6,6 +6,9 @@ class gnu_obj_4 - static const int elsewhere; - static const int nowhere; - static const int everywhere = 317; -+#if __cplusplus >= 201103L -+ constexpr -+#endif - static const float somewhere = 3.14159; - - // try to ensure test4 is actually allocated - ---y0ulUmNC+osPPQO6-- - diff --git a/gdb-testsuite-morestack-gold.patch b/gdb-testsuite-morestack-gold.patch deleted file mode 100644 index a56e100..0000000 --- a/gdb-testsuite-morestack-gold.patch +++ /dev/null @@ -1,83 +0,0 @@ -http://sourceware.org/ml/gdb-patches/2016-10/msg00652.html -Subject: [testsuite patch] Fix false FAIL for gdb.base/morestack.exp - - ---HlL+5n6rz5pIUxbD -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -Hi, - -since - [commit] [testsuite patch] Fix gcc_compiled for gcc 6 & 7 - https://sourceware.org/ml/gdb-patches/2016-10/msg00620.html - -there has started running again - Running gdb/testsuite/gdb.base/morestack.exp ... - +FAIL: gdb.base/morestack.exp: continue - +PASS: gdb.base/morestack.exp: up 3000 - -but as you can see it FAILs now - on Fedora 24 x86_64 (although for example it -still PASSes on CentOS-7.2 x86_64). - -Program received signal SIGSEGV, Segmentation fault. -0x00007ffff787c7bb in malloc_consolidate (av=av@entry=0x7ffff7bbcb00 ) at malloc.c:4181 -4181 unlink(av, nextchunk, bck, fwd); -(gdb) bt -#0 0x00007ffff787c7bb in malloc_consolidate (av=av@entry=0x7ffff7bbcb00 ) at malloc.c:4181 -#1 0x00007ffff787f235 in _int_malloc (av=av@entry=0x7ffff7bbcb00 , bytes=bytes@entry=1024) at malloc.c:3448 -[...] -#8 0x00007ffff784c5ac in _IO_vfprintf_internal (s=0x7ffff7bbd600 <_IO_2_1_stdout_>, format=, ap=ap@entry=0x7ffff77fd7f8) at vfprintf.c:1631 -#9 0x00007ffff7853939 in __printf (format=) at printf.c:33 -#10 0x0000000000400d6b in down () -#11 0x0000000000400f2c in __morestack () -#12 0x0000000000400dda in down () -[...] - -This apparently is due to - man gcc - -fsplit-stack: - When code compiled with -fsplit-stack calls code compiled without - -fsplit-stack, there may not be much stack space available for the - latter code to run. If compiling all code, including library code, - with -fsplit-stack is not an option, then the linker can fix up these - calls so that the code compiled without -fsplit-stack always has - a large stack. Support for this is implemented in the gold linker in - GNU binutils release 2.21 and later. - -Personally I do not understand why gold is not the default linker as GNU ld is -unusably slow (6x) for C++ but that is off-topic here. - -OK for check-in? - - -Thanks, -Jan - ---HlL+5n6rz5pIUxbD -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - -gdb/testsuite/ChangeLog -2016-10-22 Jan Kratochvil - - * gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first. - -diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp -index 12f5d28..caa85b8 100644 ---- a/gdb/testsuite/gdb.base/morestack.exp -+++ b/gdb/testsuite/gdb.base/morestack.exp -@@ -23,7 +23,11 @@ if {$gcc_compiled == 0} { - - standard_testfile - --if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {additional_flags=-fsplit-stack}] } { -+# -fuse-ld=gold is used for calling printf code built without -fsplit-stack -+# which could crash otherise. See GCC documentation of -fsplit-stack. -+set opts "additional_flags=-fsplit-stack" -+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile [list $opts additional_flags=-fuse-ld=gold]] \ -+ && [prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts] } { - return -1 - } - - ---HlL+5n6rz5pIUxbD-- - diff --git a/gdb-upstream.patch b/gdb-upstream.patch deleted file mode 100644 index 373b7a8..0000000 --- a/gdb-upstream.patch +++ /dev/null @@ -1,759 +0,0 @@ -commit 2c29df25b7c2ff006b45afd80ee6dd734ebbd47c -Author: Sergio Durigan Junior -Date: Sun Sep 11 16:53:09 2016 -0400 - - Fix false FAIL on gdb.base/stap-probe.exp, due to ICF optimization - - GCC 6's ICF optimization pass is making the declaration of 'm1' and - 'm2', on gdb.base/stap-probe.c, to be unified. However, this leads to - only one instance of the probe 'two' being created, which causes a - failure on the testsuite (which expects a multi-location breakpoint to - be inserted on the probe). - - This patch fixes this failure by declaring a dummy variable on 'm1', - and using it as an argument to m1's version of probe 'two'. Since we - do not care about the contents of the functions nor about the - arguments of each probe 'two', this is OK. - - gdb/testsuite/ChangeLog: - 2016-09-11 Sergio Durigan Junior - Jan Kratochvil - - * gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to - make m1's definition to be different from m2's. Use 'dummy' as an - argument for probe 'two'. - -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,3 +1,10 @@ -+2016-09-11 Sergio Durigan Junior -+ Jan Kratochvil -+ -+ * gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to -+ make m1's definition to be different from m2's. Use 'dummy' as an -+ argument for probe 'two'. -+ - 2016-09-10 Jon Beniston - - * lib/mi-support.exp (mi_gdb_target_load): Use target_sim_options ---- a/gdb/testsuite/gdb.base/stap-probe.c -+++ b/gdb/testsuite/gdb.base/stap-probe.c -@@ -53,8 +53,13 @@ struct funcs - static void - m1 (void) - { -+ /* m1 and m2 are equivalent, but because of some compiler -+ optimizations we have to make each of them unique. This is why -+ we have this dummy variable here. */ -+ volatile int dummy = 0; -+ - if (TEST2) -- STAP_PROBE (test, two); -+ STAP_PROBE1 (test, two, dummy); - } - - static void - - -commit f389f6fef76d7cf8e8beb7061edff2155c284898 -Author: Jan Kratochvil -Date: Wed Oct 5 21:56:46 2016 +0200 - - testsuite: Fix recent GCC FAIL: gdb.arch/i386-signal.exp - - gcc-6.2.1-2.fc24.x86_64 - - (gdb) backtrace 10^M - (gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10 - - (gdb) disas/s - Dump of assembler code for function main: - .../gdb/testsuite/gdb.arch/i386-signal.c: - 30 { - 0x000000000040057f <+0>: push %rbp - 0x0000000000400580 <+1>: mov %rsp,%rbp - 31 setup (); - 0x0000000000400583 <+4>: callq 0x400590 - => 0x0000000000400588 <+9>: mov $0x0,%eax - 32 } - 0x000000000040058d <+14>: pop %rbp - 0x000000000040058e <+15>: retq - End of assembler dump. - - The .exp patch is an obvious typo fix I think. The regex was written to - accept "ADDR in main" and I find it OK as checking .debug_line validity is not - the purpose of this testfile. - - gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at - all so there was no problem with .debug_line. - - gdb/testsuite/ChangeLog - 2016-10-05 Jan Kratochvil - - * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo. - -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,3 +1,7 @@ -+2016-10-05 Jan Kratochvil -+ -+ * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo. -+ - 2016-10-05 Yao Qi - - * lib/gdb.exp (support_complex_tests): Return zero if ---- a/gdb/testsuite/gdb.arch/i386-signal.exp -+++ b/gdb/testsuite/gdb.arch/i386-signal.exp -@@ -35,6 +35,6 @@ gdb_load ${binfile} - - runto func - gdb_test "backtrace 10" \ -- "#0 ($hex in )?func.*\r\n#1 \r\n#2 ($hex in)?main.*" -+ "#0 ($hex in )?func.*\r\n#1 \r\n#2 ($hex in )?main.*" - - gdb_test "finish" "Run till exit from \#0 func.*" - - -commit 20c2c024c1e89e402a57e8c3577fb9777709d9a4 -Author: Carl E. Love -Date: Fri Aug 19 11:06:38 2016 -0700 - - Fix missing files for ld when test suite not compiled in the source directory - - This patch fixes an issues with six test suite expect files that do not - run correctly when the test suite is not built in the source directory. The - issue is these tests are not using the current "standard_testfile" call - but rather using the older set command to initialize the "testfile", - "srcfile" and "binprefix" variables or are missing the set for the - "binprefix" variable. - - ----------------------------------------------- - - gdb/testsuite/ChangeLog - - 2016-08-19 Carl Love - - * gdb.arch/altivec-regs.exp: Use standard_testfile instead of - maintaining separate logic for constructing the output path. - * gdb.arch/powerpc-d128-regs.exp: Likewise. - * gdb.arch/ppc-dfp.exp: Likewise. - * gdb.arch/ppc-fp.exp: Likewise. - * gdb.arch/vsx-regs.exp: Likewise. - * gdb.arch/altivec-abi.exp: Likewise, plus added local variable - binprefix for generating the additional binary files. - -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,3 +1,14 @@ -+2016-08-19 Carl Love -+ -+ * gdb.arch/altivec-regs.exp: Use standard_testfile instead of -+ maintaining separate logic for constructing the output path. -+ * gdb.arch/powerpc-d128-regs.exp: Likewise. -+ * gdb.arch/ppc-dfp.exp: Likewise. -+ * gdb.arch/ppc-fp.exp: Likewise. -+ * gdb.arch/vsx-regs.exp: Likewise. -+ * gdb.arch/altivec-abi.exp: Likewise, plus added local variable -+ binprefix for generating the additional binary files. -+ - 2016-08-19 Pedro Alves - - * gdb.trace/mi-trace-frame-collected.exp ---- a/gdb/testsuite/gdb.arch/altivec-abi.exp -+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp -@@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then { - return - } - --set testfile "altivec-abi" --set binfile ${objdir}/${subdir}/${testfile} --set srcfile ${testfile}.c -+standard_testfile - - if [get_compiler_info] { - warning "get_compiler failed" -@@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags force_abi } { - } - - if [test_compiler_info gcc*] { -+ set binprefix ${binfile} -+ - with_test_prefix "default ABI, auto" { - altivec_abi_tests "additional_flags=-maltivec" "auto" - } -@@ -156,23 +156,23 @@ if [test_compiler_info gcc*] { - # On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec - # was broken, so skip those tests there. - if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } { -- set binfile ${objdir}/${subdir}/${testfile}-ge-ge -+ set binfile ${binprefix}-ge-ge - with_test_prefix "generic ABI, forced" { - altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic" - } - -- set binfile ${objdir}/${subdir}/${testfile}-ge-auto -+ set binfile ${binprefix}-ge-auto - with_test_prefix "generic ABI, auto" { - altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto" - } - } - -- set binfile ${objdir}/${subdir}/${testfile}-av-av -+ set binfile ${binprefix}-av-av - with_test_prefix "AltiVec ABI, forced" { - altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec" - } - -- set binfile ${objdir}/${subdir}/${testfile}-av-auto -+ set binfile ${binprefix}-av-auto - with_test_prefix "AltiVec ABI, auto" { - altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto" - } ---- a/gdb/testsuite/gdb.arch/altivec-regs.exp -+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp -@@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then { - return - } - --set testfile "altivec-regs" --set binfile ${objdir}/${subdir}/${testfile} --set srcfile ${testfile}.c -+standard_testfile - - set compile_flags {debug nowarnings} - if [get_compiler_info] { ---- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp -+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp -@@ -25,9 +25,7 @@ if ![istarget "powerpc64*-*"] then { - return - } - --set testfile "powerpc-d128-regs" --set srcfile ${testfile}.c --set binfile ${objdir}/${subdir}/${testfile} -+standard_testfile - - if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } { - untested powerpc-d128-regs.exp ---- a/gdb/testsuite/gdb.arch/ppc-dfp.exp -+++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp -@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then { - return - } - --set testfile "ppc-dfp" --set binfile ${objdir}/${subdir}/${testfile} --set srcfile ${testfile}.c -+standard_testfile - - if [get_compiler_info] { - warning "get_compiler failed" ---- a/gdb/testsuite/gdb.arch/ppc-fp.exp -+++ b/gdb/testsuite/gdb.arch/ppc-fp.exp -@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then { - return - } - --set testfile "ppc-fp" --set binfile ${objdir}/${subdir}/${testfile} --set srcfile ${testfile}.c -+standard_testfile - - if [get_compiler_info] { - warning "get_compiler failed" ---- a/gdb/testsuite/gdb.arch/vsx-regs.exp -+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp -@@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_tests]} then { - return - } - --set testfile "vsx-regs" --set binfile ${objdir}/${subdir}/${testfile} --set srcfile ${testfile}.c -+standard_testfile - - set compile_flags {debug nowarnings quiet} - if [get_compiler_info] { - - -http://sourceware.org/ml/gdb-patches/2016-10/msg00258.html -Subject: [testsuite obv] Use standard_output_file - -From: Jan Kratochvil -Date: Tue, 11 Oct 2016 16:43:58 +0200 -Subject: [PATCH] testsuite: Use standard_output_file -Subject: [PATCH] testsuite: Use standard_output_file - -gdb/testsuite/ChangeLog -2016-10-11 Jan Kratochvil - - * gdb.arch/powerpc-prologue.exp: Use standard_output_file. - * gdb.arch/ppc64-symtab-cordic.exp: Likewise. - * gdb.arch/vsx-regs.exp: Likewise. ---- - gdb/testsuite/ChangeLog | 6 ++++++ - gdb/testsuite/gdb.arch/powerpc-prologue.exp | 2 +- - gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp | 4 ++-- - gdb/testsuite/gdb.arch/vsx-regs.exp | 2 +- - 4 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog -index 9c7df29..b6ba0ec 100644 -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,3 +1,9 @@ -+2016-10-11 Jan Kratochvil -+ -+ * gdb.arch/powerpc-prologue.exp: Use standard_output_file -+ * gdb.arch/ppc64-symtab-cordic.exp: Likewise. -+ * gdb.arch/vsx-regs.exp: Likewise. -+ - 2016-10-07 Yao Qi - - * gdb.xml/tdesc-regs.exp: Set regdir to "arm/". -diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp -index 341ae02..0c74d7e 100644 ---- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp -+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp -@@ -24,7 +24,7 @@ if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then { - - set testfile "powerpc-prologue" - set srcfile ${testfile}.c --set binfile ${objdir}/${subdir}/${testfile} -+set binfile [standard_output_file ${testfile}] - - # Don't use "debug", so that we don't have line information for the assembly - # fragments. -diff --git a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp -index c8cb429..3fdc490 100644 ---- a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp -+++ b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp -@@ -21,9 +21,9 @@ if {![istarget "powerpc*"] || ![is_lp64_target]} { - standard_testfile - - set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2 --set kofile ${objdir}/${subdir}/cordic.ko -+set kofile [standard_output_file cordic.ko] - set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2 --set kodebugfile ${objdir}/${subdir}/cordic.ko.debug -+set kodebugfile [standard_output_file cordic.ko.debug] - - if {[catch "system \"bzip2 -dc ${kobz2file} >${kofile}\""] != 0} { - untested "failed bzip2 for ${kobz2file}" -diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp -index 307f12a..31e58e6 100644 ---- a/gdb/testsuite/gdb.arch/vsx-regs.exp -+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp -@@ -152,7 +152,7 @@ for {set i 0} {$i < 32} {incr i 1} { - # later when loading the core file (i.e., different register values for different - # vector register banks). - --set corefile "${objdir}/${subdir}/vsx-core.test" -+set corefile [standard_output_file vsx-core.test] - set core_supported [gdb_gcore_cmd "$corefile" "Save a VSX-enabled corefile"] - - # Now run the F32~F63/VR0~VR31 tests. --- -2.7.4 - - -http://sourceware.org/ml/gdb-patches/2016-10/msg00268.html -Subject: [testsuite obv] Fix gdb.arch/powerpc-prologue.c compilation - -From: Jan Kratochvil -Date: Tue, 11 Oct 2016 19:09:05 +0200 -Subject: [PATCH] testsuite: Fix gdb.arch/powerpc-prologue.c compilation -Subject: [PATCH] testsuite: Fix gdb.arch/powerpc-prologue.c compilation - -gcc-6.2.1 - -gdb compile failed, gdb/testsuite/gdb.arch/powerpc-prologue.c: In function 'main': -gdb/testsuite/gdb.arch/powerpc-prologue.c:32:3: warning: implicit declaration of function 'optimized_1' [-Wimplicit-function-declaration] - optimized_1 (); - ^~~~~~~~~~~ - -gdb/testsuite/ChangeLog -2016-10-11 Jan Kratochvil - - * gdb.arch/powerpc-prologue.c (optimized_1): New declaration. ---- - gdb/testsuite/ChangeLog | 4 ++++ - gdb/testsuite/gdb.arch/powerpc-prologue.c | 1 + - 2 files changed, 5 insertions(+) - -diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog -index b6ba0ec..b4ccd4a 100644 -### a/gdb/testsuite/ChangeLog -### b/gdb/testsuite/ChangeLog -## -1,5 +1,9 @@ - 2016-10-11 Jan Kratochvil - -+ * gdb.arch/powerpc-prologue.c (optimized_1): New declaration. -+ -+2016-10-11 Jan Kratochvil -+ - * gdb.arch/powerpc-prologue.exp: Use standard_output_file - * gdb.arch/ppc64-symtab-cordic.exp: Likewise. - * gdb.arch/vsx-regs.exp: Likewise. -diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.c b/gdb/testsuite/gdb.arch/powerpc-prologue.c -index 6c10dfc..a1b8065 100644 ---- a/gdb/testsuite/gdb.arch/powerpc-prologue.c -+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.c -@@ -24,6 +24,7 @@ - #endif - - void gdb2029 (void); -+void optimized_1 (void); - - int - main (void) --- -2.7.4 - - - -http://sourceware.org/ml/gdb-patches/2016-10/msg00613.html -Subject: [testsuite patch] Fix gcc_compiled for gcc 6 & 7 - - ---IS0zKkzwUGydFO0o -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline - -Hi, - -OK for check-in? - - -Jan - ---IS0zKkzwUGydFO0o -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline; filename=1 - -gdb/testsuite/ChangeLog -2016-10-20 Jan Kratochvil - - * lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp. - -diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp -index 378eea0..7d9b198 100644 ---- a/gdb/testsuite/lib/gdb.exp -+++ b/gdb/testsuite/lib/gdb.exp -@@ -3290,12 +3290,8 @@ proc get_compiler_info {{arg ""}} { - } - - # Set the legacy symbols. -- set gcc_compiled 0 -- if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 } -- if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 } -- if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 } -- if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 } -- if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 } -+ set gcc_compiled 0 -+ regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled - - # Log what happened. - verbose -log "get_compiler_info: $compiler_info" - ---IS0zKkzwUGydFO0o-- - - - -commit 1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6 -Author: Nick Clifton -Date: Fri Feb 3 09:04:21 2017 +0000 - - Fix compile time warning messages when compiling binutils with gcc 7.0.1. - - PR 21096 - bfd * coffcode.h (coff_write_object_contents): Enlarge size of - s_name_buf in order to avoid compile time warning about possible - integer truncation. - * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower - 32-bits of insn value before printing into buffer. - - opcodes * aarch64-opc.c (print_register_list): Ensure that the register - list index will fir into the tb buffer. - (print_register_offset_address): Likewise. - * tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf. - -### a/bfd/ChangeLog -### b/bfd/ChangeLog -## -1,3 +1,12 @@ -+2017-02-03 Nick Clifton -+ -+ PR 21096 -+ * coffcode.h (coff_write_object_contents): Enlarge size of -+ s_name_buf in order to avoid compile time warning about possible -+ integer truncation. -+ * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower -+ 32-bits of insn value before printing into buffer. -+ - 2017-02-02 Maciej W. Rozycki - - * elfxx-mips.c (mips_elf_hash_sort_data): Add ---- a/bfd/coffcode.h -+++ b/bfd/coffcode.h -@@ -3755,7 +3755,9 @@ coff_write_object_contents (bfd * abfd) - NUL-terminated. We use a temporary buffer so that we can still - sprintf all eight chars without splatting a terminating NUL - over the first byte of the following member (s_paddr). */ -- char s_name_buf[SCNNMLEN + 1]; -+ /* PR 21096: The +20 is to stop a bogus warning from gcc7 about -+ a possible buffer overflow. */ -+ char s_name_buf[SCNNMLEN + 1 + 20]; - - /* An inherent limitation of the /nnnnnnn notation used to indicate - the offset of the long name in the string table is that we -@@ -3770,9 +3772,10 @@ coff_write_object_contents (bfd * abfd) - return FALSE; - } - -- /* snprintf not strictly necessary now we've verified the value -- has less than eight ASCII digits, but never mind. */ -- snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long) string_size); -+ /* We do not need to use snprintf here as we have already verfied -+ that string_size is not too big, plus we have an overlarge -+ buffer, just in case. */ -+ sprintf (s_name_buf, "/%lu", (unsigned long) string_size); - /* Then strncpy takes care of any padding for us. */ - strncpy (section.s_name, s_name_buf, SCNNMLEN); - string_size += len + 1; ---- a/bfd/elf32-nds32.c -+++ b/bfd/elf32-nds32.c -@@ -14949,7 +14949,6 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) - { - int num = 0; - bfd_byte *contents; -- unsigned long insn; - FILE *ex9_import_file; - int update_ex9_table; - struct elf_nds32_link_hash_table *table; -@@ -14963,6 +14962,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) - /* Read instructions from the input file and build the list. */ - while (!feof (ex9_import_file)) - { -+ unsigned long insn; - char *code; - struct elf_nds32_insn_times_entry *ptr; - size_t nread; -@@ -14973,7 +14973,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) - break; - insn = bfd_getb32 (contents); - code = bfd_malloc (sizeof (char) * 9); -- snprintf (code, 9, "%08lx", insn); -+ snprintf (code, 9, "%08lx", (insn & 0xffffffff)); - ptr = bfd_malloc (sizeof (struct elf_nds32_insn_times_entry)); - ptr->string = code; - ptr->order = num; -### a/opcodes/ChangeLog -### b/opcodes/ChangeLog -## -1,3 +1,11 @@ -+2017-02-03 Nick Clifton -+ -+ PR 21096 -+ * aarch64-opc.c (print_register_list): Ensure that the register -+ list index will fir into the tb buffer. -+ (print_register_offset_address): Likewise. -+ * tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf. -+ - 2017-01-27 Alexis Deruell - - PR 21056 ---- a/opcodes/aarch64-opc.c -+++ b/opcodes/aarch64-opc.c -@@ -2865,7 +2865,8 @@ print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd, - - /* Prepare the index if any. */ - if (opnd->reglist.has_index) -- snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index); -+ /* PR 21096: The %100 is to silence a warning about possible truncation. */ -+ snprintf (tb, 8, "[%" PRIi64 "]", (opnd->reglist.index % 100)); - else - tb[0] = '\0'; - -@@ -2344,7 +2344,9 @@ print_register_offset_address (char *buf - if (print_extend_p) - { - if (print_amount_p) -- snprintf (tb, sizeof (tb), ",%s #%d", shift_name, opnd->shifter.amount); -+ snprintf (tb, sizeof (tb), ",%s #%d", shift_name, -+ /* PR 21096: The %100 is to silence a warning about possible truncation. */ -+ (opnd->shifter.amount % 100)); - else - snprintf (tb, sizeof (tb), ",%s", shift_name); - } ---- a/opcodes/tic6x-dis.c -+++ b/opcodes/tic6x-dis.c -@@ -316,7 +316,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info) - const char *parallel; - const char *cond = ""; - const char *func_unit; -- char func_unit_buf[7]; -+ char func_unit_buf[8]; - unsigned int func_unit_side = 0; - unsigned int func_unit_data_side = 0; - unsigned int func_unit_cross = 0; -@@ -703,8 +703,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info) - if (opc->flags & TIC6X_FLAG_INSN16_BSIDE && func_unit_side == 1) - func_unit_cross = 1; - -- snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char, -- func_unit_side, (func_unit_cross ? "X" : ""), data_str); -+ snprintf (func_unit_buf, sizeof func_unit_buf, " .%c%u%s%s", -+ func_unit_char, func_unit_side, -+ (func_unit_cross ? "X" : ""), data_str); - func_unit = func_unit_buf; - } - - - - -commit db7b55faa1a11e632ddf57505c9bb64bc783471a -Author: Nick Clifton -Date: Fri Dec 16 10:59:36 2016 +0000 - - Fix compile time warning building arm-dis.c - -### a/opcodes/ChangeLog -### b/opcodes/ChangeLog -## -1,3 +1,8 @@ -+2016-12-16 Nick Clifton -+ -+ * arm-dis.c (print_insn_thumb32): Fix compile time warning -+ computing value_in_comment. -+ - 2016-12-14 Maciej W. Rozycki - - * mips-dis.c (mips_convert_abiflags_ases): New function. ---- a/opcodes/arm-dis.c -+++ b/opcodes/arm-dis.c -@@ -5759,7 +5759,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) - if (off || !U) - { - func (stream, ", #%c%u", U ? '+' : '-', off * 4); -- value_in_comment = off * 4 * U ? 1 : -1; -+ value_in_comment = (off && U) ? 1 : -1; - } - func (stream, "]"); - if (W) -@@ -5771,7 +5771,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) - if (W) - { - func (stream, "#%c%u", U ? '+' : '-', off * 4); -- value_in_comment = off * 4 * U ? 1 : -1; -+ value_in_comment = (off && U) ? 1 : -1; - } - else - { - - - -commit 97e64e5ab19dbf6a9babd711e8deec5545520954 -Author: Yao Qi -Date: Fri Sep 23 17:27:26 2016 +0100 - - Replace sprintf with xsnprintf in nat/linux-osdata.c - - I see the following build warning when I build GDB with GCC trunk. - - ../../binutils-gdb/gdb/nat/linux-osdata.c: In function ‘LONGEST linux_xfer_osdata_fds(gdb_byte*, ULONGEST, ULONGEST)’: - ../../binutils-gdb/gdb/nat/linux-osdata.c:767:1: error: ‘%s’ directive writing between 0 and 255 bytes into a region of size 11 [-Werror=format-length=] - linux_xfer_osdata_fds (gdb_byte *readbuf, - ^~~~~~~~~~~~~~~~~~~~~ - ../../binutils-gdb/gdb/nat/linux-osdata.c:800:51: note: format output between 7 and 262 bytes into a destination of size 17 - sprintf (procentry, "/proc/%s", dp->d_name); - ^ - ../../binutils-gdb/gdb/nat/linux-osdata.c: In function ‘LONGEST linux_xfer_osdata_threads(gdb_byte*, ULONGEST, ULONGEST)’: - ../../binutils-gdb/gdb/nat/linux-osdata.c:555:1: error: ‘%s’ directive writing between 0 and 255 bytes into a region of size 11 [-Werror=format-length=] - linux_xfer_osdata_threads (gdb_byte *readbuf, - ^~~~~~~~~~~~~~~~~~~~~~~~~ - ../../binutils-gdb/gdb/nat/linux-osdata.c:588:51: note: format output between 7 and 262 bytes into a destination of size 17 - sprintf (procentry, "/proc/%s", dp->d_name); - ^ - cc1plus: all warnings being treated as errors - - The warning is a false positive, but we can workaround it by replacing - sprintf with xsnprintf. On the other hand, it is always preferred to - use xsnprintf. - - gdb: - - 2016-09-23 Yao Qi - - * nat/linux-osdata.c (linux_xfer_osdata_threads): Replace - sprintf with xsnprintf. - (linux_xfer_osdata_fds): Likewise. - -### a/gdb/ChangeLog -### b/gdb/ChangeLog -## -1,3 +1,9 @@ -+2016-09-23 Yao Qi -+ -+ * nat/linux-osdata.c (linux_xfer_osdata_threads): Replace -+ sprintf with xsnprintf. -+ (linux_xfer_osdata_fds): Likewise. -+ - 2016-09-23 Pedro Alves - - * Makefile.in (SFILES): Add common/new-op.c. ---- a/gdb/nat/linux-osdata.c -+++ b/gdb/nat/linux-osdata.c -@@ -585,7 +585,8 @@ linux_xfer_osdata_threads (gdb_byte *readbuf, - || NAMELEN (dp) > sizeof ("4294967295") - 1) - continue; - -- sprintf (procentry, "/proc/%s", dp->d_name); -+ xsnprintf (procentry, sizeof (procentry), "/proc/%s", -+ dp->d_name); - if (stat (procentry, &statbuf) == 0 - && S_ISDIR (statbuf.st_mode)) - { -@@ -797,7 +798,8 @@ linux_xfer_osdata_fds (gdb_byte *readbuf, - || NAMELEN (dp) > sizeof ("4294967295") - 1) - continue; - -- sprintf (procentry, "/proc/%s", dp->d_name); -+ xsnprintf (procentry, sizeof (procentry), "/proc/%s", -+ dp->d_name); - if (stat (procentry, &statbuf) == 0 - && S_ISDIR (statbuf.st_mode)) - { - - - -http://sourceware.org/ml/gdb-patches/2017-02/msg00226.html -Subject: [OB PATCH] Fix NULL pointer dereference - -This commit fixes a segmentation fault on tab completion when -certain debuginfo is installed: - - https://bugzilla.redhat.com/show_bug.cgi?id=1398387 - -gdb/ChangeLog: - - * symtab.c (add_symtab_completions): Prevent NULL pointer - dereference. ---- - gdb/ChangeLog | 5 +++++ - gdb/symtab.c | 3 +++ - 2 files changed, 8 insertions(+) - -diff --git a/gdb/symtab.c b/gdb/symtab.c -index 356f480..2c141e5 100644 ---- a/gdb/symtab.c -+++ b/gdb/symtab.c -@@ -5163,6 +5163,9 @@ add_symtab_completions (struct compunit_symtab *cust, - struct block_iterator iter; - int i; - -+ if (cust == NULL) -+ return; -+ - for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) - { - QUIT; --- -1.8.3.1 - diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index 0479200..194d8fe 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -26,11 +26,11 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922 gdb/value.h | 2 + 23 files changed, 1242 insertions(+), 183 deletions(-) -diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c -index 548e468..560e16f 100644 ---- a/gdb/dwarf2loc.c -+++ b/gdb/dwarf2loc.c -@@ -2601,11 +2601,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, +Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/dwarf2loc.c 2017-02-07 20:47:32.161026214 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2loc.c 2017-02-07 20:47:33.115033460 +0100 +@@ -2542,11 +2542,14 @@ /* See dwarf2loc.h. */ int @@ -47,7 +47,7 @@ index 548e468..560e16f 100644 if (prop == NULL) return 0; -@@ -2629,7 +2632,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2570,7 +2573,7 @@ *value = value_as_address (val); } @@ -56,7 +56,7 @@ index 548e468..560e16f 100644 } } break; -@@ -2651,7 +2654,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2592,7 +2595,7 @@ if (!value_optimized_out (val)) { *value = value_as_address (val); @@ -65,7 +65,7 @@ index 548e468..560e16f 100644 } } } -@@ -2659,8 +2662,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2600,8 +2603,8 @@ case PROP_CONST: *value = prop->data.const_val; @@ -76,7 +76,7 @@ index 548e468..560e16f 100644 case PROP_ADDR_OFFSET: { struct dwarf2_property_baton *baton -@@ -2681,11 +2684,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2622,11 +2625,38 @@ val = value_at (baton->offset_info.type, pinfo->addr + baton->offset_info.offset); *value = value_as_address (val); @@ -84,9 +84,8 @@ index 548e468..560e16f 100644 + rc = 1; } + break; - } - -- return 0; ++ } ++ + if (rc == 1 && is_signed == 1) + { + /* If we have a valid return candidate and it's value is signed, @@ -99,10 +98,11 @@ index 548e468..560e16f 100644 + /* Check if signed bit is set and sign-extend values. */ + if (*value & (neg_mask)) + *value |= (neg_mask ); -+ } + } + return rc; +} -+ + +- return 0; +int +dwarf2_evaluate_property (const struct dynamic_prop *prop, + struct frame_info *frame, @@ -117,11 +117,11 @@ index 548e468..560e16f 100644 } /* See dwarf2loc.h. */ -diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h -index fa83459..da6b9cd 100644 ---- a/gdb/dwarf2loc.h -+++ b/gdb/dwarf2loc.h -@@ -138,6 +138,12 @@ int dwarf2_evaluate_property (const struct dynamic_prop *prop, +Index: gdb-7.12.50.20170207/gdb/dwarf2loc.h +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/dwarf2loc.h 2017-02-07 20:47:32.162026222 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2loc.h 2017-02-07 20:47:33.115033460 +0100 +@@ -138,6 +138,12 @@ struct property_addr_info *addr_stack, CORE_ADDR *value); @@ -134,11 +134,11 @@ index fa83459..da6b9cd 100644 /* A helper for the compiler interface that compiles a single dynamic property to C code. -diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c -index 6658a38..a1ac659 100644 ---- a/gdb/dwarf2read.c -+++ b/gdb/dwarf2read.c -@@ -14952,7 +14952,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +Index: gdb-7.12.50.20170207/gdb/dwarf2read.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/dwarf2read.c 2017-02-07 20:47:32.168026268 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2read.c 2017-02-07 20:47:33.120033498 +0100 +@@ -14924,7 +14924,7 @@ struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -147,7 +147,7 @@ index 6658a38..a1ac659 100644 int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -14972,7 +14972,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14944,7 +14944,9 @@ low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -157,7 +157,7 @@ index 6658a38..a1ac659 100644 /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -15006,6 +15008,13 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -14977,6 +14979,13 @@ break; } @@ -171,7 +171,7 @@ index 6658a38..a1ac659 100644 attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -15082,7 +15091,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -15053,7 +15062,7 @@ && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -180,11 +180,11 @@ index 6658a38..a1ac659 100644 if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; -diff --git a/gdb/eval.c b/gdb/eval.c -index 00a107c..91d8a03 100644 ---- a/gdb/eval.c -+++ b/gdb/eval.c -@@ -399,29 +399,325 @@ init_array_element (struct value *array, struct value *element, +Index: gdb-7.12.50.20170207/gdb/eval.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/eval.c 2017-02-07 20:47:32.170026283 +0100 ++++ gdb-7.12.50.20170207/gdb/eval.c 2017-02-07 20:47:33.121033506 +0100 +@@ -379,29 +379,325 @@ return index; } @@ -209,11 +209,6 @@ index 00a107c..91d8a03 100644 - = (enum range_type) longest_to_int (exp->elts[pc].longconst); - - *pos += 3; -- -- if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) -- low_bound = TYPE_LOW_BOUND (range); -- else -- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); + struct value *new_array = array; + struct type *array_type = check_typedef (value_type (new_array)); + struct type *elt_type; @@ -268,17 +263,21 @@ index 00a107c..91d8a03 100644 + { + struct subscript_store *index = &subscript_array[i]; -- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) -- high_bound = TYPE_HIGH_BOUND (range); +- if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) +- low_bound = TYPE_LOW_BOUND (range); - else -- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); +- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); + /* The user input is a range, with or without lower and upper bound. + E.g.: "p arry(2:5)", "p arry( :5)", "p arry( : )", etc. */ + if (exp->elts[*pos].opcode == OP_RANGE) + { + int pc = (*pos) + 1; + subscript_range *range; -+ + +- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) +- high_bound = TYPE_HIGH_BOUND (range); +- else +- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); + index->kind = SUBSCRIPT_RANGE; + range = &index->U.range; + @@ -372,7 +371,8 @@ index 00a107c..91d8a03 100644 + + case SUBSCRIPT_INDEX: + break; -+ + +- return value_slice (array, low_bound, high_bound - low_bound + 1); + } + + array_type = TYPE_TARGET_TYPE (array_type); @@ -492,8 +492,7 @@ index 00a107c..91d8a03 100644 + struct type *range_type, *interim_array_type; + + int new_length; - -- return value_slice (array, low_bound, high_bound - low_bound + 1); ++ + /* The length of a sub-dimension with all elements between the + bounds plus the start element itself. It may be modified by + a user provided stride value. */ @@ -528,7 +527,7 @@ index 00a107c..91d8a03 100644 } -@@ -1810,19 +2106,8 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -1790,19 +2086,8 @@ switch (code) { case TYPE_CODE_ARRAY: @@ -549,7 +548,7 @@ index 00a107c..91d8a03 100644 case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2223,49 +2508,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2203,49 +2488,6 @@ } return (arg1); @@ -599,7 +598,7 @@ index 00a107c..91d8a03 100644 case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -3123,6 +3365,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3102,6 +3344,9 @@ int ndimen = 1; struct type *tmp_type; @@ -609,11 +608,11 @@ index 00a107c..91d8a03 100644 if ((TYPE_CODE (array_type) != TYPE_CODE_ARRAY)) error (_("Can't get dimensions for a non-array type")); -diff --git a/gdb/expprint.c b/gdb/expprint.c -index c37ecb0..214d58e 100644 ---- a/gdb/expprint.c -+++ b/gdb/expprint.c -@@ -568,12 +568,10 @@ print_subexp_standard (struct expression *exp, int *pos, +Index: gdb-7.12.50.20170207/gdb/expprint.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/expprint.c 2017-02-07 20:47:32.170026283 +0100 ++++ gdb-7.12.50.20170207/gdb/expprint.c 2017-02-07 20:47:33.121033506 +0100 +@@ -568,12 +568,10 @@ *pos += 2; fputs_filtered ("RANGE(", stream); @@ -628,7 +627,7 @@ index c37ecb0..214d58e 100644 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered (")", stream); return; -@@ -1055,16 +1053,16 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1055,16 +1053,16 @@ switch (range_type) { @@ -649,7 +648,7 @@ index c37ecb0..214d58e 100644 fputs_filtered ("Range 'EXP..EXP'", stream); break; default: -@@ -1072,11 +1070,9 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1072,11 +1070,9 @@ break; } @@ -663,11 +662,11 @@ index c37ecb0..214d58e 100644 elt = dump_subexp (exp, stream, elt); } break; -diff --git a/gdb/expression.h b/gdb/expression.h -index 4952d84..34ca54b 100644 ---- a/gdb/expression.h -+++ b/gdb/expression.h -@@ -152,17 +152,17 @@ extern void dump_raw_expression (struct expression *, +Index: gdb-7.12.50.20170207/gdb/expression.h +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/expression.h 2017-02-07 20:47:32.170026283 +0100 ++++ gdb-7.12.50.20170207/gdb/expression.h 2017-02-07 20:47:33.121033506 +0100 +@@ -154,17 +154,17 @@ struct ui_file *, char *); extern void dump_prefix_expression (struct expression *, struct ui_file *); @@ -694,11 +693,11 @@ index 4952d84..34ca54b 100644 }; #endif /* !defined (EXPRESSION_H) */ -diff --git a/gdb/f-exp.y b/gdb/f-exp.y -index e3148a3..71f1823 100644 ---- a/gdb/f-exp.y -+++ b/gdb/f-exp.y -@@ -253,31 +253,63 @@ arglist : subrange +Index: gdb-7.12.50.20170207/gdb/f-exp.y +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/f-exp.y 2017-02-07 20:47:32.171026290 +0100 ++++ gdb-7.12.50.20170207/gdb/f-exp.y 2017-02-07 20:47:33.121033506 +0100 +@@ -254,31 +254,63 @@ arglist : arglist ',' exp %prec ABOVE_COMMA { arglist_len++; } @@ -767,11 +766,11 @@ index e3148a3..71f1823 100644 write_exp_elt_opcode (pstate, OP_RANGE); } ; -diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c -index 08215e2..e6eca6a 100644 ---- a/gdb/f-valprint.c -+++ b/gdb/f-valprint.c -@@ -121,8 +121,14 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, +Index: gdb-7.12.50.20170207/gdb/f-valprint.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/f-valprint.c 2017-02-07 20:47:32.171026290 +0100 ++++ gdb-7.12.50.20170207/gdb/f-valprint.c 2017-02-07 20:47:33.122033513 +0100 +@@ -121,8 +121,14 @@ if (nss != ndimensions) { @@ -787,11 +786,11 @@ index 08215e2..e6eca6a 100644 for (i = lowerbound; (i < upperbound + 1 && (*elts) < options->print_max); -diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c -index ec5c17a..eb83791 100644 ---- a/gdb/gdbtypes.c -+++ b/gdb/gdbtypes.c -@@ -836,7 +836,8 @@ allocate_stub_method (struct type *type) +Index: gdb-7.12.50.20170207/gdb/gdbtypes.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/gdbtypes.c 2017-02-07 20:47:32.173026306 +0100 ++++ gdb-7.12.50.20170207/gdb/gdbtypes.c 2017-02-07 20:47:33.123033521 +0100 +@@ -836,7 +836,8 @@ struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, @@ -801,7 +800,7 @@ index ec5c17a..eb83791 100644 { if (result_type == NULL) result_type = alloc_type_copy (index_type); -@@ -851,6 +852,7 @@ create_range_type (struct type *result_type, struct type *index_type, +@@ -851,6 +852,7 @@ TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; @@ -809,7 +808,7 @@ index ec5c17a..eb83791 100644 if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -879,7 +881,7 @@ struct type * +@@ -879,7 +881,7 @@ create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -818,7 +817,7 @@ index ec5c17a..eb83791 100644 low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -887,7 +889,11 @@ create_static_range_type (struct type *result_type, struct type *index_type, +@@ -887,7 +889,11 @@ high.kind = PROP_CONST; high.data.const_val = high_bound; @@ -831,7 +830,7 @@ index ec5c17a..eb83791 100644 return result_type; } -@@ -1084,16 +1090,20 @@ create_array_type_with_stride (struct type *result_type, +@@ -1084,16 +1090,20 @@ && (!type_not_associated (result_type) && !type_not_allocated (result_type))) { @@ -853,7 +852,7 @@ index ec5c17a..eb83791 100644 else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1888,12 +1898,12 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1886,12 +1896,12 @@ CORE_ADDR value; struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; @@ -868,7 +867,7 @@ index ec5c17a..eb83791 100644 { low_bound.kind = PROP_CONST; low_bound.data.const_val = value; -@@ -1905,7 +1915,7 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1903,7 +1913,7 @@ } prop = &TYPE_RANGE_DATA (dyn_range_type)->high; @@ -877,7 +876,7 @@ index ec5c17a..eb83791 100644 { high_bound.kind = PROP_CONST; high_bound.data.const_val = value; -@@ -1920,12 +1930,20 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1918,12 +1928,20 @@ high_bound.data.const_val = 0; } @@ -899,11 +898,11 @@ index ec5c17a..eb83791 100644 TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; return static_range_type; } -diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h -index 2dda074..bcc9200 100644 ---- a/gdb/gdbtypes.h -+++ b/gdb/gdbtypes.h -@@ -577,6 +577,10 @@ struct range_bounds +Index: gdb-7.12.50.20170207/gdb/gdbtypes.h +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/gdbtypes.h 2017-02-07 20:47:32.173026306 +0100 ++++ gdb-7.12.50.20170207/gdb/gdbtypes.h 2017-02-07 20:47:33.123033521 +0100 +@@ -550,6 +550,10 @@ struct dynamic_prop high; @@ -914,7 +913,7 @@ index 2dda074..bcc9200 100644 /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -739,7 +743,6 @@ struct main_type +@@ -712,7 +716,6 @@ /* * Union member used for range types. */ struct range_bounds *bounds; @@ -922,7 +921,7 @@ index 2dda074..bcc9200 100644 } flds_bnds; /* * Slot to point to additional language-specific fields of this -@@ -1255,6 +1258,15 @@ extern void allocate_gnat_aux_type (struct type *); +@@ -1224,6 +1227,15 @@ TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -938,7 +937,7 @@ index 2dda074..bcc9200 100644 /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1289,6 +1301,9 @@ extern void allocate_gnat_aux_type (struct type *); +@@ -1258,6 +1270,9 @@ TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -948,7 +947,7 @@ index 2dda074..bcc9200 100644 #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1783,6 +1798,7 @@ extern struct type *create_array_type_with_stride +@@ -1767,6 +1782,7 @@ extern struct type *create_range_type (struct type *, struct type *, const struct dynamic_prop *, @@ -956,11 +955,11 @@ index 2dda074..bcc9200 100644 const struct dynamic_prop *); extern struct type *create_array_type (struct type *, struct type *, -diff --git a/gdb/parse.c b/gdb/parse.c -index 2b00708..992af87 100644 ---- a/gdb/parse.c -+++ b/gdb/parse.c -@@ -1006,22 +1006,20 @@ operator_length_standard (const struct expression *expr, int endpos, +Index: gdb-7.12.50.20170207/gdb/parse.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/parse.c 2017-02-07 20:47:32.174026313 +0100 ++++ gdb-7.12.50.20170207/gdb/parse.c 2017-02-07 20:47:33.124033529 +0100 +@@ -1007,22 +1007,20 @@ case OP_RANGE: oplen = 3; @@ -994,11 +993,11 @@ index 2b00708..992af87 100644 break; -diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y -index aeb6058..b1b9633 100644 ---- a/gdb/rust-exp.y -+++ b/gdb/rust-exp.y -@@ -2429,23 +2429,17 @@ convert_ast_to_expression (struct parser_state *state, +Index: gdb-7.12.50.20170207/gdb/rust-exp.y +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/rust-exp.y 2017-02-07 20:47:32.174026313 +0100 ++++ gdb-7.12.50.20170207/gdb/rust-exp.y 2017-02-07 20:47:33.124033529 +0100 +@@ -2409,23 +2409,17 @@ case OP_RANGE: { @@ -1025,11 +1024,11 @@ index aeb6058..b1b9633 100644 } write_exp_elt_opcode (state, OP_RANGE); write_exp_elt_longcst (state, kind); -diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c -index 17b20c6..295002f 100644 ---- a/gdb/rust-lang.c -+++ b/gdb/rust-lang.c -@@ -1241,9 +1241,9 @@ rust_range (struct expression *exp, int *pos, enum noside noside) +Index: gdb-7.12.50.20170207/gdb/rust-lang.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/rust-lang.c 2017-02-07 20:47:32.175026321 +0100 ++++ gdb-7.12.50.20170207/gdb/rust-lang.c 2017-02-07 20:47:33.125033536 +0100 +@@ -1315,9 +1315,9 @@ kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst); *pos += 3; @@ -1041,7 +1040,7 @@ index 17b20c6..295002f 100644 high = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -1332,7 +1332,7 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1406,7 +1406,7 @@ *low = 0; *high = 0; @@ -1050,7 +1049,7 @@ index 17b20c6..295002f 100644 if (TYPE_NFIELDS (type) == 0) return; -@@ -1340,15 +1340,14 @@ rust_compute_range (struct type *type, struct value *range, +@@ -1414,15 +1414,14 @@ i = 0; if (strcmp (TYPE_FIELD_NAME (type, 0), "start") == 0) { @@ -1068,7 +1067,7 @@ index 17b20c6..295002f 100644 *high = value_as_long (value_field (range, i)); } } -@@ -1363,7 +1362,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1437,7 +1436,7 @@ struct type *rhstype; LONGEST low, high_bound; /* Initialized to appease the compiler. */ @@ -1077,7 +1076,7 @@ index 17b20c6..295002f 100644 LONGEST high = 0; int want_slice = 0; -@@ -1425,7 +1424,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1499,7 +1498,7 @@ error (_("Cannot subscript non-array type")); if (want_slice @@ -1086,7 +1085,7 @@ index 17b20c6..295002f 100644 low = low_bound; if (low < 0) error (_("Index less than zero")); -@@ -1443,7 +1442,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, +@@ -1517,7 +1516,7 @@ CORE_ADDR addr; struct value *addrval, *tem; @@ -1095,11 +1094,10 @@ index 17b20c6..295002f 100644 high = high_bound; if (high < 0) error (_("High index less than zero")); -diff --git a/gdb/testsuite/gdb.fortran/static-arrays.exp b/gdb/testsuite/gdb.fortran/static-arrays.exp -new file mode 100644 -index 0000000..cc9ecc0 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/static-arrays.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.exp 2017-02-07 20:47:33.125033536 +0100 @@ -0,0 +1,421 @@ +# Copyright 2015 Free Software Foundation, Inc. +# @@ -1522,11 +1520,10 @@ index 0000000..cc9ecc0 +gdb_test "print ar1\(3:7\) = 42" \ + "Invalid cast." \ + "Assignment of value to subarray" -diff --git a/gdb/testsuite/gdb.fortran/static-arrays.f90 b/gdb/testsuite/gdb.fortran/static-arrays.f90 -new file mode 100644 -index 0000000..f22fcbe ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/static-arrays.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.f90 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/static-arrays.f90 2017-02-07 20:47:33.125033536 +0100 @@ -0,0 +1,55 @@ +! Copyright 2015 Free Software Foundation, Inc. +! @@ -1583,11 +1580,11 @@ index 0000000..f22fcbe +program testprog + call sub +end -diff --git a/gdb/testsuite/gdb.fortran/vla-ptype.exp b/gdb/testsuite/gdb.fortran/vla-ptype.exp -index 175661f..544d40a 100644 ---- a/gdb/testsuite/gdb.fortran/vla-ptype.exp -+++ b/gdb/testsuite/gdb.fortran/vla-ptype.exp -@@ -98,3 +98,7 @@ gdb_test "ptype vla2" "type = " "ptype vla2 not allocated" +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:47:32.176026328 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:47:33.125033536 +0100 +@@ -98,3 +98,7 @@ gdb_test "ptype vla2(5, 45, 20)" \ "no such vector element \\\(vector not allocated\\\)" \ "ptype vla2(5, 45, 20) not allocated" @@ -1595,11 +1592,11 @@ index 175661f..544d40a 100644 +gdb_breakpoint [gdb_get_line_number "vla1-neg-bounds"] +gdb_continue_to_breakpoint "vla1-neg-bounds" +gdb_test "ptype vla1" "type = $real \\(-2:1,-5:4,-3:-1\\)" "ptype vla1 negative bounds" -diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp -index 8010c0a..f8258a1 100644 ---- a/gdb/testsuite/gdb.fortran/vla-sizeof.exp -+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp -@@ -44,3 +44,7 @@ gdb_test "print sizeof(pvla)" " = 0" "print sizeof non-associated pvla" +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-sizeof.exp +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-02-07 20:47:32.176026328 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2017-02-07 20:47:33.126033544 +0100 +@@ -44,3 +44,7 @@ gdb_breakpoint [gdb_get_line_number "pvla-associated"] gdb_continue_to_breakpoint "pvla-associated" gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla" @@ -1607,11 +1604,10 @@ index 8010c0a..f8258a1 100644 +gdb_breakpoint [gdb_get_line_number "vla1-neg-bounds"] +gdb_continue_to_breakpoint "vla1-neg-bounds" +gdb_test "print sizeof(vla1)" " = 480" "print sizeof vla1 negative bounds" -diff --git a/gdb/testsuite/gdb.fortran/vla-stride.exp b/gdb/testsuite/gdb.fortran/vla-stride.exp -new file mode 100644 -index 0000000..dcf15e5 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-stride.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.exp 2017-02-07 20:47:33.126033544 +0100 @@ -0,0 +1,44 @@ +# Copyright 2016 Free Software Foundation, Inc. + @@ -1657,11 +1653,10 @@ index 0000000..dcf15e5 +gdb_continue_to_breakpoint "single-element" +gdb_test "print pvla" " = \\\(5\\\)" "print single-element" +gdb_test "print pvla(1)" " = 5" "print one single-element" -diff --git a/gdb/testsuite/gdb.fortran/vla-stride.f90 b/gdb/testsuite/gdb.fortran/vla-stride.f90 -new file mode 100644 -index 0000000..8d24252 ---- /dev/null -+++ b/gdb/testsuite/gdb.fortran/vla-stride.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.f90 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-stride.f90 2017-02-07 20:47:33.126033544 +0100 @@ -0,0 +1,29 @@ +! Copyright 2016 Free Software Foundation, Inc. +! @@ -1692,11 +1687,11 @@ index 0000000..8d24252 + + pvla => null() ! single-element +end program vla_stride -diff --git a/gdb/testsuite/gdb.fortran/vla.f90 b/gdb/testsuite/gdb.fortran/vla.f90 -index c76d24c..ef307b7 100644 ---- a/gdb/testsuite/gdb.fortran/vla.f90 -+++ b/gdb/testsuite/gdb.fortran/vla.f90 -@@ -54,4 +54,14 @@ program vla +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla.f90 +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla.f90 2017-02-07 20:47:32.176026328 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla.f90 2017-02-07 20:47:33.126033544 +0100 +@@ -54,4 +54,14 @@ allocate (vla3 (2,2)) ! vla2-deallocated vla3(:,:) = 13 @@ -1711,35 +1706,34 @@ index c76d24c..ef307b7 100644 + l = allocated(vla1) + end program vla -diff --git a/gdb/valarith.c b/gdb/valarith.c -index de6fcfd..9753506 100644 ---- a/gdb/valarith.c -+++ b/gdb/valarith.c -@@ -193,11 +193,17 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) +Index: gdb-7.12.50.20170207/gdb/valarith.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/valarith.c 2017-02-07 20:47:33.126033544 +0100 ++++ gdb-7.12.50.20170207/gdb/valarith.c 2017-02-07 20:48:29.114458788 +0100 +@@ -193,10 +193,16 @@ struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); ULONGEST elt_size = type_length_units (elt_type); - ULONGEST elt_offs = elt_size * (index - lowerbound); + LONGEST elt_offs = index - lowerbound; + LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)); - struct value *v; - ++ + if (elt_stride != 0) + elt_offs *= elt_stride; + else + elt_offs *= elt_size; -+ + if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) - && elt_offs >= type_length_units (array_type))) + && abs (elt_offs) >= type_length_units (array_type))) { if (type_not_associated (array_type)) error (_("no such vector element (vector not associated)")); -diff --git a/gdb/valops.c b/gdb/valops.c -index 40392e8..24ffacb 100644 ---- a/gdb/valops.c -+++ b/gdb/valops.c -@@ -3775,56 +3775,191 @@ value_of_this_silent (const struct language_defn *lang) +Index: gdb-7.12.50.20170207/gdb/valops.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-07 20:47:33.127033551 +0100 ++++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-07 20:50:24.909338275 +0100 +@@ -3782,55 +3782,190 @@ struct value * value_slice (struct value *array, int lowbound, int length) { @@ -1789,6 +1783,10 @@ index 40392e8..24ffacb 100644 - range_type = TYPE_INDEX_TYPE (array_type); - if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0) - error (_("slice from bad array or bitstring")); +- +- if (lowbound < lowerbound || length < 0 +- || lowbound + length - 1 > upperbound) +- error (_("slice out of range")); + ary_low_bound = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (array_type)); + ary_high_bound = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (array_type)); + @@ -1814,10 +1812,7 @@ index 40392e8..24ffacb 100644 + + elt_size = TYPE_LENGTH (elt_type); + elt_offs = lowbound - ary_low_bound; - -- if (lowbound < lowerbound || length < 0 -- || lowbound + length - 1 > upperbound) -- error (_("slice out of range")); ++ + elt_offs *= elt_size; + + /* Check for valid user input. In case of Fortran this was already done @@ -1864,8 +1859,15 @@ index 40392e8..24ffacb 100644 - struct type *element_type = TYPE_TARGET_TYPE (array_type); - LONGEST offset - = (lowbound - lowerbound) * TYPE_LENGTH (check_typedef (element_type)); +- +- slice_type = create_array_type ((struct type *) NULL, +- element_type, +- slice_range_type); +- TYPE_CODE (slice_type) = TYPE_CODE (array_type); + struct type *element_type; -+ + +- if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) +- slice = allocate_value_lazy (slice_type); + /* When both CALL_COUNT and STRIDE_LENGTH equal 1, we can use the legacy + code for subarrays. */ + if (call_count == 1 && stride_length == 1) @@ -1873,15 +1875,9 @@ index 40392e8..24ffacb 100644 + element_type = TYPE_TARGET_TYPE (array_type); + + slice_type = create_array_type (NULL, element_type, slice_range_type); - -- slice_type = create_array_type ((struct type *) NULL, -- element_type, -- slice_range_type); -- TYPE_CODE (slice_type) = TYPE_CODE (array_type); ++ + TYPE_CODE (slice_type) = TYPE_CODE (array_type); - -- if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) -- slice = allocate_value_lazy (slice_type); ++ + if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) + v = allocate_value_lazy (slice_type); + else @@ -1949,11 +1945,9 @@ index 40392e8..24ffacb 100644 } - set_value_component_location (slice, array); -- VALUE_FRAME_ID (slice) = VALUE_FRAME_ID (array); - set_value_offset (slice, value_offset (array) + offset); + set_value_component_location (v, array); + VALUE_REGNUM (v) = VALUE_REGNUM (array); -+ VALUE_FRAME_ID (v) = VALUE_FRAME_ID (array); + set_value_offset (v, value_offset (array) + elt_offs); } @@ -1962,11 +1956,11 @@ index 40392e8..24ffacb 100644 } /* Create a value for a FORTRAN complex number. Currently most of the -diff --git a/gdb/value.h b/gdb/value.h -index 0b417b4..9c37713 100644 ---- a/gdb/value.h -+++ b/gdb/value.h -@@ -1057,6 +1057,8 @@ extern struct value *varying_to_slice (struct value *); +Index: gdb-7.12.50.20170207/gdb/value.h +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/value.h 2017-02-07 20:47:32.178026343 +0100 ++++ gdb-7.12.50.20170207/gdb/value.h 2017-02-07 20:47:33.128033559 +0100 +@@ -1106,6 +1106,8 @@ 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 6655390..1478cab 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -23,24 +23,24 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings gdb/valprint.c | 6 -- 20 files changed, 827 insertions(+), 110 deletions(-) -Index: gdb-7.11.90.20160907/gdb/NEWS +Index: gdb-7.12.50.20170207/gdb/NEWS =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/NEWS 2016-09-07 21:52:10.273563060 +0200 -+++ gdb-7.11.90.20160907/gdb/NEWS 2016-09-07 21:53:22.708210416 +0200 -@@ -1,6 +1,8 @@ - What has changed in GDB? - (Organized release by release) +--- gdb-7.12.50.20170207.orig/gdb/NEWS 2017-02-07 20:53:48.851887262 +0100 ++++ gdb-7.12.50.20170207/gdb/NEWS 2017-02-07 20:53:54.437929689 +0100 +@@ -73,6 +73,8 @@ + Erases all the flash memory regions reported by the target. This is + equivalent to the CLI command flash-erase. +* Fortran: Support pointers to dynamic types. + *** Changes in GDB 7.12 * GDB and GDBserver now build with a C++ compiler by default. -Index: gdb-7.11.90.20160907/gdb/c-valprint.c +Index: gdb-7.12.50.20170207/gdb/c-valprint.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/c-valprint.c 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/c-valprint.c 2016-09-07 21:53:22.708210416 +0200 -@@ -645,6 +645,28 @@ +--- gdb-7.12.50.20170207.orig/gdb/c-valprint.c 2017-02-07 20:53:48.851887262 +0100 ++++ gdb-7.12.50.20170207/gdb/c-valprint.c 2017-02-07 20:53:54.437929689 +0100 +@@ -646,6 +646,28 @@ else { /* normal case */ @@ -69,11 +69,11 @@ Index: gdb-7.11.90.20160907/gdb/c-valprint.c fprintf_filtered (stream, "("); type_print (value_type (val), "", stream, -1); fprintf_filtered (stream, ") "); -Index: gdb-7.11.90.20160907/gdb/dwarf2read.c +Index: gdb-7.12.50.20170207/gdb/dwarf2read.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/dwarf2read.c 2016-09-07 21:52:53.700951175 +0200 -+++ gdb-7.11.90.20160907/gdb/dwarf2read.c 2016-09-07 21:54:02.140562825 +0200 -@@ -1764,7 +1764,8 @@ +--- gdb-7.12.50.20170207.orig/gdb/dwarf2read.c 2017-02-07 20:53:48.862887345 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2read.c 2017-02-07 20:53:54.442929727 +0100 +@@ -1768,7 +1768,8 @@ static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, struct dwarf2_cu *cu, @@ -83,7 +83,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c /* memory allocation interface */ -@@ -11446,7 +11447,7 @@ +@@ -11399,7 +11400,7 @@ { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -92,7 +92,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c } cu->list_in_scope = &local_symbols; -@@ -14512,29 +14513,94 @@ +@@ -14460,29 +14461,94 @@ struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -198,7 +198,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -14864,7 +14930,8 @@ +@@ -14819,7 +14885,8 @@ static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -208,7 +208,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack = &cu->objfile->objfile_obstack; -@@ -14874,14 +14941,33 @@ +@@ -14829,14 +14896,33 @@ if (attr_form_is_block (attr)) { @@ -246,7 +246,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -14914,8 +15000,28 @@ +@@ -14869,8 +14955,28 @@ baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -277,7 +277,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -15027,24 +15133,24 @@ +@@ -14981,24 +15087,24 @@ attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -306,7 +306,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -22416,7 +22522,7 @@ +@@ -22333,7 +22439,7 @@ attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -315,7 +315,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile); } else if (attr != NULL) -@@ -22431,7 +22537,7 @@ +@@ -22348,7 +22454,7 @@ attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -324,7 +324,7 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile); } else if (attr != NULL) -@@ -22444,7 +22550,7 @@ +@@ -22361,7 +22467,7 @@ /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); @@ -333,10 +333,10 @@ Index: gdb-7.11.90.20160907/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile); if (dwarf2_per_objfile->die_type_hash == NULL) -Index: gdb-7.11.90.20160907/gdb/f-typeprint.c +Index: gdb-7.12.50.20170207/gdb/f-typeprint.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/f-typeprint.c 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/f-typeprint.c 2016-09-07 21:53:22.713210461 +0200 +--- gdb-7.12.50.20170207.orig/gdb/f-typeprint.c 2017-02-07 20:53:48.863887353 +0100 ++++ gdb-7.12.50.20170207/gdb/f-typeprint.c 2017-02-07 20:53:54.443929734 +0100 @@ -37,7 +37,7 @@ #endif @@ -486,11 +486,11 @@ Index: gdb-7.11.90.20160907/gdb/f-typeprint.c fputs_filtered ("\n", stream); } fprintfi_filtered (level, stream, "End Type "); -Index: gdb-7.11.90.20160907/gdb/gdbtypes.c +Index: gdb-7.12.50.20170207/gdb/gdbtypes.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/gdbtypes.c 2016-09-07 21:52:53.703951202 +0200 -+++ gdb-7.11.90.20160907/gdb/gdbtypes.c 2016-09-07 21:53:22.714210470 +0200 -@@ -1816,7 +1816,8 @@ +--- gdb-7.12.50.20170207.orig/gdb/gdbtypes.c 2017-02-07 20:53:48.865887368 +0100 ++++ gdb-7.12.50.20170207/gdb/gdbtypes.c 2017-02-07 20:53:54.444929742 +0100 +@@ -1814,7 +1814,8 @@ type = check_typedef (type); /* We only want to recognize references at the outermost level. */ @@ -500,7 +500,7 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c type = check_typedef (TYPE_TARGET_TYPE (type)); /* Types that have a dynamic TYPE_DATA_LOCATION are considered -@@ -1850,6 +1851,7 @@ +@@ -1848,6 +1849,7 @@ } case TYPE_CODE_ARRAY: @@ -508,7 +508,7 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c { gdb_assert (TYPE_NFIELDS (type) == 1); -@@ -1962,7 +1964,8 @@ +@@ -1960,7 +1962,8 @@ struct type *ary_dim; struct dynamic_prop *prop; @@ -518,7 +518,7 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c type = copy_type (type); -@@ -1987,13 +1990,17 @@ +@@ -1985,13 +1988,17 @@ ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -539,7 +539,7 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c } /* Resolve dynamic bounds of members of the union TYPE to static -@@ -2123,6 +2130,28 @@ +@@ -2121,6 +2128,28 @@ return resolved_type; } @@ -568,7 +568,7 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c /* Worker for resolved_dynamic_type. */ static struct type * -@@ -2171,7 +2200,12 @@ +@@ -2169,7 +2198,12 @@ break; } @@ -581,10 +581,10 @@ Index: gdb-7.11.90.20160907/gdb/gdbtypes.c resolved_type = resolve_dynamic_array (type, addr_stack); break; -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.cc +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/vla-cxx.cc =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.cp/vla-cxx.cc 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.cc 2016-09-07 21:53:22.714210470 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.cp/vla-cxx.cc 2017-02-07 20:53:48.866887375 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/vla-cxx.cc 2017-02-07 20:53:54.444929742 +0100 @@ -15,6 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -613,10 +613,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.cc + return vla[2]; } -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/vla-cxx.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.cp/vla-cxx.exp 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.exp 2016-09-07 21:53:22.715210479 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.cp/vla-cxx.exp 2017-02-07 20:53:48.866887375 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/vla-cxx.exp 2017-02-07 20:53:54.444929742 +0100 @@ -23,6 +23,12 @@ return -1 } @@ -637,10 +637,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.cp/vla-cxx.exp +gdb_test "ptype ptr" "int \\(\\*\\)\\\[3\\\]" +gdb_test "print ptr" "\\(int \\(\\*\\)\\\[3\\\]\\) $hex" +gdb_test "print *ptr" " = \\{5, 7, 9\\}" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/pointers.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.exp 2016-09-07 21:53:22.715210479 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/pointers.exp 2017-02-07 20:53:54.444929742 +0100 @@ -0,0 +1,143 @@ +# Copyright 2016 Free Software Foundation, Inc. + @@ -785,10 +785,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.exp +gdb_test "print *((integer*) &inta + 2)" "= 3" "print temporary pointer, array" +gdb_test "print *((integer*) &intvla + 3)" "= 4" "print temporary pointer, allocated vla" +gdb_test "print \$pc" "= \\(PTR TO -> \\( void \\(\\)\\(\\)\\)\\) $hex " "Print program counter" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/pointers.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.f90 2016-09-07 21:53:22.715210479 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/pointers.f90 2017-02-07 20:53:54.445929749 +0100 @@ -0,0 +1,109 @@ +! Copyright 2016 Free Software Foundation, Inc. +! @@ -899,10 +899,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/pointers.f90 + intv = intv + 1 ! After value assignment + +end program pointers -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/print_type.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/print_type.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/print_type.exp 2016-09-07 21:53:22.715210479 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/print_type.exp 2017-02-07 20:53:54.445929749 +0100 @@ -0,0 +1,100 @@ +# Copyright 2016 Free Software Foundation, Inc. + @@ -1004,10 +1004,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/print_type.exp + } +} +gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-ptype.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2016-09-07 21:52:53.705951220 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-ptype.exp 2016-09-07 21:53:22.715210479 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:53:48.867887383 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-ptype.exp 2017-02-07 20:53:54.445929749 +0100 @@ -32,9 +32,9 @@ # Check the ptype of various VLA states and pointer to VLA's. gdb_breakpoint [gdb_get_line_number "vla1-init"] @@ -1045,10 +1045,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-ptype.exp gdb_test "ptype vla2(5, 45, 20)" \ "no such vector element \\\(vector not allocated\\\)" \ "ptype vla2(5, 45, 20) not allocated" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-strings.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.exp 2016-09-07 21:53:22.716210488 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-strings.exp 2017-02-07 20:53:54.445929749 +0100 @@ -0,0 +1,103 @@ +# Copyright 2016 Free Software Foundation, Inc. + @@ -1153,10 +1153,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.exp + pass $test + } +} -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-strings.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.f90 2016-09-07 21:53:22.716210488 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-strings.f90 2017-02-07 20:53:54.445929749 +0100 @@ -0,0 +1,39 @@ +! Copyright 2016 Free Software Foundation, Inc. +! @@ -1197,10 +1197,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-strings.f90 + var_char_p => null() + l = associated(var_char_p) ! var_char_p-not-associated +end program vla_strings -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-type.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-type.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.fortran/vla-type.exp 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-type.exp 2016-09-07 21:53:22.716210488 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-type.exp 2017-02-07 20:53:48.867887383 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-type.exp 2017-02-07 20:53:54.446929757 +0100 @@ -132,7 +132,10 @@ "End Type one" ] @@ -1222,17 +1222,17 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-type.exp "End Type one" ] \ "ptype fivedynarr(2)%tone, not allocated" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-value.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-value.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.fortran/vla-value.exp 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-value.exp 2016-09-07 21:53:22.716210488 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.fortran/vla-value.exp 2017-02-07 20:53:48.868887391 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/vla-value.exp 2017-02-07 20:53:54.446929757 +0100 @@ -14,6 +14,7 @@ # along with this program. If not, see . standard_testfile "vla.f90" +load_lib "fortran.exp" - if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ {debug f90 quiet}] } { @@ -25,12 +26,15 @@ return -1 @@ -1278,10 +1278,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.fortran/vla-value.exp "print associated &pvla" gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)" gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)" -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-var-child-f.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-var-child-f.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2016-09-07 21:53:22.716210488 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2017-02-07 20:53:48.868887391 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-var-child-f.exp 2017-02-07 20:53:54.446929757 +0100 @@ -17,6 +17,7 @@ load_lib mi-support.exp @@ -1303,10 +1303,10 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-var-child-f.exp set children [list [list "array.-1" "-1" 2 "$int4 \\(2\\)"] \ [list "array.0" "0" 2 "$int4 \\(2\\)"] \ -Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-vla-fortran.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-vla-fortran.exp =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2016-09-07 21:53:22.716210488 +0200 +--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2017-02-07 20:53:48.868887391 +0100 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2017-02-07 20:53:54.446929757 +0100 @@ -17,7 +17,9 @@ # Array (VLA). @@ -1405,11 +1405,11 @@ Index: gdb-7.11.90.20160907/gdb/testsuite/gdb.mi/mi-vla-fortran.exp "info type variable pvla2_associated" mi_gdb_test "592-var-show-format pvla2_associated" \ "592\\^done,format=\"natural\"" \ -Index: gdb-7.11.90.20160907/gdb/typeprint.c +Index: gdb-7.12.50.20170207/gdb/typeprint.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/typeprint.c 2016-09-07 21:52:10.272563051 +0200 -+++ gdb-7.11.90.20160907/gdb/typeprint.c 2016-09-07 21:53:22.717210497 +0200 -@@ -485,6 +485,25 @@ +--- gdb-7.12.50.20170207.orig/gdb/typeprint.c 2017-02-07 20:53:48.869887398 +0100 ++++ gdb-7.12.50.20170207/gdb/typeprint.c 2017-02-07 20:53:54.446929757 +0100 +@@ -475,6 +475,25 @@ printf_filtered (" */\n"); } @@ -1435,11 +1435,11 @@ Index: gdb-7.11.90.20160907/gdb/typeprint.c LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags); printf_filtered ("\n"); -Index: gdb-7.11.90.20160907/gdb/valops.c +Index: gdb-7.12.50.20170207/gdb/valops.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/valops.c 2016-09-07 21:52:53.707951238 +0200 -+++ gdb-7.11.90.20160907/gdb/valops.c 2016-09-07 21:53:22.717210497 +0200 -@@ -1562,6 +1562,19 @@ +--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-07 20:53:48.870887406 +0100 ++++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-07 20:53:54.447929765 +0100 +@@ -1569,6 +1569,19 @@ if (TYPE_CODE (base_type) == TYPE_CODE_PTR) { struct type *enc_type; @@ -1459,7 +1459,7 @@ Index: gdb-7.11.90.20160907/gdb/valops.c /* We may be pointing to something embedded in a larger object. Get the real type of the enclosing object. */ -@@ -1577,8 +1590,7 @@ +@@ -1584,8 +1597,7 @@ else /* Retrieve the enclosing object pointed to. */ arg2 = value_at_lazy (enc_type, @@ -1469,11 +1469,11 @@ Index: gdb-7.11.90.20160907/gdb/valops.c enc_type = value_type (arg2); return readjust_indirect_value_type (arg2, enc_type, base_type, arg1); -Index: gdb-7.11.90.20160907/gdb/valprint.c +Index: gdb-7.12.50.20170207/gdb/valprint.c =================================================================== ---- gdb-7.11.90.20160907.orig/gdb/valprint.c 2016-09-07 21:52:10.273563060 +0200 -+++ gdb-7.11.90.20160907/gdb/valprint.c 2016-09-07 21:53:22.718210506 +0200 -@@ -1141,12 +1141,6 @@ +--- gdb-7.12.50.20170207.orig/gdb/valprint.c 2017-02-07 02:48:47.000000000 +0100 ++++ gdb-7.12.50.20170207/gdb/valprint.c 2017-02-07 20:53:54.448929772 +0100 +@@ -1165,12 +1165,6 @@ return 0; } diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index 29ef563..1d29825 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -27,40 +27,43 @@ cannot reproduce it. Thanks, Jan ---- ./gdb/dwarf2loc.c 2016-08-29 04:01:25.000000000 +0200 -+++ ./gdb/dwarf2loc.c 2016-09-01 11:00:20.258909494 +0200 -@@ -2289,6 +2289,15 @@ const struct dwarf_expr_context_funcs dw - dwarf_expr_get_obj_addr - }; +Index: gdb-7.12.50.20170207/gdb/dwarf2loc.c +=================================================================== +--- gdb-7.12.50.20170207.orig/gdb/dwarf2loc.c 2017-02-16 23:31:53.977893289 +0100 ++++ gdb-7.12.50.20170207/gdb/dwarf2loc.c 2017-02-16 23:37:44.625522081 +0100 +@@ -2285,6 +2285,12 @@ + ctx.per_cu = per_cu; + ctx.obj_address = 0; -+static void -+select_frame_cleanup (void *arg) -+{ -+ struct frame_info *frame = (struct frame_info *) arg; -+ -+ if (frame != NULL) -+ select_frame (frame); -+} -+ - /* Evaluate a location description, starting at DATA and with length - SIZE, to find the current location of variable of TYPE in the - context of FRAME. BYTE_OFFSET is applied after the contents are -@@ -2318,6 +2327,11 @@ dwarf2_evaluate_loc_desc_full (struct ty - - ctx = new_dwarf_expr_context (); - old_chain = make_cleanup_free_dwarf_expr_context (ctx); -+ -+ make_cleanup (select_frame_cleanup, deprecated_safe_get_selected_frame ()); ++struct frame_info *old_frame (deprecated_safe_get_selected_frame ()); ++TRY ++ { + if (frame != NULL) + select_frame (frame); + - value_chain = make_cleanup_value_free_to_mark (value_mark ()); + scoped_value_mark free_values; - ctx->gdbarch = get_objfile_arch (objfile); -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 + ctx.gdbarch = get_objfile_arch (objfile); +@@ -2471,6 +2477,15 @@ + + set_value_initialized (retval, ctx.initialized); + ++ } ++CATCH (ex, RETURN_MASK_ALL) ++ { ++ select_frame (old_frame); ++ throw_exception (ex); ++ } ++END_CATCH ++select_frame (old_frame); ++ + return retval; + } + +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-05-31 16:14:05.844545344 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2017-02-16 23:32:09.546010002 +0100 @@ -0,0 +1,24 @@ +! Copyright 2010 Free Software Foundation, Inc. +! @@ -86,10 +89,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f9 + real :: dummy + dummy = 1 +end subroutine bar -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-05-31 16:14:05.845545351 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2017-02-16 23:32:09.546010002 +0100 @@ -0,0 +1,39 @@ +# Copyright 2010 Free Software Foundation, Inc. + @@ -130,10 +133,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp +} + +gdb_test "bt" {foo \(string='hello'.*} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 +Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-05-31 16:14:05.845545351 +0200 ++++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2017-02-16 23:32:09.546010002 +0100 @@ -0,0 +1,36 @@ +! Copyright 2010 Free Software Foundation, Inc. +! diff --git a/gdb.spec b/gdb.spec index 095c934..df71949 100644 --- a/gdb.spec +++ b/gdb.spec @@ -18,15 +18,15 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20160801 +%global snapsrc 20170226 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20150822 %global tarname gdb-%{version} -Version: 7.12.1 +Version: 7.12.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: 47%{?dist} +Release: 1%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -274,7 +274,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch # Backported fixups post the source tarball. #Xdrop: Just backports. -Patch232: gdb-upstream.patch +#Patch232: gdb-upstream.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest+ppc @@ -345,10 +345,6 @@ Patch289: gdb-6.5-ia64-libunwind-leak-test.patch #=fedoratest Patch290: gdb-6.5-missed-trap-on-step-test.patch -# Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600). -#=fedoratest -Patch294: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch - # Test gcore memory and time requirements for large inferiors. #=fedoratest Patch296: gdb-6.5-gcore-buffer-limit-test.patch @@ -629,20 +625,10 @@ Patch1123: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). Patch1143: gdb-linux_perf-bundle.patch -# [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. -Patch1144: gdb-bison-old.patch - -# [testsuite] More testsuite fixes. -Patch1145: gdb-testsuite-casts.patch -Patch1146: gdb-testsuite-m-static.patch - # Fix TLS (such as 'errno') regression. Patch1149: gdb-tls-1of2.patch Patch1150: gdb-tls-2of2.patch -# [testsuite] Fix false FAIL for gdb.base/morestack.exp. -Patch1151: gdb-testsuite-morestack-gold.patch - # Fix gdb-headless /usr/bin/ executables (BZ 1390251). Patch1152: gdb-libexec-add-index.patch @@ -808,6 +794,9 @@ BuildRequires: valgrind%{bits_local} valgrind%{bits_other} %if 0%{!?rhel:1} || 0%{?rhel} > 6 BuildRequires: xz %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: rust +%endif %endif # 0%{?_with_testsuite:1} @@ -881,7 +870,7 @@ find -name "*.info*"|xargs rm -f # Match the Fedora's version info. %patch2 -p1 -%patch232 -p1 +#patch232 -p1 %patch349 -p1 %patch1058 -p1 %patch1132 -p1 @@ -927,7 +916,6 @@ find -name "*.info*"|xargs rm -f %patch287 -p1 %patch289 -p1 %patch290 -p1 -%patch294 -p1 %patch296 -p1 %patch298 -p1 %patch309 -p1 @@ -1016,12 +1004,8 @@ done %patch1118 -p1 %patch1123 -p1 %patch1143 -p1 -%patch1144 -p1 -%patch1145 -p1 -%patch1146 -p1 %patch1149 -p1 %patch1150 -p1 -%patch1151 -p1 %patch1152 -p1 %patch1153 -p1 %patch1155 -p1 @@ -1594,6 +1578,10 @@ then fi %changelog +* Mon Feb 27 2017 Jan Kratochvil - 7.12.50.20170226-1.fc26 +- Rebase to pre-7.13 FSF GDB trunk. +- Dropped gdb-6.7-bz426600-DW_TAG_interface_type-test.patch as GCJ is no more. + * Fri Feb 24 2017 Jan Kratochvil - 7.12.1-47.fc26 - New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). - [testsuite] Use more standard_output_file. diff --git a/sources b/sources index da0612e..72cf44a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-6.3.1-20170212.tar.xz) = 22ad4187d6bb9851ecf389c3ff4c68f33ccf5602d8f51bc337215c700d56c9073b3fb40ece3f58901315161f76a4fd1d6463c623650317ad96fd9e3f4aba7252 SHA512 (v1.5.tar.gz) = ea3e76291d5b077d5b42061898a1f70af6cbdbccb7d05c59904f322ca1c03f7596cac6a966b80b12d2c2d86212f17d6bde02b1daf92be62e49abcb234e2bacbd -SHA512 (gdb-7.12.1.tar.xz) = 0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8 +SHA512 (gdb-7.12.50.20170226.tar.xz) = cf1b55c011fc6dfee64c0d2e8facea6270c4b1e5966427bc8e2f36bc2515d5d51ea6a1a4e0a5300dfad40ff798d1763f7f9397f3d03fff5ab2f1cc88c4ead737