Rebase to FSF GDB 8.2.50.20190120 (8.3pre).

Fix 'gdb does crash randomly on loading symbols or setting a breakpoint'
  (RHBZ 1638798, Keith Seitz).
This commit is contained in:
Sergio Durigan Junior 2019-01-21 12:16:00 -05:00
parent 2111580a73
commit 31f5b96fb9
38 changed files with 294 additions and 281 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
/v2.0.tar.gz /v2.0.tar.gz
/gdb-8.2.50.20181220.tar.xz /gdb-8.2.50.20190120.tar.xz

View File

@ -1 +1 @@
f0f13ece4ce4ae5745cbf987c187306f755736b8 3e80dafbfee64a4a9cdec17d60a3e18cf1fef28f

View File

@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff --git a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in --- a/gdb/Makefile.in
+++ b/gdb/Makefile.in +++ b/gdb/Makefile.in
@@ -1740,7 +1740,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force @@ -1749,7 +1749,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
install: all install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only @$(MAKE) $(FLAGS_TO_PASS) install-only
@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \ echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1789,7 +1789,25 @@ install-guile: @@ -1798,7 +1798,25 @@ install-guile:
install-python: install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \ echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1812,6 +1830,18 @@ uninstall: force $(CONFIG_UNINSTALL) @@ -1821,6 +1839,18 @@ uninstall: force $(CONFIG_UNINSTALL)
fi fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do

View File

@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/printcmd.c b/gdb/printcmd.c
--- a/gdb/printcmd.c --- a/gdb/printcmd.c
+++ b/gdb/printcmd.c +++ b/gdb/printcmd.c
@@ -1182,6 +1182,10 @@ print_command_1 (const char *exp, int voidprint) @@ -1184,6 +1184,10 @@ print_command_1 (const char *exp, int voidprint)
if (exp && *exp) if (exp && *exp)
{ {

View File

@ -11,7 +11,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
diff --git a/gdb/symtab.c b/gdb/symtab.c diff --git a/gdb/symtab.c b/gdb/symtab.c
--- a/gdb/symtab.c --- a/gdb/symtab.c
+++ b/gdb/symtab.c +++ b/gdb/symtab.c
@@ -3167,6 +3167,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) @@ -3161,6 +3161,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
SYMBOL_LINKAGE_NAME (msymbol)); */ SYMBOL_LINKAGE_NAME (msymbol)); */
; ;
/* fall through */ /* fall through */

View File

@ -12,7 +12,7 @@ diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.ba
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp +++ b/gdb/testsuite/gdb.base/readline-overflow.exp
@@ -0,0 +1,126 @@ @@ -0,0 +1,104 @@
+# Copyright 2006 Free Software Foundation, Inc. +# Copyright 2006 Free Software Foundation, Inc.
+ +
+# This program is free software; you can redistribute it and/or modify +# This program is free software; you can redistribute it and/or modify
@ -44,98 +44,76 @@ new file mode 100644
+ strace $tracelevel + strace $tracelevel
+} +}
+ +
+# Don't let a .inputrc file or an existing setting of INPUTRC mess up
+# the test results. Even if /dev/null doesn't exist on the particular
+# platform, the readline library will use the default setting just by
+# failing to open the file. OTOH, opening /dev/null successfully will
+# also result in the default settings being used since nothing will be
+# read from this file.
+global env +global env
+if [info exists env(INPUTRC)] {
+ set old_inputrc $env(INPUTRC)
+}
+set env(INPUTRC) "/dev/null"
+ +
+set oldtimeout1 $timeout +save_vars { env(INPUTRC) env(GDBHISTFILE) env(HISTSIZE) TERM timeout } {
+set timeout 600 + # The arrow key test relies on the standard VT100 bindings, so
+ # make sure that an appropriate terminal is selected. The same
+ # bug doesn't show up if we use ^P / ^N instead.
+ setenv TERM vt100
+ +
+if [info exists env(GDBHISTFILE)] { + # Don't let a .inputrc file or an existing setting of INPUTRC mess up
+ set old_gdbhistfile $env(GDBHISTFILE) + # the test results. Even if /dev/null doesn't exist on the particular
+} + # platform, the readline library will use the default setting just by
+if [info exists env(HISTSIZE)] { + # failing to open the file. OTOH, opening /dev/null successfully will
+ set old_histsize $env(HISTSIZE) + # also result in the default settings being used since nothing will be
+} + # read from this file.
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history" + set env(INPUTRC) "/dev/null"
+set env(HISTSIZE) "10"
+ +
+gdb_exit + set timeout 600
+gdb_start +
+gdb_reinitialize_dir $srcdir/$subdir + set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+ set env(HISTSIZE) "10"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ +
+ +
+set width 11 + set width 11
+gdb_test "set width $width" \ + gdb_test "set width $width" \
+ "" \ + "" \
+ "Setting width to $width." + "Setting width to $width."
+#gdb_test "set height 1" \ + #gdb_test "set height 1" \
+# "" \ + # "" \
+# "Setting height to 1." + # "Setting height to 1."
+send_gdb "run X" + send_gdb "run X"
+set i 0 + set i 0
+# It crashes using `set width 7' on `set total 3560'. + # It crashes using `set width 7' on `set total 3560'.
+# Sometimes it corrupts screen on `set width 7'. + # Sometimes it corrupts screen on `set width 7'.
+# Bugreport used `set total 130001': + # Bugreport used `set total 130001':
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196 + # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
+# Check also `timeout' above. + # Check also `timeout' above.
+set total 4200 + set total 4200
+gdb_expect { + gdb_expect {
+ -re X { + -re X {
+ incr i + incr i
+ if {$i <= $total} { + if {$i <= $total} {
+ send_gdb "X" + send_gdb "X"
+ exp_continue + exp_continue
+ } + }
+ } + }
+ -re "\[ \b\r\n\]" { + -re "\[ \b\r\n\]" {
+ exp_continue + exp_continue
+ } + }
+ eof { + eof {
+ fail "gdb sending total $total characters" + fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: EOF" + note "Failed after sending $i characters, reason: EOF"
+ gdb_clear_suppressed + gdb_clear_suppressed
+ } + }
+ timeout { + timeout {
+ fail "gdb sending total $total characters" + fail "gdb sending total $total characters"
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT" + note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
+ gdb_clear_suppressed + gdb_clear_suppressed
+ } + }
+ default { + default {
+ fail "gdb sending total $total characters" + fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]" + note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
+ gdb_clear_suppressed + gdb_clear_suppressed
+ } + }
+ }
+ send_gdb "\r"
+ gdb_test "" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+} +}
+send_gdb "\r"
+gdb_test "" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+
+
+# Restore globals modified in this test...
+if [info exists old_inputrc] {
+ set env(INPUTRC) $old_inputrc
+} else {
+ unset env(INPUTRC)
+}
+if [info exists old_gdbhistfile] {
+ set env(GDBHISTFILE) $old_gdbhistfile
+} else {
+ unset env(GDBHISTFILE)
+}
+if [info exists old_histsize] {
+ set env(HISTSIZE) $old_histsize
+} else {
+ unset env(HISTSIZE)
+}
+set timeout $oldtimeout1
+

View File

@ -155,7 +155,7 @@ diff --git a/gdb/main.c b/gdb/main.c
static void static void
captured_main_1 (struct captured_main_args *context) captured_main_1 (struct captured_main_args *context)
{ {
@@ -888,6 +917,8 @@ captured_main_1 (struct captured_main_args *context) @@ -887,6 +916,8 @@ captured_main_1 (struct captured_main_args *context)
{ {
symarg = argv[optind]; symarg = argv[optind];
execarg = argv[optind]; execarg = argv[optind];
@ -164,7 +164,7 @@ diff --git a/gdb/main.c b/gdb/main.c
optind++; optind++;
} }
@@ -1038,12 +1069,25 @@ captured_main_1 (struct captured_main_args *context) @@ -1037,12 +1068,25 @@ captured_main_1 (struct captured_main_args *context)
&& symarg != NULL && symarg != NULL
&& strcmp (execarg, symarg) == 0) && strcmp (execarg, symarg) == 0)
{ {

View File

@ -28,18 +28,14 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c --- a/gdb/build-id.c
+++ b/gdb/build-id.c +++ b/gdb/build-id.c
@@ -578,7 +578,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, @@ -590,6 +590,7 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
do_cleanups (inner); if (separate_debug_file_debug)
printf_unfiltered (_(" no, unable to open.\n"));
if (abfd == NULL) + filename.reset (nullptr);
- continue; continue;
+ { }
+ filename = NULL;
+ continue;
+ }
if (build_id_verify (abfd.get(), build_id_len, build_id))
break;
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null

View File

@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c --- a/gdb/build-id.c
+++ b/gdb/build-id.c +++ b/gdb/build-id.c
@@ -649,6 +649,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) @@ -672,6 +672,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif

View File

@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585
diff --git a/gdb/build-id.c b/gdb/build-id.c diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c --- a/gdb/build-id.c
+++ b/gdb/build-id.c +++ b/gdb/build-id.c
@@ -686,7 +686,11 @@ static int missing_rpm_list_entries; @@ -707,7 +707,11 @@ static int missing_rpm_list_entries;
/* Returns the count of newly added rpms. */ /* Returns the count of newly added rpms. */
static int static int
@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
{ {
static int rpm_init_done = 0; static int rpm_init_done = 0;
rpmts ts; rpmts ts;
@@ -793,7 +797,11 @@ missing_rpm_enlist (const char *filename) @@ -814,7 +818,11 @@ missing_rpm_enlist (const char *filename)
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
if (mi != NULL) if (mi != NULL)
{ {
@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
{ {
Header h; Header h;
char *debuginfo, **slot, *s, *s2; char *debuginfo, **slot, *s, *s2;
@@ -911,6 +919,37 @@ missing_rpm_enlist (const char *filename) @@ -932,6 +940,37 @@ missing_rpm_enlist (const char *filename)
xfree (debuginfo); xfree (debuginfo);
count++; count++;
} }
@ -74,7 +74,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
rpmdbFreeIterator_p (mi); rpmdbFreeIterator_p (mi);
} }
@@ -921,6 +960,21 @@ missing_rpm_enlist (const char *filename) @@ -942,6 +981,21 @@ missing_rpm_enlist (const char *filename)
} }
static int static int
@ -99,7 +99,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -3469,6 +3469,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, @@ -3501,6 +3501,16 @@ read_gdb_index_from_buffer (struct objfile *objfile,
"set use-deprecated-index-sections on". */ "set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok) if (version < 6 && !deprecated_ok)
{ {
@ -116,7 +116,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
static int warning_printed = 0; static int warning_printed = 0;
if (!warning_printed) if (!warning_printed)
{ {
@@ -3480,6 +3490,10 @@ to use the section anyway."), @@ -3512,6 +3522,10 @@ to use the section anyway."),
warning_printed = 1; warning_printed = 1;
} }
return 0; return 0;

View File

@ -244,7 +244,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
#define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1 #define BUILD_ID_VERBOSE_FILENAMES 1
@@ -637,8 +639,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) @@ -660,8 +662,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
return result; return result;
} }
@ -612,7 +612,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
avoidance. */ avoidance. */
struct missing_filepair struct missing_filepair
@@ -692,11 +1052,17 @@ missing_filepair_change (void) @@ -715,11 +1075,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */ /* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL; missing_filepair_hash = NULL;
} }
@ -630,7 +630,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
missing_filepair_change (); missing_filepair_change ();
} }
@@ -763,14 +1129,39 @@ debug_print_missing (const char *binary, const char *debug) @@ -786,14 +1152,39 @@ debug_print_missing (const char *binary, const char *debug)
*slot = missing_filepair; *slot = missing_filepair;
@ -703,7 +703,7 @@ diff --git a/gdb/config.in b/gdb/config.in
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -749,6 +749,11 @@ CODESIGN_CERT @@ -751,6 +751,11 @@ CODESIGN_CERT
HAVE_NATIVE_GCORE_TARGET HAVE_NATIVE_GCORE_TARGET
TARGET_OBS TARGET_OBS
subdirs subdirs
@ -715,7 +715,7 @@ diff --git a/gdb/configure b/gdb/configure
GDB_DATADIR GDB_DATADIR
DEBUGDIR DEBUGDIR
MAKEINFO_EXTRA_FLAGS MAKEINFO_EXTRA_FLAGS
@@ -853,6 +858,7 @@ with_gdb_datadir @@ -855,6 +860,7 @@ with_gdb_datadir
with_relocated_sources with_relocated_sources
with_auto_load_dir with_auto_load_dir
with_auto_load_safe_path with_auto_load_safe_path
@ -723,7 +723,7 @@ diff --git a/gdb/configure b/gdb/configure
enable_targets enable_targets
enable_64_bit_bfd enable_64_bit_bfd
enable_gdbmi enable_gdbmi
@@ -912,6 +918,11 @@ CCC @@ -914,6 +920,11 @@ CCC
CPP CPP
MAKEINFO MAKEINFO
MAKEINFOFLAGS MAKEINFOFLAGS
@ -735,7 +735,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC YACC
YFLAGS YFLAGS
XMKMF' XMKMF'
@@ -1583,6 +1594,8 @@ Optional Packages: @@ -1585,6 +1596,8 @@ Optional Packages:
[--with-auto-load-dir] [--with-auto-load-dir]
--without-auto-load-safe-path --without-auto-load-safe-path
do not restrict auto-loaded files locations do not restrict auto-loaded files locations
@ -744,7 +744,7 @@ diff --git a/gdb/configure b/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap --with-curses use the curses library instead of the termcap
library library
@@ -1640,6 +1653,13 @@ Some influential environment variables: @@ -1642,6 +1655,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS MAKEINFOFLAGS
Parameters for MAKEINFO. Parameters for MAKEINFO.
@ -758,7 +758,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC The `Yet Another Compiler Compiler' implementation to use. YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc', Defaults to the first program found out of: `bison -y', `byacc',
`yacc'. `yacc'.
@@ -6621,6 +6641,494 @@ _ACEOF @@ -6623,6 +6643,494 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; } $as_echo "$with_auto_load_safe_path" >&6; }
@ -1488,7 +1488,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
/* Do not call the python hook on an explicit prompt change as /* Do not call the python hook on an explicit prompt change as
passed to this function, as this forms a secondary/local prompt, passed to this function, as this forms a secondary/local prompt,
IE, displayed but not set. */ IE, displayed but not set. */
@@ -774,7 +777,10 @@ command_line_handler (char *rl) @@ -772,7 +775,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
command_handler (cmd); command_handler (cmd);
if (ui->prompt_state != PROMPTED) if (ui->prompt_state != PROMPTED)

View File

@ -485,15 +485,14 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
gdb_bfd_ref_ptr abfd; gdb_bfd_ref_ptr abfd;
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
@@ -82,63 +516,296 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) @@ -82,86 +516,319 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
{ {
const gdb_byte *data = build_id; const gdb_byte *data = build_id;
size_t size = build_id_len; size_t size = build_id_len;
+ char *filename = NULL;
+ struct cleanup *inner;
+ unsigned seqno; + unsigned seqno;
+ struct stat statbuf_trash; + struct stat statbuf_trash;
+ std::string link0; + std::string link0;
+ gdb::unique_xmalloc_ptr<char> filename;
- std::string link = debugdir.get (); - std::string link = debugdir.get ();
+ link = debugdir.get (); + link = debugdir.get ();
@ -514,7 +513,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
- link += ".debug"; - link += ".debug";
- -
if (separate_debug_file_debug) if (separate_debug_file_debug)
printf_unfiltered (_(" Trying %s\n"), link.c_str ()); {
printf_unfiltered (_(" Trying %s..."), link.c_str ());
gdb_flush (gdb_stdout);
}
- /* lrealpath() is expensive even for the usually non-existent files. */ - /* lrealpath() is expensive even for the usually non-existent files. */
- gdb::unique_xmalloc_ptr<char> filename; - gdb::unique_xmalloc_ptr<char> filename;
@ -522,9 +524,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
- filename.reset (lrealpath (link.c_str ())); - filename.reset (lrealpath (link.c_str ()));
- -
- if (filename == NULL) - if (filename == NULL)
- continue;
+ for (seqno = 0;; seqno++) + for (seqno = 0;; seqno++)
+ { {
- if (separate_debug_file_debug)
- printf_unfiltered (_(" no, unable to compute real path\n"));
+ if (seqno) + if (seqno)
+ { + {
+ /* There can be multiple build-id symlinks pointing to real files + /* There can be multiple build-id symlinks pointing to real files
@ -551,64 +554,95 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ break; + break;
+ } + }
+ +
+ filename = lrealpath (link.c_str ()); + /* lrealpath() is expensive even for the usually non-existent files. */
+ if (access (link.c_str (), F_OK) == 0)
+ filename.reset (lrealpath (link.c_str ()));
+
+ if (filename == NULL) + if (filename == NULL)
+ continue; + {
+ if (separate_debug_file_debug)
+ printf_unfiltered (_(" no, unable to compute real path\n"));
+
+ continue;
+ }
+ +
+ /* We expect to be silent on the non-existing files. */ + /* We expect to be silent on the non-existing files. */
+ inner = make_cleanup (xfree, filename); + abfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+ abfd = gdb_bfd_open (filename, gnutarget, -1);
+ do_cleanups (inner);
+ +
+ if (abfd == NULL) + if (abfd == NULL)
+ continue; + {
+ if (separate_debug_file_debug)
+ printf_unfiltered (_(" no, unable to open.\n"));
+
+ continue;
+ }
+ +
+ if (build_id_verify (abfd.get(), build_id_len, build_id)) + if (build_id_verify (abfd.get(), build_id_len, build_id))
+ break; + {
+ if (separate_debug_file_debug)
+ printf_unfiltered (_(" yes!\n"));
+
+ break;
+ }
+ else
+ {
+ if (separate_debug_file_debug)
+ printf_unfiltered (_(" no, build-id does not match.\n"));
+ }
+ +
+ abfd.release (); + abfd.release ();
+ +
+ filename = NULL; + filename.reset (nullptr);
+ } + }
- /* We expect to be silent on the non-existing files. */ - continue;
- abfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+ if (filename != NULL) + if (filename != NULL)
+ { + {
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */ + /* LINK_ALL is not used below in this non-NULL FILENAME case. */
+ break; + break;
+ } }
- if (abfd == NULL) - /* We expect to be silent on the non-existing files. */
- continue; - abfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+ /* If the symlink has target request to install the target. + /* If the symlink has target request to install the target.
+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. + BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ + https://bugzilla.redhat.com/show_bug.cgi?id=981154 */
+ std::string link0_resolved (link_resolve (link0.c_str (), 0)); + std::string link0_resolved (link_resolve (link0.c_str (), 0));
- if (build_id_verify (abfd.get(), build_id_len, build_id)) - if (abfd == NULL)
- break;
+ if (link_all.empty ()) + if (link_all.empty ())
+ link_all = link0_resolved; + link_all = link0_resolved;
+ else + else
+ { {
- if (separate_debug_file_debug)
- printf_unfiltered (_(" no, unable to open.\n"));
-
- continue;
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with + /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
+ its possible use as an argument for installation command. */ + its possible use as an argument for installation command. */
+ link_all += " " + link0_resolved; + link_all += " " + link0_resolved;
+ } }
+ } + }
- abfd.release (); - if (build_id_verify (abfd.get(), build_id_len, build_id))
+ if (link_return != NULL) + if (link_return != NULL)
+ { + {
+ if (abfd != NULL) + if (abfd != NULL)
+ { {
- if (separate_debug_file_debug)
- printf_unfiltered (_(" yes!\n"));
-
- break;
+ *link_return = xstrdup (link.c_str ()); + *link_return = xstrdup (link.c_str ());
+ } }
+ else else
+ { {
- if (separate_debug_file_debug)
- printf_unfiltered (_(" no, build-id does not match.\n"));
+ *link_return = xstrdup (link_all.c_str ()); + *link_return = xstrdup (link_all.c_str ());
+ } }
-
- abfd.release ();
} }
return abfd; return abfd;
@ -804,7 +838,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
/* Prevent looping on a stripped .debug file. */ /* Prevent looping on a stripped .debug file. */
if (abfd != NULL if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd.get ()), && filename_cmp (bfd_get_filename (abfd.get ()),
@@ -151,3 +818,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) @@ -174,3 +841,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
return std::string (); return std::string ();
} }
@ -868,7 +902,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
diff --git a/gdb/coffread.c b/gdb/coffread.c diff --git a/gdb/coffread.c b/gdb/coffread.c
--- a/gdb/coffread.c --- a/gdb/coffread.c
+++ b/gdb/coffread.c +++ b/gdb/coffread.c
@@ -734,7 +734,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) @@ -732,7 +732,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
/* Try to add separate debug file if no symbols table found. */ /* Try to add separate debug file if no symbols table found. */
if (!objfile_has_partial_symbols (objfile)) if (!objfile_has_partial_symbols (objfile))
{ {
@ -977,7 +1011,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
--- a/gdb/doc/gdb.texinfo --- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo
@@ -19966,6 +19966,27 @@ information files. @@ -19945,6 +19945,27 @@ information files.
@end table @end table
@ -1020,7 +1054,7 @@ diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -2695,7 +2695,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) @@ -2727,7 +2727,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
} }
if (dwz_bfd == NULL) if (dwz_bfd == NULL)
@ -1029,7 +1063,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
if (dwz_bfd == NULL) if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"), error (_("could not find '.gnu_debugaltlink' file for %s"),
@@ -6205,7 +6205,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) @@ -6237,7 +6237,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
static gdb::array_view<const gdb_byte> static gdb::array_view<const gdb_byte>
get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
{ {
@ -1038,7 +1072,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
if (build_id == nullptr) if (build_id == nullptr)
return {}; return {};
@@ -6218,7 +6218,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) @@ -6250,7 +6250,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
static gdb::array_view<const gdb_byte> static gdb::array_view<const gdb_byte>
get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
{ {
@ -1050,7 +1084,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
diff --git a/gdb/elfread.c b/gdb/elfread.c diff --git a/gdb/elfread.c b/gdb/elfread.c
--- a/gdb/elfread.c --- a/gdb/elfread.c
+++ b/gdb/elfread.c +++ b/gdb/elfread.c
@@ -1289,7 +1289,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) @@ -1287,7 +1287,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
&& objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL) && objfile->separate_debug_objfile_backlink == NULL)
{ {
@ -1061,7 +1095,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
if (debugfile.empty ()) if (debugfile.empty ())
debugfile = find_separate_debug_file_by_debuglink (objfile); debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1301,6 +1303,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) @@ -1299,6 +1301,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
symbol_file_add_separate (debug_bfd.get (), debugfile.c_str (), symbol_file_add_separate (debug_bfd.get (), debugfile.c_str (),
symfile_flags, objfile); symfile_flags, objfile);
} }
@ -1075,7 +1109,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
diff --git a/gdb/objfiles.h b/gdb/objfiles.h diff --git a/gdb/objfiles.h b/gdb/objfiles.h
--- a/gdb/objfiles.h --- a/gdb/objfiles.h
+++ b/gdb/objfiles.h +++ b/gdb/objfiles.h
@@ -470,6 +470,10 @@ struct objfile @@ -554,6 +554,10 @@ struct objfile
htab_t static_links {}; htab_t static_links {};
}; };
@ -1098,7 +1132,7 @@ diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
} }
CATCH (except, RETURN_MASK_ALL) CATCH (except, RETURN_MASK_ALL)
{ {
@@ -550,7 +550,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id) @@ -536,7 +536,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
/* Don't return separate debug files. */ /* Don't return separate debug files. */
if (objfile->separate_debug_objfile_backlink != NULL) if (objfile->separate_debug_objfile_backlink != NULL)
continue; continue;

View File

@ -9,7 +9,7 @@ Subject: gdb-6.6-scheduler_locking-step-is-default.patch
diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/infrun.c b/gdb/infrun.c
--- a/gdb/infrun.c --- a/gdb/infrun.c
+++ b/gdb/infrun.c +++ b/gdb/infrun.c
@@ -2177,7 +2177,7 @@ static const char *const scheduler_enums[] = { @@ -2075,7 +2075,7 @@ static const char *const scheduler_enums[] = {
schedlock_replay, schedlock_replay,
NULL NULL
}; };

View File

@ -45,7 +45,7 @@ diff --git a/gdb/extension.c b/gdb/extension.c
diff --git a/gdb/top.c b/gdb/top.c diff --git a/gdb/top.c b/gdb/top.c
--- a/gdb/top.c --- a/gdb/top.c
+++ b/gdb/top.c +++ b/gdb/top.c
@@ -1606,7 +1606,13 @@ quit_force (int *exit_arg, int from_tty) @@ -1617,7 +1617,13 @@ quit_force (int *exit_arg, int from_tty)
qt.from_tty = from_tty; qt.from_tty = from_tty;
@ -62,7 +62,7 @@ diff --git a/gdb/top.c b/gdb/top.c
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/gdb/utils.c +++ b/gdb/utils.c
@@ -98,6 +98,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time; @@ -99,6 +99,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
static int debug_timestamp = 0; static int debug_timestamp = 0;

View File

@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons-keep-disabled.patch
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c +++ b/gdb/breakpoint.c
@@ -15500,6 +15500,50 @@ static struct cmd_list_element *enablebreaklist = NULL; @@ -15505,6 +15505,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
cmd_list_element *commands_cmd_element = nullptr; cmd_list_element *commands_cmd_element = nullptr;
@ -75,7 +75,7 @@ diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
diff --git a/gdb/objfiles.c b/gdb/objfiles.c diff --git a/gdb/objfiles.c b/gdb/objfiles.c
--- a/gdb/objfiles.c --- a/gdb/objfiles.c
+++ b/gdb/objfiles.c +++ b/gdb/objfiles.c
@@ -878,6 +878,11 @@ objfile_relocate1 (struct objfile *objfile, @@ -875,6 +875,11 @@ objfile_relocate1 (struct objfile *objfile,
obj_section_addr (s)); obj_section_addr (s));
} }

View File

@ -17,7 +17,7 @@ tromey/python
diff --git a/gdb/Makefile.in b/gdb/Makefile.in diff --git a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in --- a/gdb/Makefile.in
+++ b/gdb/Makefile.in +++ b/gdb/Makefile.in
@@ -2100,6 +2100,12 @@ stamp-h: $(srcdir)/config.in config.status @@ -2082,6 +2082,12 @@ stamp-h: $(srcdir)/config.in config.status
CONFIG_LINKS= \ CONFIG_LINKS= \
$(SHELL) config.status $(SHELL) config.status
@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c
{ {
int argc = context->argc; int argc = context->argc;
char **argv = context->argv; char **argv = context->argv;
@@ -698,10 +699,14 @@ captured_main_1 (struct captured_main_args *context) @@ -697,10 +698,14 @@ captured_main_1 (struct captured_main_args *context)
{"args", no_argument, &set_args, 1}, {"args", no_argument, &set_args, 1},
{"l", required_argument, 0, 'l'}, {"l", required_argument, 0, 'l'},
{"return-child-result", no_argument, &return_child_result, 1}, {"return-child-result", no_argument, &return_child_result, 1},
@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c
{ {
int option_index; int option_index;
@@ -719,6 +724,9 @@ captured_main_1 (struct captured_main_args *context) @@ -718,6 +723,9 @@ captured_main_1 (struct captured_main_args *context)
case 0: case 0:
/* Long option that just sets a flag. */ /* Long option that just sets a flag. */
break; break;
@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c
case OPT_SE: case OPT_SE:
symarg = optarg; symarg = optarg;
execarg = optarg; execarg = optarg;
@@ -893,7 +901,31 @@ captured_main_1 (struct captured_main_args *context) @@ -892,7 +900,31 @@ captured_main_1 (struct captured_main_args *context)
/* Now that gdb_init has created the initial inferior, we're in /* Now that gdb_init has created the initial inferior, we're in
position to set args for that inferior. */ position to set args for that inferior. */
@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c
{ {
/* The remaining options are the command-line options for the /* The remaining options are the command-line options for the
inferior. The first one is the sym/exec file, and the rest inferior. The first one is the sym/exec file, and the rest
@@ -1194,7 +1226,8 @@ captured_main_1 (struct captured_main_args *context) @@ -1193,7 +1225,8 @@ captured_main_1 (struct captured_main_args *context)
/* Read in the old history after all the command files have been /* Read in the old history after all the command files have been
read. */ read. */
@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c
if (batch_flag) if (batch_flag)
{ {
@@ -1210,24 +1243,37 @@ static void @@ -1209,24 +1242,37 @@ static void
captured_main (void *data) captured_main (void *data)
{ {
struct captured_main_args *context = (struct captured_main_args *) data; struct captured_main_args *context = (struct captured_main_args *) data;
@ -241,7 +241,7 @@ diff --git a/gdb/main.c b/gdb/main.c
} }
/* No exit -- exit is through quit_command. */ /* No exit -- exit is through quit_command. */
} }
@@ -1270,6 +1316,12 @@ print_gdb_help (struct ui_file *stream) @@ -1269,6 +1315,12 @@ print_gdb_help (struct ui_file *stream)
fputs_unfiltered (_("\ fputs_unfiltered (_("\
This is the GNU debugger. Usage:\n\n\ This is the GNU debugger. Usage:\n\n\
gdb [options] [executable-file [core-file or process-id]]\n\ gdb [options] [executable-file [core-file or process-id]]\n\
@ -254,7 +254,7 @@ diff --git a/gdb/main.c b/gdb/main.c
gdb [options] --args executable-file [inferior-arguments ...]\n\n\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\
"), stream); "), stream);
fputs_unfiltered (_("\ fputs_unfiltered (_("\
@@ -1315,6 +1367,13 @@ Output and user interface control:\n\n\ @@ -1314,6 +1366,13 @@ Output and user interface control:\n\n\
#endif #endif
fputs_unfiltered (_("\ fputs_unfiltered (_("\
--dbx DBX compatibility mode.\n\ --dbx DBX compatibility mode.\n\
@ -365,7 +365,7 @@ new file mode 100644
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
--- a/gdb/python/python-internal.h --- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h
@@ -629,6 +629,9 @@ class gdbpy_enter_varobj : public gdbpy_enter @@ -686,6 +686,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
}; };
@ -417,7 +417,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
/* Set the quit flag. */ /* Set the quit flag. */
static void static void
@@ -1312,6 +1337,92 @@ gdbpy_print_stack (void) @@ -1313,6 +1338,92 @@ gdbpy_print_stack_or_quit ()
@ -510,7 +510,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
/* Return a sequence holding all the Progspaces. */ /* Return a sequence holding all the Progspaces. */
static PyObject * static PyObject *
@@ -1966,6 +2077,8 @@ PyMethodDef python_GdbMethods[] = @@ -1967,6 +2078,8 @@ PyMethodDef python_GdbMethods[] =
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
a Python String containing the output of the command if to_string is\n\ a Python String containing the output of the command if to_string is\n\
set to True." }, set to True." },

View File

@ -68,7 +68,7 @@ diff --git a/gdb/config.in b/gdb/config.in
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -15844,6 +15844,64 @@ cat >>confdefs.h <<_ACEOF @@ -15874,6 +15874,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
@ -136,7 +136,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -2009,6 +2009,10 @@ case $host_os in @@ -2032,6 +2032,10 @@ case $host_os in
esac esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -276,7 +276,7 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
--- a/gdb/linux-nat.c --- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c +++ b/gdb/linux-nat.c
@@ -1092,7 +1092,17 @@ linux_nat_target::create_inferior (const char *exec_file, @@ -1097,7 +1097,17 @@ linux_nat_target::create_inferior (const char *exec_file,
/* Make sure we report all signals during startup. */ /* Make sure we report all signals during startup. */
pass_signals (0, NULL); pass_signals (0, NULL);

View File

@ -14,7 +14,7 @@ printed, but a default backtrace will occur in this case.
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
--- a/gdb/python/py-framefilter.c --- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c
@@ -1154,6 +1154,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, @@ -1140,6 +1140,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
htab_eq_pointer, htab_eq_pointer,
NULL)); NULL));
@ -22,22 +22,22 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
while (true) while (true)
{ {
gdbpy_ref<> item (PyIter_Next (iterable.get ())); gdbpy_ref<> item (PyIter_Next (iterable.get ()));
@@ -1162,8 +1163,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, @@ -1148,8 +1149,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
{ {
if (PyErr_Occurred ()) if (PyErr_Occurred ())
{ {
- throw_quit_or_print_exception (); - gdbpy_print_stack_or_quit ();
- return EXT_LANG_BT_ERROR; - return EXT_LANG_BT_ERROR;
+ gdbpy_print_stack (); + gdbpy_print_stack ();
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS; + return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
} }
break; break;
} }
@@ -1196,7 +1197,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, @@ -1182,7 +1183,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
/* Do not exit on error printing a single frame. Print the /* Do not exit on error printing a single frame. Print the
error and continue with other frames. */ error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR) if (success == EXT_LANG_BT_ERROR)
- throw_quit_or_print_exception (); - gdbpy_print_stack_or_quit ();
+ gdbpy_print_stack (); + gdbpy_print_stack ();
+ count_printed++; + count_printed++;
} }

View File

@ -80,7 +80,7 @@ gdb/testsuite/ChangeLog
diff --git a/gdb/main.c b/gdb/main.c diff --git a/gdb/main.c b/gdb/main.c
--- a/gdb/main.c --- a/gdb/main.c
+++ b/gdb/main.c +++ b/gdb/main.c
@@ -1124,7 +1124,10 @@ captured_main_1 (struct captured_main_args *context) @@ -1123,7 +1123,10 @@ captured_main_1 (struct captured_main_args *context)
{ {
ret = catch_command_errors (attach_command, pid_or_core_arg, ret = catch_command_errors (attach_command, pid_or_core_arg,
!batch_flag); !batch_flag);

View File

@ -30,7 +30,7 @@ debugging problem of GOMP outside of the scope of this Bug.
diff --git a/gdb/infrun.c b/gdb/infrun.c diff --git a/gdb/infrun.c b/gdb/infrun.c
--- a/gdb/infrun.c --- a/gdb/infrun.c
+++ b/gdb/infrun.c +++ b/gdb/infrun.c
@@ -6637,6 +6637,16 @@ process_event_stop_test (struct execution_control_state *ecs) @@ -6535,6 +6535,16 @@ process_event_stop_test (struct execution_control_state *ecs)
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{ {
@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
/* We're doing a "next". /* We're doing a "next".
Normal (forward) execution: set a breakpoint at the Normal (forward) execution: set a breakpoint at the
@@ -6670,6 +6680,7 @@ process_event_stop_test (struct execution_control_state *ecs) @@ -6568,6 +6578,7 @@ process_event_stop_test (struct execution_control_state *ecs)
keep_going (ecs); keep_going (ecs);
return; return;

View File

@ -10,7 +10,7 @@ Subject: gdb-bz541866-rwatch-before-run.patch
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c +++ b/gdb/breakpoint.c
@@ -8779,7 +8779,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, @@ -8777,7 +8777,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
int enabled, int internal, unsigned flags, int enabled, int internal, unsigned flags,
int display_canonical) int display_canonical)
{ {
@ -19,7 +19,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
if (type == bp_hardware_breakpoint) if (type == bp_hardware_breakpoint)
{ {
@@ -14330,7 +14330,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, @@ -14335,7 +14335,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
if (bpt->type == bp_hardware_breakpoint) if (bpt->type == bp_hardware_breakpoint)
{ {
@ -97,26 +97,26 @@ new file mode 100644
diff --git a/gdb/configure.nat b/gdb/configure.nat diff --git a/gdb/configure.nat b/gdb/configure.nat
--- a/gdb/configure.nat --- a/gdb/configure.nat
+++ b/gdb/configure.nat +++ b/gdb/configure.nat
@@ -242,6 +242,7 @@ case ${gdb_host} in @@ -244,6 +244,7 @@ case ${gdb_host} in
;; ;;
i386) i386)
# Host: Intel 386 running GNU/Linux. # Host: Intel 386 running GNU/Linux.
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h" + NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h"
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
i386-linux-nat.o x86-linux-nat.o linux-btrace.o \ i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
x86-linux.o x86-linux-dregs.o" nat/x86-linux.o nat/x86-linux-dregs.o"
@@ -298,6 +299,7 @@ case ${gdb_host} in @@ -300,6 +301,7 @@ case ${gdb_host} in
case ${gdb_host_cpu} in case ${gdb_host_cpu} in
i386) i386)
# Host: GNU/Linux x86-64 # Host: GNU/Linux x86-64
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h" + NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h"
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \ amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o" nat/linux-btrace.o \
diff --git a/gdb/target.h b/gdb/target.h diff --git a/gdb/target.h b/gdb/target.h
--- a/gdb/target.h --- a/gdb/target.h
+++ b/gdb/target.h +++ b/gdb/target.h
@@ -1971,9 +1971,11 @@ extern struct thread_info *target_thread_handle_to_thread_info @@ -1972,9 +1972,11 @@ extern struct thread_info *target_thread_handle_to_thread_info
one. OTHERTYPE is the number of watchpoints of other types than one. OTHERTYPE is the number of watchpoints of other types than
this one used so far. */ this one used so far. */

View File

@ -53,7 +53,7 @@ gdb/
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/gdb/utils.c +++ b/gdb/utils.c
@@ -719,13 +719,11 @@ malloc_failure (long size) @@ -720,13 +720,11 @@ malloc_failure (long size)
{ {
if (size > 0) if (size > 0)
{ {

View File

@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch
diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/remote.c b/gdb/remote.c
--- a/gdb/remote.c --- a/gdb/remote.c
+++ b/gdb/remote.c +++ b/gdb/remote.c
@@ -13960,7 +13960,17 @@ remote_target::pid_to_exec_file (int pid) @@ -13967,7 +13967,17 @@ remote_target::pid_to_exec_file (int pid)
char *annex = NULL; char *annex = NULL;
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)

View File

@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -9413,6 +9413,7 @@ if test x"$prefer_curses" = xyes; then @@ -9415,6 +9415,7 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A # search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such # default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation. # a situation.
@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; } $as_echo_n "checking for library containing waddstr... " >&6; }
if ${ac_cv_search_waddstr+:} false; then : if ${ac_cv_search_waddstr+:} false; then :
@@ -9437,7 +9438,7 @@ return waddstr (); @@ -9439,7 +9440,7 @@ return waddstr ();
return 0; return 0;
} }
_ACEOF _ACEOF
@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
if test -z "$ac_lib"; then if test -z "$ac_lib"; then
ac_res="none required" ac_res="none required"
else else
@@ -9511,6 +9512,7 @@ case $host_os in @@ -9513,6 +9514,7 @@ case $host_os in
esac esac
# These are the libraries checked by Readline. # These are the libraries checked by Readline.
@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; } $as_echo_n "checking for library containing tgetent... " >&6; }
if ${ac_cv_search_tgetent+:} false; then : if ${ac_cv_search_tgetent+:} false; then :
@@ -9535,7 +9537,7 @@ return tgetent (); @@ -9537,7 +9539,7 @@ return tgetent ();
return 0; return 0;
} }
_ACEOF _ACEOF

View File

@ -42,7 +42,7 @@ gdb/
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -10587,6 +10587,13 @@ private: @@ -10588,6 +10588,13 @@ private:
static void static void
process_die (struct die_info *die, struct dwarf2_cu *cu) process_die (struct die_info *die, struct dwarf2_cu *cu)
{ {
@ -89,7 +89,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
static unsigned int debug_linux_nat; static unsigned int debug_linux_nat;
static void static void
show_debug_linux_nat (struct ui_file *file, int from_tty, show_debug_linux_nat (struct ui_file *file, int from_tty,
@@ -1030,6 +1036,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) @@ -1035,6 +1041,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled)
if (debug_linux_nat) if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n"); "LNPAW: Attaching to a stopped process\n");
@ -99,7 +99,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
/* The process is definitely stopped. It is in a job control /* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED / stop, unless the kernel predates the TASK_STOPPED /
@@ -1362,6 +1371,25 @@ get_detach_signal (struct lwp_info *lp) @@ -1367,6 +1376,25 @@ get_detach_signal (struct lwp_info *lp)
return gdb_signal_to_host (signo); return gdb_signal_to_host (signo);
} }
@ -125,7 +125,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
return 0; return 0;
} }
@@ -1510,6 +1538,10 @@ linux_nat_target::detach (inferior *inf, int from_tty) @@ -1515,6 +1543,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
detach_one_lwp (main_lwp, &signo); detach_one_lwp (main_lwp, &signo);
detach_success (inf); detach_success (inf);
@ -136,7 +136,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
} }
} }
@@ -1768,6 +1800,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo) @@ -1773,6 +1805,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
return; return;
} }
@ -153,7 +153,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
if (resume_many) if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, lp); iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
@@ -3756,6 +3798,10 @@ linux_nat_target::mourn_inferior () @@ -3761,6 +3803,10 @@ linux_nat_target::mourn_inferior ()
/* Let the arch-specific native code know this process is gone. */ /* Let the arch-specific native code know this process is gone. */
linux_target->low_forget_process (pid); linux_target->low_forget_process (pid);

View File

@ -9,7 +9,7 @@ Subject: gdb-jit-reader-multilib.patch
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -9700,10 +9700,12 @@ _ACEOF @@ -9702,10 +9702,12 @@ _ACEOF

View File

@ -9,7 +9,7 @@ Subject: gdb-linux_perf-bundle.patch
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -12083,7 +12083,7 @@ else @@ -12113,7 +12113,7 @@ else
#include <linux/perf_event.h> #include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5 #ifndef PERF_ATTR_SIZE_VER5
@ -21,7 +21,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -1458,7 +1458,7 @@ else @@ -1481,7 +1481,7 @@ else
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <linux/perf_event.h> #include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5 #ifndef PERF_ATTR_SIZE_VER5

View File

@ -14,7 +14,7 @@ Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c +++ b/gdb/breakpoint.c
@@ -11988,6 +11988,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) @@ -11986,6 +11986,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
traps we can no longer explain. */ traps we can no longer explain. */
old_loc->events_till_retirement = 3 * (thread_count () + 1); old_loc->events_till_retirement = 3 * (thread_count () + 1);

View File

@ -39,7 +39,7 @@ diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
diff --git a/gdb/python/python.c b/gdb/python/python.c diff --git a/gdb/python/python.c b/gdb/python/python.c
--- a/gdb/python/python.c --- a/gdb/python/python.c
+++ b/gdb/python/python.c +++ b/gdb/python/python.c
@@ -555,12 +555,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) @@ -545,12 +545,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
{ {
const char *arg; const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL; PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
@ -60,7 +60,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
return NULL; return NULL;
from_tty = 0; from_tty = 0;
@@ -581,6 +585,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) @@ -571,6 +575,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
to_string = cmp; to_string = cmp;
} }
@ -76,7 +76,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
std::string to_string_res; std::string to_string_res;
scoped_restore preventer = prevent_dont_repeat (); scoped_restore preventer = prevent_dont_repeat ();
@@ -603,6 +616,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) @@ -593,6 +606,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
counted_command_line lines = read_command_lines_1 (reader, 1, nullptr); counted_command_line lines = read_command_lines_1 (reader, 1, nullptr);
@ -90,7 +90,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c
{ {
scoped_restore save_async = make_scoped_restore (&current_ui->async, scoped_restore save_async = make_scoped_restore (&current_ui->async,
0); 0);
@@ -621,12 +641,24 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) @@ -611,12 +631,24 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
execute_control_commands (lines.get (), from_tty); execute_control_commands (lines.get (), from_tty);
} }

View File

@ -9,7 +9,7 @@ Subject: gdb-readline62-ask-more-rh.patch
diff --git a/gdb/event-top.c b/gdb/event-top.c diff --git a/gdb/event-top.c b/gdb/event-top.c
--- a/gdb/event-top.c --- a/gdb/event-top.c
+++ b/gdb/event-top.c +++ b/gdb/event-top.c
@@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing) @@ -1181,6 +1181,13 @@ gdb_setup_readline (int editing)
{ {
struct ui *ui = current_ui; struct ui *ui = current_ui;

View File

@ -683,7 +683,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
gdb_byte *buf = (gdb_byte *) alloca (len); gdb_byte *buf = (gdb_byte *) alloca (len);
CORE_ADDR addr; CORE_ADDR addr;
@@ -6637,7 +6638,7 @@ value_tag_from_contents_and_address (struct type *type, @@ -6642,7 +6643,7 @@ value_tag_from_contents_and_address (struct type *type,
const gdb_byte *valaddr, const gdb_byte *valaddr,
CORE_ADDR address) CORE_ADDR address)
{ {
@ -692,7 +692,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *tag_type; struct type *tag_type;
if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
@@ -7130,7 +7131,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) @@ -7135,7 +7136,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num)
only in that it can handle packed values of arbitrary type. */ only in that it can handle packed values of arbitrary type. */
static struct value * static struct value *
@ -701,7 +701,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *arg_type) struct type *arg_type)
{ {
struct type *type; struct type *type;
@@ -7142,7 +7143,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, @@ -7147,7 +7148,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0)
{ {
@ -710,7 +710,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
return ada_value_primitive_packed_val (arg1, value_contents (arg1), return ada_value_primitive_packed_val (arg1, value_contents (arg1),
@@ -7219,9 +7220,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, @@ -7224,9 +7225,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
Returns 1 if found, 0 otherwise. */ Returns 1 if found, 0 otherwise. */
static int static int
@ -722,7 +722,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
int *index_p) int *index_p)
{ {
int i; int i;
@@ -7240,8 +7241,8 @@ find_struct_field (const char *name, struct type *type, int offset, @@ -7245,8 +7246,8 @@ find_struct_field (const char *name, struct type *type, int offset,
for (i = 0; i < TYPE_NFIELDS (type); i += 1) for (i = 0; i < TYPE_NFIELDS (type); i += 1)
{ {
@ -733,7 +733,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
const char *t_field_name = TYPE_FIELD_NAME (type, i); const char *t_field_name = TYPE_FIELD_NAME (type, i);
if (t_field_name == NULL) if (t_field_name == NULL)
@@ -7343,7 +7344,7 @@ num_visible_fields (struct type *type) @@ -7348,7 +7349,7 @@ num_visible_fields (struct type *type)
long explanation in find_struct_field's function documentation. */ long explanation in find_struct_field's function documentation. */
static struct value * static struct value *
@ -742,7 +742,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *type) struct type *type)
{ {
int i; int i;
@@ -7391,7 +7392,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, @@ -7396,7 +7397,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset,
int j; int j;
struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type,
i)); i));
@ -751,7 +751,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
{ {
@@ -7423,8 +7424,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, @@ -7428,8 +7429,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset,
return NULL; return NULL;
} }
@ -762,7 +762,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
/* Return field #INDEX in ARG, where the index is that returned by /* Return field #INDEX in ARG, where the index is that returned by
@@ -7433,7 +7434,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, @@ -7438,7 +7439,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *,
* If found, return value, else return NULL. */ * If found, return value, else return NULL. */
static struct value * static struct value *
@ -771,7 +771,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *type) struct type *type)
{ {
return ada_index_struct_field_1 (&index, arg, offset, type); return ada_index_struct_field_1 (&index, arg, offset, type);
@@ -7445,7 +7446,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, @@ -7450,7 +7451,7 @@ ada_index_struct_field (int index, struct value *arg, int offset,
* *INDEX_P. */ * *INDEX_P. */
static struct value * static struct value *
@ -780,7 +780,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *type) struct type *type)
{ {
int i; int i;
@@ -7536,7 +7537,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) @@ -7541,7 +7542,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err)
v = ada_search_struct_field (name, arg, 0, t); v = ada_search_struct_field (name, arg, 0, t);
else else
{ {
@ -790,7 +790,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
struct type *field_type; struct type *field_type;
CORE_ADDR address; CORE_ADDR address;
@@ -7885,8 +7887,8 @@ ada_coerce_ref (struct value *val0) @@ -7890,8 +7892,8 @@ ada_coerce_ref (struct value *val0)
/* Return OFF rounded upward if necessary to a multiple of /* Return OFF rounded upward if necessary to a multiple of
ALIGNMENT (a power of 2). */ ALIGNMENT (a power of 2). */
@ -801,7 +801,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
{ {
return (off + alignment - 1) & ~(alignment - 1); return (off + alignment - 1) & ~(alignment - 1);
} }
@@ -8276,10 +8278,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, @@ -8281,10 +8283,9 @@ ada_template_to_fixed_record_type_1 (struct type *type,
struct value *mark = value_mark (); struct value *mark = value_mark ();
struct value *dval; struct value *dval;
struct type *rtype; struct type *rtype;
@ -814,7 +814,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
int f; int f;
/* Compute the number of fields in this record type that are going /* Compute the number of fields in this record type that are going
@@ -8356,7 +8357,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, @@ -8361,7 +8362,7 @@ ada_template_to_fixed_record_type_1 (struct type *type,
that follow this one. */ that follow this one. */
if (ada_is_aligner_type (field_type)) if (ada_is_aligner_type (field_type))
{ {
@ -823,7 +823,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
field_valaddr = cond_offset_host (field_valaddr, field_offset); field_valaddr = cond_offset_host (field_valaddr, field_offset);
field_address = cond_offset_target (field_address, field_offset); field_address = cond_offset_target (field_address, field_offset);
@@ -8492,11 +8493,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, @@ -8497,11 +8498,11 @@ ada_template_to_fixed_record_type_1 (struct type *type,
if (TYPE_LENGTH (type) <= 0) if (TYPE_LENGTH (type) <= 0)
{ {
if (TYPE_NAME (rtype)) if (TYPE_NAME (rtype))
@ -839,7 +839,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
} }
else else
{ {
@@ -8960,7 +8961,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, @@ -8965,7 +8966,8 @@ to_fixed_array_type (struct type *type0, struct value *dval,
type was a regular (non-packed) array type. As a result, the 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 bitsize of the array elements needs to be set again, and the array
length needs to be recomputed based on that bitsize. */ length needs to be recomputed based on that bitsize. */
@ -1280,7 +1280,7 @@ diff --git a/gdb/ax.h b/gdb/ax.h
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
--- a/gdb/breakpoint.c --- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c +++ b/gdb/breakpoint.c
@@ -2055,9 +2055,9 @@ should_be_inserted (struct bp_location *bl) @@ -2056,9 +2056,9 @@ should_be_inserted (struct bp_location *bl)
{ {
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
"infrun: stepping past non-steppable watchpoint. " "infrun: stepping past non-steppable watchpoint. "
@ -1292,7 +1292,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
} }
return 0; return 0;
} }
@@ -6795,7 +6795,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, @@ -6793,7 +6793,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1,
static int static int
breakpoint_address_match_range (const address_space *aspace1, breakpoint_address_match_range (const address_space *aspace1,
CORE_ADDR addr1, CORE_ADDR addr1,
@ -1301,7 +1301,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
CORE_ADDR addr2) CORE_ADDR addr2)
{ {
return ((gdbarch_has_global_breakpoints (target_gdbarch ()) return ((gdbarch_has_global_breakpoints (target_gdbarch ())
@@ -10877,7 +10877,7 @@ can_use_hardware_watchpoint (const std::vector<value_ref_ptr> &vals) @@ -10875,7 +10875,7 @@ can_use_hardware_watchpoint (const std::vector<value_ref_ptr> &vals)
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
{ {
CORE_ADDR vaddr = value_address (v); CORE_ADDR vaddr = value_address (v);
@ -1615,7 +1615,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -2033,11 +2033,11 @@ dwarf2_complex_location_expr_complaint (void) @@ -2065,11 +2065,11 @@ dwarf2_complex_location_expr_complaint (void)
} }
static void static void
@ -1631,7 +1631,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
} }
static void static void
@@ -15110,8 +15110,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, @@ -15105,8 +15105,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
object, and then subtract off the number of bits of object, and then subtract off the number of bits of
the field itself. The result is the bit offset of the field itself. The result is the bit offset of
the LSB of the field. */ the LSB of the field. */
@ -1884,7 +1884,7 @@ diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
--- a/gdb/gdbtypes.c --- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c
@@ -2915,7 +2915,7 @@ floatformat_from_type (const struct type *type) @@ -2889,7 +2889,7 @@ floatformat_from_type (const struct type *type)
least as long as OBJFILE. */ least as long as OBJFILE. */
struct type * struct type *
@ -1893,7 +1893,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
const char *name) const char *name)
{ {
struct type *type; struct type *type;
@@ -3369,8 +3369,8 @@ is_public_ancestor (struct type *base, struct type *dclass) @@ -3343,8 +3343,8 @@ is_public_ancestor (struct type *base, struct type *dclass)
static int static int
is_unique_ancestor_worker (struct type *base, struct type *dclass, is_unique_ancestor_worker (struct type *base, struct type *dclass,
@ -1904,7 +1904,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
CORE_ADDR address, struct value *val) CORE_ADDR address, struct value *val)
{ {
int i, count = 0; int i, count = 0;
@@ -3381,7 +3381,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -3355,7 +3355,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass,
for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
{ {
struct type *iter; struct type *iter;
@ -1913,7 +1913,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
iter = check_typedef (TYPE_BASECLASS (dclass, i)); iter = check_typedef (TYPE_BASECLASS (dclass, i));
@@ -3422,7 +3422,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -3396,7 +3396,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass,
int int
is_unique_ancestor (struct type *base, struct value *val) is_unique_ancestor (struct type *base, struct value *val)
{ {
@ -1922,7 +1922,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
return is_unique_ancestor_worker (base, value_type (val), &offset, return is_unique_ancestor_worker (base, value_type (val), &offset,
value_contents_for_printing (val), value_contents_for_printing (val),
@@ -4649,7 +4649,7 @@ recursive_dump_type (struct type *type, int spaces) @@ -4623,7 +4623,7 @@ recursive_dump_type (struct type *type, int spaces)
break; break;
} }
puts_filtered ("\n"); puts_filtered ("\n");
@ -1931,7 +1931,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
if (TYPE_OBJFILE_OWNED (type)) if (TYPE_OBJFILE_OWNED (type))
{ {
printfi_filtered (spaces, "objfile "); printfi_filtered (spaces, "objfile ");
@@ -5094,7 +5094,7 @@ copy_type (const struct type *type) @@ -5068,7 +5068,7 @@ copy_type (const struct type *type)
struct type * struct type *
arch_type (struct gdbarch *gdbarch, arch_type (struct gdbarch *gdbarch,
@ -2570,7 +2570,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
--- a/gdb/ppc-linux-tdep.c --- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c
@@ -2265,7 +2265,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, @@ -2263,7 +2263,7 @@ ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep,
const struct floatformat ** const struct floatformat **
ppc_floatformat_for_type (struct gdbarch *gdbarch, ppc_floatformat_for_type (struct gdbarch *gdbarch,
@ -2582,7 +2582,7 @@ diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/printcmd.c b/gdb/printcmd.c
--- a/gdb/printcmd.c --- a/gdb/printcmd.c
+++ b/gdb/printcmd.c +++ b/gdb/printcmd.c
@@ -275,7 +275,7 @@ print_formatted (struct value *val, int size, @@ -277,7 +277,7 @@ print_formatted (struct value *val, int size,
struct ui_file *stream) struct ui_file *stream)
{ {
struct type *type = check_typedef (value_type (val)); struct type *type = check_typedef (value_type (val));
@ -2591,7 +2591,7 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c
if (VALUE_LVAL (val) == lval_memory) if (VALUE_LVAL (val) == lval_memory)
next_address = value_address (val) + len; next_address = value_address (val) + len;
@@ -351,7 +351,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type, @@ -353,7 +353,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type,
int size, struct ui_file *stream) int size, struct ui_file *stream)
{ {
struct gdbarch *gdbarch = get_type_arch (type); struct gdbarch *gdbarch = get_type_arch (type);
@ -2730,7 +2730,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h
diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/remote.c b/gdb/remote.c
--- a/gdb/remote.c --- a/gdb/remote.c
+++ b/gdb/remote.c +++ b/gdb/remote.c
@@ -460,7 +460,7 @@ public: @@ -459,7 +459,7 @@ public:
int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override;
@ -2847,7 +2847,7 @@ diff --git a/gdb/stack.c b/gdb/stack.c
diff --git a/gdb/symmisc.c b/gdb/symmisc.c diff --git a/gdb/symmisc.c b/gdb/symmisc.c
--- a/gdb/symmisc.c --- a/gdb/symmisc.c
+++ b/gdb/symmisc.c +++ b/gdb/symmisc.c
@@ -586,11 +586,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, @@ -587,11 +587,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
case LOC_CONST_BYTES: case LOC_CONST_BYTES:
{ {
@ -3170,7 +3170,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
gdb_byte buffer[sizeof (LONGEST)]; gdb_byte buffer[sizeof (LONGEST)];
if (value_bitsize (toval)) if (value_bitsize (toval))
@@ -3354,7 +3354,7 @@ get_baseclass_offset (struct type *vt, struct type *cls, @@ -3335,7 +3335,7 @@ get_baseclass_offset (struct type *vt, struct type *cls,
the form "DOMAIN::NAME". */ the form "DOMAIN::NAME". */
static struct value * static struct value *
@ -3179,7 +3179,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
struct type *curtype, const char *name, struct type *curtype, const char *name,
struct type *intype, struct type *intype,
int want_address, int want_address,
@@ -3388,7 +3388,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, @@ -3369,7 +3369,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
if (want_address) if (want_address)
return value_from_longest return value_from_longest
(lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain),
@ -3188,7 +3188,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
else if (noside != EVAL_NORMAL) else if (noside != EVAL_NORMAL)
return allocate_value (TYPE_FIELD_TYPE (t, i)); return allocate_value (TYPE_FIELD_TYPE (t, i));
else else
@@ -3579,7 +3579,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, @@ -3548,7 +3548,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--)
{ {
struct value *v; struct value *v;
@ -3197,7 +3197,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
if (BASETYPE_VIA_VIRTUAL (t, i)) if (BASETYPE_VIA_VIRTUAL (t, i))
base_offset = 0; base_offset = 0;
@@ -3728,7 +3728,7 @@ value_rtti_indirect_type (struct value *v, int *full, @@ -3697,7 +3697,7 @@ value_rtti_indirect_type (struct value *v, int *full,
struct value * struct value *
value_full_object (struct value *argp, value_full_object (struct value *argp,
struct type *rtype, struct type *rtype,

View File

@ -111,7 +111,7 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
diff --git a/gdb/utils.c b/gdb/utils.c diff --git a/gdb/utils.c b/gdb/utils.c
--- a/gdb/utils.c --- a/gdb/utils.c
+++ b/gdb/utils.c +++ b/gdb/utils.c
@@ -2807,6 +2807,17 @@ string_to_core_addr (const char *my_string) @@ -2899,6 +2899,17 @@ string_to_core_addr (const char *my_string)
return addr; return addr;
} }
@ -132,7 +132,7 @@ diff --git a/gdb/utils.c b/gdb/utils.c
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/gdb/valops.c +++ b/gdb/valops.c
@@ -2075,6 +2075,7 @@ search_struct_method (const char *name, struct value **arg1p, @@ -2064,6 +2064,7 @@ search_struct_method (const char *name, struct value **arg1p,
{ {
CORE_ADDR address; CORE_ADDR address;

View File

@ -375,7 +375,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c
diff --git a/gdb/remote.c b/gdb/remote.c diff --git a/gdb/remote.c b/gdb/remote.c
--- a/gdb/remote.c --- a/gdb/remote.c
+++ b/gdb/remote.c +++ b/gdb/remote.c
@@ -452,7 +452,7 @@ public: @@ -451,7 +451,7 @@ public:
bool stopped_data_address (CORE_ADDR *) override; bool stopped_data_address (CORE_ADDR *) override;
@ -385,14 +385,14 @@ diff --git a/gdb/remote.c b/gdb/remote.c
int can_use_hw_breakpoint (enum bptype, int, int) override; int can_use_hw_breakpoint (enum bptype, int, int) override;
@@ -10336,7 +10336,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, @@ -10336,7 +10336,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len,
p = strchr (rs->buf, '\0'); p = strchr (rs->buf.data (), '\0');
addr = remote_address_masked (addr); addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr); p += hexnumstr (p, (ULONGEST) addr);
- xsnprintf (p, endbuf - p, ",%x", len); - xsnprintf (p, endbuf - p, ",%x", len);
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len))); + xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
putpkt (rs->buf); putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0); getpkt (&rs->buf, 0);
@@ -10356,7 +10356,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, @@ -10356,7 +10356,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len,
bool bool
@ -403,13 +403,13 @@ diff --git a/gdb/remote.c b/gdb/remote.c
CORE_ADDR diff = remote_address_masked (addr - start); CORE_ADDR diff = remote_address_masked (addr - start);
@@ -10385,7 +10385,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, @@ -10385,7 +10385,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len,
p = strchr (rs->buf, '\0'); p = strchr (rs->buf.data (), '\0');
addr = remote_address_masked (addr); addr = remote_address_masked (addr);
p += hexnumstr (p, (ULONGEST) addr); p += hexnumstr (p, (ULONGEST) addr);
- xsnprintf (p, endbuf - p, ",%x", len); - xsnprintf (p, endbuf - p, ",%x", len);
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len))); + xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
putpkt (rs->buf); putpkt (rs->buf);
getpkt (&rs->buf, &rs->buf_size, 0); getpkt (&rs->buf, 0);
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
--- a/gdb/s390-linux-nat.c --- a/gdb/s390-linux-nat.c

View File

@ -437,7 +437,7 @@ diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
--- a/gdb/hppa-tdep.c --- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c
@@ -986,7 +986,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, @@ -985,7 +985,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
{ {
struct value *arg = args[i]; struct value *arg = args[i];
struct type *type = value_type (arg); struct type *type = value_type (arg);
@ -446,7 +446,7 @@ diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
const bfd_byte *valbuf; const bfd_byte *valbuf;
bfd_byte fptrbuf[8]; bfd_byte fptrbuf[8];
int regnum; int regnum;
@@ -1179,7 +1179,7 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function, @@ -1178,7 +1178,7 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache, struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf) gdb_byte *readbuf, const gdb_byte *writebuf)
{ {

View File

@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -17758,7 +17758,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17753,7 +17753,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
struct type *base_type, *orig_base_type; struct type *base_type, *orig_base_type;
struct type *range_type; struct type *range_type;
struct attribute *attr; struct attribute *attr;
@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
int low_default_is_valid; int low_default_is_valid;
int high_bound_is_count = 0; int high_bound_is_count = 0;
const char *name; const char *name;
@@ -17778,7 +17778,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17773,7 +17773,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
low.kind = PROP_CONST; low.kind = PROP_CONST;
high.kind = PROP_CONST; high.kind = PROP_CONST;
@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
/* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
omitting DW_AT_lower_bound. */ omitting DW_AT_lower_bound. */
@@ -17811,6 +17813,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17806,6 +17808,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
break; break;
} }
@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
attr = dwarf2_attr (die, DW_AT_lower_bound, cu); attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
if (attr) if (attr)
attr_to_dynamic_prop (attr, die, cu, &low); attr_to_dynamic_prop (attr, die, cu, &low);
@@ -17903,7 +17913,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17898,7 +17908,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
&& !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask))
high.data.const_val |= negative_mask; high.data.const_val |= negative_mask;
@ -1818,7 +1818,7 @@ diff --git a/gdb/valarith.c b/gdb/valarith.c
diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valops.c b/gdb/valops.c
--- a/gdb/valops.c --- a/gdb/valops.c
+++ b/gdb/valops.c +++ b/gdb/valops.c
@@ -3823,56 +3823,195 @@ value_of_this_silent (const struct language_defn *lang) @@ -3792,56 +3792,195 @@ value_of_this_silent (const struct language_defn *lang)
struct value * struct value *
value_slice (struct value *array, int lowbound, int length) value_slice (struct value *array, int lowbound, int length)

View File

@ -33,7 +33,7 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings
diff --git a/gdb/NEWS b/gdb/NEWS diff --git a/gdb/NEWS b/gdb/NEWS
--- a/gdb/NEWS --- a/gdb/NEWS
+++ b/gdb/NEWS +++ b/gdb/NEWS
@@ -290,6 +290,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* @@ -323,6 +323,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
*** Changes in GDB 8.1 *** Changes in GDB 8.1
@ -77,7 +77,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c --- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c
@@ -1801,7 +1801,8 @@ static void read_signatured_type (struct signatured_type *); @@ -1833,7 +1833,8 @@ static void read_signatured_type (struct signatured_type *);
static int attr_to_dynamic_prop (const struct attribute *attr, static int attr_to_dynamic_prop (const struct attribute *attr,
struct die_info *die, struct dwarf2_cu *cu, struct die_info *die, struct dwarf2_cu *cu,
@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
/* memory allocation interface */ /* memory allocation interface */
@@ -13763,7 +13764,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) @@ -13758,7 +13759,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
{ {
newobj->static_link newobj->static_link
= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
@ -95,8 +95,8 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
+ attr_to_dynamic_prop (attr, die, cu, newobj->static_link, NULL, 0); + attr_to_dynamic_prop (attr, die, cu, newobj->static_link, NULL, 0);
} }
cu->list_in_scope = cu->builder->get_local_symbols (); cu->list_in_scope = cu->get_builder ()->get_local_symbols ();
@@ -16501,7 +16502,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) @@ -16496,7 +16497,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
byte_stride_prop byte_stride_prop
= (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop));
@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
if (!stride_ok) if (!stride_ok)
{ {
complaint (_("unable to read array DW_AT_byte_stride " complaint (_("unable to read array DW_AT_byte_stride "
@@ -17262,29 +17264,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17257,29 +17259,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
struct gdbarch *gdbarch = get_objfile_arch (objfile); struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct type *type, *range_type, *index_type, *char_type; struct type *type, *range_type, *index_type, *char_type;
struct attribute *attr; struct attribute *attr;
@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
char_type = language_string_char_type (cu->language_defn, gdbarch); char_type = language_string_char_type (cu->language_defn, gdbarch);
type = create_string_type (NULL, char_type, range_type); type = create_string_type (NULL, char_type, range_type);
@@ -17652,7 +17715,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17647,7 +17710,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
static int static int
attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
{ {
struct dwarf2_property_baton *baton; struct dwarf2_property_baton *baton;
struct obstack *obstack struct obstack *obstack
@@ -17663,14 +17727,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -17658,14 +17722,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
} }
else if (attr_form_is_ref (attr)) else if (attr_form_is_ref (attr))
{ {
@@ -17703,8 +17786,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -17698,8 +17781,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
baton = XOBNEW (obstack, struct dwarf2_property_baton); baton = XOBNEW (obstack, struct dwarf2_property_baton);
baton->referenced_type = die_type (target_die, target_cu); baton->referenced_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu; baton->locexpr.per_cu = cu->per_cu;
@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
prop->data.baton = baton; prop->data.baton = baton;
prop->kind = PROP_LOCEXPR; prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL); gdb_assert (prop->data.baton != NULL);
@@ -17815,7 +17918,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17810,7 +17913,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
attr = dwarf2_attr (die, DW_AT_byte_stride, cu); attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
if (attr) if (attr)
@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
complaint (_("Missing DW_AT_byte_stride " complaint (_("Missing DW_AT_byte_stride "
"- DIE at 0x%s [in module %s]"), "- DIE at 0x%s [in module %s]"),
sect_offset_str (die->sect_off), sect_offset_str (die->sect_off),
@@ -17823,7 +17926,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17818,7 +17921,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
attr = dwarf2_attr (die, DW_AT_lower_bound, cu); attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
if (attr) if (attr)
@ -305,7 +305,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
else if (!low_default_is_valid) else if (!low_default_is_valid)
complaint (_("Missing DW_AT_lower_bound " complaint (_("Missing DW_AT_lower_bound "
"- DIE at %s [in module %s]"), "- DIE at %s [in module %s]"),
@@ -17832,10 +17935,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) @@ -17827,10 +17930,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *attr_ub, *attr_count; struct attribute *attr_ub, *attr_count;
attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu); attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu);
@ -318,7 +318,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
{ {
/* If bounds are constant do the final calculation here. */ /* If bounds are constant do the final calculation here. */
if (low.kind == PROP_CONST && high.kind == PROP_CONST) if (low.kind == PROP_CONST && high.kind == PROP_CONST)
@@ -25393,7 +25496,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) @@ -25397,7 +25500,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
attr = dwarf2_attr (die, DW_AT_allocated, cu); attr = dwarf2_attr (die, DW_AT_allocated, cu);
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); add_dyn_prop (DYN_PROP_ALLOCATED, prop, type);
} }
else if (attr != NULL) else if (attr != NULL)
@@ -25407,7 +25510,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) @@ -25411,7 +25514,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
attr = dwarf2_attr (die, DW_AT_associated, cu); attr = dwarf2_attr (die, DW_AT_associated, cu);
if (attr_form_is_block (attr)) if (attr_form_is_block (attr))
{ {
@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type);
} }
else if (attr != NULL) else if (attr != NULL)
@@ -25419,7 +25522,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) @@ -25423,7 +25526,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
/* Read DW_AT_data_location and set in type. */ /* Read DW_AT_data_location and set in type. */
attr = dwarf2_attr (die, DW_AT_data_location, cu); attr = dwarf2_attr (die, DW_AT_data_location, cu);

View File

@ -22,7 +22,7 @@
Name: %{?scl_prefix}gdb Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched # Freeze it when GDB gets branched
%global snapsrc 20181220 %global snapsrc 20190120
# See timestamp of source gnulib installed into gdb/gnulib/ . # See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20161115 %global snapgnulib 20161115
%global tarname gdb-%{version} %global tarname gdb-%{version}
@ -30,7 +30,7 @@ Version: 8.2.50.%{snapsrc}
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 12%{?dist} Release: 13%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
Group: Development/Debuggers Group: Development/Debuggers
@ -1032,6 +1032,11 @@ fi
%endif %endif
%changelog %changelog
* Mon Jan 21 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.2.50.20190120-13.fc30
- Rebase to FSF GDB 8.2.50.20190120 (8.3pre).
- Fix 'gdb does crash randomly on loading symbols or setting a breakpoint'
(RHBZ 1638798, Keith Seitz).
* Thu Dec 20 2018 Sergio Durigan Junior <sergiodj@redhat.com> - 8.2.50.20181220-12.fc30 * Thu Dec 20 2018 Sergio Durigan Junior <sergiodj@redhat.com> - 8.2.50.20181220-12.fc30
- Rebase to FSF GDB 8.2.50.20181220 (8.3pre). - Rebase to FSF GDB 8.2.50.20181220 (8.3pre).

View File

@ -1,3 +1,3 @@
SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8
SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939
SHA512 (gdb-8.2.50.20181220.tar.xz) = 203915e52aa2e62887434c8b0b9c1482091a178e885b57119e64bb92effc6f0cae4f0543beb3b6757c16801f4941d83605b68d859e2842c8035d2952b90ec5bb SHA512 (gdb-8.2.50.20190120.tar.xz) = e9b1c216b3630951df4c7fca4ed58ad6b48e8060482d5e82eb23d9980eeef5891c3f21191f2ff8c7cfa2b974a9e6cf5882c199ea64fe4c25fb034995eb61c6bc