- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are: * Python Scripting - You can now access frame registers from Python scripts. - New attribute 'producer' for gdb.Symtab objects. * New Python-based convenience functions: - $_caller_is(name [, number_of_frames]) - $_caller_matches(regexp [, number_of_frames]) - $_any_caller_is(name [, number_of_frames]) - $_any_caller_matches(regexp [, number_of_frames]) * New commands - queue-signal signal-name-or-number Queue a signal to be delivered to the thread when it is resumed. * On resume, GDB now always passes the signal the program had stopped for to the thread the signal was sent to, even if the user changed threads before resuming. Previously GDB would often (but not always) deliver the signal to the thread that happens to be current at resume time. * Conversely, the "signal" command now consistently delivers the requested signal to the current thread. GDB now asks for confirmation if the program had stopped for a signal and the user switched threads meanwhile. * "breakpoint always-inserted" modes "off" and "auto" merged. Now, when 'breakpoint always-inserted mode' is set to "off", GDB won't remove breakpoints from the target until all threads stop, even in non-stop mode. The "auto" mode has been removed, and "off" is now the default mode. * MI changes - The -list-thread-groups command outputs an exit-code field for inferiors that have exited. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
This commit is contained in:
parent
382191c20a
commit
355c8053f0
@ -1,29 +1,10 @@
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
||||
|
||||
|
||||
Index: gdb-7.5.50.20130118/gdb/symmisc.c
|
||||
Index: gdb-7.8.50.20141228/include/obstack.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/gdb/symmisc.c 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/gdb/symmisc.c 2013-01-18 23:55:41.650930254 +0100
|
||||
@@ -148,10 +148,10 @@ print_objfile_statistics (void)
|
||||
if (OBJSTAT (objfile, sz_strtab) > 0)
|
||||
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
||||
OBJSTAT (objfile, sz_strtab));
|
||||
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
|
||||
- obstack_memory_used (&objfile->objfile_obstack));
|
||||
- printf_filtered (_(" Total memory used for BFD obstack: %d\n"),
|
||||
- obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
||||
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
||||
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
||||
+ printf_filtered (_(" Total memory used for BFD obstack: %ld\n"),
|
||||
+ (long) obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
||||
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
||||
bcache_memory_used (psymbol_bcache_get_bcache
|
||||
(objfile->psymbol_cache)));
|
||||
Index: gdb-7.5.50.20130118/include/obstack.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/include/obstack.h 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/include/obstack.h 2013-01-18 23:55:10.256999188 +0100
|
||||
--- gdb-7.8.50.20141228.orig/include/obstack.h 2015-01-01 17:02:53.254820447 +0100
|
||||
+++ gdb-7.8.50.20141228/include/obstack.h 2015-01-01 17:02:53.880820084 +0100
|
||||
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
||||
|
||||
/* Declare the external functions we use; they are in obstack.c. */
|
||||
@ -129,10 +110,10 @@ Index: gdb-7.5.50.20130118/include/obstack.h
|
||||
if (__o->chunk_limit - __o->next_free < __len) \
|
||||
_obstack_newchunk (__o, __len); \
|
||||
obstack_blank_fast (__o, __len); \
|
||||
Index: gdb-7.5.50.20130118/libiberty/obstack.c
|
||||
Index: gdb-7.8.50.20141228/libiberty/obstack.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130118.orig/libiberty/obstack.c 2013-01-18 23:54:57.478974289 +0100
|
||||
+++ gdb-7.5.50.20130118/libiberty/obstack.c 2013-01-18 23:55:10.256999188 +0100
|
||||
--- gdb-7.8.50.20141228.orig/libiberty/obstack.c 2015-01-01 17:02:53.254820447 +0100
|
||||
+++ gdb-7.8.50.20141228/libiberty/obstack.c 2015-01-01 17:02:53.880820084 +0100
|
||||
@@ -44,9 +44,11 @@
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-01-27 22:42:53.150573603 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-01-27 22:42:56.694576319 +0100
|
||||
@@ -1031,6 +1031,12 @@ Read each symbol file's entire symbol ta
|
||||
--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-01 17:01:08.308881292 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-01 17:01:10.302880126 +0100
|
||||
@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta
|
||||
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.6.90.20140127/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.6.90.20140127/gdb/main.c
|
||||
Index: gdb-7.8.50.20141228/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/main.c 2014-01-27 22:42:53.153573606 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/main.c 2014-01-27 22:42:56.695576319 +0100
|
||||
@@ -473,6 +473,7 @@ captured_main (void *data)
|
||||
--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-01 17:01:08.312881290 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-01 17:01:10.303880125 +0100
|
||||
@@ -590,6 +590,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.6.90.20140127/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1164,6 +1165,7 @@ Selection of debuggee and its files:\n\n
|
||||
@@ -1245,6 +1246,7 @@ Selection of debuggee and its files:\n\n
|
||||
--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.6.90.20140127/gdb/main.c
|
||||
--write Set writing into executable and core files.\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
Index: gdb-7.6.90.20140127/gdb/symfile.c
|
||||
Index: gdb-7.8.50.20141228/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/symfile.c 2014-01-27 22:42:53.154573607 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/symfile.c 2014-01-27 22:42:56.696576320 +0100
|
||||
@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup (
|
||||
--- gdb-7.8.50.20141228.orig/gdb/symfile.c 2015-01-01 17:01:08.313881289 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/symfile.c 2015-01-01 17:01:10.304880125 +0100
|
||||
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
int readnow_symbol_files; /* Read full symbols immediately. */
|
||||
@ -60,19 +60,19 @@ Index: gdb-7.6.90.20140127/gdb/symfile.c
|
||||
|
||||
/* Functions this file defines. */
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
|
||||
Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-01-27 22:42:56.700576323 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-01-27 22:44:21.915641560 +0100
|
||||
@@ -70,6 +70,7 @@
|
||||
--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-01 17:01:08.319881285 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-01 17:01:26.888870511 +0100
|
||||
@@ -69,6 +69,7 @@
|
||||
#include "source.h"
|
||||
#include "filestuff.h"
|
||||
#include "build-id.h"
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
@@ -1975,7 +1976,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
#include <sys/types.h>
|
||||
@@ -1989,7 +1990,8 @@ dwarf2_has_info (struct objfile *objfile
|
||||
(void *) names);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
@ -82,11 +82,11 @@ Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
|
||||
&& dwarf2_per_objfile->info.s.asection != NULL
|
||||
&& !dwarf2_per_objfile->abbrev.is_virtual
|
||||
&& dwarf2_per_objfile->abbrev.s.asection != NULL);
|
||||
Index: gdb-7.6.90.20140127/gdb/top.h
|
||||
Index: gdb-7.8.50.20141228/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/top.h 2014-01-27 22:42:53.159573610 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/top.h 2014-01-27 22:42:56.701576324 +0100
|
||||
@@ -59,6 +59,7 @@ extern void set_prompt (const char *s);
|
||||
--- gdb-7.8.50.20141228.orig/gdb/top.h 2015-01-01 17:01:08.320881284 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/top.h 2015-01-01 17:01:10.310880121 +0100
|
||||
@@ -67,6 +67,7 @@ extern void set_prompt (const char *s);
|
||||
|
||||
/* From random places. */
|
||||
extern int readnow_symbol_files;
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/configure.ac
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/configure.ac 2014-06-13 20:05:33.058506817 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/configure.ac 2014-06-13 20:05:59.991532595 +0200
|
||||
@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure.ac 2015-01-01 17:00:26.123908948 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/configure.ac 2015-01-01 17:00:43.168897773 +0100
|
||||
@@ -106,6 +106,6 @@ AC_OUTPUT([Makefile \
|
||||
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
|
||||
gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile \
|
||||
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
|
||||
@ -10,20 +10,20 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/configure.ac
|
||||
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||
gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
|
||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/configure
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/configure
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/configure 2014-06-13 20:05:29.956503899 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/configure 2014-06-13 20:06:24.492555709 +0200
|
||||
@@ -3448,7 +3448,7 @@ done
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/configure 2015-01-01 17:00:26.124908947 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/configure 2015-01-01 17:00:59.467887088 +0100
|
||||
@@ -3458,7 +3458,7 @@ if test "${build}" = "${host}" -a "${hos
|
||||
fi
|
||||
|
||||
|
||||
|
||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -4179,6 +4179,7 @@ do
|
||||
@@ -4190,6 +4190,7 @@ do
|
||||
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
|
||||
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
|
||||
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
|
||||
@ -31,10 +31,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/configure
|
||||
"gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;;
|
||||
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c 2014-06-13 20:05:33.060506819 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.c 2015-01-01 17:00:43.169897773 +0100
|
||||
@@ -0,0 +1,20 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -56,10 +56,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c 2014-06-13 20:05:33.060506819 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach2.c 2015-01-01 17:00:43.170897772 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* This program is intended to be started outside of gdb, and then
|
||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||
@ -85,10 +85,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach2.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c 2014-06-13 20:05:33.061506820 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.c 2015-01-01 17:00:43.170897772 +0100
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -236,10 +236,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c 2014-06-13 20:05:33.061506820 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break1.c 2015-01-01 17:00:43.170897772 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -285,10 +285,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break1.c
|
||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||
+#endif
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c 2014-06-13 20:05:33.061506820 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/coremaker.c 2015-01-01 17:00:43.170897772 +0100
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ Free Software Foundation, Inc.
|
||||
@ -432,10 +432,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/coremaker.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp 2014-06-13 20:05:33.061506820 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/attach.exp 2015-01-01 17:00:43.171897771 +0100
|
||||
@@ -0,0 +1,417 @@
|
||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -854,10 +854,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp 2014-06-13 20:05:33.062506821 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/break.exp 2015-01-01 17:00:43.172897771 +0100
|
||||
@@ -0,0 +1,962 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
@ -1821,10 +1821,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp 2014-06-13 20:05:33.063506822 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/corefile.exp 2015-01-01 17:00:43.172897771 +0100
|
||||
@@ -0,0 +1,233 @@
|
||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -2059,10 +2059,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/corefile.exp
|
||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
||||
+
|
||||
+gdb_test "core" "No core file now."
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.pie/Makefile.in 2014-06-13 20:05:33.063506822 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.pie/Makefile.in 2015-01-01 17:00:43.172897771 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+VPATH = @srcdir@
|
||||
+srcdir = @srcdir@
|
||||
|
@ -474,7 +474,7 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
+ local FAILURES=0
|
||||
+
|
||||
+ mustNotHave '??' || ((FAILURES++))
|
||||
+ mustHaveCorrectAmount 12 threadcrash.c: || ((FAILURES++))
|
||||
+ mustHaveCorrectAmount 11 threadcrash.c: || ((FAILURES++))
|
||||
+
|
||||
+ mustHaveSevenThreads || ((FAILURES++))
|
||||
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
|
||||
|
@ -22,6 +22,8 @@ for the most common under-ggdb3 compiled programs.
|
||||
Original patch hooked into target_translate_tls_address. But its inferior
|
||||
call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||
|
||||
|
||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
@ -32,23 +34,25 @@ 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.6.50.20130731-cvs/gdb/printcmd.c
|
||||
Index: gdb-7.8.1/gdb/printcmd.c
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/printcmd.c 2013-08-02 16:21:13.665758324 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/printcmd.c 2013-08-02 16:22:24.367853322 +0200
|
||||
@@ -982,6 +982,8 @@ print_command_1 (const char *exp, int vo
|
||||
--- gdb-7.8.1.orig/gdb/printcmd.c 2014-11-21 19:05:44.699959209 +0100
|
||||
+++ gdb-7.8.1/gdb/printcmd.c 2014-11-21 19:05:44.868959291 +0100
|
||||
@@ -980,6 +980,10 @@ print_command_1 (const char *exp, int vo
|
||||
|
||||
if (exp && *exp)
|
||||
{
|
||||
+ if (strcmp (exp, "errno") == 0)
|
||||
+ exp = "*((int *(*) (void)) __errno_location) ()";
|
||||
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
|
||||
+ 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.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2013-08-02 16:21:13.665758324 +0200
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2014-11-21 19:05:44.869959291 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -78,10 +82,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2013-08-02 16:21:13.665758324 +0200
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2014-11-21 19:05:44.869959291 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -143,3 +147,112 @@ Index: gdb-7.6.50.20130731-cvs/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.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2014-11-21 19:05:44.869959291 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005, 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 <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ errno = 42;
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2014-11-21 19:13:01.553171326 +0100
|
||||
@@ -0,0 +1,71 @@
|
||||
+# 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 <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile dw2-errno2
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+proc prep { message {do_xfail 0} } { with_test_prefix $message {
|
||||
+ global srcdir subdir binfile variant
|
||||
+ gdb_exit
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}${variant}
|
||||
+
|
||||
+ runto_main
|
||||
+
|
||||
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
|
||||
+ gdb_continue_to_breakpoint "breakpoint"
|
||||
+
|
||||
+ gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant"
|
||||
+
|
||||
+ gdb_test "print errno" ".* = 42"
|
||||
+
|
||||
+ gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y"
|
||||
+ gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file"
|
||||
+ if $do_xfail {
|
||||
+ setup_xfail "*-*-*"
|
||||
+ }
|
||||
+ gdb_test "print errno" ".* = 42" "print errno for core"
|
||||
+}}
|
||||
+
|
||||
+set variant g2thrN
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+prep "macros=N threads=N" 1
|
||||
+
|
||||
+set variant g3thrN
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+prep "macros=Y threads=N" 1
|
||||
+
|
||||
+set variant g2thrY
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+prep "macros=N threads=Y"
|
||||
+
|
||||
+set variant g3thrY
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+prep "macros=Y threads=Y" 1
|
||||
+
|
||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||
+# Just how to find the current libc filename?
|
||||
|
@ -23,11 +23,11 @@ instead.
|
||||
|
||||
Port to GDB-6.7.
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c
|
||||
Index: gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/amd64-linux-tdep.c 2014-02-04 23:40:06.263483469 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c 2014-02-04 23:47:18.438009290 +0100
|
||||
@@ -289,6 +289,80 @@ amd64_linux_register_reggroup_p (struct
|
||||
--- gdb-7.8.50.20141228.orig/gdb/amd64-linux-tdep.c 2015-01-01 17:01:51.506856241 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c 2015-01-01 17:01:54.769854349 +0100
|
||||
@@ -290,6 +290,80 @@ amd64_linux_register_reggroup_p (struct
|
||||
|
||||
/* Set the program counter for process PTID to PC. */
|
||||
|
||||
@ -108,7 +108,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c
|
||||
static void
|
||||
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
{
|
||||
@@ -1607,6 +1681,8 @@ amd64_linux_init_abi_common(struct gdbar
|
||||
@@ -1657,6 +1731,8 @@ amd64_linux_init_abi_common(struct gdbar
|
||||
|
||||
tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
|
||||
|
||||
@ -117,11 +117,11 @@ Index: gdb-7.6.90.20140127/gdb/amd64-linux-tdep.c
|
||||
/* Add the %orig_rax register used for syscall restarting. */
|
||||
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
|
||||
Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/amd64-tdep.c 2014-02-04 23:40:06.265483471 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/amd64-tdep.c 2014-02-04 23:45:40.846891653 +0100
|
||||
@@ -2359,6 +2359,7 @@ amd64_frame_unwind_stop_reason (struct f
|
||||
--- gdb-7.8.50.20141228.orig/gdb/amd64-tdep.c 2015-01-01 17:01:51.507856240 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/amd64-tdep.c 2015-01-01 17:01:54.770854349 +0100
|
||||
@@ -2492,6 +2492,7 @@ amd64_frame_unwind_stop_reason (struct f
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_frame_cache (this_frame, this_cache);
|
||||
@ -129,7 +129,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
return UNWIND_UNAVAILABLE;
|
||||
@@ -2367,6 +2368,10 @@ amd64_frame_unwind_stop_reason (struct f
|
||||
@@ -2500,6 +2501,10 @@ amd64_frame_unwind_stop_reason (struct f
|
||||
if (cache->base == 0)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
@ -140,7 +140,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
|
||||
return UNWIND_NO_REASON;
|
||||
}
|
||||
|
||||
@@ -2498,6 +2503,7 @@ amd64_sigtramp_frame_this_id (struct fra
|
||||
@@ -2631,6 +2636,7 @@ amd64_sigtramp_frame_this_id (struct fra
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_sigtramp_frame_cache (this_frame, this_cache);
|
||||
@ -148,7 +148,7 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
|
||||
|
||||
if (!cache->base_p)
|
||||
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame));
|
||||
@@ -2506,6 +2512,11 @@ amd64_sigtramp_frame_this_id (struct fra
|
||||
@@ -2639,6 +2645,11 @@ amd64_sigtramp_frame_this_id (struct fra
|
||||
/* This marks the outermost frame. */
|
||||
return;
|
||||
}
|
||||
@ -160,11 +160,11 @@ Index: gdb-7.6.90.20140127/gdb/amd64-tdep.c
|
||||
else
|
||||
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame));
|
||||
}
|
||||
Index: gdb-7.6.90.20140127/gdb/i386-tdep.c
|
||||
Index: gdb-7.8.50.20141228/gdb/i386-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.c 2014-02-04 23:40:06.267483473 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/i386-tdep.c 2014-02-04 23:43:33.048734974 +0100
|
||||
@@ -7830,6 +7830,9 @@ i386_gdbarch_init (struct gdbarch_info i
|
||||
--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.c 2015-01-01 17:01:51.509856239 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/i386-tdep.c 2015-01-01 17:01:54.772854348 +0100
|
||||
@@ -8286,6 +8286,9 @@ i386_gdbarch_init (struct gdbarch_info i
|
||||
|
||||
tdep->xsave_xcr0_offset = -1;
|
||||
|
||||
@ -174,175 +174,24 @@ Index: gdb-7.6.90.20140127/gdb/i386-tdep.c
|
||||
tdep->record_regmap = i386_record_regmap;
|
||||
|
||||
set_gdbarch_long_long_align_bit (gdbarch, 32);
|
||||
Index: gdb-7.6.90.20140127/gdb/i386-tdep.h
|
||||
Index: gdb-7.8.50.20141228/gdb/i386-tdep.h
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/i386-tdep.h 2014-02-04 23:40:06.268483475 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/i386-tdep.h 2014-02-04 23:43:33.048734974 +0100
|
||||
@@ -192,6 +192,9 @@ struct gdbarch_tdep
|
||||
int (*i386_sysenter_record) (struct regcache *regcache);
|
||||
/* Parse syscall args. */
|
||||
int (*i386_syscall_record) (struct regcache *regcache);
|
||||
--- gdb-7.8.50.20141228.orig/gdb/i386-tdep.h 2015-01-01 17:01:54.772854348 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/i386-tdep.h 2015-01-01 17:02:15.826842143 +0100
|
||||
@@ -240,6 +240,9 @@ struct gdbarch_tdep
|
||||
|
||||
/* Regsets. */
|
||||
const struct regset *fpregset;
|
||||
+
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ int (*outermost_frame_p) (struct frame_info *this_frame);
|
||||
};
|
||||
|
||||
/* Floating-point registers. */
|
||||
Index: gdb-7.6.90.20140127/gdb/ia64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/ia64-tdep.c 2014-02-04 23:40:06.270483477 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/ia64-tdep.c 2014-02-04 23:43:33.049734975 +0100
|
||||
@@ -2176,6 +2176,138 @@ static const struct frame_unwind ia64_fr
|
||||
default_frame_sniffer
|
||||
};
|
||||
|
||||
+/* Detect the outermost frame; during unwind of
|
||||
+ #6 0x2000000000347100 in __clone2 () from /lib/libc.so.6.1
|
||||
+ avoid the additional bogus frame
|
||||
+ #7 0x0000000000000000 in ?? () */
|
||||
+
|
||||
+static char linux_clone2_code[] =
|
||||
+{
|
||||
+/* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */
|
||||
+ 0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40,
|
||||
+ 0x28, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
+/* st4 [r9]=r8 */
|
||||
+/* st4 [r10]=r8 */
|
||||
+/* ;; */
|
||||
+/* #endif */
|
||||
+ 0x02, 0x50, 0x21, 0x40, 0x18, 0x14, 0x90, 0x02,
|
||||
+ 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
+/* 1: ld8 out1=[in0],8 |* Retrieve code pointer. *| */
|
||||
+/* mov out0=in4 |* Pass proper argument to fn *| */
|
||||
+/* ;; */
|
||||
+ 0x11, 0x08, 0x00, 0x40, 0x18, 0x10, 0x60, 0x50,
|
||||
+ 0x05, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x12,
|
||||
+/* ld8 gp=[in0] |* Load function gp. *| */
|
||||
+/* mov b6=out1 */
|
||||
+/* br.call.dptk.many rp=b6 |* Call fn(arg) in the child *| */
|
||||
+/* ;; */
|
||||
+ 0x10, 0x48, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00,
|
||||
+ 0xa0, 0x00, 0x42, 0x00, 0x98, 0xdf, 0xf7, 0x5b,
|
||||
+/* mov out0=r8 |* Argument to _exit *| */
|
||||
+/* mov gp=loc0 */
|
||||
+/* .globl HIDDEN_JUMPTARGET(_exit) */
|
||||
+/* br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) */
|
||||
+/* |* call _exit with result from fn. *| */
|
||||
+ 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00
|
||||
+/* ret |* Not reached. *| */
|
||||
+};
|
||||
+
|
||||
+#define LINUX_CLONE_PRE_SLOTS 3 /* Number of slots before PC. */
|
||||
+#define LINUX_CLONE_LEN (sizeof linux_clone2_code)
|
||||
+
|
||||
+static int
|
||||
+ia64_linux_clone2_running (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ char buf[LINUX_CLONE_LEN];
|
||||
+ struct minimal_symbol *minsym;
|
||||
+ long long instr;
|
||||
+
|
||||
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_PRE_SLOTS * 16,
|
||||
+ buf, LINUX_CLONE_LEN))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (memcmp (buf, linux_clone2_code, LINUX_CLONE_PRE_SLOTS * 16) != 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Adjust the expected "_exit" address. */
|
||||
+ minsym = lookup_minimal_symbol_text ("_exit", NULL);
|
||||
+ if (minsym == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ instr = slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], 2);
|
||||
+ instr &= ~(((1L << 20) - 1) << 13);
|
||||
+ /* Address is relative to the jump instruction slot, not the next one. */
|
||||
+ instr |= (((SYMBOL_VALUE_ADDRESS (minsym) - (pc & ~0xfL)) >> 4)
|
||||
+ & ((1L << 20) - 1)) << 13;
|
||||
+ replace_slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], instr,
|
||||
+ 2);
|
||||
+
|
||||
+ if (memcmp (&buf[LINUX_CLONE_PRE_SLOTS * 16],
|
||||
+ &linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16],
|
||||
+ LINUX_CLONE_LEN - (LINUX_CLONE_PRE_SLOTS * 16)) != 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+ia64_outermost_frame (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ char *name;
|
||||
+
|
||||
+ find_pc_partial_function (pc, &name, NULL, NULL);
|
||||
+
|
||||
+ /* If we have NAME, we can optimize the search.
|
||||
+ `clone' NAME still needs to have the code checked as its name may be
|
||||
+ present in the user code.
|
||||
+ `__clone' NAME should not be present in the user code but in the initial
|
||||
+ parts of the `__clone' implementation the unwind still makes sense.
|
||||
+ More detailed unwinding decision would be too much sensitive to possible
|
||||
+ subtle changes in specific glibc revisions. */
|
||||
+ if (name == NULL || strcmp (name, "clone2") == 0
|
||||
+ || strcmp ("__clone2", name) == 0)
|
||||
+ return (ia64_linux_clone2_running (this_frame) != 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+ia64_clone2_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
+ struct frame_id *this_id)
|
||||
+{
|
||||
+ /* Leave the default outermost frame at *THIS_ID. */
|
||||
+}
|
||||
+
|
||||
+static struct value *
|
||||
+ia64_clone2_frame_prev_register (struct frame_info *this_frame,
|
||||
+ void **this_cache, int regnum)
|
||||
+{
|
||||
+ return frame_unwind_got_register (this_frame, regnum, regnum);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+ia64_clone2_frame_sniffer (const struct frame_unwind *self,
|
||||
+ struct frame_info *this_frame,
|
||||
+ void **this_prologue_cache)
|
||||
+{
|
||||
+ if (ia64_outermost_frame (this_frame))
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct frame_unwind ia64_clone2_frame_unwind =
|
||||
+{
|
||||
+ NORMAL_FRAME,
|
||||
+ &ia64_clone2_frame_this_id,
|
||||
+ &ia64_clone2_frame_prev_register,
|
||||
+ NULL,
|
||||
+ &ia64_clone2_frame_sniffer
|
||||
+};
|
||||
+
|
||||
/* Signal trampolines. */
|
||||
|
||||
static void
|
||||
@@ -4023,6 +4155,7 @@ ia64_gdbarch_init (struct gdbarch_info i
|
||||
set_gdbarch_dummy_id (gdbarch, ia64_dummy_id);
|
||||
|
||||
set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc);
|
||||
+ frame_unwind_append_unwinder (gdbarch, &ia64_clone2_frame_unwind);
|
||||
#ifdef HAVE_LIBUNWIND_IA64_H
|
||||
frame_unwind_append_unwinder (gdbarch,
|
||||
&ia64_libunwind_sigtramp_frame_unwind);
|
||||
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c 2014-02-04 23:43:33.050734976 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c 2015-01-01 17:01:54.773854347 +0100
|
||||
@@ -0,0 +1,39 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -383,10 +232,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
+ for (;;)
|
||||
+ pause();
|
||||
+}
|
||||
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2014-02-04 23:43:33.050734976 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2015-01-01 17:01:54.774854346 +0100
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -58,24 +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.7.50.20140609/gdb/exceptions.h
|
||||
Index: gdb-7.8.50.20141228/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/exceptions.h 2014-06-13 20:26:46.988804553 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/exceptions.h 2014-06-13 20:27:01.930820057 +0200
|
||||
@@ -100,6 +100,9 @@ enum errors {
|
||||
/* Requested feature, method, mechanism, etc. is not supported. */
|
||||
NOT_SUPPORTED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
Index: gdb-7.7.50.20140609/gdb/exec.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/exec.c 2014-06-13 20:26:44.831802315 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/exec.c 2014-06-13 20:27:17.282836454 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/exec.c 2015-01-03 23:18:38.097427908 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/exec.c 2015-01-03 23:19:02.448556391 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "progspace.h"
|
||||
#include "gdb_bfd.h"
|
||||
@ -84,7 +70,7 @@ Index: gdb-7.7.50.20140609/gdb/exec.c
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -231,12 +232,27 @@ exec_file_attach (char *filename, int fr
|
||||
@@ -222,12 +223,27 @@ exec_file_attach (const char *filename,
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@ -115,11 +101,11 @@ Index: gdb-7.7.50.20140609/gdb/exec.c
|
||||
}
|
||||
|
||||
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||
Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
Index: gdb-7.8.50.20141228/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/main.c 2014-06-13 20:26:44.831802315 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/main.c 2014-06-13 20:26:46.990804555 +0200
|
||||
@@ -341,6 +341,36 @@ typedef struct cmdarg {
|
||||
--- gdb-7.8.50.20141228.orig/gdb/main.c 2015-01-03 23:18:38.098427913 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/main.c 2015-01-03 23:22:10.157546792 +0100
|
||||
@@ -426,6 +426,36 @@ typedef struct cmdarg {
|
||||
/* Define type VEC (cmdarg_s). */
|
||||
DEF_VEC_O (cmdarg_s);
|
||||
|
||||
@ -128,7 +114,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
+ core_file_command failed to find a matching executable. */
|
||||
+
|
||||
+static void
|
||||
+exec_or_core_file_attach (char *filename, int from_tty)
|
||||
+exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
+{
|
||||
+ volatile struct gdb_exception e;
|
||||
+
|
||||
@ -142,7 +128,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
+ {
|
||||
+ if (e.error == IS_CORE_ERROR)
|
||||
+ {
|
||||
+ core_file_command (filename, from_tty);
|
||||
+ core_file_command ((char *) filename, from_tty);
|
||||
+
|
||||
+ /* Iff the core file found its executable suppress the error message
|
||||
+ from exec_file_attach. */
|
||||
@ -156,7 +142,7 @@ Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
static int
|
||||
captured_main (void *data)
|
||||
{
|
||||
@@ -854,6 +884,8 @@ captured_main (void *data)
|
||||
@@ -910,6 +940,8 @@ captured_main (void *data)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@ -165,11 +151,11 @@ Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -1017,11 +1049,25 @@ captured_main (void *data)
|
||||
@@ -1069,11 +1101,26 @@ captured_main (void *data)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
+ catch_command_errors_ftype *func;
|
||||
+ catch_command_errors_const_ftype *func;
|
||||
+
|
||||
+ /* Call exec_or_core_file_attach only if the file was specified as
|
||||
+ a command line argument (and not an a command line option). */
|
||||
@ -184,13 +170,28 @@ Index: gdb-7.7.50.20140609/gdb/main.c
|
||||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
- catch_command_errors returns non-zero on success! */
|
||||
- if (catch_command_errors (exec_file_attach, execarg,
|
||||
- if (catch_command_errors_const (exec_file_attach, execarg,
|
||||
- !batch_flag, RETURN_MASK_ALL))
|
||||
+ catch_command_errors returns non-zero on success!
|
||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||
+ as a core file. */
|
||||
+ if (catch_command_errors (func, execarg, !batch_flag, RETURN_MASK_ALL)
|
||||
+ if (catch_command_errors_const (func, execarg, !batch_flag,
|
||||
+ RETURN_MASK_ALL)
|
||||
+ && core_bfd == NULL)
|
||||
catch_command_errors_const (symbol_file_add_main, symarg,
|
||||
!batch_flag, RETURN_MASK_ALL);
|
||||
}
|
||||
Index: gdb-7.8.50.20141228/gdb/common/common-exceptions.h
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/common/common-exceptions.h 2015-01-03 23:18:38.097427908 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/common/common-exceptions.h 2015-01-03 23:19:02.449556396 +0100
|
||||
@@ -99,6 +99,9 @@ enum errors {
|
||||
/* Requested feature, method, mechanism, etc. is not supported. */
|
||||
NOT_SUPPORTED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.7.50.20140609/gdb/event-top.c
|
||||
Index: gdb-7.8.50.20141228/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/event-top.c 2014-06-13 20:10:19.632787642 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/event-top.c 2014-06-13 20:11:49.605878557 +0200
|
||||
@@ -38,6 +38,7 @@
|
||||
--- gdb-7.8.50.20141228.orig/gdb/event-top.c 2015-01-01 17:12:24.881489087 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/event-top.c 2015-01-01 17:12:28.821486803 +0100
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "gdbcmd.h" /* for dont_repeat() */
|
||||
#include "annotate.h"
|
||||
#include "maint.h"
|
||||
@ -10,7 +10,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -176,6 +177,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
@@ -180,6 +181,8 @@ rl_callback_read_char_wrapper (gdb_clien
|
||||
void
|
||||
cli_command_loop (void *data)
|
||||
{
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
|
||||
display_gdb_prompt (0);
|
||||
|
||||
/* Now it's time to start the event loop. */
|
||||
@@ -243,6 +246,8 @@ display_gdb_prompt (char *new_prompt)
|
||||
@@ -298,6 +301,8 @@ display_gdb_prompt (const char *new_prom
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.7.50.20140609/gdb/event-top.c
|
||||
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
|
||||
|
||||
/* Do not call the python hook on an explicit prompt change as
|
||||
Index: gdb-7.7.50.20140609/gdb/symfile.h
|
||||
Index: gdb-7.8.50.20141228/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:10:19.633787643 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:31.066799158 +0200
|
||||
@@ -573,6 +573,8 @@ void map_symbol_filenames (symbol_filena
|
||||
--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-01 17:12:24.881489087 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-01 17:12:28.822486802 +0100
|
||||
@@ -577,6 +577,8 @@ void map_symbol_filenames (symbol_filena
|
||||
/* build-id support. */
|
||||
extern struct elf_build_id *build_id_addr_get (CORE_ADDR addr);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
@ -41,11 +41,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:19.634787644 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:10:31.067799159 +0200
|
||||
@@ -1492,7 +1492,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:24.883489085 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-01 17:12:28.823486801 +0100
|
||||
@@ -1522,7 +1522,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -54,11 +54,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:19.635787645 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:10:31.068799160 +0200
|
||||
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:24.884489085 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-01 17:12:28.823486801 +0100
|
||||
@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -67,22 +67,22 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
|
||||
send_gdb "190-gdb-set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
|
||||
Index: gdb-7.7.50.20140609/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.8.50.20141228/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/tui/tui-interp.c 2014-06-13 20:10:31.068799160 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/tui/tui-interp.c 2014-06-13 20:10:47.806816542 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "exceptions.h"
|
||||
--- gdb-7.8.50.20141228.orig/gdb/tui/tui-interp.c 2015-01-01 17:12:28.824486801 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/tui/tui-interp.c 2015-01-01 17:12:43.240478444 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "tui/tui-io.h"
|
||||
#include "infrun.h"
|
||||
#include "observer.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
static struct ui_out *tui_ui_out (struct interp *self);
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/aclocal.m4
|
||||
Index: gdb-7.8.50.20141228/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/aclocal.m4 2014-06-13 20:10:19.636787646 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/aclocal.m4 2014-06-13 20:10:31.069799161 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/aclocal.m4 2015-01-01 17:12:24.885489084 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/aclocal.m4 2015-01-01 17:12:28.824486801 +0100
|
||||
@@ -11,6 +11,221 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
@ -305,10 +305,10 @@ Index: gdb-7.7.50.20140609/gdb/aclocal.m4
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
Index: gdb-7.7.50.20140609/gdb/config.in
|
||||
Index: gdb-7.8.50.20141228/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/config.in 2014-06-13 20:10:19.637787647 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/config.in 2014-06-13 20:10:31.069799161 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/config.in 2015-01-01 17:12:24.885489084 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/config.in 2015-01-01 17:12:28.824486801 +0100
|
||||
@@ -33,6 +33,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -319,7 +319,7 @@ Index: gdb-7.7.50.20140609/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -210,6 +213,9 @@
|
||||
@@ -207,6 +210,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -329,11 +329,11 @@ Index: gdb-7.7.50.20140609/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/configure
|
||||
Index: gdb-7.8.50.20141228/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/configure 2014-06-13 20:10:19.642787652 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/configure 2014-06-13 20:10:31.073799165 +0200
|
||||
@@ -692,6 +692,11 @@ PKGVERSION
|
||||
--- gdb-7.8.50.20141228.orig/gdb/configure 2015-01-01 17:12:24.891489081 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/configure 2015-01-01 17:12:28.828486798 +0100
|
||||
@@ -698,6 +698,11 @@ PKGVERSION
|
||||
HAVE_NATIVE_GCORE_TARGET
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -345,7 +345,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -795,6 +800,7 @@ with_gdb_datadir
|
||||
@@ -801,6 +806,7 @@ with_gdb_datadir
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
@ -353,7 +353,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -846,6 +852,11 @@ CPPFLAGS
|
||||
@@ -852,6 +858,11 @@ CPPFLAGS
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
@ -365,7 +365,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1516,6 +1527,8 @@ Optional Packages:
|
||||
@@ -1522,6 +1533,8 @@ Optional Packages:
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
@ -374,7 +374,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1565,6 +1578,13 @@ Some influential environment variables:
|
||||
@@ -1571,6 +1584,13 @@ Some influential environment variables:
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
@ -388,7 +388,7 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
||||
the first program found out of: `bison -y', `byacc', `yacc'.
|
||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||
@@ -5160,6 +5180,491 @@ _ACEOF
|
||||
@@ -5267,6 +5287,491 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -880,11 +880,11 @@ Index: gdb-7.7.50.20140609/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.7.50.20140609/gdb/configure.ac
|
||||
Index: gdb-7.8.50.20141228/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/configure.ac 2014-06-13 20:10:19.643787653 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/configure.ac 2014-06-13 20:10:31.074799166 +0200
|
||||
@@ -165,6 +165,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
|
||||
--- gdb-7.8.50.20141228.orig/gdb/configure.ac 2015-01-01 17:12:24.893489079 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/configure.ac 2015-01-01 17:12:28.829486798 +0100
|
||||
@@ -172,6 +172,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
|
||||
@ -1084,11 +1084,11 @@ Index: gdb-7.7.50.20140609/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
Index: gdb-7.8.50.20141228/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:10:19.644787654 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:10:31.074799166 +0200
|
||||
@@ -316,7 +316,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-01 17:12:24.894489079 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-01 17:12:28.829486798 +0100
|
||||
@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
@ -1097,11 +1097,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
|
||||
do_cleanups (back_to);
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
Index: gdb-7.8.50.20141228/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:10:19.644787654 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:10:31.075799167 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-01 17:12:24.894489079 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-01 17:12:28.830486797 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
#include <sys/stat.h>
|
||||
@ -1109,7 +1109,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
|
||||
#define BUILD_ID_VERBOSE_NONE 0
|
||||
#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
@@ -666,8 +667,360 @@ build_id_to_filename (const struct elf_b
|
||||
@@ -664,8 +665,360 @@ build_id_to_filename (const struct elf_b
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1471,7 +1471,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -721,11 +1074,17 @@ missing_filepair_change (void)
|
||||
@@ -719,11 +1072,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -1489,7 +1489,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -792,14 +1151,34 @@ debug_print_missing (const char *binary,
|
||||
@@ -790,14 +1149,34 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
Index: gdb-7.8.50.20141228/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/corelow.c 2014-06-13 20:09:37.369745221 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/corelow.c 2014-06-13 20:09:42.407750265 +0200
|
||||
@@ -49,6 +49,10 @@
|
||||
--- gdb-7.8.50.20141228.orig/gdb/corelow.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/corelow.c 2015-01-03 23:12:08.691349454 +0100
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "completer.h"
|
||||
#include "filestuff.h"
|
||||
@ -13,7 +13,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
@@ -272,6 +276,53 @@ add_to_thread_list (bfd *abfd, asection
|
||||
@@ -266,6 +270,53 @@ add_to_thread_list (bfd *abfd, asection
|
||||
inferior_ptid = ptid; /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
/* This routine opens and sets up the core file bfd. */
|
||||
|
||||
static void
|
||||
@@ -410,6 +461,14 @@ core_open (char *filename, int from_tty)
|
||||
@@ -405,6 +456,14 @@ core_open (const char *arg, int from_tty
|
||||
switch_to_thread (thread->ptid);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
post_create_inferior (&core_ops, from_tty);
|
||||
|
||||
/* Now go through the target stack looking for threads since there
|
||||
@@ -1029,4 +1088,11 @@ _initialize_corelow (void)
|
||||
@@ -1035,4 +1094,11 @@ _initialize_corelow (void)
|
||||
init_core_ops ();
|
||||
|
||||
add_target_with_completer (&core_ops, filename_completer);
|
||||
@ -94,11 +94,11 @@ Index: gdb-7.7.50.20140609/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.7.50.20140609/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.8.50.20141228/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/doc/gdb.texinfo 2014-06-13 20:09:37.380745232 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/doc/gdb.texinfo 2014-06-13 20:09:42.417750275 +0200
|
||||
@@ -17547,6 +17547,27 @@ information files.
|
||||
--- gdb-7.8.50.20141228.orig/gdb/doc/gdb.texinfo 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/doc/gdb.texinfo 2015-01-03 23:12:08.701349509 +0100
|
||||
@@ -17930,6 +17930,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -126,19 +126,19 @@ Index: gdb-7.7.50.20140609/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.7.50.20140609/gdb/solib-svr4.c
|
||||
Index: gdb-7.8.50.20141228/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/solib-svr4.c 2014-06-13 20:09:37.382745234 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/solib-svr4.c 2014-06-13 20:09:42.418750276 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "exceptions.h"
|
||||
--- gdb-7.8.50.20141228.orig/gdb/solib-svr4.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/solib-svr4.c 2015-01-03 23:12:08.702349514 +0100
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "auxv.h"
|
||||
#include "gdb_bfd.h"
|
||||
#include "probe.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
|
||||
static int svr4_have_link_map_offsets (void);
|
||||
@@ -1369,9 +1370,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||
@@ -1366,9 +1367,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -194,11 +194,11 @@ Index: gdb-7.7.50.20140609/gdb/solib-svr4.c
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
Index: gdb-7.7.50.20140609/gdb/elfread.c
|
||||
Index: gdb-7.8.50.20141228/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/elfread.c 2014-06-13 20:09:37.383745235 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/elfread.c 2014-06-13 20:09:42.418750276 +0200
|
||||
@@ -1335,9 +1335,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
--- gdb-7.8.50.20141228.orig/gdb/elfread.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/elfread.c 2015-01-03 23:12:08.703349519 +0100
|
||||
@@ -1339,9 +1339,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
@ -211,7 +211,7 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1351,6 +1352,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1355,6 +1356,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
@ -224,11 +224,11 @@ Index: gdb-7.7.50.20140609/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/symfile.h
|
||||
Index: gdb-7.8.50.20141228/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/symfile.h 2014-06-13 20:09:42.419750277 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/symfile.h 2014-06-13 20:10:04.478772510 +0200
|
||||
@@ -570,6 +570,10 @@ void expand_symtabs_matching (expand_sym
|
||||
--- gdb-7.8.50.20141228.orig/gdb/symfile.h 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/symfile.h 2015-01-03 23:12:08.703349519 +0100
|
||||
@@ -574,6 +574,10 @@ void expand_symtabs_matching (expand_sym
|
||||
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname);
|
||||
|
||||
@ -239,11 +239,11 @@ Index: gdb-7.7.50.20140609/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
/* Names for a dwarf2 debugging section. The field NORMAL is the normal
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:37.384745236 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp 2014-06-13 20:09:42.420750278 +0200
|
||||
@@ -1492,6 +1492,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/gdb.exp 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/gdb.exp 2015-01-03 23:12:08.704349525 +0100
|
||||
@@ -1522,6 +1522,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -260,11 +260,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/gdb.exp
|
||||
return 0
|
||||
}
|
||||
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:37.385745237 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp 2014-06-13 20:09:42.421750279 +0200
|
||||
@@ -212,6 +212,16 @@ proc default_mi_gdb_start { args } {
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/lib/mi-support.exp 2015-01-03 23:12:08.705349530 +0100
|
||||
@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -281,11 +281,11 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/lib/mi-support.exp
|
||||
# If allowing the inferior to have its own PTY then assign the inferior
|
||||
# its own terminal device here.
|
||||
if { $separate_inferior_pty } {
|
||||
Index: gdb-7.7.50.20140609/gdb/objfiles.h
|
||||
Index: gdb-7.8.50.20141228/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/objfiles.h 2014-06-13 20:09:37.385745237 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/objfiles.h 2014-06-13 20:09:42.421750279 +0200
|
||||
@@ -464,6 +464,10 @@ struct objfile
|
||||
--- gdb-7.8.50.20141228.orig/gdb/objfiles.h 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/objfiles.h 2015-01-03 23:12:08.705349530 +0100
|
||||
@@ -459,6 +459,10 @@ struct objfile
|
||||
|
||||
#define OBJF_NOT_FILENAME (1 << 6)
|
||||
|
||||
@ -296,10 +296,10 @@ Index: gdb-7.7.50.20140609/gdb/objfiles.h
|
||||
/* Declarations for functions defined in objfiles.c */
|
||||
|
||||
extern struct objfile *allocate_objfile (bfd *, const char *name, int);
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:37.385745237 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/corefile.exp 2014-06-13 20:09:42.421750279 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/corefile.exp 2015-01-03 23:12:08.705349530 +0100
|
||||
@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile"
|
||||
pass $test
|
||||
}
|
||||
@ -334,11 +334,11 @@ Index: gdb-7.7.50.20140609/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.7.50.20140609/gdb/build-id.c
|
||||
Index: gdb-7.8.50.20141228/gdb/build-id.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/build-id.c 2014-06-13 20:09:37.386745238 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/build-id.c 2014-06-13 20:09:42.422750280 +0200
|
||||
@@ -27,11 +27,65 @@
|
||||
--- gdb-7.8.50.20141228.orig/gdb/build-id.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/build-id.c 2015-01-03 23:12:40.792523085 +0100
|
||||
@@ -26,11 +26,64 @@
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
@ -359,11 +359,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
|
||||
+ value);
|
||||
+}
|
||||
+
|
||||
|
||||
-/* See build-id.h. */
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
|
||||
|
||||
-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
|
||||
+
|
||||
+static struct elf_build_id *
|
||||
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
|
||||
+{
|
||||
@ -389,24 +389,23 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
+ retval = xmalloc (sizeof *retval - 1 + size);
|
||||
+ retval->size = size;
|
||||
+ memcpy (retval->data, data, size);
|
||||
+
|
||||
|
||||
+ return retval;
|
||||
+ }
|
||||
+ p = descdata + BFD_ALIGN (descsz, 4);
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
|
||||
+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
|
||||
+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
|
||||
+
|
||||
static const struct elf_build_id *
|
||||
+/* See build-id.h. */
|
||||
+
|
||||
const struct elf_build_id *
|
||||
-build_id_bfd_get (bfd *abfd)
|
||||
+build_id_bfd_shdr_get (bfd *abfd)
|
||||
{
|
||||
if (!bfd_check_format (abfd, bfd_object)
|
||||
|| bfd_get_flavour (abfd) != bfd_target_elf_flavour
|
||||
@@ -45,6 +99,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -44,6 +97,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return elf_tdata (abfd)->build_id;
|
||||
}
|
||||
|
||||
@ -755,7 +754,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
/* See build-id.h. */
|
||||
|
||||
int
|
||||
@@ -53,7 +449,7 @@ build_id_verify (bfd *abfd, size_t check
|
||||
@@ -52,7 +447,7 @@ build_id_verify (bfd *abfd, size_t check
|
||||
const struct elf_build_id *found;
|
||||
int retval = 0;
|
||||
|
||||
@ -764,7 +763,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"),
|
||||
@@ -68,20 +464,56 @@ build_id_verify (bfd *abfd, size_t check
|
||||
@@ -67,20 +462,56 @@ build_id_verify (bfd *abfd, size_t check
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -825,7 +824,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@@ -94,8 +526,11 @@ build_id_to_debug_bfd (size_t build_id_l
|
||||
@@ -93,8 +524,11 @@ build_id_to_debug_bfd (size_t build_id_l
|
||||
size_t debugdir_len = strlen (debugdir);
|
||||
const gdb_byte *data = build_id;
|
||||
size_t size = build_id_len;
|
||||
@ -838,7 +837,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
|
||||
memcpy (link, debugdir, debugdir_len);
|
||||
s = &link[debugdir_len];
|
||||
@@ -109,44 +544,282 @@ build_id_to_debug_bfd (size_t build_id_l
|
||||
@@ -108,44 +542,282 @@ build_id_to_debug_bfd (size_t build_id_l
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -909,7 +908,9 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
+ xfree (filename);
|
||||
+ filename = NULL;
|
||||
+ }
|
||||
+
|
||||
|
||||
- gdb_bfd_unref (abfd);
|
||||
- abfd = NULL;
|
||||
+ if (filename != NULL)
|
||||
+ {
|
||||
+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */
|
||||
@ -935,9 +936,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
|
||||
+ its possible use as an argument for installation command. */
|
||||
+ link_all[len_orig] = ' ';
|
||||
|
||||
- gdb_bfd_unref (abfd);
|
||||
- abfd = NULL;
|
||||
+
|
||||
+ strcpy (&link_all[len_orig + 1], link0_resolved);
|
||||
+ xfree (link0_resolved);
|
||||
+ }
|
||||
@ -1138,7 +1137,7 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (abfd != NULL
|
||||
&& filename_cmp (bfd_get_filename (abfd),
|
||||
@@ -166,3 +839,21 @@ find_separate_debug_file_by_buildid (str
|
||||
@@ -165,3 +837,21 @@ find_separate_debug_file_by_buildid (str
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -1160,11 +1159,24 @@ Index: gdb-7.7.50.20140609/gdb/build-id.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
+}
|
||||
Index: gdb-7.7.50.20140609/gdb/build-id.h
|
||||
Index: gdb-7.8.50.20141228/gdb/build-id.h
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/build-id.h 2014-06-13 20:09:37.386745238 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/build-id.h 2014-06-13 20:09:42.422750280 +0200
|
||||
@@ -32,13 +32,18 @@ extern int build_id_verify (bfd *abfd,
|
||||
--- gdb-7.8.50.20141228.orig/gdb/build-id.h 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/build-id.h 2015-01-03 23:12:08.706349536 +0100
|
||||
@@ -20,9 +20,10 @@
|
||||
#ifndef BUILD_ID_H
|
||||
#define BUILD_ID_H
|
||||
|
||||
-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
|
||||
+/* Separate debuginfo files have corrupted PHDR but SHDR is correct there.
|
||||
+ Locate NT_GNU_BUILD_ID from ABFD and return its content. */
|
||||
|
||||
-extern const struct elf_build_id *build_id_bfd_get (bfd *abfd);
|
||||
+extern const struct elf_build_id *build_id_bfd_shdr_get (bfd *abfd);
|
||||
|
||||
/* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
|
||||
Otherwise, issue a warning and return false. */
|
||||
@@ -36,13 +37,18 @@ extern int build_id_verify (bfd *abfd,
|
||||
the caller. */
|
||||
|
||||
extern bfd *build_id_to_debug_bfd (size_t build_id_len,
|
||||
@ -1185,11 +1197,11 @@ Index: gdb-7.7.50.20140609/gdb/build-id.h
|
||||
+ char **build_id_filename_return);
|
||||
|
||||
#endif /* BUILD_ID_H */
|
||||
Index: gdb-7.7.50.20140609/gdb/dwarf2read.c
|
||||
Index: gdb-7.8.50.20141228/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/dwarf2read.c 2014-06-13 20:09:37.389745241 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/dwarf2read.c 2014-06-13 20:09:42.425750283 +0200
|
||||
@@ -2446,7 +2446,7 @@ dwarf2_get_dwz_file (void)
|
||||
--- gdb-7.8.50.20141228.orig/gdb/dwarf2read.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/dwarf2read.c 2015-01-03 23:12:08.711349563 +0100
|
||||
@@ -2443,7 +2443,7 @@ dwarf2_get_dwz_file (void)
|
||||
}
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
@ -1198,3 +1210,25 @@ Index: gdb-7.7.50.20140609/gdb/dwarf2read.c
|
||||
|
||||
if (dwz_bfd == NULL)
|
||||
error (_("could not find '.gnu_debugaltlink' file for %s"),
|
||||
Index: gdb-7.8.50.20141228/gdb/python/py-objfile.c
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/python/py-objfile.c 2015-01-03 23:11:54.018270090 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/python/py-objfile.c 2015-01-03 23:12:08.712349568 +0100
|
||||
@@ -118,7 +118,7 @@ objfpy_get_build_id (PyObject *self, voi
|
||||
|
||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
}
|
||||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
|
||||
@@ -467,7 +467,7 @@ objfpy_lookup_objfile_by_build_id (const
|
||||
/* Don't return separate debug files. */
|
||||
if (objfile->separate_debug_objfile_backlink != NULL)
|
||||
continue;
|
||||
- obfd_build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
if (obfd_build_id == NULL)
|
||||
continue;
|
||||
if (objfpy_build_id_matches (obfd_build_id, build_id))
|
||||
|
@ -3,23 +3,10 @@
|
||||
Port to GDB-6.8pre.
|
||||
Remove the `[' character from the GDB-6.8 default message.
|
||||
|
||||
Index: gdb-7.6.90.20140127/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-04 23:47:39.275034491 +0100
|
||||
+++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-04 23:48:11.943074132 +0100
|
||||
@@ -426,7 +426,7 @@ holding the child stopped. Try \"set de
|
||||
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
||||
}
|
||||
|
||||
- if (info_verbose || debug_linux_nat)
|
||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat)
|
||||
{
|
||||
target_terminal_ours ();
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c 2014-02-04 23:47:39.275034491 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.c 2015-01-06 19:31:40.703988534 +0100
|
||||
@@ -0,0 +1,57 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -78,10 +65,10 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp 2014-02-04 23:47:39.276034493 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/fork-detach.exp 2015-01-06 19:31:40.704988538 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -119,3 +106,16 @@ Index: gdb-7.6.90.20140127/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
+gdb_test "" \
|
||||
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
|
||||
+ "Info message caught"
|
||||
Index: gdb-7.8.50.20141228/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/infrun.c 2015-01-06 19:31:40.262986644 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/infrun.c 2015-01-06 19:43:54.865219096 +0100
|
||||
@@ -456,7 +456,7 @@ holding the child stopped. Try \"set de
|
||||
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
||||
}
|
||||
|
||||
- if (info_verbose || debug_infrun)
|
||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
Index: gdb-7.8.90.20150125/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 03:59:36.000000000 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:36:43.637294782 +0200
|
||||
@@ -84,7 +84,7 @@ static int follow_fork (void);
|
||||
--- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:36:16.651716159 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:36:26.491758571 +0100
|
||||
@@ -86,7 +86,7 @@ static void follow_inferior_reset_breakp
|
||||
static void set_schedlock_func (char *args, int from_tty,
|
||||
struct cmd_list_element *c);
|
||||
|
||||
@ -34,17 +34,16 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
|
||||
static void xdb_handle_command (char *args, int from_tty);
|
||||
|
||||
@@ -1742,7 +1742,8 @@ user_visible_resume_ptid (int step)
|
||||
@@ -1998,7 +1998,7 @@ user_visible_resume_ptid (int step)
|
||||
resume_ptid = inferior_ptid;
|
||||
}
|
||||
else if ((scheduler_mode == schedlock_on)
|
||||
|| (scheduler_mode == schedlock_step
|
||||
- && (step || singlestep_breakpoints_inserted_p)))
|
||||
+ && (step == RESUME_STEP_USER
|
||||
+ || singlestep_breakpoints_inserted_p)))
|
||||
- || (scheduler_mode == schedlock_step && step))
|
||||
+ || (scheduler_mode == schedlock_step && step == RESUME_STEP_USER))
|
||||
{
|
||||
/* User-settable 'scheduler' mode requires solo thread resume. */
|
||||
resume_ptid = inferior_ptid;
|
||||
@@ -1760,7 +1761,7 @@ user_visible_resume_ptid (int step)
|
||||
@@ -2022,7 +2022,7 @@ user_visible_resume_ptid (int step)
|
||||
STEP nonzero if we should step (zero to continue instead).
|
||||
SIG is the signal to give the inferior (zero for none). */
|
||||
void
|
||||
@ -53,7 +52,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
{
|
||||
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
|
||||
struct regcache *regcache = get_current_regcache ();
|
||||
@@ -1800,9 +1801,13 @@ resume (int step, enum gdb_signal sig)
|
||||
@@ -2064,9 +2064,13 @@ resume (int step, enum gdb_signal sig)
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -69,7 +68,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
tp->control.trap_expected,
|
||||
target_pid_to_str (inferior_ptid),
|
||||
paddress (gdbarch, pc));
|
||||
@@ -2188,6 +2193,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2543,6 +2547,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
struct thread_info *tp;
|
||||
CORE_ADDR pc;
|
||||
struct address_space *aspace;
|
||||
@ -77,7 +76,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
"set follow-fork-mode" command; otherwise, we'll just proceed
|
||||
@@ -2230,13 +2236,19 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2586,13 +2591,19 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
Note, we don't do this in reverse, because we won't
|
||||
actually be executing the breakpoint insn anyway.
|
||||
We'll be (un-)executing the previous instruction. */
|
||||
@ -97,7 +96,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2288,6 +2300,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
@@ -2647,6 +2658,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
tp->prev_pc = regcache_read_pc (get_current_regcache ());
|
||||
switch_to_thread (step_over->ptid);
|
||||
tp = step_over;
|
||||
@ -105,9 +104,9 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2375,9 +2388,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
/* Reset to normal state. */
|
||||
init_infwait_state ();
|
||||
@@ -2699,9 +2711,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
|
||||
correctly when the inferior is stopped. */
|
||||
tp->prev_pc = regcache_read_pc (get_current_regcache ());
|
||||
|
||||
+ if (tp->control.trap_expected || step)
|
||||
+ resume_step = RESUME_STEP_USER;
|
||||
@ -121,7 +120,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
|
||||
/* Wait for it to stop (if not standalone)
|
||||
and in any case decode why it stopped, and act accordingly. */
|
||||
@@ -5359,13 +5376,16 @@ switch_back_to_stepped_thread (struct ex
|
||||
@@ -5684,14 +5700,16 @@ switch_back_to_stepped_thread (struct ex
|
||||
|
||||
/* Is thread TP in the middle of single-stepping? */
|
||||
|
||||
@ -133,6 +132,7 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
+ if ((tp->control.step_range_end
|
||||
&& tp->control.step_resume_breakpoint == NULL)
|
||||
- || tp->control.trap_expected
|
||||
- || tp->stepped_breakpoint
|
||||
- || bpstat_should_step ());
|
||||
+ || tp->control.trap_expected)
|
||||
+ return RESUME_STEP_USER;
|
||||
@ -142,11 +142,11 @@ Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||
}
|
||||
|
||||
/* Inferior has stepped into a subroutine call with source code that
|
||||
Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
Index: gdb-7.8.90.20150125/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 03:59:37.000000000 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 21:31:19.449949814 +0200
|
||||
@@ -2709,7 +2709,11 @@ static int
|
||||
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:36:16.653716168 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:36:26.492758576 +0100
|
||||
@@ -2648,7 +2648,11 @@ static int
|
||||
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
|
||||
{
|
||||
if (lp->last_resume_kind == resume_step
|
||||
@ -159,10 +159,10 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
Index: gdb-7.7.90.20140613/gdb/linux-nat.h
|
||||
Index: gdb-7.8.90.20150125/gdb/linux-nat.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.h 2014-06-13 03:59:37.000000000 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/linux-nat.h 2014-06-13 21:31:19.449949814 +0200
|
||||
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.h 2015-01-25 08:36:16.653716168 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/linux-nat.h 2015-01-25 08:36:44.948838126 +0100
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@ -171,22 +171,22 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.h
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
@@ -59,8 +60,8 @@ struct lwp_info
|
||||
/* If non-zero, a pending wait status. */
|
||||
int status;
|
||||
@@ -88,8 +89,8 @@ struct lwp_info
|
||||
running and not stepping, this is 0. */
|
||||
CORE_ADDR stop_pc;
|
||||
|
||||
- /* Non-zero if we were stepping this LWP. */
|
||||
- int step;
|
||||
+ /* The kind of stepping of this LWP. */
|
||||
+ enum resume_step step;
|
||||
|
||||
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
|
||||
watchpoint trap. */
|
||||
Index: gdb-7.7.90.20140613/gdb/infrun.h
|
||||
/* The reason the LWP last stopped, if we need to track it
|
||||
(breakpoint, watchpoint, etc.) */
|
||||
Index: gdb-7.8.90.20150125/gdb/infrun.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/infrun.h 2014-06-13 03:59:36.000000000 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/infrun.h 2014-06-13 21:31:19.449949814 +0200
|
||||
@@ -89,7 +89,14 @@ extern void proceed (CORE_ADDR, enum gdb
|
||||
--- gdb-7.8.90.20150125.orig/gdb/infrun.h 2015-01-25 08:36:16.654716172 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/infrun.h 2015-01-25 08:36:26.493758580 +0100
|
||||
@@ -92,7 +92,14 @@ extern void proceed (CORE_ADDR, enum gdb
|
||||
|
||||
/* The `resume' routine should only be called in special circumstances.
|
||||
Normally, use `proceed', which handles a lot of bookkeeping. */
|
||||
@ -200,12 +200,12 @@ Index: gdb-7.7.90.20140613/gdb/infrun.h
|
||||
+ };
|
||||
+extern void resume (enum resume_step, enum gdb_signal);
|
||||
|
||||
extern ptid_t user_visible_resume_ptid (int step);
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
|
||||
index 2a30604..ee1fd11 100644
|
||||
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
|
||||
/* Return a ptid representing the set of threads that we will proceed,
|
||||
in the perspective of the user/frontend. */
|
||||
Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 2015-01-25 08:36:16.654716172 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp 2015-01-25 08:36:26.493758580 +0100
|
||||
@@ -97,7 +97,7 @@ gdb_test "set debug infrun 1"
|
||||
|
||||
gdb_test \
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
Index: gdb-7.8.90.20150125/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/linux-nat.c 2014-06-13 23:03:34.364177614 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/linux-nat.c 2014-06-13 23:05:07.749279122 +0200
|
||||
@@ -178,6 +178,9 @@ blocked. */
|
||||
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:42:49.381408899 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:43:16.378525322 +0100
|
||||
@@ -174,6 +174,9 @@ blocked. */
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
@ -12,23 +12,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -683,7 +686,14 @@ holding the child stopped. Try \"set de
|
||||
parent_inf->waiting_for_vfork_done = 0;
|
||||
}
|
||||
else if (detach_fork)
|
||||
- target_detach (NULL, 0);
|
||||
+ {
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
+ target_detach (NULL, 0);
|
||||
+ }
|
||||
|
||||
/* Note that the detach above makes PARENT_INF dangling. */
|
||||
|
||||
@@ -1107,6 +1117,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
@@ -924,6 +927,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNPAW: Attaching to a stopped process\n");
|
||||
@ -36,7 +20,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1529,6 +1540,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
@@ -1424,6 +1428,9 @@ get_pending_status (struct lwp_info *lp,
|
||||
gdb_signal_to_string (signo));
|
||||
}
|
||||
|
||||
@ -46,7 +30,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1642,6 +1656,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
@@ -1537,6 +1544,8 @@ linux_nat_detach (struct target_ops *ops
|
||||
}
|
||||
else
|
||||
linux_ops->to_detach (ops, args, from_tty);
|
||||
@ -54,8 +38,8 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
+ pid_was_stopped = 0;
|
||||
}
|
||||
|
||||
/* Resume LP. */
|
||||
@@ -1824,6 +1840,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
/* Resume execution of the inferior process. If STEP is nonzero,
|
||||
@@ -1741,6 +1750,14 @@ linux_nat_resume (struct target_ops *ops
|
||||
return;
|
||||
}
|
||||
|
||||
@ -70,7 +54,7 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
|
||||
|
||||
@@ -3870,6 +3894,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
@@ -3723,6 +3740,8 @@ linux_nat_mourn_inferior (struct target_
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
@ -79,10 +63,10 @@ Index: gdb-7.7.90.20140613/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
Index: gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:34.365177615 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp 2014-06-13 23:03:37.162180660 +0200
|
||||
--- gdb-7.8.90.20150125.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:42:49.382408903 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-01-25 08:43:16.379525327 +0100
|
||||
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
@ -150,3 +134,19 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
Index: gdb-7.8.90.20150125/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/infrun.c 2015-01-25 08:42:49.385408916 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/infrun.c 2015-01-25 08:43:16.381525335 +0100
|
||||
@@ -600,6 +600,11 @@ holding the child stopped. Try \"set de
|
||||
child_pid);
|
||||
}
|
||||
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
target_detach (NULL, 0);
|
||||
}
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d7a923d876ecfa1cec4c1c79c014c9d8e58783a25855a95cf260275f61990647
|
||||
size 32926653
|
3
gdb-7.9.tar.xz
Normal file
3
gdb-7.9.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9b315651a16528f7af8c7d8284699fb0c965df316cc7339bb0b7bae335848392
|
||||
size 17859428
|
305
gdb-archer.patch
305
gdb-archer.patch
@ -2,38 +2,65 @@ http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||
|
||||
GIT snapshot:
|
||||
commit b88230edf4e2da948d633c283ba0893bf22bd7ae
|
||||
commit d1a09bf2f8e7e3f752a1bbeba135bc080bf0c865
|
||||
|
||||
tromey/python
|
||||
|
||||
|
||||
Amended for GDB 7.8.1 - Chris Horler
|
||||
diff --git a/README.archer b/README.archer
|
||||
new file mode 100644
|
||||
index 0000000..173b8ea
|
||||
--- /dev/null
|
||||
+++ b/README.archer
|
||||
@@ -0,0 +1,2 @@
|
||||
+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 be69b6f..a4483e4 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1515,6 +1515,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/data-directory/Makefile.in gdb-7.8.1/gdb/data-directory/Makefile.in
|
||||
--- gdb-7.8.1.orig/gdb/data-directory/Makefile.in 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/data-directory/Makefile.in 2014-12-14 20:15:43.028846584 +0000
|
||||
@@ -65,6 +65,8 @@
|
||||
+.gdbinit: $(srcdir)/gdbinit.in config.status
|
||||
+ CONFIG_FILES=".gdbinit:gdbinit.in" \
|
||||
+ CONFIG_COMMANDS= \
|
||||
+ CONFIG_HEADERS= \
|
||||
+ $(SHELL) config.status
|
||||
+
|
||||
config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 00c70bb..f93ffdd 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -64,7 +64,10 @@ PYTHON_FILE_LIST = \
|
||||
gdb/printing.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/frame_filters.py \
|
||||
gdb/command/type_printers.py \
|
||||
@@ -73,6 +75,8 @@
|
||||
gdb/command/explore.py \
|
||||
@@ -74,6 +77,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/function/__init__.py \
|
||||
gdb/function/caller_is.py \
|
||||
gdb/function/strfns.py \
|
||||
+ gdb/function/caller_is.py \
|
||||
+ gdb/function/in_scope.py \
|
||||
gdb/printer/__init__.py \
|
||||
gdb/printer/bound_registers.py
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/gdb.texinfo gdb-7.8.1/gdb/doc/gdb.texinfo
|
||||
--- gdb-7.8.1.orig/gdb/doc/gdb.texinfo 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/doc/gdb.texinfo 2014-12-14 20:13:31.604314553 +0000
|
||||
@@ -1225,6 +1225,16 @@
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index e086c33..5dfeb1d 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -1225,6 +1225,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.
|
||||
|
||||
@ -50,10 +77,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/gdb.texinfo gdb-7.8.1/gdb/doc/gdb.t
|
||||
@c resolve the situation of these eventually
|
||||
@item -tui
|
||||
@cindex @code{--tui}
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/python.texi gdb-7.8.1/gdb/doc/python.texi
|
||||
--- gdb-7.8.1.orig/gdb/doc/python.texi 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/doc/python.texi 2014-12-14 20:13:31.609314573 +0000
|
||||
@@ -88,8 +88,6 @@
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index 234ce5c..e940125 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -88,8 +88,6 @@ containing @code{end}. For example:
|
||||
|
||||
@smallexample
|
||||
(@value{GDBP}) python
|
||||
@ -62,9 +90,10 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/doc/python.texi gdb-7.8.1/gdb/doc/pytho
|
||||
>print 23
|
||||
>end
|
||||
23
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in gdb-7.8.1/gdb/gdb-gdb.gdb.in
|
||||
--- gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in 2014-06-11 17:34:41.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/gdb-gdb.gdb.in 2014-12-14 20:13:31.610314577 +0000
|
||||
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||
index 05a38b2..9801fdf 100644
|
||||
--- a/gdb/gdb-gdb.gdb.in
|
||||
+++ b/gdb/gdb-gdb.gdb.in
|
||||
@@ -1,5 +1,15 @@
|
||||
echo Setting up the environment for debugging gdb.\n
|
||||
|
||||
@ -81,10 +110,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdb-gdb.gdb.in gdb-7.8.1/gdb/gdb-gdb.gd
|
||||
if !$gdb_init_done
|
||||
set variable $gdb_init_done = 1
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
--- gdb-7.8.1.orig/gdb/main.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/main.c 2014-12-14 20:13:31.612314585 +0000
|
||||
@@ -37,6 +37,7 @@
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index accd927..ed211f6 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "interps.h"
|
||||
#include "main.h"
|
||||
@ -92,7 +122,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "objfiles.h"
|
||||
@@ -426,6 +427,8 @@
|
||||
@@ -444,6 +445,8 @@ captured_main (void *data)
|
||||
char *cdarg = NULL;
|
||||
char *ttyarg = NULL;
|
||||
|
||||
@ -101,7 +131,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
/* These are static so that we can take their address in an
|
||||
initializer. */
|
||||
static int print_help;
|
||||
@@ -633,10 +636,14 @@
|
||||
@@ -649,10 +652,14 @@ captured_main (void *data)
|
||||
{"args", no_argument, &set_args, 1},
|
||||
{"l", required_argument, 0, 'l'},
|
||||
{"return-child-result", no_argument, &return_child_result, 1},
|
||||
@ -117,7 +147,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
{
|
||||
int option_index;
|
||||
|
||||
@@ -654,6 +661,9 @@
|
||||
@@ -670,6 +677,9 @@ captured_main (void *data)
|
||||
case 0:
|
||||
/* Long option that just sets a flag. */
|
||||
break;
|
||||
@ -127,7 +157,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
case OPT_SE:
|
||||
symarg = optarg;
|
||||
execarg = optarg;
|
||||
@@ -858,7 +868,31 @@
|
||||
@@ -851,7 +861,31 @@ captured_main (void *data)
|
||||
|
||||
/* Now that gdb_init has created the initial inferior, we're in
|
||||
position to set args for that inferior. */
|
||||
@ -160,7 +190,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1144,7 +1178,8 @@
|
||||
@@ -1129,7 +1163,8 @@ captured_main (void *data)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
@ -170,7 +200,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1155,13 +1190,25 @@
|
||||
@@ -1140,13 +1175,25 @@ captured_main (void *data)
|
||||
/* Show time and/or space usage. */
|
||||
do_cleanups (pre_stat_chain);
|
||||
|
||||
@ -202,7 +232,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1195,6 +1242,12 @@
|
||||
@@ -1180,6 +1227,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\
|
||||
@ -215,7 +245,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1240,6 +1293,13 @@
|
||||
@@ -1225,6 +1278,13 @@ Output and user interface control:\n\n\
|
||||
fputs_unfiltered (_("\
|
||||
--dbx DBX compatibility mode.\n\
|
||||
--xdb XDB compatibility mode.\n\
|
||||
@ -229,25 +259,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/main.c gdb-7.8.1/gdb/main.c
|
||||
-q, --quiet, --silent\n\
|
||||
Do not print version number on startup.\n\n\
|
||||
"), stream);
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/Makefile.in gdb-7.8.1/gdb/Makefile.in
|
||||
--- gdb-7.8.1.orig/gdb/Makefile.in 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/Makefile.in 2014-12-14 20:13:31.583314468 +0000
|
||||
@@ -1476,6 +1476,12 @@
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
+.gdbinit: $(srcdir)/gdbinit.in config.status
|
||||
+ CONFIG_FILES=".gdbinit:gdbinit.in" \
|
||||
+ CONFIG_COMMANDS= \
|
||||
+ CONFIG_HEADERS= \
|
||||
+ $(SHELL) config.status
|
||||
+
|
||||
config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
--- gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/python/lib/gdb/command/ignore_errors.py 2014-12-14 20:13:31.613314589 +0000
|
||||
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
new file mode 100644
|
||||
index 0000000..6fa48ff
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Ignore errors in user commands.
|
||||
+
|
||||
@ -286,9 +302,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
+ pass
|
||||
+
|
||||
+IgnoreErrorsCommand ()
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py
|
||||
--- gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/python/lib/gdb/command/pahole.py 2014-12-14 20:13:31.613314589 +0000
|
||||
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
||||
new file mode 100644
|
||||
index 0000000..dee04f5
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/pahole.py
|
||||
@@ -0,0 +1,81 @@
|
||||
+# pahole command for gdb
|
||||
+
|
||||
@ -321,7 +339,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7.
|
||||
+ def maybe_print_hole(self, bitpos, field_bitpos):
|
||||
+ if bitpos != field_bitpos:
|
||||
+ hole = field_bitpos - bitpos
|
||||
+ print ' /* XXX %d bit hole, try to pack */' % hole
|
||||
+ print (' /* XXX %d bit hole, try to pack */' % hole)
|
||||
+
|
||||
+ def pahole (self, type, level, name):
|
||||
+ if name is None:
|
||||
@ -329,7 +347,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7.
|
||||
+ tag = type.tag
|
||||
+ if tag is None:
|
||||
+ tag = ''
|
||||
+ print '%sstruct %s {' % (' ' * (2 * level), tag)
|
||||
+ print ('%sstruct %s {' % (' ' * (2 * level), tag))
|
||||
+ bitpos = 0
|
||||
+ for field in type.fields ():
|
||||
+ # Skip static fields.
|
||||
@ -347,95 +365,35 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/command/pahole.py gdb-7.
|
||||
+ fieldsize = 8 * ftype.sizeof
|
||||
+
|
||||
+ # TARGET_CHAR_BIT
|
||||
+ print ' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)),
|
||||
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)))
|
||||
+ bitpos = bitpos + fieldsize
|
||||
+
|
||||
+ if ftype.code == gdb.TYPE_CODE_STRUCT:
|
||||
+ self.pahole (ftype, level + 1, field.name)
|
||||
+ else:
|
||||
+ print ' ' * (2 + 2 * level),
|
||||
+ print '%s %s' % (str (ftype), field.name)
|
||||
+ print (' ' * (2 + 2 * level))
|
||||
+ print ('%s %s' % (str (ftype), field.name))
|
||||
+
|
||||
+ if level == 0:
|
||||
+ self.maybe_print_hole(bitpos, 8 * type.sizeof)
|
||||
+
|
||||
+ print ' ' * (14 + 2 * level),
|
||||
+ print '} %s' % name
|
||||
+ print (' ' * (14 + 2 * level))
|
||||
+ print ('} %s' % name)
|
||||
+
|
||||
+ def invoke (self, arg, from_tty):
|
||||
+ type = gdb.lookup_type (arg)
|
||||
+ type = type.strip_typedefs ()
|
||||
+ if type.code != gdb.TYPE_CODE_STRUCT:
|
||||
+ raise TypeError, '%s is not a struct type' % arg
|
||||
+ print ' ' * 14,
|
||||
+ raise (TypeError, '%s is not a struct type' % arg)
|
||||
+ print (' ' * 14)
|
||||
+ self.pahole (type, 0, '')
|
||||
+
|
||||
+Pahole()
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py
|
||||
--- gdb-7.8.1.orig/gdb/python/lib/gdb/function/caller_is.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/python/lib/gdb/function/caller_is.py 2014-12-14 20:13:31.614314594 +0000
|
||||
@@ -0,0 +1,58 @@
|
||||
+# Caller-is functions.
|
||||
+
|
||||
+# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+import gdb
|
||||
+import re
|
||||
+
|
||||
+class CallerIs (gdb.Function):
|
||||
+ """Return True if the calling function's name is equal to a string.
|
||||
+This function takes one or two arguments.
|
||||
+The first argument is the name of a function; if the calling function's
|
||||
+name is equal to this argument, this function returns True.
|
||||
+The optional second argument tells this function how many stack frames
|
||||
+to traverse to find the calling function. The default is 1."""
|
||||
+
|
||||
+ def __init__ (self):
|
||||
+ super (CallerIs, self).__init__ ("caller_is")
|
||||
+
|
||||
+ def invoke (self, name, nframes = 1):
|
||||
+ frame = gdb.selected_frame ()
|
||||
+ while nframes > 0:
|
||||
+ frame = frame.older ()
|
||||
+ nframes = nframes - 1
|
||||
+ return frame.name () == name.string ()
|
||||
+
|
||||
+class CallerMatches (gdb.Function):
|
||||
+ """Return True if the calling function's name matches a string.
|
||||
+This function takes one or two arguments.
|
||||
+The first argument is a regular expression; if the calling function's
|
||||
+name is matched by this argument, this function returns True.
|
||||
+The optional second argument tells this function how many stack frames
|
||||
+to traverse to find the calling function. The default is 1."""
|
||||
+
|
||||
+ def __init__ (self):
|
||||
+ super (CallerMatches, self).__init__ ("caller_matches")
|
||||
+
|
||||
+ def invoke (self, name, nframes = 1):
|
||||
+ frame = gdb.selected_frame ()
|
||||
+ while nframes > 0:
|
||||
+ frame = frame.older ()
|
||||
+ nframes = nframes - 1
|
||||
+ return re.match (name.string (), frame.name ()) is not None
|
||||
+
|
||||
+CallerIs()
|
||||
+CallerMatches()
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py
|
||||
--- gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/python/lib/gdb/function/in_scope.py 2014-12-14 20:13:31.614314594 +0000
|
||||
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
|
||||
new file mode 100644
|
||||
index 0000000..8742680
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
||||
@@ -0,0 +1,47 @@
|
||||
+# In-scope function.
|
||||
+
|
||||
@ -465,7 +423,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py gdb
|
||||
+
|
||||
+ def invoke (self, *vars):
|
||||
+ if len (vars) == 0:
|
||||
+ raise TypeError, "in_scope takes at least one argument"
|
||||
+ raise (TypeError, "in_scope takes at least one argument")
|
||||
+
|
||||
+ # gdb.Value isn't hashable so it can't be put in a map.
|
||||
+ # Convert to string first.
|
||||
@ -484,10 +442,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/lib/gdb/function/in_scope.py gdb
|
||||
+ return wanted == found
|
||||
+
|
||||
+InScope ()
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/python.c
|
||||
--- gdb-7.8.1.orig/gdb/python/python.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/python/python.c 2014-12-14 20:13:31.615314598 +0000
|
||||
@@ -95,6 +95,8 @@
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index b1d8283..54a2d9b 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -93,6 +93,8 @@ const struct extension_language_defn extension_language_python =
|
||||
#include "linespec.h"
|
||||
#include "source.h"
|
||||
#include "version.h"
|
||||
@ -496,7 +455,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py
|
||||
#include "target.h"
|
||||
#include "gdbthread.h"
|
||||
#include "interps.h"
|
||||
@@ -1222,6 +1224,56 @@
|
||||
@@ -1220,6 +1222,83 @@ gdbpy_print_stack (void)
|
||||
|
||||
/* Return the current Progspace.
|
||||
There always is one. */
|
||||
@ -536,7 +495,34 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py
|
||||
+ ensure_python_env (get_current_arch (), current_language);
|
||||
+
|
||||
+ running_python_script = 1;
|
||||
+
|
||||
+#if PYTHON_ABI_VERSION < 3
|
||||
+ PySys_SetArgv (argc - 1, argv + 1);
|
||||
+#else
|
||||
+ {
|
||||
+ wchar_t **wargv = alloca (sizeof (*wargv) * (argc + 1));
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 1; i < argc; i++)
|
||||
+ {
|
||||
+ size_t len = mbstowcs (NULL, argv[i], 0);
|
||||
+ size_t len2;
|
||||
+
|
||||
+ if (len == (size_t) -1)
|
||||
+ {
|
||||
+ fprintf (stderr, "Invalid multibyte argument #%d \"%s\"\n",
|
||||
+ i, argv[i]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ wargv[i] = alloca (sizeof (**wargv) * (len + 1));
|
||||
+ len2 = mbstowcs (wargv[i], argv[i], len + 1);
|
||||
+ assert (len2 == len);
|
||||
+ }
|
||||
+ wargv[argc] = NULL;
|
||||
+ PySys_SetArgv (argc - 1, wargv + 1);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ input = fopen (argv[0], "r");
|
||||
+ if (! input)
|
||||
+ {
|
||||
@ -553,7 +539,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py
|
||||
|
||||
static PyObject *
|
||||
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
|
||||
@@ -1910,6 +1962,8 @@
|
||||
@@ -1913,6 +1992,8 @@ static PyMethodDef 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." },
|
||||
@ -562,9 +548,10 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.c gdb-7.8.1/gdb/python/py
|
||||
{ "parameter", gdbpy_parameter, METH_VARARGS,
|
||||
"Return a gdb parameter's value" },
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.h gdb-7.8.1/gdb/python/python.h
|
||||
--- gdb-7.8.1.orig/gdb/python/python.h 2014-06-11 17:34:41.000000000 +0100
|
||||
+++ gdb-7.8.1/gdb/python/python.h 2014-12-14 20:13:31.616314602 +0000
|
||||
diff --git a/gdb/python/python.h b/gdb/python/python.h
|
||||
index 9e99992..c776e59 100644
|
||||
--- a/gdb/python/python.h
|
||||
+++ b/gdb/python/python.h
|
||||
@@ -25,4 +25,6 @@
|
||||
/* This is all that python exports to gdb. */
|
||||
extern const struct extension_language_defn extension_language_python;
|
||||
@ -572,10 +559,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/python/python.h gdb-7.8.1/gdb/python/py
|
||||
+extern void run_python_script (int argc, char **argv);
|
||||
+
|
||||
#endif /* GDB_PYTHON_H */
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp 2014-12-14 20:10:20.896545646 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.gdb/selftest.exp 2014-12-14 20:13:31.616314602 +0000
|
||||
@@ -92,6 +92,10 @@
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index 0b11e12..e35e829 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -92,6 +92,10 @@ proc do_steps_and_nexts {} {
|
||||
set description "step over cmdarg_vec initialization"
|
||||
set command "step"
|
||||
}
|
||||
@ -586,19 +574,24 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-7.8.
|
||||
-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 -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-frame.exp 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.python/py-frame.exp 2014-12-14 20:13:31.617314606 +0000
|
||||
@@ -94,3 +94,5 @@
|
||||
gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.read_var - success"
|
||||
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
index e47f340..a7e0a52 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
|
||||
|
||||
gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = True" "test gdb.selected_frame"
|
||||
+
|
||||
|
||||
+gdb_test "python print ('result = %s' % (f0.block ()))" "<gdb.Block object at 0x\[\[:xdigit:\]\]+>" "test Frame.block"
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.python/py-value.exp 2014-12-14 20:13:31.618314610 +0000
|
||||
@@ -385,6 +385,15 @@
|
||||
+
|
||||
# Can read SP register.
|
||||
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 f081ff0..58cce09 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
||||
@@ -388,6 +388,15 @@ proc test_value_after_death {} {
|
||||
"print value's type"
|
||||
}
|
||||
|
||||
@ -608,13 +601,13 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7
|
||||
+proc test_cast_regression {} {
|
||||
+ gdb_test "python v = gdb.Value(5)" "" "create value for cast test"
|
||||
+ gdb_test "python v = v.cast(v.type)" "" "cast value for cast test"
|
||||
+ gdb_test "python print v" "5" "print value for cast test"
|
||||
+ gdb_test "python print(v)" "5" "print value for cast test"
|
||||
+}
|
||||
+
|
||||
# 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.
|
||||
@@ -514,6 +523,7 @@
|
||||
@@ -517,6 +526,7 @@ test_value_in_inferior
|
||||
test_inferior_function_call
|
||||
test_lazy_strings
|
||||
test_value_after_death
|
||||
@ -622,9 +615,3 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.python/py-value.exp gdb-7
|
||||
|
||||
# Test either C or C++ values.
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/README.archer gdb-7.8.1/README.archer
|
||||
--- gdb-7.8.1.orig/README.archer 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8.1/README.archer 2014-12-14 20:13:31.581314460 +0000
|
||||
@@ -0,0 +1,2 @@
|
||||
+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.
|
||||
|
@ -1,127 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-09/msg00102.html
|
||||
Subject: Re: Regression: GDB stopped on run with attached process (PR 17347) [Re: [pushed+7.8] Re: [PATCH] Fix "attach" command vs user input race
|
||||
|
||||
On 09/03/2014 08:58 AM, Jan Kratochvil wrote:
|
||||
|
||||
> https://sourceware.org/bugzilla/show_bug.cgi?id=17347
|
||||
|
||||
Thanks Jan.
|
||||
|
||||
Here's a fix, test included. Comments?
|
||||
|
||||
Thanks,
|
||||
Pedro Alves
|
||||
|
||||
--------------------------
|
||||
[PATCH] gdb/17347 - Regression: GDB stopped on run with attached process
|
||||
|
||||
Doing:
|
||||
|
||||
gdb --pid=PID -ex run
|
||||
|
||||
Results in GDB getting a SIGTTIN, and thus ending stopped. That's
|
||||
usually indicative of a missing target_terminal_ours call.
|
||||
|
||||
E.g., from the PR:
|
||||
|
||||
$ sleep 1h & p=$!; sleep 0.1; gdb -batch sleep $p -ex run
|
||||
[1] 28263
|
||||
[1] Killed sleep 1h
|
||||
|
||||
[2]+ Stopped gdb -batch sleep $p -ex run
|
||||
|
||||
The workaround is doing:
|
||||
|
||||
gdb -ex "attach $PID" -ex "run"
|
||||
|
||||
instead of
|
||||
|
||||
gdb [-p] $PID -ex "run"
|
||||
|
||||
With the former, gdb waits for the attach command to complete before
|
||||
moving on to the "run" command, because the interpreter is in sync
|
||||
mode at this point, within execute_command. But for the latter,
|
||||
attach_command is called directly from captured_main, and thus misses
|
||||
that waiting. IOW, "run" is running before the attach continuation
|
||||
has run, before the program stops and attach completes. The broken
|
||||
terminal settings are just one symptom of that. Any command that
|
||||
queries or requires input results in the same.
|
||||
|
||||
The fix is to wait in catch_command_errors (which is specific to
|
||||
main.c nowadays), just like we wait in execute_command.
|
||||
|
||||
gdb/ChangeLog:
|
||||
2014-09-03 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR gdb/17347
|
||||
* main.c: Include "infrun.h".
|
||||
(catch_command_errors, catch_command_errors_const): Wait for the
|
||||
foreground command to complete.
|
||||
* top.c (maybe_wait_sync_command_done): New function, factored out
|
||||
from ...
|
||||
(maybe_wait_sync_command_done): ... here.
|
||||
* top.h (maybe_wait_sync_command_done): New declaration.
|
||||
|
||||
gdb/testsuite/ChangeLog:
|
||||
2014-09-03 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR gdb/17347
|
||||
* gdb.base/attach.exp (spawn_test_prog): New, factored out from
|
||||
...
|
||||
(do_attach_tests, do_call_attach_tests, do_command_attach_tests):
|
||||
... here.
|
||||
(gdb_spawn_with_cmdline_opts): New procedure.
|
||||
(test_command_line_attach_run): New procedure.
|
||||
(top level): Call it.
|
||||
---
|
||||
gdb/main.c | 9 +++
|
||||
gdb/testsuite/gdb.base/attach.exp | 118 ++++++++++++++++++++++++++------------
|
||||
gdb/top.c | 26 +++++----
|
||||
gdb/top.h | 8 +++
|
||||
4 files changed, 114 insertions(+), 47 deletions(-)
|
||||
|
||||
|
||||
Amended for GDB 7.8.1 - Chris Horler
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp 2014-12-14 20:58:52.761567480 +0000
|
||||
@@ -58,6 +58,37 @@
|
||||
return -1
|
||||
}
|
||||
|
||||
+# Start the program running and then wait for a bit, to be sure that
|
||||
+# it can be attached to. Return the process's PID.
|
||||
+
|
||||
+proc spawn_test_prog { executable } {
|
||||
+ set testpid [eval exec $executable &]
|
||||
+ exec sleep 2
|
||||
+ if { [istarget "*-*-cygwin*"] } {
|
||||
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
|
||||
+ # different due to the way fork/exec works.
|
||||
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
|
||||
+ }
|
||||
+
|
||||
+ return $testpid
|
||||
+}
|
||||
+
|
||||
+# Spawn GDB with CMDLINE_FLAGS appended to the GDBFLAGS global.
|
||||
+
|
||||
+proc gdb_spawn_with_cmdline_opts { cmdline_flags } {
|
||||
+ global GDBFLAGS
|
||||
+
|
||||
+ set saved_gdbflags $GDBFLAGS
|
||||
+
|
||||
+ append GDBFLAGS $cmdline_flags
|
||||
+
|
||||
+ set res [gdb_spawn]
|
||||
+
|
||||
+ set GDBFLAGS $saved_gdbflags
|
||||
+
|
||||
+ return $res
|
||||
+}
|
||||
+
|
||||
proc do_attach_tests {} {
|
||||
global gdb_prompt
|
||||
global binfile
|
||||
|
@ -1,87 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-09/msg00381.html
|
||||
Subject: [testsuite patch] runaway attach processes [Re: Regression: GDB stopped on run with attached process (PR 17347)]
|
||||
|
||||
|
||||
--RnlQjJ0d97Da+TV1
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
On Thu, 11 Sep 2014 14:35:53 +0200, Pedro Alves wrote:
|
||||
> Thanks, pushed to both master and 7.8.
|
||||
|
||||
I have started seeing occasional runaway 'attach' processes these days.
|
||||
I cannot be certain it is really caused by this patch, for example
|
||||
grep 'FAIL.*cmdline attach run' does not show anything in my logs.
|
||||
|
||||
But as I remember this 'attach' runaway process always happened in GDB (but
|
||||
I do not remember it in the past months) I think it would be most safe to just
|
||||
solve it forever by [attached].
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--RnlQjJ0d97Da+TV1
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/testsuite/
|
||||
2014-09-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/attach.c: Include unistd.h.
|
||||
(main): Call alarm. Add label postloop.
|
||||
* gdb.base/attach.exp (do_attach_tests): Use gdb_get_line_number,
|
||||
gdb_breakpoint, gdb_continue_to_breakpoint.
|
||||
(test_command_line_attach_run): Kill ${testpid} in one exit path.
|
||||
|
||||
|
||||
Amended for GDB 7.8.1 - Chris Horler
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c gdb-7.8.1/gdb/testsuite/gdb.base/attach.c
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.c 2014-12-14 21:19:46.689476557 +0000
|
||||
@@ -5,6 +5,7 @@
|
||||
exit unless/until gdb sets the variable to non-zero.)
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
int should_exit = 0;
|
||||
|
||||
@@ -12,9 +13,11 @@
|
||||
{
|
||||
int local_i = 0;
|
||||
|
||||
+ alarm (60);
|
||||
+
|
||||
while (! should_exit)
|
||||
{
|
||||
local_i++;
|
||||
}
|
||||
- return 0;
|
||||
+ return 0; /* postloop */
|
||||
}
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp
|
||||
--- gdb-7.8.1.orig/gdb/testsuite/gdb.base/attach.exp 2014-12-14 21:20:42.810658051 +0000
|
||||
+++ gdb-7.8.1/gdb/testsuite/gdb.base/attach.exp 2014-12-14 21:22:53.479082555 +0000
|
||||
@@ -287,11 +287,8 @@
|
||||
|
||||
# Verify that the modification really happened.
|
||||
|
||||
- gdb_test "tbreak 19" "Temporary breakpoint .*at.*$srcfile, line 19.*" \
|
||||
- "after attach2, set tbreak postloop"
|
||||
-
|
||||
- gdb_test "continue" "main.*at.*$srcfile:19.*" \
|
||||
- "after attach2, reach tbreak postloop"
|
||||
+ gdb_breakpoint [gdb_get_line_number "postloop"] temporary
|
||||
+ gdb_continue_to_breakpoint "postloop" ".* postloop .*"
|
||||
|
||||
# Allow the test process to exit, to cleanup after ourselves.
|
||||
|
||||
@@ -449,6 +446,7 @@
|
||||
"-iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""]
|
||||
if { $res != 0} {
|
||||
fail $test
|
||||
+ remote_exec build "kill -9 ${testpid}"
|
||||
return $res
|
||||
}
|
||||
gdb_test_multiple "" $test {
|
@ -37,13 +37,11 @@ gdb/gdbserver/
|
||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
|
||||
|
||||
Amended for GDB 7.8.1 - Chris Horler
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/common/linux-ptrace.c
|
||||
--- gdb-7.8.1.orig/gdb/common/linux-ptrace.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/common/linux-ptrace.c 2014-12-14 20:47:29.326550209 +0000
|
||||
@@ -32,6 +32,10 @@
|
||||
Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.c 2015-01-25 08:36:55.710884511 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.c 2015-01-25 08:38:43.157347627 +0100
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -54,7 +52,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com
|
||||
/* Stores the currently supported ptrace options. A value of
|
||||
-1 means we did not check for features yet. A value of 0 means
|
||||
there are no supported features. */
|
||||
@@ -56,6 +60,8 @@
|
||||
@@ -53,6 +57,8 @@ linux_ptrace_attach_fail_reason (pid_t p
|
||||
buffer_xml_printf (buffer, _("process %d is a zombie "
|
||||
"- the process has already terminated"),
|
||||
(int) pid);
|
||||
@ -62,12 +60,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com
|
||||
+ linux_ptrace_create_warnings (buffer);
|
||||
}
|
||||
|
||||
#if defined __i386__ || defined __x86_64__
|
||||
@@ -551,3 +557,19 @@
|
||||
|
||||
/* See linux-ptrace.h. */
|
||||
@@ -595,6 +601,22 @@ linux_ptrace_init_warnings (void)
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
+
|
||||
|
||||
+/* Print all possible reasons we could fail to create a traced process. */
|
||||
+
|
||||
+void
|
||||
@ -83,21 +80,169 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.c gdb-7.8.1/gdb/com
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/common/linux-ptrace.h gdb-7.8.1/gdb/common/linux-ptrace.h
|
||||
--- gdb-7.8.1.orig/gdb/common/linux-ptrace.h 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/common/linux-ptrace.h 2014-12-14 20:47:29.330550222 +0000
|
||||
@@ -85,6 +85,7 @@
|
||||
+
|
||||
/* Set additional ptrace flags to use. Some such flags may be checked
|
||||
by the implementation above. This function must be called before
|
||||
any other function in this file; otherwise the flags may not take
|
||||
Index: gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/nat/linux-ptrace.h 2015-01-25 08:37:02.800915071 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/nat/linux-ptrace.h 2015-01-25 08:38:16.565233009 +0100
|
||||
@@ -98,6 +98,7 @@ extern void linux_ptrace_attach_fail_rea
|
||||
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
|
||||
|
||||
extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
|
||||
extern void linux_ptrace_init_warnings (void);
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
extern void linux_enable_event_reporting (pid_t pid);
|
||||
extern void linux_enable_event_reporting (pid_t pid, int attached);
|
||||
extern void linux_disable_event_reporting (pid_t pid);
|
||||
extern int linux_supports_tracefork (void);
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in
|
||||
--- gdb-7.8.1.orig/gdb/config.in 2014-12-14 20:44:21.913980816 +0000
|
||||
+++ gdb-7.8.1/gdb/config.in 2014-12-14 20:49:09.158856507 +0000
|
||||
@@ -216,6 +216,9 @@
|
||||
Index: gdb-7.8.90.20150125/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/configure.ac 2015-01-25 08:36:55.712884520 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/configure.ac 2015-01-25 08:37:02.801915075 +0100
|
||||
@@ -2117,6 +2117,10 @@ case $host_os in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
Index: gdb-7.8.90.20150125/gdb/gdbserver/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure.ac 2015-01-25 08:36:55.712884520 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/gdbserver/configure.ac 2015-01-25 08:37:02.801915075 +0100
|
||||
@@ -461,6 +461,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
Index: gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/linux-low.c 2015-01-25 08:36:55.714884529 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/gdbserver/linux-low.c 2015-01-25 08:37:02.803915084 +0100
|
||||
@@ -591,6 +591,29 @@ add_lwp (ptid_t ptid)
|
||||
return lwp;
|
||||
}
|
||||
|
||||
+/* Execute PTRACE_TRACEME with error checking. */
|
||||
+
|
||||
+static void
|
||||
+linux_traceme (const char *program)
|
||||
+{
|
||||
+ int save_errno;
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||
+ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ save_errno = errno;
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
|
||||
+ buffer_finish (&buffer), program, strerror (save_errno));
|
||||
+ fflush (stderr);
|
||||
+ _exit (0177);
|
||||
+}
|
||||
+
|
||||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -632,7 +655,7 @@ linux_create_inferior (char *program, ch
|
||||
if (pid == 0)
|
||||
{
|
||||
close_most_fds ();
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
|
||||
+ linux_traceme (program);
|
||||
|
||||
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
|
||||
signal (__SIGRTMIN + 1, SIG_DFL);
|
||||
Index: gdb-7.8.90.20150125/gdb/inf-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/inf-ptrace.c 2015-01-25 08:36:55.715884533 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/inf-ptrace.c 2015-01-25 08:37:02.803915084 +0100
|
||||
@@ -67,7 +67,15 @@ static void
|
||||
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.8.90.20150125/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/linux-nat.c 2015-01-25 08:36:55.717884541 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/linux-nat.c 2015-01-25 08:37:52.054127362 +0100
|
||||
@@ -1109,6 +1109,7 @@ linux_nat_create_inferior (struct target
|
||||
#ifdef HAVE_PERSONALITY
|
||||
int personality_orig = 0, personality_set = 0;
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
+ volatile struct gdb_exception ex;
|
||||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1133,7 +1134,10 @@ linux_nat_create_inferior (struct target
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (ops, 0, NULL);
|
||||
|
||||
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_PERSONALITY
|
||||
if (personality_set)
|
||||
@@ -1145,6 +1149,24 @@ linux_nat_create_inferior (struct target
|
||||
safe_strerror (errno));
|
||||
}
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
+
|
||||
+ if (ex.reason < 0)
|
||||
+ {
|
||||
+ struct buffer buffer;
|
||||
+ char *message, *buffer_s;
|
||||
+
|
||||
+ message = xstrdup (ex.message);
|
||||
+ make_cleanup (xfree, message);
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ buffer_s = buffer_finish (&buffer);
|
||||
+ make_cleanup (xfree, buffer_s);
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", buffer_s, message);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
|
||||
Index: gdb-7.8.90.20150125/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/config.in 2015-01-25 08:36:55.718884546 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/config.in 2015-01-25 08:37:02.805915092 +0100
|
||||
@@ -213,6 +213,9 @@
|
||||
/* Define if librpm library is being used. */
|
||||
#undef HAVE_LIBRPM
|
||||
|
||||
@ -107,7 +252,7 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
@@ -351,6 +354,9 @@
|
||||
@@ -342,6 +345,9 @@
|
||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||
#undef HAVE_SCM_NEW_SMOB
|
||||
|
||||
@ -117,10 +262,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/config.in gdb-7.8.1/gdb/config.in
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure gdb-7.8.1/gdb/configure
|
||||
--- gdb-7.8.1.orig/gdb/configure 2014-12-14 20:44:21.925980853 +0000
|
||||
+++ gdb-7.8.1/gdb/configure 2014-12-14 20:47:29.364550326 +0000
|
||||
@@ -13400,6 +13400,64 @@
|
||||
Index: gdb-7.8.90.20150125/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/configure 2015-01-25 08:36:55.722884563 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/configure 2015-01-25 08:37:02.809915110 +0100
|
||||
@@ -13270,6 +13270,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
@ -185,24 +331,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure gdb-7.8.1/gdb/configure
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
# except that the argument to --with-sysroot is optional.
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/configure.ac gdb-7.8.1/gdb/configure.ac
|
||||
--- gdb-7.8.1.orig/gdb/configure.ac 2014-12-14 20:44:21.933980877 +0000
|
||||
+++ gdb-7.8.1/gdb/configure.ac 2014-12-14 20:47:29.334550234 +0000
|
||||
@@ -2161,6 +2161,10 @@
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbserver/config.in
|
||||
--- gdb-7.8.1.orig/gdb/gdbserver/config.in 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/gdbserver/config.in 2014-12-14 20:47:29.366550332 +0000
|
||||
@@ -81,6 +81,9 @@
|
||||
Index: gdb-7.8.90.20150125/gdb/gdbserver/config.in
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/config.in 2015-01-25 08:36:55.724884572 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/gdbserver/config.in 2015-01-25 08:37:02.809915110 +0100
|
||||
@@ -75,6 +75,9 @@
|
||||
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
|
||||
#undef HAVE_LIBMCHECK
|
||||
|
||||
@ -212,9 +345,9 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbse
|
||||
/* Define if the target supports branch tracing. */
|
||||
#undef HAVE_LINUX_BTRACE
|
||||
|
||||
@@ -154,6 +157,9 @@
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
#undef HAVE_READLINK
|
||||
@@ -142,6 +145,9 @@
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
#undef HAVE_PWRITE
|
||||
|
||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
+#undef HAVE_SELINUX_SELINUX_H
|
||||
@ -222,10 +355,11 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/config.in gdb-7.8.1/gdb/gdbse
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure gdb-7.8.1/gdb/gdbserver/configure
|
||||
--- gdb-7.8.1.orig/gdb/gdbserver/configure 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/gdbserver/configure 2014-12-14 20:47:29.370550344 +0000
|
||||
@@ -6170,6 +6170,64 @@
|
||||
Index: gdb-7.8.90.20150125/gdb/gdbserver/configure
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150125.orig/gdb/gdbserver/configure 2015-01-25 08:36:55.726884580 +0100
|
||||
+++ gdb-7.8.90.20150125/gdb/gdbserver/configure 2015-01-25 08:37:02.811915118 +0100
|
||||
@@ -6199,6 +6199,64 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -290,126 +424,3 @@ diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure gdb-7.8.1/gdb/gdbse
|
||||
|
||||
|
||||
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/configure.ac gdb-7.8.1/gdb/gdbserver/configure.ac
|
||||
--- gdb-7.8.1.orig/gdb/gdbserver/configure.ac 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/gdbserver/configure.ac 2014-12-14 20:47:29.337550243 +0000
|
||||
@@ -454,6 +454,10 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||
+
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/gdbserver/linux-low.c gdb-7.8.1/gdb/gdbserver/linux-low.c
|
||||
--- gdb-7.8.1.orig/gdb/gdbserver/linux-low.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/gdbserver/linux-low.c 2014-12-14 20:47:29.341550255 +0000
|
||||
@@ -541,6 +541,29 @@
|
||||
return lwp;
|
||||
}
|
||||
|
||||
+/* Execute PTRACE_TRACEME with error checking. */
|
||||
+
|
||||
+static void
|
||||
+linux_traceme (const char *program)
|
||||
+{
|
||||
+ int save_errno;
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||
+ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ save_errno = errno;
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
|
||||
+ buffer_finish (&buffer), program, strerror (save_errno));
|
||||
+ fflush (stderr);
|
||||
+ _exit (0177);
|
||||
+}
|
||||
+
|
||||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -582,7 +605,7 @@
|
||||
if (pid == 0)
|
||||
{
|
||||
close_most_fds ();
|
||||
- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
|
||||
+ linux_traceme (program);
|
||||
|
||||
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
|
||||
signal (__SIGRTMIN + 1, SIG_DFL);
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/inf-ptrace.c gdb-7.8.1/gdb/inf-ptrace.c
|
||||
--- gdb-7.8.1.orig/gdb/inf-ptrace.c 2014-10-29 19:45:50.000000000 +0000
|
||||
+++ gdb-7.8.1/gdb/inf-ptrace.c 2014-12-14 20:47:29.345550267 +0000
|
||||
@@ -105,7 +105,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
|
||||
diff -Nur -x '*.orig' gdb-7.8.1.orig/gdb/linux-nat.c gdb-7.8.1/gdb/linux-nat.c
|
||||
--- gdb-7.8.1.orig/gdb/linux-nat.c 2014-12-14 20:44:21.800980475 +0000
|
||||
+++ gdb-7.8.1/gdb/linux-nat.c 2014-12-14 20:47:29.348550277 +0000
|
||||
@@ -1291,6 +1291,7 @@
|
||||
#ifdef HAVE_PERSONALITY
|
||||
int personality_orig = 0, personality_set = 0;
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
+ volatile struct gdb_exception ex;
|
||||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1315,7 +1316,10 @@
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (ops, 0, NULL);
|
||||
|
||||
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_PERSONALITY
|
||||
if (personality_set)
|
||||
@@ -1327,6 +1331,24 @@
|
||||
safe_strerror (errno));
|
||||
}
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
+
|
||||
+ if (ex.reason < 0)
|
||||
+ {
|
||||
+ struct buffer buffer;
|
||||
+ char *message, *buffer_s;
|
||||
+
|
||||
+ message = xstrdup (ex.message);
|
||||
+ make_cleanup (xfree, message);
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ buffer_s = buffer_finish (&buffer);
|
||||
+ make_cleanup (xfree, buffer_s);
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", buffer_s, message);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3,9 +3,11 @@ printed, but a default backtrace will occur in this case.
|
||||
|
||||
--
|
||||
|
||||
--- gdb-7.7.90.20140613/gdb/python/py-framefilter.c-orig 2014-06-13 03:59:37.000000000 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/python/py-framefilter.c 2014-06-27 17:20:00.945271945 +0200
|
||||
@@ -1475,6 +1475,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
Index: gdb-7.8.90.20150214/gdb/python/py-framefilter.c
|
||||
===================================================================
|
||||
--- gdb-7.8.90.20150214.orig/gdb/python/py-framefilter.c 2015-02-14 17:35:12.277653200 +0100
|
||||
+++ gdb-7.8.90.20150214/gdb/python/py-framefilter.c 2015-02-14 17:36:15.737953789 +0100
|
||||
@@ -1506,6 +1506,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
volatile struct gdb_exception except;
|
||||
PyObject *item;
|
||||
htab_t levels_printed;
|
||||
@ -13,7 +15,7 @@ printed, but a default backtrace will occur in this case.
|
||||
|
||||
if (!gdb_python_initialized)
|
||||
return EXT_LANG_BT_NO_FILTERS;
|
||||
@@ -1494,24 +1495,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
@@ -1525,24 +1526,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
|
||||
|
||||
if (iterable == NULL)
|
||||
@ -39,10 +41,11 @@ printed, but a default backtrace will occur in this case.
|
||||
|
||||
/* If iterable is None, then there are no frame filters registered.
|
||||
If this is the case, defer to default GDB printing routines in MI
|
||||
@@ -1540,15 +1524,39 @@ gdbpy_apply_frame_filter (const struct e
|
||||
@@ -1573,15 +1557,40 @@ gdbpy_apply_frame_filter (const struct e
|
||||
error and continue with other frames. */
|
||||
if (success == EXT_LANG_BT_ERROR)
|
||||
gdbpy_print_stack ();
|
||||
|
||||
Py_DECREF (item);
|
||||
+
|
||||
+ count_printed++;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.7.50.20140609/gdb/config/i386/linux64.mh
|
||||
Index: gdb-7.8.50.20141228/gdb/config/i386/linux64.mh
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/config/i386/linux64.mh 2014-06-13 20:25:37.356732335 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/config/i386/linux64.mh 2014-06-13 20:26:07.984764098 +0200
|
||||
@@ -5,7 +5,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux64.mh 2015-01-01 17:12:53.965472227 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/config/i386/linux64.mh 2015-01-01 17:12:55.367471414 +0100
|
||||
@@ -6,7 +6,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
proc-service.o linux-thread-db.o linux-fork.o \
|
||||
linux-procfs.o linux-ptrace.o linux-btrace.o \
|
||||
linux-waitpid.o
|
||||
@ -11,22 +11,22 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/linux64.mh
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
Index: gdb-7.7.50.20140609/gdb/config/i386/linux.mh
|
||||
Index: gdb-7.8.50.20141228/gdb/config/i386/linux.mh
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/config/i386/linux.mh 2014-06-13 20:25:37.356732335 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/config/i386/linux.mh 2014-06-13 20:26:07.984764098 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/config/i386/linux.mh 2015-01-01 17:12:55.367471414 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/config/i386/linux.mh 2015-01-01 17:13:07.568464342 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o i386-linux-nat.o \
|
||||
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h
|
||||
Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h 2014-06-13 20:26:07.984764098 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux.h 2015-01-01 17:12:55.368471414 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
@ -56,10 +56,10 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h
|
||||
Index: gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h 2014-06-13 20:26:07.984764098 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/config/i386/nm-linux64.h 2015-01-01 17:12:55.368471414 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
@ -89,11 +89,11 @@ Index: gdb-7.7.50.20140609/gdb/config/i386/nm-linux64.h
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.7.50.20140609/gdb/target.h
|
||||
Index: gdb-7.8.50.20141228/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.7.50.20140609.orig/gdb/target.h 2014-06-13 20:26:07.985764099 +0200
|
||||
+++ gdb-7.7.50.20140609/gdb/target.h 2014-06-13 20:26:34.915792095 +0200
|
||||
@@ -1728,9 +1728,11 @@ extern char *target_thread_name (struct
|
||||
--- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-01 17:12:53.967472226 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/target.h 2015-01-01 17:12:55.368471414 +0100
|
||||
@@ -1754,9 +1754,11 @@ extern char *target_thread_name (struct
|
||||
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
|
||||
(including this one?). OTHERTYPE is who knows what... */
|
||||
|
||||
@ -105,10 +105,10 @@ Index: gdb-7.7.50.20140609/gdb/target.h
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2014-06-13 20:26:07.986764101 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-01-01 17:12:55.369471413 +0100
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,10 +1,10 @@
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/data-directory/Makefile.in
|
||||
Index: gdb-7.8.50.20141228/gdb/data-directory/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/data-directory/Makefile.in 2014-06-13 23:02:37.597115787 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/data-directory/Makefile.in 2014-06-13 23:03:21.285163909 +0200
|
||||
@@ -60,6 +60,8 @@ PYTHON_FILES = \
|
||||
--- gdb-7.8.50.20141228.orig/gdb/data-directory/Makefile.in 2015-01-05 22:51:10.707756810 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/data-directory/Makefile.in 2015-01-05 22:51:48.608923139 +0100
|
||||
@@ -60,6 +60,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/frames.py \
|
||||
gdb/FrameIterator.py \
|
||||
gdb/FrameDecorator.py \
|
||||
@ -13,18 +13,18 @@ Index: gdb-7.7.90.20140613/gdb/data-directory/Makefile.in
|
||||
gdb/types.py \
|
||||
gdb/printing.py \
|
||||
gdb/prompt.py \
|
||||
@@ -74,6 +76,7 @@ PYTHON_FILES = \
|
||||
@@ -74,6 +76,7 @@ PYTHON_FILE_LIST = \
|
||||
gdb/command/pretty_printers.py \
|
||||
gdb/command/prompt.py \
|
||||
gdb/command/explore.py \
|
||||
+ gdb/command/backtrace.py \
|
||||
gdb/function/__init__.py \
|
||||
gdb/function/strfns.py \
|
||||
gdb/function/caller_is.py \
|
||||
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py
|
||||
gdb/function/strfns.py \
|
||||
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py 2014-06-13 23:02:37.598115788 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/FrameWrapper.py 2015-01-05 22:51:24.706818245 +0100
|
||||
@@ -0,0 +1,122 @@
|
||||
+# Wrapper API for frames.
|
||||
+
|
||||
@ -148,10 +148,10 @@ Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/FrameWrapper.py
|
||||
+
|
||||
+ def __getattr__ (self, name):
|
||||
+ return getattr (self.frame, name)
|
||||
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py
|
||||
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py 2014-06-13 23:02:37.598115788 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/backtrace.py 2015-01-05 22:51:24.706818245 +0100
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Filtering backtrace.
|
||||
+
|
||||
@ -195,10 +195,10 @@ Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/backtrace.py
|
||||
+ return iter
|
||||
+ return old_frame_filter (iter)
|
||||
+
|
||||
Index: gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py
|
||||
Index: gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140613/gdb/python/lib/gdb/command/backtrace.py 2014-06-13 23:02:37.598115788 +0200
|
||||
+++ gdb-7.8.50.20141228/gdb/python/lib/gdb/command/backtrace.py 2015-01-05 22:51:24.707818249 +0100
|
||||
@@ -0,0 +1,106 @@
|
||||
+# New backtrace command.
|
||||
+
|
||||
|
@ -37,11 +37,11 @@ gdb/testsuite/ChangeLog:
|
||||
gdb/testsuite/gdb.base/ena-dis-br.exp | 8 ++++++++
|
||||
2 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index ccd05d9..5a0c5ab 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -14389,7 +14389,7 @@ map_breakpoint_numbers (char *args, void (*function) (struct breakpoint *,
|
||||
Index: gdb-7.8.50.20141228/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/breakpoint.c 2015-01-05 22:21:47.631801558 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/breakpoint.c 2015-01-05 22:26:13.165005049 +0100
|
||||
@@ -14849,7 +14849,7 @@ map_breakpoint_numbers (char *args, void
|
||||
int match;
|
||||
struct get_number_or_range_state state;
|
||||
|
||||
@ -50,7 +50,7 @@ index ccd05d9..5a0c5ab 100644
|
||||
error_no_arg (_("one or more breakpoint numbers"));
|
||||
|
||||
init_number_or_range (&state, args);
|
||||
@@ -14713,7 +14713,12 @@ do_map_enable_count_breakpoint (struct breakpoint *bpt, void *countptr)
|
||||
@@ -15186,7 +15186,12 @@ do_map_enable_count_breakpoint (struct b
|
||||
static void
|
||||
enable_count_command (char *args, int from_tty)
|
||||
{
|
||||
@ -64,13 +64,13 @@ index ccd05d9..5a0c5ab 100644
|
||||
|
||||
map_breakpoint_numbers (args, do_map_enable_count_breakpoint, &count);
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
|
||||
index b08b709..82aef64 100644
|
||||
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
|
||||
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
|
||||
@@ -173,6 +173,14 @@ set bp [break_at $bp_location7 "line $bp_location7"]
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.base/ena-dis-br.exp
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/testsuite/gdb.base/ena-dis-br.exp 2015-01-05 22:26:13.165005049 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.base/ena-dis-br.exp 2015-01-05 22:26:51.357178150 +0100
|
||||
@@ -151,6 +151,14 @@ set bp [break_at $bp_location7 "line $bp
|
||||
|
||||
set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"]
|
||||
set bp2 [break_at marker1 " line $bp_location15"]
|
||||
|
||||
+gdb_test "enable count" \
|
||||
+ "Argument required \\(hit count\\)\\." \
|
||||
@ -83,4 +83,3 @@ index b08b709..82aef64 100644
|
||||
gdb_test_no_output "enable count 2 $bp" "disable break with count"
|
||||
|
||||
gdb_test "continue" \
|
||||
|
||||
|
40
gdb-jit-reader-multilib.patch
Normal file
40
gdb-jit-reader-multilib.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 7ff74ba..00a5b5b 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -7382,10 +7382,12 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
|
||||
- TARGET_PTR="unsigned long"
|
||||
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
|
||||
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
|
||||
+# content is the same for multilib distributions.
|
||||
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
|
||||
TARGET_PTR="unsigned long long"
|
||||
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
|
||||
+ TARGET_PTR="unsigned long"
|
||||
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index ec776d7..c02ace9 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -648,10 +648,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(unsigned __int128)
|
||||
|
||||
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
|
||||
- TARGET_PTR="unsigned long"
|
||||
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
|
||||
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
|
||||
+# content is the same for multilib distributions.
|
||||
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
|
||||
TARGET_PTR="unsigned long long"
|
||||
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
|
||||
+ TARGET_PTR="unsigned long"
|
||||
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
589
gdb-no-dg-extract-results-py.patch
Normal file
589
gdb-no-dg-extract-results-py.patch
Normal file
@ -0,0 +1,589 @@
|
||||
diff -dup -ruNp gdb-7.8.90.20150202-orig/gdb/testsuite/dg-extract-results.py gdb-7.8.90.20150202/gdb/testsuite/dg-extract-results.py
|
||||
--- gdb-7.8.90.20150202-orig/gdb/testsuite/dg-extract-results.py 2015-02-02 02:58:29.000000000 +0100
|
||||
+++ gdb-7.8.90.20150202/gdb/testsuite/dg-extract-results.py 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,585 +0,0 @@
|
||||
-#!/usr/bin/python
|
||||
-#
|
||||
-# Copyright (C) 2014-2015 Free Software Foundation, Inc.
|
||||
-#
|
||||
-# This script 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, or (at your option)
|
||||
-# any later version.
|
||||
-
|
||||
-import sys
|
||||
-import getopt
|
||||
-import re
|
||||
-import io
|
||||
-from datetime import datetime
|
||||
-from operator import attrgetter
|
||||
-
|
||||
-# True if unrecognised lines should cause a fatal error. Might want to turn
|
||||
-# this on by default later.
|
||||
-strict = False
|
||||
-
|
||||
-# True if the order of .log segments should match the .sum file, false if
|
||||
-# they should keep the original order.
|
||||
-sort_logs = True
|
||||
-
|
||||
-# A version of open() that is safe against whatever binary output
|
||||
-# might be added to the log.
|
||||
-def safe_open (filename):
|
||||
- if sys.version_info >= (3, 0):
|
||||
- return open (filename, 'r', errors = 'surrogateescape')
|
||||
- return open (filename, 'r')
|
||||
-
|
||||
-# Force stdout to handle escape sequences from a safe_open file.
|
||||
-if sys.version_info >= (3, 0):
|
||||
- sys.stdout = io.TextIOWrapper (sys.stdout.buffer,
|
||||
- errors = 'surrogateescape')
|
||||
-
|
||||
-class Named:
|
||||
- def __init__ (self, name):
|
||||
- self.name = name
|
||||
-
|
||||
-class ToolRun (Named):
|
||||
- def __init__ (self, name):
|
||||
- Named.__init__ (self, name)
|
||||
- # The variations run for this tool, mapped by --target_board name.
|
||||
- self.variations = dict()
|
||||
-
|
||||
- # Return the VariationRun for variation NAME.
|
||||
- def get_variation (self, name):
|
||||
- if name not in self.variations:
|
||||
- self.variations[name] = VariationRun (name)
|
||||
- return self.variations[name]
|
||||
-
|
||||
-class VariationRun (Named):
|
||||
- def __init__ (self, name):
|
||||
- Named.__init__ (self, name)
|
||||
- # A segment of text before the harness runs start, describing which
|
||||
- # baseboard files were loaded for the target.
|
||||
- self.header = None
|
||||
- # The harnesses run for this variation, mapped by filename.
|
||||
- self.harnesses = dict()
|
||||
- # A list giving the number of times each type of result has
|
||||
- # been seen.
|
||||
- self.counts = []
|
||||
-
|
||||
- # Return the HarnessRun for harness NAME.
|
||||
- def get_harness (self, name):
|
||||
- if name not in self.harnesses:
|
||||
- self.harnesses[name] = HarnessRun (name)
|
||||
- return self.harnesses[name]
|
||||
-
|
||||
-class HarnessRun (Named):
|
||||
- def __init__ (self, name):
|
||||
- Named.__init__ (self, name)
|
||||
- # Segments of text that make up the harness run, mapped by a test-based
|
||||
- # key that can be used to order them.
|
||||
- self.segments = dict()
|
||||
- # Segments of text that make up the harness run but which have
|
||||
- # no recognized test results. These are typically harnesses that
|
||||
- # are completely skipped for the target.
|
||||
- self.empty = []
|
||||
- # A list of results. Each entry is a pair in which the first element
|
||||
- # is a unique sorting key and in which the second is the full
|
||||
- # PASS/FAIL line.
|
||||
- self.results = []
|
||||
-
|
||||
- # Add a segment of text to the harness run. If the segment includes
|
||||
- # test results, KEY is an example of one of them, and can be used to
|
||||
- # combine the individual segments in order. If the segment has no
|
||||
- # test results (e.g. because the harness doesn't do anything for the
|
||||
- # current configuration) then KEY is None instead. In that case
|
||||
- # just collect the segments in the order that we see them.
|
||||
- def add_segment (self, key, segment):
|
||||
- if key:
|
||||
- assert key not in self.segments
|
||||
- self.segments[key] = segment
|
||||
- else:
|
||||
- self.empty.append (segment)
|
||||
-
|
||||
-class Segment:
|
||||
- def __init__ (self, filename, start):
|
||||
- self.filename = filename
|
||||
- self.start = start
|
||||
- self.lines = 0
|
||||
-
|
||||
-class Prog:
|
||||
- def __init__ (self):
|
||||
- # The variations specified on the command line.
|
||||
- self.variations = []
|
||||
- # The variations seen in the input files.
|
||||
- self.known_variations = set()
|
||||
- # The tools specified on the command line.
|
||||
- self.tools = []
|
||||
- # Whether to create .sum rather than .log output.
|
||||
- self.do_sum = True
|
||||
- # Regexps used while parsing.
|
||||
- self.test_run_re = re.compile (r'^Test Run By (\S+) on (.*)$')
|
||||
- self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$')
|
||||
- self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED'
|
||||
- r'|WARNING|ERROR|UNSUPPORTED|UNTESTED'
|
||||
- r'|KFAIL):\s*(.+)')
|
||||
- self.completed_re = re.compile (r'.* completed at (.*)')
|
||||
- # Pieces of text to write at the head of the output.
|
||||
- # start_line is a pair in which the first element is a datetime
|
||||
- # and in which the second is the associated 'Test Run By' line.
|
||||
- self.start_line = None
|
||||
- self.native_line = ''
|
||||
- self.target_line = ''
|
||||
- self.host_line = ''
|
||||
- self.acats_premable = ''
|
||||
- # Pieces of text to write at the end of the output.
|
||||
- # end_line is like start_line but for the 'runtest completed' line.
|
||||
- self.acats_failures = []
|
||||
- self.version_output = ''
|
||||
- self.end_line = None
|
||||
- # Known summary types.
|
||||
- self.count_names = [
|
||||
- '# of expected passes\t\t',
|
||||
- '# of unexpected failures\t',
|
||||
- '# of unexpected successes\t',
|
||||
- '# of expected failures\t\t',
|
||||
- '# of unknown successes\t\t',
|
||||
- '# of known failures\t\t',
|
||||
- '# of untested testcases\t\t',
|
||||
- '# of unresolved testcases\t',
|
||||
- '# of unsupported tests\t\t'
|
||||
- ]
|
||||
- self.runs = dict()
|
||||
-
|
||||
- def usage (self):
|
||||
- name = sys.argv[0]
|
||||
- sys.stderr.write ('Usage: ' + name
|
||||
- + ''' [-t tool] [-l variant-list] [-L] log-or-sum-file ...
|
||||
-
|
||||
- tool The tool (e.g. g++, libffi) for which to create a
|
||||
- new test summary file. If not specified then output
|
||||
- is created for all tools.
|
||||
- variant-list One or more test variant names. If the list is
|
||||
- not specified then one is constructed from all
|
||||
- variants in the files for <tool>.
|
||||
- sum-file A test summary file with the format of those
|
||||
- created by runtest from DejaGnu.
|
||||
- If -L is used, merge *.log files instead of *.sum. In this
|
||||
- mode the exact order of lines may not be preserved, just different
|
||||
- Running *.exp chunks should be in correct order.
|
||||
-''')
|
||||
- sys.exit (1)
|
||||
-
|
||||
- def fatal (self, what, string):
|
||||
- if not what:
|
||||
- what = sys.argv[0]
|
||||
- sys.stderr.write (what + ': ' + string + '\n')
|
||||
- sys.exit (1)
|
||||
-
|
||||
- # Parse the command-line arguments.
|
||||
- def parse_cmdline (self):
|
||||
- try:
|
||||
- (options, self.files) = getopt.getopt (sys.argv[1:], 'l:t:L')
|
||||
- if len (self.files) == 0:
|
||||
- self.usage()
|
||||
- for (option, value) in options:
|
||||
- if option == '-l':
|
||||
- self.variations.append (value)
|
||||
- elif option == '-t':
|
||||
- self.tools.append (value)
|
||||
- else:
|
||||
- self.do_sum = False
|
||||
- except getopt.GetoptError as e:
|
||||
- self.fatal (None, e.msg)
|
||||
-
|
||||
- # Try to parse time string TIME, returning an arbitrary time on failure.
|
||||
- # Getting this right is just a nice-to-have so failures should be silent.
|
||||
- def parse_time (self, time):
|
||||
- try:
|
||||
- return datetime.strptime (time, '%c')
|
||||
- except ValueError:
|
||||
- return datetime.now()
|
||||
-
|
||||
- # Parse an integer and abort on failure.
|
||||
- def parse_int (self, filename, value):
|
||||
- try:
|
||||
- return int (value)
|
||||
- except ValueError:
|
||||
- self.fatal (filename, 'expected an integer, got: ' + value)
|
||||
-
|
||||
- # Return a list that represents no test results.
|
||||
- def zero_counts (self):
|
||||
- return [0 for x in self.count_names]
|
||||
-
|
||||
- # Return the ToolRun for tool NAME.
|
||||
- def get_tool (self, name):
|
||||
- if name not in self.runs:
|
||||
- self.runs[name] = ToolRun (name)
|
||||
- return self.runs[name]
|
||||
-
|
||||
- # Add the result counts in list FROMC to TOC.
|
||||
- def accumulate_counts (self, toc, fromc):
|
||||
- for i in range (len (self.count_names)):
|
||||
- toc[i] += fromc[i]
|
||||
-
|
||||
- # Parse the list of variations after 'Schedule of variations:'.
|
||||
- # Return the number seen.
|
||||
- def parse_variations (self, filename, file):
|
||||
- num_variations = 0
|
||||
- while True:
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- self.fatal (filename, 'could not parse variation list')
|
||||
- if line == '\n':
|
||||
- break
|
||||
- self.known_variations.add (line.strip())
|
||||
- num_variations += 1
|
||||
- return num_variations
|
||||
-
|
||||
- # Parse from the first line after 'Running target ...' to the end
|
||||
- # of the run's summary.
|
||||
- def parse_run (self, filename, file, tool, variation, num_variations):
|
||||
- header = None
|
||||
- harness = None
|
||||
- segment = None
|
||||
- final_using = 0
|
||||
-
|
||||
- # If this is the first run for this variation, add any text before
|
||||
- # the first harness to the header.
|
||||
- if not variation.header:
|
||||
- segment = Segment (filename, file.tell())
|
||||
- variation.header = segment
|
||||
-
|
||||
- # Parse up until the first line of the summary.
|
||||
- if num_variations == 1:
|
||||
- end = '\t\t=== ' + tool.name + ' Summary ===\n'
|
||||
- else:
|
||||
- end = ('\t\t=== ' + tool.name + ' Summary for '
|
||||
- + variation.name + ' ===\n')
|
||||
- while True:
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- self.fatal (filename, 'no recognised summary line')
|
||||
- if line == end:
|
||||
- break
|
||||
-
|
||||
- # Look for the start of a new harness.
|
||||
- if line.startswith ('Running ') and line.endswith (' ...\n'):
|
||||
- # Close off the current harness segment, if any.
|
||||
- if harness:
|
||||
- segment.lines -= final_using
|
||||
- harness.add_segment (first_key, segment)
|
||||
- name = line[len ('Running '):-len(' ...\n')]
|
||||
- harness = variation.get_harness (name)
|
||||
- segment = Segment (filename, file.tell())
|
||||
- first_key = None
|
||||
- final_using = 0
|
||||
- continue
|
||||
-
|
||||
- # Record test results. Associate the first test result with
|
||||
- # the harness segment, so that if a run for a particular harness
|
||||
- # has been split up, we can reassemble the individual segments
|
||||
- # in a sensible order.
|
||||
- #
|
||||
- # dejagnu sometimes issues warnings about the testing environment
|
||||
- # before running any tests. Treat them as part of the header
|
||||
- # rather than as a test result.
|
||||
- match = self.result_re.match (line)
|
||||
- if match and (harness or not line.startswith ('WARNING:')):
|
||||
- if not harness:
|
||||
- self.fatal (filename, 'saw test result before harness name')
|
||||
- name = match.group (2)
|
||||
- # Ugly hack to get the right order for gfortran.
|
||||
- if name.startswith ('gfortran.dg/g77/'):
|
||||
- name = 'h' + name
|
||||
- key = (name, len (harness.results))
|
||||
- harness.results.append ((key, line))
|
||||
- if not first_key and sort_logs:
|
||||
- first_key = key
|
||||
-
|
||||
- # 'Using ...' lines are only interesting in a header. Splitting
|
||||
- # the test up into parallel runs leads to more 'Using ...' lines
|
||||
- # than there would be in a single log.
|
||||
- if line.startswith ('Using '):
|
||||
- final_using += 1
|
||||
- else:
|
||||
- final_using = 0
|
||||
-
|
||||
- # Add other text to the current segment, if any.
|
||||
- if segment:
|
||||
- segment.lines += 1
|
||||
-
|
||||
- # Close off the final harness segment, if any.
|
||||
- if harness:
|
||||
- segment.lines -= final_using
|
||||
- harness.add_segment (first_key, segment)
|
||||
-
|
||||
- # Parse the rest of the summary (the '# of ' lines).
|
||||
- if len (variation.counts) == 0:
|
||||
- variation.counts = self.zero_counts()
|
||||
- while True:
|
||||
- before = file.tell()
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- break
|
||||
- if line == '\n':
|
||||
- continue
|
||||
- if not line.startswith ('# '):
|
||||
- file.seek (before)
|
||||
- break
|
||||
- found = False
|
||||
- for i in range (len (self.count_names)):
|
||||
- if line.startswith (self.count_names[i]):
|
||||
- count = line[len (self.count_names[i]):-1].strip()
|
||||
- variation.counts[i] += self.parse_int (filename, count)
|
||||
- found = True
|
||||
- break
|
||||
- if not found:
|
||||
- self.fatal (filename, 'unknown test result: ' + line[:-1])
|
||||
-
|
||||
- # Parse an acats run, which uses a different format from dejagnu.
|
||||
- # We have just skipped over '=== acats configuration ==='.
|
||||
- def parse_acats_run (self, filename, file):
|
||||
- # Parse the preamble, which describes the configuration and logs
|
||||
- # the creation of support files.
|
||||
- record = (self.acats_premable == '')
|
||||
- if record:
|
||||
- self.acats_premable = '\t\t=== acats configuration ===\n'
|
||||
- while True:
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- self.fatal (filename, 'could not parse acats preamble')
|
||||
- if line == '\t\t=== acats tests ===\n':
|
||||
- break
|
||||
- if record:
|
||||
- self.acats_premable += line
|
||||
-
|
||||
- # Parse the test results themselves, using a dummy variation name.
|
||||
- tool = self.get_tool ('acats')
|
||||
- variation = tool.get_variation ('none')
|
||||
- self.parse_run (filename, file, tool, variation, 1)
|
||||
-
|
||||
- # Parse the failure list.
|
||||
- while True:
|
||||
- before = file.tell()
|
||||
- line = file.readline()
|
||||
- if line.startswith ('*** FAILURES: '):
|
||||
- self.acats_failures.append (line[len ('*** FAILURES: '):-1])
|
||||
- continue
|
||||
- file.seek (before)
|
||||
- break
|
||||
-
|
||||
- # Parse the final summary at the end of a log in order to capture
|
||||
- # the version output that follows it.
|
||||
- def parse_final_summary (self, filename, file):
|
||||
- record = (self.version_output == '')
|
||||
- while True:
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- break
|
||||
- if line.startswith ('# of '):
|
||||
- continue
|
||||
- if record:
|
||||
- self.version_output += line
|
||||
- if line == '\n':
|
||||
- break
|
||||
-
|
||||
- # Parse a .log or .sum file.
|
||||
- def parse_file (self, filename, file):
|
||||
- tool = None
|
||||
- target = None
|
||||
- num_variations = 1
|
||||
- while True:
|
||||
- line = file.readline()
|
||||
- if line == '':
|
||||
- return
|
||||
-
|
||||
- # Parse the list of variations, which comes before the test
|
||||
- # runs themselves.
|
||||
- if line.startswith ('Schedule of variations:'):
|
||||
- num_variations = self.parse_variations (filename, file)
|
||||
- continue
|
||||
-
|
||||
- # Parse a testsuite run for one tool/variation combination.
|
||||
- if line.startswith ('Running target '):
|
||||
- name = line[len ('Running target '):-1]
|
||||
- if not tool:
|
||||
- self.fatal (filename, 'could not parse tool name')
|
||||
- if name not in self.known_variations:
|
||||
- self.fatal (filename, 'unknown target: ' + name)
|
||||
- self.parse_run (filename, file, tool,
|
||||
- tool.get_variation (name),
|
||||
- num_variations)
|
||||
- # If there is only one variation then there is no separate
|
||||
- # summary for it. Record any following version output.
|
||||
- if num_variations == 1:
|
||||
- self.parse_final_summary (filename, file)
|
||||
- continue
|
||||
-
|
||||
- # Parse the start line. In the case where several files are being
|
||||
- # parsed, pick the one with the earliest time.
|
||||
- match = self.test_run_re.match (line)
|
||||
- if match:
|
||||
- time = self.parse_time (match.group (2))
|
||||
- if not self.start_line or self.start_line[0] > time:
|
||||
- self.start_line = (time, line)
|
||||
- continue
|
||||
-
|
||||
- # Parse the form used for native testing.
|
||||
- if line.startswith ('Native configuration is '):
|
||||
- self.native_line = line
|
||||
- continue
|
||||
-
|
||||
- # Parse the target triplet.
|
||||
- if line.startswith ('Target is '):
|
||||
- self.target_line = line
|
||||
- continue
|
||||
-
|
||||
- # Parse the host triplet.
|
||||
- if line.startswith ('Host is '):
|
||||
- self.host_line = line
|
||||
- continue
|
||||
-
|
||||
- # Parse the acats premable.
|
||||
- if line == '\t\t=== acats configuration ===\n':
|
||||
- self.parse_acats_run (filename, file)
|
||||
- continue
|
||||
-
|
||||
- # Parse the tool name.
|
||||
- match = self.tool_re.match (line)
|
||||
- if match:
|
||||
- tool = self.get_tool (match.group (1))
|
||||
- continue
|
||||
-
|
||||
- # Skip over the final summary (which we instead create from
|
||||
- # individual runs) and parse the version output.
|
||||
- if tool and line == '\t\t=== ' + tool.name + ' Summary ===\n':
|
||||
- if file.readline() != '\n':
|
||||
- self.fatal (filename, 'expected blank line after summary')
|
||||
- self.parse_final_summary (filename, file)
|
||||
- continue
|
||||
-
|
||||
- # Parse the completion line. In the case where several files
|
||||
- # are being parsed, pick the one with the latest time.
|
||||
- match = self.completed_re.match (line)
|
||||
- if match:
|
||||
- time = self.parse_time (match.group (1))
|
||||
- if not self.end_line or self.end_line[0] < time:
|
||||
- self.end_line = (time, line)
|
||||
- continue
|
||||
-
|
||||
- # Sanity check to make sure that important text doesn't get
|
||||
- # dropped accidentally.
|
||||
- if strict and line.strip() != '':
|
||||
- self.fatal (filename, 'unrecognised line: ' + line[:-1])
|
||||
-
|
||||
- # Output a segment of text.
|
||||
- def output_segment (self, segment):
|
||||
- with safe_open (segment.filename) as file:
|
||||
- file.seek (segment.start)
|
||||
- for i in range (segment.lines):
|
||||
- sys.stdout.write (file.readline())
|
||||
-
|
||||
- # Output a summary giving the number of times each type of result has
|
||||
- # been seen.
|
||||
- def output_summary (self, tool, counts):
|
||||
- for i in range (len (self.count_names)):
|
||||
- name = self.count_names[i]
|
||||
- # dejagnu only prints result types that were seen at least once,
|
||||
- # but acats always prints a number of unexpected failures.
|
||||
- if (counts[i] > 0
|
||||
- or (tool.name == 'acats'
|
||||
- and name.startswith ('# of unexpected failures'))):
|
||||
- sys.stdout.write ('%s%d\n' % (name, counts[i]))
|
||||
-
|
||||
- # Output unified .log or .sum information for a particular variation,
|
||||
- # with a summary at the end.
|
||||
- def output_variation (self, tool, variation):
|
||||
- self.output_segment (variation.header)
|
||||
- for harness in sorted (variation.harnesses.values(),
|
||||
- key = attrgetter ('name')):
|
||||
- sys.stdout.write ('Running ' + harness.name + ' ...\n')
|
||||
- if self.do_sum:
|
||||
- harness.results.sort()
|
||||
- for (key, line) in harness.results:
|
||||
- sys.stdout.write (line)
|
||||
- else:
|
||||
- # Rearrange the log segments into test order (but without
|
||||
- # rearranging text within those segments).
|
||||
- for key in sorted (harness.segments.keys()):
|
||||
- self.output_segment (harness.segments[key])
|
||||
- for segment in harness.empty:
|
||||
- self.output_segment (segment)
|
||||
- if len (self.variations) > 1:
|
||||
- sys.stdout.write ('\t\t=== ' + tool.name + ' Summary for '
|
||||
- + variation.name + ' ===\n\n')
|
||||
- self.output_summary (tool, variation.counts)
|
||||
-
|
||||
- # Output unified .log or .sum information for a particular tool,
|
||||
- # with a summary at the end.
|
||||
- def output_tool (self, tool):
|
||||
- counts = self.zero_counts()
|
||||
- if tool.name == 'acats':
|
||||
- # acats doesn't use variations, so just output everything.
|
||||
- # It also has a different approach to whitespace.
|
||||
- sys.stdout.write ('\t\t=== ' + tool.name + ' tests ===\n')
|
||||
- for variation in tool.variations.values():
|
||||
- self.output_variation (tool, variation)
|
||||
- self.accumulate_counts (counts, variation.counts)
|
||||
- sys.stdout.write ('\t\t=== ' + tool.name + ' Summary ===\n')
|
||||
- else:
|
||||
- # Output the results in the usual dejagnu runtest format.
|
||||
- sys.stdout.write ('\n\t\t=== ' + tool.name + ' tests ===\n\n'
|
||||
- 'Schedule of variations:\n')
|
||||
- for name in self.variations:
|
||||
- if name in tool.variations:
|
||||
- sys.stdout.write (' ' + name + '\n')
|
||||
- sys.stdout.write ('\n')
|
||||
- for name in self.variations:
|
||||
- if name in tool.variations:
|
||||
- variation = tool.variations[name]
|
||||
- sys.stdout.write ('Running target '
|
||||
- + variation.name + '\n')
|
||||
- self.output_variation (tool, variation)
|
||||
- self.accumulate_counts (counts, variation.counts)
|
||||
- sys.stdout.write ('\n\t\t=== ' + tool.name + ' Summary ===\n\n')
|
||||
- self.output_summary (tool, counts)
|
||||
-
|
||||
- def main (self):
|
||||
- self.parse_cmdline()
|
||||
- try:
|
||||
- # Parse the input files.
|
||||
- for filename in self.files:
|
||||
- with safe_open (filename) as file:
|
||||
- self.parse_file (filename, file)
|
||||
-
|
||||
- # Decide what to output.
|
||||
- if len (self.variations) == 0:
|
||||
- self.variations = sorted (self.known_variations)
|
||||
- else:
|
||||
- for name in self.variations:
|
||||
- if name not in self.known_variations:
|
||||
- self.fatal (None, 'no results for ' + name)
|
||||
- if len (self.tools) == 0:
|
||||
- self.tools = sorted (self.runs.keys())
|
||||
-
|
||||
- # Output the header.
|
||||
- if self.start_line:
|
||||
- sys.stdout.write (self.start_line[1])
|
||||
- sys.stdout.write (self.native_line)
|
||||
- sys.stdout.write (self.target_line)
|
||||
- sys.stdout.write (self.host_line)
|
||||
- sys.stdout.write (self.acats_premable)
|
||||
-
|
||||
- # Output the main body.
|
||||
- for name in self.tools:
|
||||
- if name not in self.runs:
|
||||
- self.fatal (None, 'no results for ' + name)
|
||||
- self.output_tool (self.runs[name])
|
||||
-
|
||||
- # Output the footer.
|
||||
- if len (self.acats_failures) > 0:
|
||||
- sys.stdout.write ('*** FAILURES: '
|
||||
- + ' '.join (self.acats_failures) + '\n')
|
||||
- sys.stdout.write (self.version_output)
|
||||
- if self.end_line:
|
||||
- sys.stdout.write (self.end_line[1])
|
||||
- except IOError as e:
|
||||
- self.fatal (e.filename, e.strerror)
|
||||
-
|
||||
-Prog().main()
|
@ -1,747 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00002.html
|
||||
Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1075199
|
||||
|
||||
On Wednesday, May 21 2014, Doug Evans wrote:
|
||||
|
||||
> Sergio Durigan Junior <sergiodj@redhat.com> writes:
|
||||
>> [...]
|
||||
>> Thanks. WDYT of the following patch?
|
||||
>
|
||||
> Hi.
|
||||
>
|
||||
> fwiw it's too bad the ability to plug in different completers isn't more,
|
||||
> I dunno, parameterized (couldn't pick a better term, apologies -
|
||||
> I thought of "object oriented" but that carries its own baggage).
|
||||
> Performing completion obviously involves specifying more than a just
|
||||
> single function (witness the comparison of the completer with specific
|
||||
> functions).
|
||||
|
||||
Thanks for the reply, and sorry for the long delay in answering.
|
||||
|
||||
> Plus it's more than specifying brkchars.
|
||||
> Witness code like this:
|
||||
>
|
||||
> /* Many commands which want to complete on
|
||||
> file names accept several file names, as
|
||||
> in "run foo bar >>baz". So we don't want
|
||||
> to complete the entire text after the
|
||||
> command, just the last word. To this
|
||||
> end, we need to find the beginning of the
|
||||
> file name by starting at `word' and going
|
||||
> backwards. */
|
||||
> for (p = word;
|
||||
> p > tmp_command
|
||||
> && strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL;
|
||||
> p--)
|
||||
> ;
|
||||
>
|
||||
> IWBN if a "completer" object described how to do all these three things.
|
||||
> Then the special case code for filename_completer (and location_completer)
|
||||
> in completer.c could disappear. But maybe that's a patch for another day.
|
||||
|
||||
While I agree with you that the completion mechanism could be better (I
|
||||
myself had a lot of trouble with it), I unfortunately don't have enough
|
||||
time to tackle this problem now. So yeah, I think it will be a patch
|
||||
for another day...
|
||||
|
||||
> Regarding the hack of using a static local to pass data from
|
||||
> handle_brkchars to handle_completion, I know it's a hacky pragmatic
|
||||
> choice. To get the reference counting right the code assumes that
|
||||
> if the handle_brkchars phase is done then the handle_completion
|
||||
> phase will be done too, right?
|
||||
|
||||
Yeah. This is true for the current code (well, except maybe for the
|
||||
case you describe below...).
|
||||
|
||||
> I wonder if a SIGINT could sneak in
|
||||
> there between the two passes (either today or tomorrow).
|
||||
> Maybe the code in cmdpy_completer_helper for handle_brkchars_p could
|
||||
> first check whether resultobj is already non-NULL, and decrement its
|
||||
> reference count before setting it to NULL?
|
||||
|
||||
Yes, done (I think). Thanks for raising this issue.
|
||||
|
||||
> And cmdpy_completer_helper
|
||||
> could be defined to return a borrowed reference to resultobj?
|
||||
> Dunno, just thinking out loud.
|
||||
|
||||
Done, I guess.
|
||||
|
||||
> Something puzzles me though: If it's ok to cache the completion result from the
|
||||
> handle_brkchars pass to the handle_completion pass, why have two passes?
|
||||
> It feels like there must be a case where this caching of the result
|
||||
> in a static local from one pass to the next won't work.
|
||||
|
||||
I'm not sure I follow.
|
||||
|
||||
It's OK to cache the result because handle_brkchars and
|
||||
handle_completion work on the same set of data. In fact, we wouldn't
|
||||
need to have two passes here; my previous patch didn't have two passes,
|
||||
and worked fine. I just implemented it this way because Tom (correctly)
|
||||
raised the point that the completion itself might be time-consuming, and
|
||||
thus we could reuse its result in the two phases.
|
||||
|
||||
> Another question:
|
||||
> I noticed complete_command doesn't do this two-phase dance
|
||||
> of handle_brkchars followed by handle_completions. Should it?
|
||||
> It just goes straight to handle_completions.
|
||||
|
||||
I don't think it should, because for complete_command (and
|
||||
complete_filename et al) the handle_brkchars is already defined
|
||||
internally by GDB. See:
|
||||
|
||||
...
|
||||
/* Choose the default set of word break characters to break
|
||||
completions. If we later find out that we are doing completions
|
||||
on command strings (as opposed to strings supplied by the
|
||||
individual command completer functions, which can be any string)
|
||||
then we will switch to the special word break set for command
|
||||
strings, which leaves out the '-' character used in some
|
||||
commands. */
|
||||
rl_completer_word_break_characters =
|
||||
current_language->la_word_break_characters();
|
||||
...
|
||||
|
||||
/* It is a normal command; what comes after it is
|
||||
completed by the command's completer function. */
|
||||
if (c->completer == filename_completer)
|
||||
{
|
||||
/* Many commands which want to complete on
|
||||
file names accept several file names, as
|
||||
in "run foo bar >>baz". So we don't want
|
||||
to complete the entire text after the
|
||||
command, just the last word. To this
|
||||
end, we need to find the beginning of the
|
||||
file name by starting at `word' and going
|
||||
backwards. */
|
||||
for (p = word;
|
||||
p > tmp_command
|
||||
&& strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL;
|
||||
p--)
|
||||
;
|
||||
rl_completer_word_break_characters =
|
||||
gdb_completer_file_name_break_characters;
|
||||
}
|
||||
else if (c->completer == location_completer)
|
||||
{
|
||||
/* Commands which complete on locations want to
|
||||
see the entire argument. */
|
||||
for (p = word;
|
||||
p > tmp_command
|
||||
&& p[-1] != ' ' && p[-1] != '\t';
|
||||
p--)
|
||||
;
|
||||
}
|
||||
if (reason == handle_brkchars
|
||||
&& c->completer_handle_brkchars != NULL)
|
||||
(*c->completer_handle_brkchars) (c, p, word);
|
||||
if (reason != handle_brkchars && c->completer != NULL)
|
||||
list = (*c->completer) (c, p, word);
|
||||
|
||||
|
||||
The complete_command function will only be called by the last "if"
|
||||
clause, when reason != handle_brkchars. Otherwise,
|
||||
complete_line_internal will just deal with handle_brkchars. And for
|
||||
complete_command, the right value for rl_completer_word_break_characters
|
||||
is what is attributed at the beginning of the function.
|
||||
|
||||
My patch implements this "two-phase" dance for Python because in this
|
||||
specific case (i.e., a completion method defined in the Python script)
|
||||
there is no way to know the value of handle_brkchars before we actually
|
||||
do the completion itself.
|
||||
|
||||
In fact, my patch could probably be "simplified" and be made to call
|
||||
cmdpy_completer directly (without any cmdpy_completer_handle_brkchars),
|
||||
assuming that this function took care of filling handle_brkchars
|
||||
correctly. What I mean is: when dealing with the handle_brkchars case,
|
||||
the completer command can do anything it wants.
|
||||
|
||||
> [Maybe that explains the difference from using TAB. Dunno off hand.]
|
||||
> It seems like complete_command is trying to hand-code its own
|
||||
> handle_brkchars handling:
|
||||
>
|
||||
> static void
|
||||
> complete_command (char *arg, int from_tty)
|
||||
> {
|
||||
> int argpoint;
|
||||
> char *point, *arg_prefix;
|
||||
> VEC (char_ptr) *completions;
|
||||
>
|
||||
> dont_repeat ();
|
||||
>
|
||||
> if (arg == NULL)
|
||||
> arg = "";
|
||||
> argpoint = strlen (arg);
|
||||
>
|
||||
> /* complete_line assumes that its first argument is somewhere
|
||||
> within, and except for filenames at the beginning of, the word to
|
||||
> be completed. The following crude imitation of readline's
|
||||
> word-breaking tries to accomodate this. */
|
||||
> point = arg + argpoint;
|
||||
> while (point > arg)
|
||||
> {
|
||||
> if (strchr (rl_completer_word_break_characters, point[-1]) != 0)
|
||||
> break;
|
||||
> point--;
|
||||
> }
|
||||
>
|
||||
> arg_prefix = alloca (point - arg + 1);
|
||||
> memcpy (arg_prefix, arg, point - arg);
|
||||
> arg_prefix[point - arg] = 0;
|
||||
>
|
||||
> completions = complete_line (point, arg, argpoint);
|
||||
>
|
||||
> ...
|
||||
> }
|
||||
|
||||
Yes, it seems so, but I did not check further.
|
||||
|
||||
> TAB and the complete command should work identically of course,
|
||||
> but for your testcase, maybe you should test both just to verify
|
||||
> both work reasonably well (even if not identically).
|
||||
> Given that complete_command doesn't do the two phase dance,
|
||||
> does it work with your patch?
|
||||
> Maybe it does, but IWBN to confirm that.
|
||||
|
||||
The 'complete' command does not work as it should with my patch:
|
||||
|
||||
(gdb) complete completefileinit /hom
|
||||
completefileinit /home
|
||||
(gdb) complete completefilemethod /hom
|
||||
completefilemethod /home
|
||||
|
||||
But then, it also does not work without my patch either:
|
||||
|
||||
(gdb) complete file /hom
|
||||
file /home
|
||||
|
||||
So I am not extending the testcase for now, because this bug needs to be
|
||||
fixed first (and it is unrelated to the patch I am proposing).
|
||||
|
||||
WDYT of this version?
|
||||
|
||||
Thanks,
|
||||
|
||||
--
|
||||
Sergio
|
||||
GPG key ID: 65FC5E36
|
||||
Please send encrypted e-mail if possible
|
||||
http://blog.sergiodj.net/
|
||||
|
||||
gdb/
|
||||
2014-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR python/16699
|
||||
* cli/cli-decode.c (set_cmd_completer_handle_brkchars): New
|
||||
function.
|
||||
(add_cmd): Set "completer_handle_brkchars" to NULL.
|
||||
* cli/cli-decode.h (struct cmd_list_element)
|
||||
<completer_handle_brkchars>: New field.
|
||||
* command.h (completer_ftype_void): New typedef.
|
||||
(set_cmd_completer_handle_brkchars): New prototype.
|
||||
* completer.c (set_gdb_completion_word_break_characters): New
|
||||
function.
|
||||
(complete_line_internal): Call "completer_handle_brkchars"
|
||||
callback from command.
|
||||
* completer.h: Include "command.h".
|
||||
(set_gdb_completion_word_break_characters): New prototype.
|
||||
* python/py-cmd.c (cmdpy_completer_helper): New function.
|
||||
(cmdpy_completer_handle_brkchars): New function.
|
||||
(cmdpy_completer): Adjust to use cmdpy_completer_helper.
|
||||
(cmdpy_init): Set completer_handle_brkchars to
|
||||
cmdpy_completer_handle_brkchars.
|
||||
|
||||
gdb/testsuite/
|
||||
2014-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR python/16699
|
||||
* gdb.python/py-completion.exp: New file.
|
||||
* gdb.python/py-completion.py: Likewise.
|
||||
|
||||
|
||||
Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.c 2014-07-07 20:53:52.635106914 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.c 2014-07-07 20:53:55.429110207 +0200
|
||||
@@ -164,6 +164,15 @@ set_cmd_completer (struct cmd_list_eleme
|
||||
cmd->completer = completer; /* Ok. */
|
||||
}
|
||||
|
||||
+/* See definition in commands.h. */
|
||||
+
|
||||
+void
|
||||
+set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
|
||||
+ completer_ftype_void *completer_handle_brkchars)
|
||||
+{
|
||||
+ cmd->completer_handle_brkchars = completer_handle_brkchars;
|
||||
+}
|
||||
+
|
||||
/* Add element named NAME.
|
||||
Space for NAME and DOC must be allocated by the caller.
|
||||
CLASS is the top level category into which commands are broken down
|
||||
@@ -239,6 +248,7 @@ add_cmd (const char *name, enum command_
|
||||
c->prefix = NULL;
|
||||
c->abbrev_flag = 0;
|
||||
set_cmd_completer (c, make_symbol_completion_list_fn);
|
||||
+ c->completer_handle_brkchars = NULL;
|
||||
c->destroyer = NULL;
|
||||
c->type = not_set_cmd;
|
||||
c->var = NULL;
|
||||
Index: gdb-7.7.90.20140627/gdb/cli/cli-decode.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/cli/cli-decode.h 2014-07-07 20:53:52.636106915 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/cli/cli-decode.h 2014-07-07 20:53:55.429110207 +0200
|
||||
@@ -176,6 +176,15 @@ struct cmd_list_element
|
||||
"baz/foo", return "baz/foobar". */
|
||||
completer_ftype *completer;
|
||||
|
||||
+ /* Handle the word break characters for this completer. Usually
|
||||
+ this function need not be defined, but for some types of
|
||||
+ completers (e.g., Python completers declared as methods inside
|
||||
+ a class) the word break chars may need to be redefined
|
||||
+ depending on the completer type (e.g., for filename
|
||||
+ completers). */
|
||||
+
|
||||
+ completer_ftype_void *completer_handle_brkchars;
|
||||
+
|
||||
/* Destruction routine for this command. If non-NULL, this is
|
||||
called when this command instance is destroyed. This may be
|
||||
used to finalize the CONTEXT field, if needed. */
|
||||
Index: gdb-7.7.90.20140627/gdb/command.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/command.h 2014-07-07 20:53:52.636106915 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/command.h 2014-07-07 20:53:55.430110208 +0200
|
||||
@@ -158,8 +158,16 @@ extern void set_cmd_sfunc (struct cmd_li
|
||||
typedef VEC (char_ptr) *completer_ftype (struct cmd_list_element *,
|
||||
const char *, const char *);
|
||||
|
||||
+typedef void completer_ftype_void (struct cmd_list_element *,
|
||||
+ const char *, const char *);
|
||||
+
|
||||
extern void set_cmd_completer (struct cmd_list_element *, completer_ftype *);
|
||||
|
||||
+/* Set the completer_handle_brkchars callback. */
|
||||
+
|
||||
+extern void set_cmd_completer_handle_brkchars (struct cmd_list_element *,
|
||||
+ completer_ftype_void *);
|
||||
+
|
||||
/* HACK: cagney/2002-02-23: Code, mostly in tracepoints.c, grubs
|
||||
around in cmd objects to test the value of the commands sfunc(). */
|
||||
extern int cmd_cfunc_eq (struct cmd_list_element *cmd,
|
||||
Index: gdb-7.7.90.20140627/gdb/completer.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/completer.c 2014-07-07 20:53:52.637106916 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/completer.c 2014-07-07 20:53:55.430110208 +0200
|
||||
@@ -450,6 +450,21 @@ expression_completer (struct cmd_list_el
|
||||
return location_completer (ignore, p, word);
|
||||
}
|
||||
|
||||
+/* See definition in completer.h. */
|
||||
+
|
||||
+void
|
||||
+set_gdb_completion_word_break_characters (completer_ftype *fn)
|
||||
+{
|
||||
+ /* So far we are only interested in differentiating filename
|
||||
+ completers from everything else. */
|
||||
+ if (fn == filename_completer)
|
||||
+ rl_completer_word_break_characters
|
||||
+ = gdb_completer_file_name_break_characters;
|
||||
+ else
|
||||
+ rl_completer_word_break_characters
|
||||
+ = gdb_completer_command_word_break_characters;
|
||||
+}
|
||||
+
|
||||
/* Here are some useful test cases for completion. FIXME: These
|
||||
should be put in the test suite. They should be tested with both
|
||||
M-? and TAB.
|
||||
@@ -678,6 +693,9 @@ complete_line_internal (const char *text
|
||||
p--)
|
||||
;
|
||||
}
|
||||
+ if (reason == handle_brkchars
|
||||
+ && c->completer_handle_brkchars != NULL)
|
||||
+ (*c->completer_handle_brkchars) (c, p, word);
|
||||
if (reason != handle_brkchars && c->completer != NULL)
|
||||
list = (*c->completer) (c, p, word);
|
||||
}
|
||||
@@ -751,6 +769,9 @@ complete_line_internal (const char *text
|
||||
p--)
|
||||
;
|
||||
}
|
||||
+ if (reason == handle_brkchars
|
||||
+ && c->completer_handle_brkchars != NULL)
|
||||
+ (*c->completer_handle_brkchars) (c, p, word);
|
||||
if (reason != handle_brkchars && c->completer != NULL)
|
||||
list = (*c->completer) (c, p, word);
|
||||
}
|
||||
Index: gdb-7.7.90.20140627/gdb/completer.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/completer.h 2014-07-07 20:53:52.637106916 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/completer.h 2014-07-07 20:54:13.297131831 +0200
|
||||
@@ -18,6 +18,7 @@
|
||||
#define COMPLETER_H 1
|
||||
|
||||
#include "gdb_vecs.h"
|
||||
+#include "command.h"
|
||||
|
||||
extern VEC (char_ptr) *complete_line (const char *text,
|
||||
char *line_buffer,
|
||||
@@ -48,6 +49,13 @@ extern char *get_gdb_completer_quote_cha
|
||||
|
||||
extern char *gdb_completion_word_break_characters (void);
|
||||
|
||||
+/* Set the word break characters array to the corresponding set of
|
||||
+ chars, based on FN. This function is useful for cases when the
|
||||
+ completer doesn't know the type of the completion until some
|
||||
+ calculation is done (e.g., for Python functions). */
|
||||
+
|
||||
+extern void set_gdb_completion_word_break_characters (completer_ftype *fn);
|
||||
+
|
||||
/* Exported to linespec.c */
|
||||
|
||||
extern const char *skip_quoted_chars (const char *, const char *,
|
||||
Index: gdb-7.7.90.20140627/gdb/python/py-cmd.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140627.orig/gdb/python/py-cmd.c 2014-07-07 20:53:52.637106916 +0200
|
||||
+++ gdb-7.7.90.20140627/gdb/python/py-cmd.c 2014-07-07 20:53:55.431110209 +0200
|
||||
@@ -208,45 +208,155 @@ cmdpy_function (struct cmd_list_element
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
|
||||
+/* Helper function for the Python command completers (both "pure"
|
||||
+ completer and brkchar handler). This function takes COMMAND, TEXT
|
||||
+ and WORD and tries to call the Python method for completion with
|
||||
+ these arguments. It also takes HANDLE_BRKCHARS_P, an argument to
|
||||
+ identify whether it is being called from the brkchar handler or
|
||||
+ from the "pure" completer. In the first case, it effectively calls
|
||||
+ the Python method for completion, and records the PyObject in a
|
||||
+ static variable (used as a "cache"). In the second case, it just
|
||||
+ returns that variable, without actually calling the Python method
|
||||
+ again. This saves us one Python method call.
|
||||
+
|
||||
+ It is important to mention that this function is built on the
|
||||
+ assumption that the calls to cmdpy_completer_handle_brkchars and
|
||||
+ cmdpy_completer will be subsequent with nothing intervening. This
|
||||
+ is true for our completer mechanism.
|
||||
+
|
||||
+ This function returns the PyObject representing the Python method
|
||||
+ call. */
|
||||
+
|
||||
+static PyObject *
|
||||
+cmdpy_completer_helper (struct cmd_list_element *command,
|
||||
+ const char *text, const char *word,
|
||||
+ int handle_brkchars_p)
|
||||
+{
|
||||
+ cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
|
||||
+ PyObject *textobj, *wordobj;
|
||||
+ /* This static variable will server as a "cache" for us, in order to
|
||||
+ store the PyObject that results from calling the Python
|
||||
+ function. */
|
||||
+ static PyObject *resultobj = NULL;
|
||||
+
|
||||
+ if (handle_brkchars_p)
|
||||
+ {
|
||||
+ /* If we were called to handle brkchars, it means this is the
|
||||
+ first function call of two that will happen in a row.
|
||||
+ Therefore, we need to call the completer ourselves, and cache
|
||||
+ the return value in the static variable RESULTOBJ. Then, in
|
||||
+ the second call, we can just use the value of RESULTOBJ to do
|
||||
+ our job. */
|
||||
+ if (resultobj != NULL)
|
||||
+ Py_DECREF (resultobj);
|
||||
+
|
||||
+ resultobj = NULL;
|
||||
+ if (!obj)
|
||||
+ error (_("Invalid invocation of Python command object."));
|
||||
+ if (!PyObject_HasAttr ((PyObject *) obj, complete_cst))
|
||||
+ {
|
||||
+ /* If there is no complete method, don't error. */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL);
|
||||
+ if (!textobj)
|
||||
+ error (_("Could not convert argument to Python string."));
|
||||
+ wordobj = PyUnicode_Decode (word, sizeof (word), host_charset (), NULL);
|
||||
+ if (!wordobj)
|
||||
+ {
|
||||
+ Py_DECREF (textobj);
|
||||
+ error (_("Could not convert argument to Python string."));
|
||||
+ }
|
||||
+
|
||||
+ resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
|
||||
+ textobj, wordobj, NULL);
|
||||
+ Py_DECREF (textobj);
|
||||
+ Py_DECREF (wordobj);
|
||||
+ if (!resultobj)
|
||||
+ {
|
||||
+ /* Just swallow errors here. */
|
||||
+ PyErr_Clear ();
|
||||
+ }
|
||||
+
|
||||
+ Py_XINCREF (resultobj);
|
||||
+ }
|
||||
+
|
||||
+ return resultobj;
|
||||
+}
|
||||
+
|
||||
+/* Python function called to determine the break characters of a
|
||||
+ certain completer. We are only interested in knowing if the
|
||||
+ completer registered by the user will return one of the integer
|
||||
+ codes (see COMPLETER_* symbols). */
|
||||
+
|
||||
+static void
|
||||
+cmdpy_completer_handle_brkchars (struct cmd_list_element *command,
|
||||
+ const char *text, const char *word)
|
||||
+{
|
||||
+ PyObject *resultobj = NULL;
|
||||
+ struct cleanup *cleanup;
|
||||
+
|
||||
+ cleanup = ensure_python_env (get_current_arch (), current_language);
|
||||
+
|
||||
+ /* Calling our helper to obtain the PyObject of the Python
|
||||
+ function. */
|
||||
+ resultobj = cmdpy_completer_helper (command, text, word, 1);
|
||||
+
|
||||
+ /* Check if there was an error. */
|
||||
+ if (resultobj == NULL)
|
||||
+ goto done;
|
||||
+
|
||||
+ if (PyInt_Check (resultobj))
|
||||
+ {
|
||||
+ /* User code may also return one of the completion constants,
|
||||
+ thus requesting that sort of completion. We are only
|
||||
+ interested in this kind of return. */
|
||||
+ long value;
|
||||
+
|
||||
+ if (!gdb_py_int_as_long (resultobj, &value))
|
||||
+ {
|
||||
+ /* Ignore. */
|
||||
+ PyErr_Clear ();
|
||||
+ }
|
||||
+ else if (value >= 0 && value < (long) N_COMPLETERS)
|
||||
+ {
|
||||
+ /* This is the core of this function. Depending on which
|
||||
+ completer type the Python function returns, we have to
|
||||
+ adjust the break characters accordingly. */
|
||||
+ set_gdb_completion_word_break_characters
|
||||
+ (completers[value].completer);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ done:
|
||||
+
|
||||
+ /* We do not call Py_XDECREF here because RESULTOBJ will be used in
|
||||
+ the subsequent call to cmdpy_completer function. */
|
||||
+ do_cleanups (cleanup);
|
||||
+}
|
||||
+
|
||||
/* Called by gdb for command completion. */
|
||||
|
||||
static VEC (char_ptr) *
|
||||
cmdpy_completer (struct cmd_list_element *command,
|
||||
const char *text, const char *word)
|
||||
{
|
||||
- cmdpy_object *obj = (cmdpy_object *) get_cmd_context (command);
|
||||
- PyObject *textobj, *wordobj, *resultobj = NULL;
|
||||
+ PyObject *resultobj = NULL;
|
||||
VEC (char_ptr) *result = NULL;
|
||||
struct cleanup *cleanup;
|
||||
|
||||
cleanup = ensure_python_env (get_current_arch (), current_language);
|
||||
|
||||
- if (! obj)
|
||||
- error (_("Invalid invocation of Python command object."));
|
||||
- if (! PyObject_HasAttr ((PyObject *) obj, complete_cst))
|
||||
- {
|
||||
- /* If there is no complete method, don't error -- instead, just
|
||||
- say that there are no completions. */
|
||||
- goto done;
|
||||
- }
|
||||
-
|
||||
- textobj = PyUnicode_Decode (text, strlen (text), host_charset (), NULL);
|
||||
- if (! textobj)
|
||||
- error (_("Could not convert argument to Python string."));
|
||||
- wordobj = PyUnicode_Decode (word, strlen (word), host_charset (), NULL);
|
||||
- if (! wordobj)
|
||||
- error (_("Could not convert argument to Python string."));
|
||||
-
|
||||
- resultobj = PyObject_CallMethodObjArgs ((PyObject *) obj, complete_cst,
|
||||
- textobj, wordobj, NULL);
|
||||
- Py_DECREF (textobj);
|
||||
- Py_DECREF (wordobj);
|
||||
- if (! resultobj)
|
||||
- {
|
||||
- /* Just swallow errors here. */
|
||||
- PyErr_Clear ();
|
||||
- goto done;
|
||||
- }
|
||||
+ /* Calling our helper to obtain the PyObject of the Python
|
||||
+ function. */
|
||||
+ resultobj = cmdpy_completer_helper (command, text, word, 0);
|
||||
+
|
||||
+ /* If the result object of calling the Python function is NULL, it
|
||||
+ means that there was an error. In this case, just give up and
|
||||
+ return NULL. */
|
||||
+ if (resultobj == NULL)
|
||||
+ goto done;
|
||||
|
||||
result = NULL;
|
||||
if (PyInt_Check (resultobj))
|
||||
@@ -302,7 +412,6 @@ cmdpy_completer (struct cmd_list_element
|
||||
|
||||
done:
|
||||
|
||||
- Py_XDECREF (resultobj);
|
||||
do_cleanups (cleanup);
|
||||
|
||||
return result;
|
||||
@@ -548,6 +657,9 @@ cmdpy_init (PyObject *self, PyObject *ar
|
||||
set_cmd_context (cmd, self);
|
||||
set_cmd_completer (cmd, ((completetype == -1) ? cmdpy_completer
|
||||
: completers[completetype].completer));
|
||||
+ if (completetype == -1)
|
||||
+ set_cmd_completer_handle_brkchars (cmd,
|
||||
+ cmdpy_completer_handle_brkchars);
|
||||
}
|
||||
if (except.reason < 0)
|
||||
{
|
||||
Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.exp 2014-07-07 20:53:55.431110209 +0200
|
||||
@@ -0,0 +1,70 @@
|
||||
+# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile "py-completion"
|
||||
+
|
||||
+load_lib gdb-python.exp
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+
|
||||
+# Skip all tests if Python scripting is not enabled.
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
|
||||
+
|
||||
+# Create a temporary directory
|
||||
+set testdir "${objdir}/${subdir}/py-completion-testdir/"
|
||||
+set testdir_regex [string_to_regexp $testdir]
|
||||
+set testdir_complete "${objdir}/${subdir}/py-completion-test"
|
||||
+file mkdir $testdir
|
||||
+
|
||||
+# This one should always pass.
|
||||
+send_gdb "completefileinit ${testdir_complete}\t"
|
||||
+gdb_test_multiple "" "completefileinit completion" {
|
||||
+ -re "^completefileinit ${testdir_regex}$" {
|
||||
+ pass "completefileinit completion"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Just discarding whatever we typed.
|
||||
+send_gdb "\n"
|
||||
+gdb_test "print" ".*"
|
||||
+
|
||||
+# This is the problematic one.
|
||||
+send_gdb "completefilemethod ${testdir_complete}\t"
|
||||
+gdb_test_multiple "" "completefilemethod completion" {
|
||||
+ -re "^completefilemethod ${testdir_regex} $" {
|
||||
+ fail "completefilemethod completion (completed filename as wrong command arg)"
|
||||
+ }
|
||||
+ -re "^completefilemethod ${testdir_regex}$" {
|
||||
+ pass "completefilemethod completion"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Discarding again
|
||||
+send_gdb "\n"
|
||||
+gdb_test "print" ".*"
|
||||
+
|
||||
+# Another problematic
|
||||
+send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t"
|
||||
+gdb_test_multiple "" "completefilecommandcond completion" {
|
||||
+ -re "^completefilecommandcond ${testdir}$" {
|
||||
+ fail "completefilecommandcond completion (completed filename instead of command)"
|
||||
+ }
|
||||
+ -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
|
||||
+ pass "completefilecommandcond completion"
|
||||
+ }
|
||||
+}
|
||||
Index: gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.7.90.20140627/gdb/testsuite/gdb.python/py-completion.py 2014-07-07 20:53:55.431110209 +0200
|
||||
@@ -0,0 +1,58 @@
|
||||
+# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This testcase tests PR python/16699
|
||||
+
|
||||
+import gdb
|
||||
+
|
||||
+class CompleteFileInit(gdb.Command):
|
||||
+ def __init__(self):
|
||||
+ gdb.Command.__init__(self,'completefileinit',gdb.COMMAND_USER,gdb.COMPLETE_FILENAME)
|
||||
+
|
||||
+ def invoke(self,argument,from_tty):
|
||||
+ raise gdb.GdbError('not implemented')
|
||||
+
|
||||
+class CompleteFileMethod(gdb.Command):
|
||||
+ def __init__(self):
|
||||
+ gdb.Command.__init__(self,'completefilemethod',gdb.COMMAND_USER)
|
||||
+
|
||||
+ def invoke(self,argument,from_tty):
|
||||
+ raise gdb.GdbError('not implemented')
|
||||
+
|
||||
+ def complete(self,text,word):
|
||||
+ return gdb.COMPLETE_FILENAME
|
||||
+
|
||||
+class CompleteFileCommandCond(gdb.Command):
|
||||
+ def __init__(self):
|
||||
+ gdb.Command.__init__(self,'completefilecommandcond',gdb.COMMAND_USER)
|
||||
+
|
||||
+ def invoke(self,argument,from_tty):
|
||||
+ raise gdb.GdbError('not implemented')
|
||||
+
|
||||
+ def complete(self,text,word):
|
||||
+ # This is a test made to know if the command
|
||||
+ # completion still works fine. When the user asks to
|
||||
+ # complete something like "completefilecommandcond
|
||||
+ # /path/to/py-completion-t", it should not complete to
|
||||
+ # "/path/to/py-completion-test/", but instead just
|
||||
+ # wait for input.
|
||||
+ if "py-completion-t" in text:
|
||||
+ return gdb.COMPLETE_COMMAND
|
||||
+ else:
|
||||
+ return gdb.COMPLETE_FILENAME
|
||||
+
|
||||
+CompleteFileInit()
|
||||
+CompleteFileMethod()
|
||||
+CompleteFileCommandCond()
|
@ -1,72 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00154.html
|
||||
Subject: Re: [PATCH] PR python/16699: GDB Python command completion with overriden complete vs. completer class
|
||||
|
||||
|
||||
--pWyiEgJYm5f9v55/
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
On Tue, 08 Jul 2014 17:32:21 +0200, Jan Kratochvil wrote:
|
||||
> - -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
|
||||
> + -re "^completefilecommandcond ${completion_regex}$" {
|
||||
|
||||
There was a racy bug here - and even in the former test - here should be:
|
||||
+ -re "^completefilecommandcond ${completion_regex}\007$" {
|
||||
|
||||
Updated fix attached.
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--pWyiEgJYm5f9v55/
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="py-completion-race2.patch"
|
||||
|
||||
--- ./gdb/testsuite/gdb.python/py-completion.exp-orig 2014-07-07 21:32:17.891045058 +0200
|
||||
+++ ./gdb/testsuite/gdb.python/py-completion.exp 2014-07-08 20:14:57.189791928 +0200
|
||||
@@ -26,9 +26,9 @@ if { [skip_python_tests] } { continue }
|
||||
gdb_test_no_output "source ${srcdir}/${subdir}/${testfile}.py"
|
||||
|
||||
# Create a temporary directory
|
||||
-set testdir "${objdir}/${subdir}/py-completion-testdir/"
|
||||
+set testdir "[standard_output_file "py-completion-testdir"]/"
|
||||
set testdir_regex [string_to_regexp $testdir]
|
||||
-set testdir_complete "${objdir}/${subdir}/py-completion-test"
|
||||
+set testdir_complete [standard_output_file "py-completion-test"]
|
||||
file mkdir $testdir
|
||||
|
||||
# This one should always pass.
|
||||
@@ -40,8 +40,7 @@ gdb_test_multiple "" "completefileinit c
|
||||
}
|
||||
|
||||
# Just discarding whatever we typed.
|
||||
-send_gdb "\n"
|
||||
-gdb_test "print" ".*"
|
||||
+gdb_test " " ".*" "discard #1"
|
||||
|
||||
# This is the problematic one.
|
||||
send_gdb "completefilemethod ${testdir_complete}\t"
|
||||
@@ -55,16 +54,16 @@ gdb_test_multiple "" "completefilemethod
|
||||
}
|
||||
|
||||
# Discarding again
|
||||
-send_gdb "\n"
|
||||
-gdb_test "print" ".*"
|
||||
+gdb_test " " ".*" "discard #2"
|
||||
|
||||
# Another problematic
|
||||
-send_gdb "completefilecommandcond ${objdir}/${subdir}/py-completion-t\t"
|
||||
+set completion_regex "[string_to_regexp [standard_output_file "py-completion-t"]]"
|
||||
+send_gdb "completefilecommandcond [standard_output_file "py-completion-t\t"]"
|
||||
gdb_test_multiple "" "completefilecommandcond completion" {
|
||||
-re "^completefilecommandcond ${testdir}$" {
|
||||
fail "completefilecommandcond completion (completed filename instead of command)"
|
||||
}
|
||||
- -re "^completefilecommandcond ${objdir}/${subdir}/py-completion-t$" {
|
||||
+ -re "^completefilecommandcond ${completion_regex}\007$" {
|
||||
pass "completefilecommandcond completion"
|
||||
}
|
||||
}
|
||||
|
||||
--pWyiEgJYm5f9v55/--
|
||||
|
224
gdb-python-gil.patch
Normal file
224
gdb-python-gil.patch
Normal file
@ -0,0 +1,224 @@
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/doc/python.texi gdb-7.8/gdb/doc/python.texi
|
||||
--- gdb-7.8-orig/gdb/doc/python.texi 2014-08-13 22:04:14.162441271 +0200
|
||||
+++ gdb-7.8/gdb/doc/python.texi 2014-08-13 22:07:20.894643853 +0200
|
||||
@@ -228,6 +228,14 @@ returned as a string. The default is @c
|
||||
return value is @code{None}. If @var{to_string} is @code{True}, the
|
||||
@value{GDBN} virtual terminal will be temporarily set to unlimited width
|
||||
and height, and its pagination will be disabled; @pxref{Screen Size}.
|
||||
+
|
||||
+The @var{release_gil} flag specifies whether @value{GDBN} ought to
|
||||
+release the Python GIL before executing the command. This is useful
|
||||
+in multi-threaded Python programs where by default the Python
|
||||
+interpreter will acquire the GIL and lock other threads from
|
||||
+executing. After the command has completed executing in @value{GDBN}
|
||||
+the Python GIL is reacquired. This flag must be a boolean value. If
|
||||
+omitted, it defaults to @code{False}.
|
||||
@end defun
|
||||
|
||||
@findex gdb.breakpoints
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/gdb/python/python-internal.h
|
||||
--- gdb-7.8-orig/gdb/python/python-internal.h 2014-08-13 22:04:14.835441977 +0200
|
||||
+++ gdb-7.8/gdb/python/python-internal.h 2014-08-13 22:07:20.895643867 +0200
|
||||
@@ -143,6 +143,8 @@ typedef int Py_ssize_t;
|
||||
#define PyGILState_Release(ARG) ((void)(ARG))
|
||||
#define PyEval_InitThreads()
|
||||
#define PyThreadState_Swap(ARG) ((void)(ARG))
|
||||
+#define PyEval_SaveThread() ((void)(ARG))
|
||||
+#define PyEval_RestoreThread(ARG) ((void)(ARG))
|
||||
#define PyEval_ReleaseLock()
|
||||
#endif
|
||||
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
|
||||
--- gdb-7.8-orig/gdb/python/python.c 2014-08-13 22:04:14.164441273 +0200
|
||||
+++ gdb-7.8/gdb/python/python.c 2014-08-13 22:07:20.895643867 +0200
|
||||
@@ -620,14 +620,19 @@ execute_gdb_command (PyObject *self, PyO
|
||||
{
|
||||
const char *arg;
|
||||
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
|
||||
- int from_tty, to_string;
|
||||
+ PyObject *release_gil_obj = NULL;
|
||||
+ int from_tty, to_string, release_gil;
|
||||
volatile struct gdb_exception except;
|
||||
- static char *keywords[] = {"command", "from_tty", "to_string", NULL };
|
||||
+ static char *keywords[] = {"command", "from_tty", "to_string",
|
||||
+ "release_gil", NULL };
|
||||
char *result = NULL;
|
||||
+ /* Initialize it just to avoid a GCC false warning. */
|
||||
+ PyThreadState *state = NULL;
|
||||
|
||||
- if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg,
|
||||
+ if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!O!", keywords, &arg,
|
||||
&PyBool_Type, &from_tty_obj,
|
||||
- &PyBool_Type, &to_string_obj))
|
||||
+ &PyBool_Type, &to_string_obj,
|
||||
+ &PyBool_Type, &release_gil_obj))
|
||||
return NULL;
|
||||
|
||||
from_tty = 0;
|
||||
@@ -648,12 +652,28 @@ execute_gdb_command (PyObject *self, PyO
|
||||
to_string = cmp;
|
||||
}
|
||||
|
||||
+ release_gil = 0;
|
||||
+ if (release_gil_obj)
|
||||
+ {
|
||||
+ int cmp = PyObject_IsTrue (release_gil_obj);
|
||||
+ if (cmp < 0)
|
||||
+ return NULL;
|
||||
+ release_gil = cmp;
|
||||
+ }
|
||||
+
|
||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
/* Copy the argument text in case the command modifies it. */
|
||||
char *copy = xstrdup (arg);
|
||||
struct cleanup *cleanup = make_cleanup (xfree, copy);
|
||||
|
||||
+ /* In the case of long running GDB commands, allow the user to
|
||||
+ release the Python GIL acquired by Python. Restore the GIL
|
||||
+ after the command has completed before handing back to
|
||||
+ Python. */
|
||||
+ if (release_gil)
|
||||
+ state = PyEval_SaveThread();
|
||||
+
|
||||
make_cleanup_restore_integer (&interpreter_async);
|
||||
interpreter_async = 0;
|
||||
|
||||
@@ -666,9 +686,21 @@ execute_gdb_command (PyObject *self, PyO
|
||||
execute_command (copy, from_tty);
|
||||
}
|
||||
|
||||
+ /* Reacquire the GIL if it was released earlier. */
|
||||
+ if (release_gil)
|
||||
+ PyEval_RestoreThread (state);
|
||||
+
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
- GDB_PY_HANDLE_EXCEPTION (except);
|
||||
+ if (except.reason < 0)
|
||||
+ {
|
||||
+ /* Reacquire the GIL if it was released earlier. */
|
||||
+ if (release_gil)
|
||||
+ PyEval_RestoreThread (state);
|
||||
+
|
||||
+ gdbpy_convert_exception (except);
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
/* Do any commands attached to breakpoint we stopped at. */
|
||||
bpstat_do_actions ();
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.c 2014-08-13 22:33:05.052648912 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ int i;
|
||||
+ for (i = 0; i < 10; i++)
|
||||
+ {
|
||||
+ sleep (1); /* break-here */
|
||||
+ printf ("Sleeping %d\n", i);
|
||||
+ }
|
||||
+}
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.exp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.exp 2014-08-13 22:33:00.660641300 +0200
|
||||
@@ -0,0 +1,69 @@
|
||||
+# Copyright (C) 2014 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 <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile .c .py
|
||||
+set executable $testfile
|
||||
+
|
||||
+if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Skip all tests if Python scripting is not enabled.
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"] temporary
|
||||
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
||||
+
|
||||
+set test "response"
|
||||
+set timeout 60
|
||||
+set sleeping_last -1
|
||||
+set hello_last 0
|
||||
+set minimal 5
|
||||
+gdb_test_multiple "python execfile('$srcdir/$subdir/$srcfile2')" $test {
|
||||
+ -re "Error: unable to start thread\r\n" {
|
||||
+ fail $test
|
||||
+ # Not $gdb_prompt-synced!
|
||||
+ }
|
||||
+ -re "Sleeping (\[0-9\]+)\r\n" {
|
||||
+ set n $expect_out(1,string)
|
||||
+ if { $sleeping_last + 1 != $n } {
|
||||
+ fail $test
|
||||
+ } else {
|
||||
+ set sleeping_last $n
|
||||
+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ -re "Hello \\( (\[0-9\]+) \\)\r\n" {
|
||||
+ set n $expect_out(1,string)
|
||||
+ if { $hello_last + 1 != $n } {
|
||||
+ fail $test
|
||||
+ } else {
|
||||
+ set hello_last $n
|
||||
+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff -dup -ruNp gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
--- gdb-7.8-orig/gdb/testsuite/gdb.python/py-gil-mthread.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gdb-7.8/gdb/testsuite/gdb.python/py-gil-mthread.py 2014-08-13 22:33:08.996654320 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+import thread
|
||||
+import time
|
||||
+import gdb
|
||||
+
|
||||
+# Define a function for the thread
|
||||
+def print_thread_hello():
|
||||
+ count = 0
|
||||
+ while count < 10:
|
||||
+ time.sleep(1)
|
||||
+ count += 1
|
||||
+ print "Hello (", count, ")"
|
||||
+
|
||||
+# Create a threads a continue
|
||||
+try:
|
||||
+ thread.start_new_thread( print_thread_hello, ())
|
||||
+ gdb.execute ("continue", release_gil=True)
|
||||
+
|
||||
+except:
|
||||
+ print "Error: unable to start thread"
|
||||
+
|
||||
+while 1:
|
||||
+ pass
|
175
gdb-python3-py_hash_t-32bit.patch
Normal file
175
gdb-python3-py_hash_t-32bit.patch
Normal file
@ -0,0 +1,175 @@
|
||||
http://sourceware.org/ml/gdb-patches/2015-02/msg00091.html
|
||||
Subject: [patch] Fix Python 3 build error on 32-bit hosts
|
||||
|
||||
|
||||
--ZPt4rx8FFjLCG7dd
|
||||
Content-Type: text/plain; charset=iso-2022-jp
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
on Fedora Rawhide (==22) i686 using --with-python=/usr/bin/python3 one gets:
|
||||
|
||||
gcc -g -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -pthread -I/usr/include/guile/2.0 -I/usr/include/python3.4m -I/usr/include/python3.4m -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o py-value.o -MT py-value.o -MMD -MP -MF .deps/py-value.Tpo -fno-strict-aliasing -DNDEBUG -fwrapv ./python/py-value.c
|
||||
./python/py-value.c:1696:3: error: initialization from incompatible pointer type [-Werror]
|
||||
valpy_hash, /*tp_hash*/
|
||||
^
|
||||
./python/py-value.c:1696:3: error: (near initialization for $B!F(Bvalue_object_type.tp_hash$B!G(B) [-Werror]
|
||||
cc1: all warnings being treated as errors
|
||||
Makefile:2628: recipe for target 'py-value.o' failed
|
||||
|
||||
This is because in Python 2 tp_hash was:
|
||||
typedef long (*hashfunc)(PyObject *);
|
||||
while in Python 3 tp_hash is:
|
||||
typedef Py_hash_t (*hashfunc)(PyObject *);
|
||||
|
||||
Py_hash_t is int for 32-bit hosts and long for 64-bit hosts. While on 32-bit
|
||||
hosts sizeof(long)==sizeof(int) still the hashfunc type is formally
|
||||
incompatible. As this patch should have no compiled code change it is not
|
||||
really necessary for gdb-7.9, it would fix there just this non-fatal
|
||||
compilation warning:
|
||||
./python/py-value.c:1696:3: warning: initialization from incompatible pointer type
|
||||
valpy_hash, /*tp_hash*/
|
||||
^
|
||||
./python/py-value.c:1696:3: warning: (near initialization for $B!F(Bvalue_object_type.tp_hash$B!G(B)
|
||||
|
||||
A question is whether the autoconf test isn't an overkill. One could use
|
||||
instead just:
|
||||
#if PYTHON_ABI_VERSION >= 3
|
||||
Also one could use that #if either just at the valpy_hash() definition or one
|
||||
could provide Py_hash_t in gdb/defs.h or one could provide some GDB_Py_hash_t
|
||||
in gdb/defs.h.
|
||||
|
||||
Tested compilation with:
|
||||
python-devel-2.7.9-4.fc22.x86_64
|
||||
python-devel-2.7.9-4.fc22.i686
|
||||
python3-devel-3.4.2-4.fc22.x86_64
|
||||
python3-devel-3.4.2-4.fc22.i686
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--ZPt4rx8FFjLCG7dd
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/
|
||||
2015-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* configure.ac <"${have_libpython}" != no>: Define Py_hash_t.
|
||||
* python/py-value.c (valpy_fetch_lazy): Use it. Remove cast to the
|
||||
return type.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
diff --git a/gdb/config.in b/gdb/config.in
|
||||
index 806cbac..44acfac 100644
|
||||
--- a/gdb/config.in
|
||||
+++ b/gdb/config.in
|
||||
@@ -617,6 +617,9 @@
|
||||
/* Define if the python directory should be relocated when GDB is moved. */
|
||||
#undef PYTHON_PATH_RELOCATABLE
|
||||
|
||||
+/* Provide Python 3 Py_hash_t for Python 2. */
|
||||
+#undef Py_hash_t
|
||||
+
|
||||
/* Relocated directory for source files. */
|
||||
#undef RELOC_SRCDIR
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 9632f9a..65f5b2c 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -8749,6 +8749,45 @@ rm -f conftest.err conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
|
||||
$as_echo "${python_has_threads}" >&6; }
|
||||
CPPFLAGS="${saved_CPPFLAGS}"
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Py_hash_t" >&5
|
||||
+$as_echo_n "checking for Py_hash_t... " >&6; }
|
||||
+if test "${gdb_cv_Py_hash_t+set}" = set; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ old_CFLAGS="$CFLAGS"
|
||||
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
|
||||
+ old_CPPFLAGS="$CPPFLAGS"
|
||||
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+#include <Python.h>
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+Py_hash_t var;
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_compile "$LINENO"; then :
|
||||
+ gdb_cv_Py_hash_t=yes
|
||||
+else
|
||||
+ gdb_cv_Py_hash_t=no
|
||||
+
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+ CPPFLAGS="$old_CPPFLAGS"
|
||||
+ CFLAGS="$old_CFLAGS"
|
||||
+
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_Py_hash_t" >&5
|
||||
+$as_echo "$gdb_cv_Py_hash_t" >&6; }
|
||||
+ if test "x$gdb_cv_Py_hash_t" = "xno"; then
|
||||
+
|
||||
+$as_echo "#define Py_hash_t long" >>confdefs.h
|
||||
+
|
||||
+ fi
|
||||
else
|
||||
# Even if Python support is not compiled in, we need to have this file
|
||||
# included so that the "python" command, et.al., still exists.
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index dfc6947..f335b7b 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -1016,6 +1016,25 @@ if test "${have_libpython}" != no; then
|
||||
]]), [python_has_threads=no], [python_has_threads=yes])
|
||||
AC_MSG_RESULT(${python_has_threads})
|
||||
CPPFLAGS="${saved_CPPFLAGS}"
|
||||
+
|
||||
+ AC_CACHE_CHECK([for Py_hash_t], gdb_cv_Py_hash_t,
|
||||
+ old_CFLAGS="$CFLAGS"
|
||||
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
|
||||
+ old_CPPFLAGS="$CPPFLAGS"
|
||||
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
|
||||
+ AC_TRY_COMPILE(
|
||||
+ [#include <Python.h>],
|
||||
+ [Py_hash_t var;],
|
||||
+ gdb_cv_Py_hash_t=yes,
|
||||
+ gdb_cv_Py_hash_t=no
|
||||
+ )
|
||||
+ CPPFLAGS="$old_CPPFLAGS"
|
||||
+ CFLAGS="$old_CFLAGS"
|
||||
+ )
|
||||
+ if test "x$gdb_cv_Py_hash_t" = "xno"; then
|
||||
+ AC_DEFINE(Py_hash_t, long,
|
||||
+ [Provide Python 3 Py_hash_t for Python 2.])
|
||||
+ fi
|
||||
else
|
||||
# Even if Python support is not compiled in, we need to have this file
|
||||
# included so that the "python" command, et.al., still exists.
|
||||
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
|
||||
index 4c4d36e..5a13777 100644
|
||||
--- a/gdb/python/py-value.c
|
||||
+++ b/gdb/python/py-value.c
|
||||
@@ -895,10 +895,10 @@ valpy_fetch_lazy (PyObject *self, PyObject *args)
|
||||
|
||||
/* Calculate and return the address of the PyObject as the value of
|
||||
the builtin __hash__ call. */
|
||||
-static long
|
||||
+static Py_hash_t
|
||||
valpy_hash (PyObject *self)
|
||||
{
|
||||
- return (long) (intptr_t) self;
|
||||
+ return (intptr_t) self;
|
||||
}
|
||||
|
||||
enum valpy_opcode
|
56
gdb-python3-testsuite.patch
Normal file
56
gdb-python3-testsuite.patch
Normal file
@ -0,0 +1,56 @@
|
||||
http://sourceware.org/ml/gdb-patches/2015-02/msg00361.html
|
||||
Subject: PR python/17927 (Python 3 testsuite compatability)
|
||||
|
||||
This patch updates the Python testsuite to maintain Python 3
|
||||
compatibility. I'll check it in under the obvious tomorrow (if
|
||||
nobody objects otherwise.)
|
||||
|
||||
Cheers
|
||||
|
||||
Phil
|
||||
|
||||
|
||||
2015-02-16 Phil Muldoon <pmuldoon@redhat.com>
|
||||
|
||||
PR python/17927
|
||||
* gdb.python/py-objfile.exp: Use print ()
|
||||
* gdb.python/py-type.exp: Ditto.
|
||||
* gdb.python/py-framefilter.py: Update to use map in
|
||||
Python 3.
|
||||
|
||||
--
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-framefilter.py b/gdb/testsuite/gdb.python/py-framefilter.py
|
||||
index 0de026c..8c65edc 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-framefilter.py
|
||||
+++ b/gdb/testsuite/gdb.python/py-framefilter.py
|
||||
@@ -145,7 +145,10 @@ class ErrorFilter():
|
||||
gdb.frame_filters [self.name] = self
|
||||
|
||||
def filter(self, frame_iter):
|
||||
- return itertools.imap(ErrorInName, frame_iter)
|
||||
+ if hasattr(itertools, "imap"):
|
||||
+ return itertools.imap(ErrorInName, frame_iter)
|
||||
+ else:
|
||||
+ return map(ErrorInName, frame_iter)
|
||||
|
||||
FrameFilter()
|
||||
FrameElider()
|
||||
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp
|
||||
index c4c8d9f..6c4e5f8 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-type.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-type.exp
|
||||
@@ -247,10 +247,10 @@ restart_gdb "${binfile}"
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
-gdb_test "python print gdb.lookup_type('char').array(1, 0)" \
|
||||
+gdb_test "python print (gdb.lookup_type('char').array(1, 0))" \
|
||||
"char \\\[0\\\]"
|
||||
|
||||
-gdb_test "python print gdb.lookup_type('char').array(1, -1)" \
|
||||
+gdb_test "python print (gdb.lookup_type('char').array(1, -1))" \
|
||||
"Array length must not be negative.*"
|
||||
|
||||
with_test_prefix "lang_c" {
|
||||
|
@ -1,90 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-06/msg00737.html
|
||||
Subject: [patch] Fix --with-system-readline with readline-6.3 patch 5
|
||||
|
||||
|
||||
--BXVAT5kNtrzKuDFl
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
I have filed now:
|
||||
--with-system-readline uses bundled readline include files
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=17077
|
||||
|
||||
To see any effect of the patch below you have to do:
|
||||
rm -rf readline
|
||||
Otherwise readline include files get used the bundled ones from GDB which are
|
||||
currently 6.2 while system readline may be 6.3 already.
|
||||
|
||||
You also have to use system readline-6.3 including its upstream patch:
|
||||
[Bug-readline] Readline-6.3 Official Patch 5
|
||||
http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html
|
||||
Message-ID: <140415125618.AA57598.SM@caleb.ins.cwru.edu>
|
||||
|
||||
In short it happens on Fedora Rawhide since:
|
||||
readline-6.3-1.fc21
|
||||
https://koji.fedoraproject.org/koji/buildinfo?buildID=538941
|
||||
|
||||
The error is:
|
||||
https://kojipkgs.fedoraproject.org//work/tasks/9890/7059890/build.log
|
||||
../../gdb/tui/tui-io.c:132:1: error: 'Function' is deprecated [-Werror=deprecated-declarations]
|
||||
static Function *tui_old_rl_getc_function;
|
||||
^
|
||||
../../gdb/tui/tui-io.c:133:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
|
||||
static VFunction *tui_old_rl_redisplay_function;
|
||||
^
|
||||
../../gdb/tui/tui-io.c:134:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
|
||||
static VFunction *tui_old_rl_prep_terminal;
|
||||
^
|
||||
../../gdb/tui/tui-io.c:135:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations]
|
||||
static VFunction *tui_old_rl_deprep_terminal;
|
||||
^
|
||||
|
||||
It is since bash change:
|
||||
lib/readline/rltypedefs.h
|
||||
- remove old Function/VFunction/CPFunction/CPPFunction typedefs as
|
||||
suggested by Tom Tromey <tromey@redhat.com>
|
||||
|
||||
The new typedefs used below are present in readline/rltypedefs.h since:
|
||||
git://git.savannah.gnu.org/bash.git
|
||||
commit 28ef6c316f1aff914bb95ac09787a3c83c1815fd
|
||||
Date: Fri Apr 6 19:14:31 2001 +0000
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--BXVAT5kNtrzKuDFl
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="tuireadline.patch"
|
||||
|
||||
gdb/
|
||||
2014-06-20 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix --with-system-readline with readline-6.3 patch 5.
|
||||
* tui/tui-io.c (tui_old_rl_getc_function, tui_old_rl_redisplay_function)
|
||||
(tui_old_rl_prep_terminal, tui_old_rl_deprep_terminal): Use rl_*_t
|
||||
types.
|
||||
|
||||
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
|
||||
index 761d203..dcccb08 100644
|
||||
--- a/gdb/tui/tui-io.c
|
||||
+++ b/gdb/tui/tui-io.c
|
||||
@@ -129,10 +129,10 @@ static struct ui_file *tui_old_stderr;
|
||||
struct ui_out *tui_old_uiout;
|
||||
|
||||
/* Readline previous hooks. */
|
||||
-static Function *tui_old_rl_getc_function;
|
||||
-static VFunction *tui_old_rl_redisplay_function;
|
||||
-static VFunction *tui_old_rl_prep_terminal;
|
||||
-static VFunction *tui_old_rl_deprep_terminal;
|
||||
+static rl_getc_func_t *tui_old_rl_getc_function;
|
||||
+static rl_voidfunc_t *tui_old_rl_redisplay_function;
|
||||
+static rl_vintfunc_t *tui_old_rl_prep_terminal;
|
||||
+static rl_voidfunc_t *tui_old_rl_deprep_terminal;
|
||||
static int tui_old_rl_echoing_p;
|
||||
|
||||
/* Readline output stream.
|
||||
|
||||
--BXVAT5kNtrzKuDFl--
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -96,11 +96,11 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=bitpos-wp.patch
|
||||
|
||||
Index: gdb-7.8/gdb/arm-linux-nat.c
|
||||
Index: gdb-7.8.50.20141228/gdb/arm-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/arm-linux-nat.c 2014-08-01 23:27:30.183773676 +0200
|
||||
+++ gdb-7.8/gdb/arm-linux-nat.c 2014-08-01 23:27:30.241773754 +0200
|
||||
@@ -1296,7 +1296,7 @@ arm_linux_stopped_by_watchpoint (struct
|
||||
--- gdb-7.8.50.20141228.orig/gdb/arm-linux-nat.c 2015-01-05 22:10:30.170726774 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/arm-linux-nat.c 2015-01-05 22:10:35.571751324 +0100
|
||||
@@ -1295,7 +1295,7 @@ arm_linux_stopped_by_watchpoint (struct
|
||||
static int
|
||||
arm_linux_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -109,11 +109,11 @@ Index: gdb-7.8/gdb/arm-linux-nat.c
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
Index: gdb-7.8.50.20141228/gdb/ppc-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/ppc-linux-nat.c 2014-08-01 23:27:30.202773701 +0200
|
||||
+++ gdb-7.8/gdb/ppc-linux-nat.c 2014-08-01 23:29:38.311944925 +0200
|
||||
@@ -1862,11 +1862,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
--- gdb-7.8.50.20141228.orig/gdb/ppc-linux-nat.c 2015-01-05 22:10:30.171726779 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/ppc-linux-nat.c 2015-01-05 22:10:35.572751329 +0100
|
||||
@@ -1860,11 +1860,11 @@ can_use_watchpoint_cond_accel (void)
|
||||
CONDITION_VALUE will hold the value which should be put in the
|
||||
DVC register. */
|
||||
static void
|
||||
@ -128,7 +128,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
CORE_ADDR addr_end_data, addr_end_dvc;
|
||||
|
||||
/* The DVC register compares bytes within fixed-length windows which
|
||||
@@ -1953,7 +1953,7 @@ num_memory_accesses (struct value *v)
|
||||
@@ -1951,7 +1951,7 @@ num_memory_accesses (struct value *v)
|
||||
of the constant. */
|
||||
static int
|
||||
check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
||||
@ -137,7 +137,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
{
|
||||
int pc = 1, num_accesses_left, num_accesses_right;
|
||||
struct value *left_val, *right_val, *left_chain, *right_chain;
|
||||
@@ -2021,7 +2021,7 @@ check_condition (CORE_ADDR watch_addr, s
|
||||
@@ -2019,7 +2019,7 @@ check_condition (CORE_ADDR watch_addr, s
|
||||
true. */
|
||||
static int
|
||||
ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
|
||||
@ -146,7 +146,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
struct expression *cond)
|
||||
{
|
||||
CORE_ADDR data_value;
|
||||
@@ -2038,7 +2038,7 @@ ppc_linux_can_accel_watchpoint_condition
|
||||
@@ -2036,7 +2036,7 @@ ppc_linux_can_accel_watchpoint_condition
|
||||
|
||||
static void
|
||||
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
||||
@ -155,7 +155,7 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
int insert)
|
||||
{
|
||||
if (len == 1
|
||||
@@ -2304,7 +2304,7 @@ ppc_linux_stopped_by_watchpoint (struct
|
||||
@@ -2302,7 +2302,7 @@ ppc_linux_stopped_by_watchpoint (struct
|
||||
static int
|
||||
ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -164,11 +164,11 @@ Index: gdb-7.8/gdb/ppc-linux-nat.c
|
||||
{
|
||||
int mask;
|
||||
|
||||
Index: gdb-7.8/gdb/procfs.c
|
||||
Index: gdb-7.8.50.20141228/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/procfs.c 2014-08-01 23:27:30.203773703 +0200
|
||||
+++ gdb-7.8/gdb/procfs.c 2014-08-01 23:27:30.243773756 +0200
|
||||
@@ -2429,7 +2429,7 @@ procfs_address_to_host_pointer (CORE_ADD
|
||||
--- gdb-7.8.50.20141228.orig/gdb/procfs.c 2015-01-05 22:10:30.172726783 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/procfs.c 2015-01-05 22:10:35.573751333 +0100
|
||||
@@ -2426,7 +2426,7 @@ procfs_address_to_host_pointer (CORE_ADD
|
||||
#endif
|
||||
|
||||
static int
|
||||
@ -177,7 +177,7 @@ Index: gdb-7.8/gdb/procfs.c
|
||||
{
|
||||
#if !defined (PCWATCH) && !defined (PIOCSWATCH)
|
||||
/* If neither or these is defined, we can't support watchpoints.
|
||||
@@ -4762,7 +4762,7 @@ procfs_pid_to_str (struct target_ops *op
|
||||
@@ -4705,7 +4705,7 @@ procfs_pid_to_str (struct target_ops *op
|
||||
/* Insert a watchpoint. */
|
||||
|
||||
static int
|
||||
@ -186,11 +186,11 @@ Index: gdb-7.8/gdb/procfs.c
|
||||
int after)
|
||||
{
|
||||
#ifndef AIX5
|
||||
Index: gdb-7.8/gdb/remote.c
|
||||
Index: gdb-7.8.50.20141228/gdb/remote.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/remote.c 2014-08-01 23:27:30.205773705 +0200
|
||||
+++ gdb-7.8/gdb/remote.c 2014-08-01 23:27:30.246773760 +0200
|
||||
@@ -8206,7 +8206,7 @@ remote_insert_watchpoint (struct target_
|
||||
--- gdb-7.8.50.20141228.orig/gdb/remote.c 2015-01-05 22:10:30.174726792 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/remote.c 2015-01-05 22:10:35.574751338 +0100
|
||||
@@ -8298,7 +8298,7 @@ remote_insert_watchpoint (struct target_
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -199,7 +199,7 @@ Index: gdb-7.8/gdb/remote.c
|
||||
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
@@ -8226,7 +8226,7 @@ remote_insert_watchpoint (struct target_
|
||||
@@ -8318,7 +8318,7 @@ remote_insert_watchpoint (struct target_
|
||||
|
||||
static int
|
||||
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
|
||||
@ -208,7 +208,7 @@ Index: gdb-7.8/gdb/remote.c
|
||||
{
|
||||
CORE_ADDR diff = remote_address_masked (addr - start);
|
||||
|
||||
@@ -8256,7 +8256,7 @@ remote_remove_watchpoint (struct target_
|
||||
@@ -8348,7 +8348,7 @@ remote_remove_watchpoint (struct target_
|
||||
p = strchr (rs->buf, '\0');
|
||||
addr = remote_address_masked (addr);
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
@ -217,11 +217,11 @@ Index: gdb-7.8/gdb/remote.c
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
|
||||
Index: gdb-7.8/gdb/target.c
|
||||
Index: gdb-7.8.50.20141228/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/target.c 2014-08-01 23:27:30.206773707 +0200
|
||||
+++ gdb-7.8/gdb/target.c 2014-08-01 23:29:38.314944857 +0200
|
||||
@@ -52,7 +52,7 @@ static void target_info (char *, int);
|
||||
--- gdb-7.8.50.20141228.orig/gdb/target.c 2015-01-05 22:10:30.175726797 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/target.c 2015-01-05 22:10:35.575751342 +0100
|
||||
@@ -51,7 +51,7 @@ static void generic_tls_error (void) ATT
|
||||
static void default_terminal_info (struct target_ops *, const char *, int);
|
||||
|
||||
static int default_watchpoint_addr_within_range (struct target_ops *,
|
||||
@ -230,23 +230,7 @@ Index: gdb-7.8/gdb/target.c
|
||||
|
||||
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
|
||||
CORE_ADDR, LONGEST);
|
||||
@@ -150,13 +150,13 @@ static int debug_to_remove_watchpoint (s
|
||||
static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
|
||||
|
||||
static int debug_to_watchpoint_addr_within_range (struct target_ops *,
|
||||
- CORE_ADDR, CORE_ADDR, int);
|
||||
+ CORE_ADDR, CORE_ADDR, LONGEST);
|
||||
|
||||
static int debug_to_region_ok_for_hw_watchpoint (struct target_ops *self,
|
||||
CORE_ADDR, LONGEST);
|
||||
|
||||
static int debug_to_can_accel_watchpoint_condition (struct target_ops *self,
|
||||
- CORE_ADDR, int, int,
|
||||
+ CORE_ADDR, LONGEST, int,
|
||||
struct expression *);
|
||||
|
||||
static void debug_to_terminal_init (struct target_ops *self);
|
||||
@@ -2960,7 +2960,7 @@ default_region_ok_for_hw_watchpoint (str
|
||||
@@ -2983,7 +2983,7 @@ default_region_ok_for_hw_watchpoint (str
|
||||
static int
|
||||
default_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -255,52 +239,11 @@ Index: gdb-7.8/gdb/target.c
|
||||
{
|
||||
return addr >= start && addr < start + length;
|
||||
}
|
||||
@@ -3681,7 +3681,7 @@ debug_to_region_ok_for_hw_watchpoint (st
|
||||
|
||||
static int
|
||||
debug_to_can_accel_watchpoint_condition (struct target_ops *self,
|
||||
- CORE_ADDR addr, int len, int rw,
|
||||
+ CORE_ADDR addr, LONGEST len, int rw,
|
||||
struct expression *cond)
|
||||
{
|
||||
int retval;
|
||||
@@ -3692,8 +3692,8 @@ debug_to_can_accel_watchpoint_condition
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"target_can_accel_watchpoint_condition "
|
||||
- "(%s, %d, %d, %s) = %ld\n",
|
||||
- core_addr_to_string (addr), len, rw,
|
||||
+ "(%s, %s, %d, %s) = %ld\n",
|
||||
+ core_addr_to_string (addr), plongest (len), rw,
|
||||
host_address_to_string (cond), (unsigned long) retval);
|
||||
return retval;
|
||||
}
|
||||
@@ -3728,7 +3728,7 @@ debug_to_stopped_data_address (struct ta
|
||||
static int
|
||||
debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
- CORE_ADDR start, int length)
|
||||
+ CORE_ADDR start, LONGEST length)
|
||||
{
|
||||
int retval;
|
||||
|
||||
@@ -3736,9 +3736,9 @@ debug_to_watchpoint_addr_within_range (s
|
||||
start, length);
|
||||
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
- "target_watchpoint_addr_within_range (%s, %s, %d) = %d\n",
|
||||
+ "target_watchpoint_addr_within_range (%s, %s, %s) = %d\n",
|
||||
core_addr_to_string (addr), core_addr_to_string (start),
|
||||
- length, retval);
|
||||
+ plongest (length), retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
Index: gdb-7.8/gdb/target.h
|
||||
Index: gdb-7.8.50.20141228/gdb/target.h
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/target.h 2014-08-01 23:27:30.207773708 +0200
|
||||
+++ gdb-7.8/gdb/target.h 2014-08-01 23:29:38.315944839 +0200
|
||||
@@ -469,7 +469,7 @@ struct target_ops
|
||||
--- gdb-7.8.50.20141228.orig/gdb/target.h 2015-01-05 22:10:30.176726802 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/target.h 2015-01-05 22:10:35.575751342 +0100
|
||||
@@ -483,7 +483,7 @@ struct target_ops
|
||||
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *)
|
||||
TARGET_DEFAULT_RETURN (0);
|
||||
int (*to_watchpoint_addr_within_range) (struct target_ops *,
|
||||
@ -309,7 +252,7 @@ Index: gdb-7.8/gdb/target.h
|
||||
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
|
||||
|
||||
/* Documentation of this routine is provided with the corresponding
|
||||
@@ -479,7 +479,7 @@ struct target_ops
|
||||
@@ -493,7 +493,7 @@ struct target_ops
|
||||
TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
|
||||
|
||||
int (*to_can_accel_watchpoint_condition) (struct target_ops *,
|
||||
@ -318,11 +261,11 @@ Index: gdb-7.8/gdb/target.h
|
||||
struct expression *)
|
||||
TARGET_DEFAULT_RETURN (0);
|
||||
int (*to_masked_watch_num_registers) (struct target_ops *,
|
||||
Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
Index: gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.212773715 +0200
|
||||
+++ gdb-7.8/gdb/aarch64-linux-nat.c 2014-08-01 23:27:30.248773763 +0200
|
||||
@@ -428,14 +428,14 @@ aarch64_notify_debug_reg_change (const s
|
||||
--- gdb-7.8.50.20141228.orig/gdb/aarch64-linux-nat.c 2015-01-05 22:10:30.176726802 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c 2015-01-05 22:10:35.575751342 +0100
|
||||
@@ -424,14 +424,14 @@ aarch64_notify_debug_reg_change (const s
|
||||
static void
|
||||
aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
|
||||
const char *func, CORE_ADDR addr,
|
||||
@ -340,7 +283,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
type == hw_write ? "hw-write-watchpoint"
|
||||
: (type == hw_read ? "hw-read-watchpoint"
|
||||
: (type == hw_access ? "hw-access-watchpoint"
|
||||
@@ -869,9 +869,10 @@ aarch64_linux_read_description (struct t
|
||||
@@ -851,9 +851,10 @@ aarch64_linux_read_description (struct t
|
||||
gdbserver/linux-aarch64-low.c for more information. */
|
||||
|
||||
static void
|
||||
@ -353,7 +296,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
{
|
||||
int aligned_len;
|
||||
unsigned int offset;
|
||||
@@ -1038,7 +1039,7 @@ aarch64_point_encode_ctrl_reg (int type,
|
||||
@@ -1020,7 +1021,7 @@ aarch64_point_encode_ctrl_reg (int type,
|
||||
Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */
|
||||
|
||||
static int
|
||||
@ -362,7 +305,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
{
|
||||
unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT
|
||||
: AARCH64_HBP_ALIGNMENT;
|
||||
@@ -1290,7 +1291,7 @@ aarch64_handle_aligned_watchpoint (int t
|
||||
@@ -1272,7 +1273,7 @@ aarch64_handle_aligned_watchpoint (int t
|
||||
Return 0 if succeed. */
|
||||
|
||||
static int
|
||||
@ -371,7 +314,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
int is_insert)
|
||||
{
|
||||
struct aarch64_debug_reg_state *state
|
||||
@@ -1315,8 +1316,8 @@ aarch64_handle_unaligned_watchpoint (int
|
||||
@@ -1297,8 +1298,8 @@ aarch64_handle_unaligned_watchpoint (int
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"handle_unaligned_watchpoint: is_insert: %d\n"
|
||||
" aligned_addr: 0x%08lx, aligned_len: %d\n"
|
||||
@ -382,7 +325,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
@@ -1328,7 +1329,7 @@ aarch64_handle_unaligned_watchpoint (int
|
||||
@@ -1310,7 +1311,7 @@ aarch64_handle_unaligned_watchpoint (int
|
||||
/* Implements insertion and removal of a single watchpoint. */
|
||||
|
||||
static int
|
||||
@ -391,7 +334,7 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
{
|
||||
if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
|
||||
return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert);
|
||||
@@ -1497,7 +1498,7 @@ aarch64_linux_stopped_by_watchpoint (str
|
||||
@@ -1479,7 +1480,7 @@ aarch64_linux_stopped_by_watchpoint (str
|
||||
static int
|
||||
aarch64_linux_watchpoint_addr_within_range (struct target_ops *target,
|
||||
CORE_ADDR addr,
|
||||
@ -400,11 +343,11 @@ Index: gdb-7.8/gdb/aarch64-linux-nat.c
|
||||
{
|
||||
return start <= addr && start + length - 1 >= addr;
|
||||
}
|
||||
Index: gdb-7.8/gdb/target-delegates.c
|
||||
Index: gdb-7.8.50.20141228/gdb/target-delegates.c
|
||||
===================================================================
|
||||
--- gdb-7.8.orig/gdb/target-delegates.c 2014-08-01 23:27:30.212773715 +0200
|
||||
+++ gdb-7.8/gdb/target-delegates.c 2014-08-01 23:29:38.313944877 +0200
|
||||
@@ -261,7 +261,7 @@ tdefault_stopped_data_address (struct ta
|
||||
--- gdb-7.8.50.20141228.orig/gdb/target-delegates.c 2015-01-05 22:10:30.177726806 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/target-delegates.c 2015-01-05 22:12:11.071185408 +0100
|
||||
@@ -607,14 +607,14 @@ debug_stopped_data_address (struct targe
|
||||
}
|
||||
|
||||
static int
|
||||
@ -413,7 +356,24 @@ Index: gdb-7.8/gdb/target-delegates.c
|
||||
{
|
||||
self = self->beneath;
|
||||
return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3);
|
||||
@@ -275,14 +275,14 @@ delegate_region_ok_for_hw_watchpoint (st
|
||||
}
|
||||
|
||||
static int
|
||||
-debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
|
||||
+debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3)
|
||||
{
|
||||
int result;
|
||||
fprintf_unfiltered (gdb_stdlog, "-> %s->to_watchpoint_addr_within_range (...)\n", debug_target.to_shortname);
|
||||
@@ -626,7 +626,7 @@ debug_watchpoint_addr_within_range (stru
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
target_debug_print_CORE_ADDR (arg2);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
- target_debug_print_int (arg3);
|
||||
+ target_debug_print_LONGEST (arg3);
|
||||
fputs_unfiltered (") = ", gdb_stdlog);
|
||||
target_debug_print_int (result);
|
||||
fputs_unfiltered ("\n", gdb_stdlog);
|
||||
@@ -659,20 +659,20 @@ debug_region_ok_for_hw_watchpoint (struc
|
||||
}
|
||||
|
||||
static int
|
||||
@ -430,3 +390,19 @@ Index: gdb-7.8/gdb/target-delegates.c
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
-debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
|
||||
+debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
|
||||
{
|
||||
int result;
|
||||
fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_accel_watchpoint_condition (...)\n", debug_target.to_shortname);
|
||||
@@ -682,7 +682,7 @@ debug_can_accel_watchpoint_condition (st
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
target_debug_print_CORE_ADDR (arg1);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
- target_debug_print_int (arg2);
|
||||
+ target_debug_print_LONGEST (arg2);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
target_debug_print_int (arg3);
|
||||
fputs_unfiltered (", ", gdb_stdlog);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -47,10 +47,10 @@ Content-Type: text/x-patch
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename=f77-bounds.patch
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/f-lang.h
|
||||
Index: gdb-7.8.50.20141228/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/f-lang.h 2014-06-16 22:45:00.404470944 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/f-lang.h 2014-06-16 22:45:10.352477761 +0200
|
||||
--- gdb-7.8.50.20141228.orig/gdb/f-lang.h 2015-01-06 22:46:31.620852996 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/f-lang.h 2015-01-06 22:46:34.190865466 +0100
|
||||
@@ -62,9 +62,9 @@ struct common_block
|
||||
struct symbol *contents[1];
|
||||
};
|
||||
@ -63,11 +63,11 @@ Index: gdb-7.7.90.20140613/gdb/f-lang.h
|
||||
|
||||
extern void f77_get_dynamic_array_length (struct type *);
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
Index: gdb-7.8.50.20141228/gdb/f-typeprint.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/f-typeprint.c 2014-06-16 22:45:00.404470944 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/f-typeprint.c 2014-06-16 22:45:10.353477761 +0200
|
||||
@@ -161,7 +161,7 @@ f_type_print_varspec_suffix (struct type
|
||||
--- gdb-7.8.50.20141228.orig/gdb/f-typeprint.c 2015-01-06 22:46:31.621853001 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/f-typeprint.c 2015-01-06 22:47:03.731008798 +0100
|
||||
@@ -158,7 +158,7 @@ f_type_print_varspec_suffix (struct type
|
||||
int show, int passed_a_ptr, int demangled_args,
|
||||
int arrayprint_recurse_level)
|
||||
{
|
||||
@ -76,7 +76,7 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
|
||||
/* No static variables are permitted as an error call may occur during
|
||||
execution of this function. */
|
||||
@@ -195,7 +195,7 @@ f_type_print_varspec_suffix (struct type
|
||||
@@ -192,7 +192,7 @@ f_type_print_varspec_suffix (struct type
|
||||
|
||||
lower_bound = f77_get_lowerbound (type);
|
||||
if (lower_bound != 1) /* Not the default. */
|
||||
@ -85,7 +85,7 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
|
||||
/* Make sure that, if we have an assumed size array, we
|
||||
print out a warning and print the upperbound as '*'. */
|
||||
@@ -205,7 +205,7 @@ f_type_print_varspec_suffix (struct type
|
||||
@@ -202,7 +202,7 @@ f_type_print_varspec_suffix (struct type
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
@ -94,7 +94,7 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
}
|
||||
|
||||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
|
||||
@@ -274,7 +274,7 @@ void
|
||||
@@ -271,7 +271,7 @@ void
|
||||
f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
int level)
|
||||
{
|
||||
@ -103,7 +103,7 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
int index;
|
||||
|
||||
QUIT;
|
||||
@@ -356,7 +356,7 @@ f_type_print_base (struct type *type, st
|
||||
@@ -353,7 +353,7 @@ f_type_print_base (struct type *type, st
|
||||
else
|
||||
{
|
||||
upper_bound = f77_get_upperbound (type);
|
||||
@ -112,11 +112,11 @@ Index: gdb-7.7.90.20140613/gdb/f-typeprint.c
|
||||
}
|
||||
break;
|
||||
|
||||
Index: gdb-7.7.90.20140613/gdb/f-valprint.c
|
||||
Index: gdb-7.8.50.20141228/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.7.90.20140613.orig/gdb/f-valprint.c 2014-06-16 22:45:34.901495069 +0200
|
||||
+++ gdb-7.7.90.20140613/gdb/f-valprint.c 2014-06-16 22:45:44.933502067 +0200
|
||||
@@ -46,7 +46,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
|
||||
--- gdb-7.8.50.20141228.orig/gdb/f-valprint.c 2015-01-06 22:46:31.621853001 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/f-valprint.c 2015-01-06 22:46:34.191865471 +0100
|
||||
@@ -43,7 +43,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
|
||||
/* Array which holds offsets to be applied to get a row's elements
|
||||
for a given array. Array also holds the size of each subarray. */
|
||||
|
||||
@ -125,7 +125,7 @@ Index: gdb-7.7.90.20140613/gdb/f-valprint.c
|
||||
f77_get_lowerbound (struct type *type)
|
||||
{
|
||||
if (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED (type))
|
||||
@@ -55,7 +55,7 @@ f77_get_lowerbound (struct type *type)
|
||||
@@ -52,7 +52,7 @@ f77_get_lowerbound (struct type *type)
|
||||
return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ gdb/
|
||||
- inf = find_inferior_for_program_space (pspace);
|
||||
+ if (inf->pspace != pspace)
|
||||
+ inf = find_inferior_for_program_space (pspace);
|
||||
if (inf != NULL)
|
||||
if (inf != NULL && inf->pid != 0)
|
||||
{
|
||||
- struct thread_info *tp;
|
||||
+ struct thread_info *tp, *current_tp = NULL;
|
||||
|
@ -1,67 +1,53 @@
|
||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00274.html
|
||||
Subject: [obv] Fix false argv0-symlink.exp FAIL running under a very long directory name
|
||||
commit 7a270e0c9ba0eb738a4c30258ab29c09963fcd4d
|
||||
Author: Alexander Klimov <alserkli@inbox.ru>
|
||||
Date: Tue Jan 27 19:56:45 2015 +0200
|
||||
|
||||
Hi,
|
||||
Fix build failure in symfile.c::unmap_overlay_command (GCC5 bug)
|
||||
|
||||
checked in as obvious:
|
||||
Compilation of (GDB) 7.9.50.20150127-cvs with (GCC) 5.0.0 20150127
|
||||
fails with
|
||||
|
||||
Starting program: /home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink ^M
|
||||
[...]
|
||||
(gdb) print argv[0]^M
|
||||
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-", 'f' <repeats 169 times>...^M
|
||||
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
||||
In file included from symfile.c:32:0:
|
||||
symfile.c: In function 'unmap_overlay_command':
|
||||
objfiles.h:628:3: error: 'sec' may be used uninitialized in this
|
||||
function [-Werror=maybe-uninitialized]
|
||||
for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
|
||||
^
|
||||
symfile.c:3442:23: note: 'sec' was declared here
|
||||
struct obj_section *sec;
|
||||
^
|
||||
cc1: all warnings being treated as errors
|
||||
make[2]: *** [symfile.o] Error 1
|
||||
make[2]: Leaving directory `gdb/gdb'
|
||||
|
||||
after "set print repeats 10000":
|
||||
While the bug was reported to GCC as
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64823>,
|
||||
the attached patch simply initializes sec with NULL.
|
||||
|
||||
print argv[0]^M
|
||||
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"...^M
|
||||
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
||||
gdb/ChangeLog:
|
||||
|
||||
after "set print elements 10000":
|
||||
* symfile.c (unmap_overlay_command): Initialize sec to NULL.
|
||||
|
||||
print argv[0]^M
|
||||
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink"^M
|
||||
(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
||||
Tested on x86_64-linux.
|
||||
|
||||
commit 218c2655603748b844dcaf103e34fd14d8ee8aef
|
||||
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri Jul 11 17:26:42 2014 +0200
|
||||
|
||||
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
|
||||
index 74f7bce..253eeeb 100644
|
||||
### a/gdb/testsuite/ChangeLog
|
||||
### b/gdb/testsuite/ChangeLog
|
||||
## -1,3 +1,9 @@
|
||||
+2014-07-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
### a/gdb/ChangeLog
|
||||
### b/gdb/ChangeLog
|
||||
## -1,3 +1,7 @@
|
||||
+2015-01-29 Joel Brobecker <brobecker@adacore.com> (tiny patch)
|
||||
+
|
||||
+ Fix false FAIL running under a very long directory name.
|
||||
+ * gdb.base/argv0-symlink.exp: Add "set print repeats 10000"
|
||||
+ and "set print elements 10000". Twice.
|
||||
+ * symfile.c (unmap_overlay_command): Initialize sec to NULL.
|
||||
+
|
||||
2014-07-11 Yao Qi <yao@codesourcery.com>
|
||||
2015-01-27 Doug Evans <dje@google.com>
|
||||
|
||||
* gdb.base/exprs.exp: "set print symbol off".
|
||||
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
|
||||
index 0e0202d..d849b4c 100644
|
||||
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
|
||||
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
|
||||
@@ -36,6 +36,9 @@ if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
* NEWS: Mention gdb.Objfile.username.
|
||||
--- a/gdb/symfile.c
|
||||
+++ b/gdb/symfile.c
|
||||
@@ -3439,7 +3439,7 @@ static void
|
||||
unmap_overlay_command (char *args, int from_tty)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
- struct obj_section *sec;
|
||||
+ struct obj_section *sec = NULL;
|
||||
|
||||
+gdb_test_no_output "set print repeats 10000"
|
||||
+gdb_test_no_output "set print elements 10000"
|
||||
+
|
||||
gdb_test {print argv[0]} "/$filelink\"" $test
|
||||
|
||||
# For a link named /PATH/TO/DIR/LINK, we want to check the output
|
||||
@@ -67,6 +70,9 @@ if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
+gdb_test_no_output "set print repeats 10000"
|
||||
+gdb_test_no_output "set print elements 10000"
|
||||
+
|
||||
# gdbserver does not have this issue.
|
||||
if ![is_remote target] {
|
||||
setup_kfail "*-*-*" gdb/15934
|
||||
if (!overlay_debugging)
|
||||
error (_("Overlay debugging not enabled. "
|
||||
|
11
gdb-vla-intel-logical-not.patch
Normal file
11
gdb-vla-intel-logical-not.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./gdb/value.c-orig 2015-02-11 15:17:58.413241779 +0100
|
||||
+++ ./gdb/value.c 2015-02-11 15:19:42.068716949 +0100
|
||||
@@ -3074,7 +3074,7 @@ value_primitive_field (struct value *arg
|
||||
}
|
||||
|
||||
if (!TYPE_DATA_LOCATION (type)
|
||||
- || !TYPE_DATA_LOCATION_KIND (type) == PROP_CONST)
|
||||
+ || TYPE_DATA_LOCATION_KIND (type) != PROP_CONST)
|
||||
v->offset = (value_offset (arg1) + offset
|
||||
+ value_embedded_offset (arg1));
|
||||
}
|
@ -31,11 +31,11 @@ Jan
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="vlastringonly.patch"
|
||||
|
||||
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
|
||||
index 53cae2c..cf7ac26 100644
|
||||
--- a/gdb/gdbtypes.c
|
||||
+++ b/gdb/gdbtypes.c
|
||||
@@ -1659,6 +1659,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
|
||||
Index: gdb-7.8.50.20141228/gdb/gdbtypes.c
|
||||
===================================================================
|
||||
--- gdb-7.8.50.20141228.orig/gdb/gdbtypes.c 2015-01-08 18:15:18.475682523 +0100
|
||||
+++ gdb-7.8.50.20141228/gdb/gdbtypes.c 2015-01-08 18:39:01.423134700 +0100
|
||||
@@ -1684,6 +1684,7 @@ is_dynamic_type_internal (struct type *t
|
||||
return !has_static_range (TYPE_RANGE_DATA (type));
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
@ -43,11 +43,18 @@ index 53cae2c..cf7ac26 100644
|
||||
{
|
||||
gdb_assert (TYPE_NFIELDS (type) == 1);
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
|
||||
new file mode 100644
|
||||
index 0000000..261ce17
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
|
||||
@@ -1992,6 +1993,7 @@ resolve_dynamic_type_internal (struct ty
|
||||
}
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
+ case TYPE_CODE_STRING:
|
||||
resolved_type = resolve_dynamic_array (type, addr);
|
||||
break;
|
||||
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame-stub.f90 2015-01-08 18:15:18.897684435 +0100
|
||||
@@ -0,0 +1,24 @@
|
||||
+! Copyright 2010 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -73,11 +80,10 @@ index 0000000..261ce17
|
||||
+ real :: dummy
|
||||
+ dummy = 1
|
||||
+end subroutine bar
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
|
||||
new file mode 100644
|
||||
index 0000000..570a28c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.exp 2015-01-08 18:15:18.897684435 +0100
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -118,11 +124,10 @@ index 0000000..570a28c
|
||||
+}
|
||||
+
|
||||
+gdb_test "bt" {foo \(string='hello'.*}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
|
||||
new file mode 100644
|
||||
index 0000000..2bc637d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
|
||||
Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 2015-01-08 18:15:18.897684435 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
+! Copyright 2010 Free Software Foundation, Inc.
|
||||
+!
|
||||
@ -160,6 +165,3 @@ index 0000000..2bc637d
|
||||
+ end interface
|
||||
+ call foo ('hello')
|
||||
+end
|
||||
|
||||
--FCuugMFkClbJLl1L--
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
45
gdb.changes
45
gdb.changes
@ -1,3 +1,44 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 25 13:08:27 UTC 2015 - rguenther@suse.com
|
||||
|
||||
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
|
||||
The GDB 7.8 features are:
|
||||
* Python Scripting
|
||||
- You can now access frame registers from Python scripts.
|
||||
- New attribute 'producer' for gdb.Symtab objects.
|
||||
* New Python-based convenience functions:
|
||||
- $_caller_is(name [, number_of_frames])
|
||||
- $_caller_matches(regexp [, number_of_frames])
|
||||
- $_any_caller_is(name [, number_of_frames])
|
||||
- $_any_caller_matches(regexp [, number_of_frames])
|
||||
* New commands
|
||||
- queue-signal signal-name-or-number
|
||||
Queue a signal to be delivered to the thread when it is resumed.
|
||||
* On resume, GDB now always passes the signal the program had stopped
|
||||
for to the thread the signal was sent to, even if the user changed
|
||||
threads before resuming. Previously GDB would often (but not
|
||||
always) deliver the signal to the thread that happens to be current
|
||||
at resume time.
|
||||
* Conversely, the "signal" command now consistently delivers the
|
||||
requested signal to the current thread. GDB now asks for
|
||||
confirmation if the program had stopped for a signal and the user
|
||||
switched threads meanwhile.
|
||||
* "breakpoint always-inserted" modes "off" and "auto" merged.
|
||||
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
|
||||
won't remove breakpoints from the target until all threads stop,
|
||||
even in non-stop mode. The "auto" mode has been removed, and "off"
|
||||
is now the default mode.
|
||||
* MI changes
|
||||
- The -list-thread-groups command outputs an exit-code field for
|
||||
inferiors that have exited.
|
||||
- removed (upstream) gdb-async-stopped-on-pid-arg-1of2.patch,
|
||||
gdb-async-stopped-on-pid-arg-testsuite.patch,
|
||||
gdb-python-completer-1of2.patch, gdb-python-completer-2of2.patch
|
||||
and gdb-readline-6.3.5.patch
|
||||
- added gdb-jit-reader-multilib.patch, gdb-no-dg-extract-results-py.patch,
|
||||
gdb-python-gil.patch, gdb-python3-py_hash_t-32bit.patch,
|
||||
gdb-python3-testsuite.patch and gdb-vla-intel-logical-not.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 15 07:33:31 UTC 2014 - cshorler@googlemail.com
|
||||
|
||||
@ -30,8 +71,8 @@ Wed Aug 13 07:54:35 UTC 2014 - rguenther@suse.com
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 8 12:22:24 UTC 2014 - rguenther@suse.com
|
||||
|
||||
- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 4.8.
|
||||
The GDB 4.8 features are:
|
||||
- Use patchlist.pl to merge with gdb-7.8-16.fc22, a rebase to FSF GDB 7.8.
|
||||
The GDB 7.8 features are:
|
||||
* Guile scripting support.
|
||||
* Python scripting enhancements.
|
||||
* New commands:
|
||||
|
250
gdb.spec
250
gdb.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package gdb
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 RedHat
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -27,7 +27,7 @@ Name: gdb
|
||||
%global snap 20130731
|
||||
# See timestamp of source gnulib installed into gdb/gnulib/ .
|
||||
%global snapgnulib 20121213
|
||||
Version: 7.8.1
|
||||
Version: 7.9
|
||||
Release: 0
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
@ -36,7 +36,7 @@ Release: 0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
||||
# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.gz
|
||||
Source: gdb-%{version}.tar.gz
|
||||
Source: gdb-%{version}.tar.xz
|
||||
Url: http://gnu.org/software/gdb/
|
||||
|
||||
%if "%{scl}" == "devtoolset-1.1"
|
||||
@ -92,125 +92,126 @@ Source13: gdb-rpmlintrc
|
||||
|
||||
#Fedora Packages begin
|
||||
Patch1: gdb-6.3-rh-testversion-20041202.patch
|
||||
Patch2: gdb-archer.patch
|
||||
Patch3: gdb-upstream.patch
|
||||
Patch2: gdb-upstream.patch
|
||||
Patch3: gdb-archer.patch
|
||||
Patch4: gdb-vla-intel.patch
|
||||
Patch5: gdb-vla-intel-04of23-fix.patch
|
||||
Patch5: gdb-vla-intel-logical-not.patch
|
||||
Patch6: gdb-vla-intel-stringbt-fix.patch
|
||||
Patch7: gdb-6.3-rh-dummykfail-20041202.patch
|
||||
Patch8: gdb-6.3-ppc64syscall-20040622.patch
|
||||
Patch9: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
Patch10: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||
Patch11: gdb-6.3-gstack-20050411.patch
|
||||
Patch12: gdb-6.3-test-pie-20050107.patch
|
||||
Patch13: gdb-6.3-test-self-20050110.patch
|
||||
Patch14: gdb-6.3-test-dtorfix-20050121.patch
|
||||
Patch15: gdb-6.3-test-movedir-20050125.patch
|
||||
Patch16: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
Patch17: gdb-6.3-inferior-notification-20050721.patch
|
||||
Patch18: gdb-6.3-inheritancetest-20050726.patch
|
||||
Patch19: gdb-6.3-readnever-20050907.patch
|
||||
Patch20: gdb-6.5-bz203661-emit-relocs.patch
|
||||
Patch21: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
Patch22: gdb-6.5-sharedlibrary-path.patch
|
||||
Patch23: gdb-6.5-bz190810-gdbserver-arch-advice.patch
|
||||
Patch24: gdb-6.5-BEA-testsuite.patch
|
||||
Patch25: gdb-6.5-last-address-space-byte-test.patch
|
||||
Patch26: gdb-6.5-readline-long-line-crash-test.patch
|
||||
Patch27: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
Patch28: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
Patch29: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
Patch30: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
Patch31: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
Patch32: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
Patch33: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
Patch34: gdb-6.3-bz231832-obstack-2gb.patch
|
||||
Patch35: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
Patch36: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
Patch37: gdb-6.6-testsuite-timeouts.patch
|
||||
Patch38: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
Patch39: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
Patch40: gdb-6.3-attach-see-vdso-test.patch
|
||||
Patch41: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
Patch42: gdb-6.6-buildid-locate.patch
|
||||
Patch43: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
Patch44: gdb-6.6-buildid-locate-rpm.patch
|
||||
Patch45: gdb-6.7-charsign-test.patch
|
||||
Patch46: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
Patch47: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
Patch48: gdb-6.5-missed-trap-on-step-test.patch
|
||||
Patch49: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
|
||||
Patch50: gdb-6.5-gcore-buffer-limit-test.patch
|
||||
Patch51: gdb-6.6-threads-static-test.patch
|
||||
Patch52: gdb-6.3-mapping-zero-inode-test.patch
|
||||
Patch53: gdb-6.3-focus-cmd-prev-test.patch
|
||||
Patch54: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
Patch55: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
Patch56: gdb-6.5-section-num-fixup-test.patch
|
||||
Patch57: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
Patch58: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
Patch59: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
Patch60: gdb-6.8-bz457187-largefile-test.patch
|
||||
Patch61: gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||
Patch62: gdb-core-open-vdso-warning.patch
|
||||
Patch63: gdb-x86_64-i386-syscall-restart.patch
|
||||
Patch64: gdb-bz533176-fortran-omp-step.patch
|
||||
Patch65: gdb-follow-child-stale-parent.patch
|
||||
Patch66: gdb-ccache-workaround.patch
|
||||
Patch67: gdb-archer-pie-addons.patch
|
||||
Patch68: gdb-archer-pie-addons-keep-disabled.patch
|
||||
Patch69: gdb-lineno-makeup-test.patch
|
||||
Patch70: gdb-ppc-power7-test.patch
|
||||
Patch71: gdb-bz541866-rwatch-before-run.patch
|
||||
Patch72: gdb-moribund-utrace-workaround.patch
|
||||
Patch73: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
Patch74: gdb-bz601887-dwarf4-rh-test.patch
|
||||
Patch75: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Patch76: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
Patch77: gdb-test-bt-cfi-without-die.patch
|
||||
Patch78: gdb-gdb-add-index-script.patch
|
||||
Patch79: gdb-bz568248-oom-is-error.patch
|
||||
Patch80: gdb-bz634108-solib_address.patch
|
||||
Patch81: gdb-test-pid0-core.patch
|
||||
Patch82: gdb-test-dw2-aranges.patch
|
||||
Patch83: gdb-test-expr-cumulative-archer.patch
|
||||
Patch84: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
Patch85: gdb-glibc-vdso-workaround.patch
|
||||
Patch86: gdb-runtest-pie-override.patch
|
||||
Patch87: gdb-attach-fail-reasons-5of5.patch
|
||||
Patch88: gdb-stale-frame_info.patch
|
||||
Patch89: gdb-glibc-strstr-workaround.patch
|
||||
Patch90: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
Patch91: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
Patch92: gdb-rhbz795424-bitpos-20of25.patch
|
||||
Patch93: gdb-rhbz795424-bitpos-21of25.patch
|
||||
Patch94: gdb-rhbz795424-bitpos-22of25.patch
|
||||
Patch95: gdb-rhbz795424-bitpos-23of25.patch
|
||||
Patch96: gdb-rhbz795424-bitpos-25of25.patch
|
||||
Patch97: gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
Patch98: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
Patch99: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
Patch100: gdb-enable-count-crash.patch
|
||||
Patch101: gdb-gnat-dwarf-crash-3of3.patch
|
||||
Patch102: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
Patch103: gdb-archer-vla-tests.patch
|
||||
Patch104: gdb-readline-6.3.5.patch
|
||||
Patch7: gdb-vla-intel-04of23-fix.patch
|
||||
Patch8: gdb-6.3-rh-dummykfail-20041202.patch
|
||||
Patch9: gdb-6.3-ppc64syscall-20040622.patch
|
||||
Patch10: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
Patch11: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||
Patch12: gdb-6.3-gstack-20050411.patch
|
||||
Patch13: gdb-6.3-test-pie-20050107.patch
|
||||
Patch14: gdb-6.3-test-self-20050110.patch
|
||||
Patch15: gdb-6.3-test-dtorfix-20050121.patch
|
||||
Patch16: gdb-6.3-test-movedir-20050125.patch
|
||||
Patch17: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
Patch18: gdb-6.3-inferior-notification-20050721.patch
|
||||
Patch19: gdb-6.3-inheritancetest-20050726.patch
|
||||
Patch20: gdb-6.3-readnever-20050907.patch
|
||||
Patch21: gdb-6.5-bz203661-emit-relocs.patch
|
||||
Patch22: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
Patch23: gdb-6.5-sharedlibrary-path.patch
|
||||
Patch24: gdb-6.5-bz190810-gdbserver-arch-advice.patch
|
||||
Patch25: gdb-6.5-BEA-testsuite.patch
|
||||
Patch26: gdb-6.5-last-address-space-byte-test.patch
|
||||
Patch27: gdb-6.5-readline-long-line-crash-test.patch
|
||||
Patch28: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
Patch29: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
Patch30: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
Patch31: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
Patch32: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
Patch33: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
Patch34: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
Patch35: gdb-6.3-bz231832-obstack-2gb.patch
|
||||
Patch36: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
Patch37: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
Patch38: gdb-6.6-testsuite-timeouts.patch
|
||||
Patch39: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
Patch40: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
Patch41: gdb-6.3-attach-see-vdso-test.patch
|
||||
Patch42: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
Patch43: gdb-6.6-buildid-locate.patch
|
||||
Patch44: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
Patch45: gdb-6.6-buildid-locate-rpm.patch
|
||||
Patch46: gdb-6.7-charsign-test.patch
|
||||
Patch47: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
Patch48: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
Patch49: gdb-6.5-missed-trap-on-step-test.patch
|
||||
Patch50: gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
|
||||
Patch51: gdb-6.5-gcore-buffer-limit-test.patch
|
||||
Patch52: gdb-6.6-threads-static-test.patch
|
||||
Patch53: gdb-6.3-mapping-zero-inode-test.patch
|
||||
Patch54: gdb-6.3-focus-cmd-prev-test.patch
|
||||
Patch55: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
Patch56: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
Patch57: gdb-6.5-section-num-fixup-test.patch
|
||||
Patch58: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
Patch59: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
Patch60: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
Patch61: gdb-6.8-bz457187-largefile-test.patch
|
||||
Patch62: gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||
Patch63: gdb-core-open-vdso-warning.patch
|
||||
Patch64: gdb-x86_64-i386-syscall-restart.patch
|
||||
Patch65: gdb-bz533176-fortran-omp-step.patch
|
||||
Patch66: gdb-follow-child-stale-parent.patch
|
||||
Patch67: gdb-ccache-workaround.patch
|
||||
Patch68: gdb-archer-pie-addons.patch
|
||||
Patch69: gdb-archer-pie-addons-keep-disabled.patch
|
||||
Patch70: gdb-lineno-makeup-test.patch
|
||||
Patch71: gdb-ppc-power7-test.patch
|
||||
Patch72: gdb-bz541866-rwatch-before-run.patch
|
||||
Patch73: gdb-moribund-utrace-workaround.patch
|
||||
Patch74: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
Patch75: gdb-bz601887-dwarf4-rh-test.patch
|
||||
Patch76: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Patch77: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
Patch78: gdb-test-bt-cfi-without-die.patch
|
||||
Patch79: gdb-gdb-add-index-script.patch
|
||||
Patch80: gdb-bz568248-oom-is-error.patch
|
||||
Patch81: gdb-bz634108-solib_address.patch
|
||||
Patch82: gdb-test-pid0-core.patch
|
||||
Patch83: gdb-test-dw2-aranges.patch
|
||||
Patch84: gdb-test-expr-cumulative-archer.patch
|
||||
Patch85: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
Patch86: gdb-glibc-vdso-workaround.patch
|
||||
Patch87: gdb-runtest-pie-override.patch
|
||||
Patch88: gdb-attach-fail-reasons-5of5.patch
|
||||
Patch89: gdb-stale-frame_info.patch
|
||||
Patch90: gdb-glibc-strstr-workaround.patch
|
||||
Patch91: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
Patch92: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
Patch93: gdb-rhbz795424-bitpos-20of25.patch
|
||||
Patch94: gdb-rhbz795424-bitpos-21of25.patch
|
||||
Patch95: gdb-rhbz795424-bitpos-22of25.patch
|
||||
Patch96: gdb-rhbz795424-bitpos-23of25.patch
|
||||
Patch97: gdb-rhbz795424-bitpos-25of25.patch
|
||||
Patch98: gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
Patch99: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
Patch100: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
Patch101: gdb-enable-count-crash.patch
|
||||
Patch102: gdb-gnat-dwarf-crash-3of3.patch
|
||||
Patch103: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
Patch104: gdb-archer-vla-tests.patch
|
||||
Patch105: gdb-btrobust.patch
|
||||
Patch106: gdb-python-completer-1of2.patch
|
||||
Patch107: gdb-python-completer-2of2.patch
|
||||
Patch108: gdb-fortran-frame-string.patch
|
||||
Patch110: gdb-dts-rhel6-python-compat.patch
|
||||
Patch111: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
Patch112: gdb-readline62-ask-more-rh.patch
|
||||
Patch113: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
Patch114: gdb-6.8-quit-never-aborts.patch
|
||||
Patch115: gdb-rhel5-compat.patch
|
||||
Patch106: gdb-fortran-frame-string.patch
|
||||
Patch107: gdb-python-gil.patch
|
||||
Patch108: gdb-jit-reader-multilib.patch
|
||||
Patch109: gdb-no-dg-extract-results-py.patch
|
||||
Patch110: gdb-python3-py_hash_t-32bit.patch
|
||||
Patch111: gdb-python3-testsuite.patch
|
||||
Patch112: gdb-dts-rhel6-python-compat.patch
|
||||
Patch113: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
Patch114: gdb-readline62-ask-more-rh.patch
|
||||
Patch115: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
Patch116: gdb-6.8-quit-never-aborts.patch
|
||||
Patch117: gdb-rhel5-compat.patch
|
||||
#Fedora Packages end
|
||||
|
||||
# Upstream patch to fix gcc -Werror
|
||||
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
|
||||
Patch1003: gdb-async-stopped-on-pid-arg-1of2.patch
|
||||
Patch1005: gdb-async-stopped-on-pid-arg-testsuite.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
@ -270,7 +271,7 @@ BuildRequires: gcc-objc
|
||||
%ifarch %{ix86} x86_64 ia64 ppc alpha
|
||||
BuildRequires: gcc-ada
|
||||
%endif
|
||||
%if 0%{suse_version} > 1120
|
||||
%if 0%{suse_version} >= 1110
|
||||
%ifarch x86_64 ppc64 s390x
|
||||
BuildRequires: gcc-c++-32bit
|
||||
%endif
|
||||
@ -453,23 +454,24 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch110 -p1 -R
|
||||
%patch111 -p1
|
||||
%patch111 -p1 -R
|
||||
%patch112 -p1
|
||||
%patch112 -p1 -R
|
||||
%patch113 -p1
|
||||
%patch114 -p1
|
||||
%patch115 -p1
|
||||
%patch115 -p1 -R
|
||||
%patch114 -p1 -R
|
||||
%patch113 -p1 -R
|
||||
%patch114 -p1
|
||||
%patch114 -p1 -R
|
||||
%patch115 -p1
|
||||
%patch116 -p1
|
||||
%patch117 -p1
|
||||
%patch117 -p1 -R
|
||||
%patch116 -p1 -R
|
||||
%patch115 -p1 -R
|
||||
#Fedora patching end
|
||||
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
%patch1005 -p1
|
||||
|
||||
find -name "*.orig" | xargs rm -f
|
||||
! find -name "*.rej" # Should not happen.
|
||||
|
Loading…
x
Reference in New Issue
Block a user