Rebase to FSF GDB 7.2.50.20110320 (which is a 7.3 pre-release).
Merge archer-sergiodj-stap, the SystemTap probes breakpoints feature. [stap] Fix -O2 warnings. Fix Ada support crash on uninitialized gdbarch.
This commit is contained in:
parent
d5159132e2
commit
48cf710500
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/libstdc++-v3-python-r155978.tar.bz2
|
||||
/gdb-7.2.50.20110305.tar.bz2
|
||||
/gdb-7.2.50.20110320.tar.bz2
|
||||
|
@ -92,7 +92,7 @@
|
||||
+gdb_run_cmd
|
||||
+
|
||||
+gdb_test_multiple {} "Program exited" {
|
||||
+ -re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
|
||||
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
|
||||
+ pass "Program exited"
|
||||
+ }
|
||||
+}
|
||||
|
@ -9,10 +9,10 @@
|
||||
|
||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c 2008-12-07 10:06:03.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.c 2011-03-20 20:15:57.000000000 +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
|
||||
@ -34,10 +34,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp 2008-12-07 10:08:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp 2011-03-20 20:20:03.000000000 +0100
|
||||
@@ -0,0 +1,245 @@
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -153,7 +153,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
|
||||
+
|
||||
+ # Allow the test process to exit, to cleanup after ourselves.
|
||||
+
|
||||
+ gdb_test "continue" "Program exited normally." "after attach-32, exit"
|
||||
+ gdb_test "continue" {\[Inferior .* exited normally\]} "after attach-32, exit"
|
||||
+
|
||||
+ # Make sure we don't leave a process around to confuse
|
||||
+ # the next test run (and prevent the compile by keeping
|
||||
@ -234,7 +234,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
|
||||
+ # Get rid of the process
|
||||
+
|
||||
+ gdb_test "p should_exit = 1"
|
||||
+ gdb_test "c" "Program exited normally."
|
||||
+ gdb_test "c" {\[Inferior .* exited normally\]}
|
||||
+
|
||||
+ # Be paranoid
|
||||
+
|
||||
@ -284,10 +284,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32b.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c 2008-12-07 10:06:03.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32b.c 2011-03-20 20:15:57.000000000 +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
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/configure.ac
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/testsuite/configure.ac 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/configure.ac 2011-03-05 08:26:53.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/configure.ac 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/configure.ac 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -97,6 +97,6 @@ AC_OUTPUT([Makefile \
|
||||
gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile \
|
||||
gdb.hp/gdb.defects/Makefile \
|
||||
@ -10,10 +10,10 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/configure.ac
|
||||
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||
gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
|
||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/configure
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/testsuite/configure 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/configure 2011-03-05 08:26:58.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/configure 2011-03-03 17:57:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/configure 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -3448,7 +3448,7 @@ done
|
||||
|
||||
|
||||
@ -31,10 +31,10 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/configure
|
||||
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
||||
"gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.c 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.c 2011-03-20 20:21:43.000000000 +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.2.50.20110305/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach2.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach2.c 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach2.c 2011-03-20 20:21:43.000000000 +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.2.50.20110305/gdb/testsuite/gdb.pie/attach2.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.c 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.c 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,146 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -236,10 +236,10 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break1.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break1.c 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break1.c 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,44 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -285,10 +285,10 @@ Index: gdb-7.2.50.20110305/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.2.50.20110305/gdb/testsuite/gdb.pie/coremaker.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/coremaker.c 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/coremaker.c 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,142 @@
|
||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||
+ Free Software Foundation, Inc.
|
||||
@ -432,11 +432,11 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/coremaker.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.exp 2011-03-05 08:26:28.000000000 +0100
|
||||
@@ -0,0 +1,423 @@
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/attach.exp 2011-03-20 20:25:53.000000000 +0100
|
||||
@@ -0,0 +1,417 @@
|
||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -699,13 +699,7 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.exp
|
||||
+
|
||||
+ # Allow the test process to exit, to cleanup after ourselves.
|
||||
+ #
|
||||
+ send_gdb "continue\n"
|
||||
+ gdb_expect {
|
||||
+ -re "Program exited normally.*$gdb_prompt $"\
|
||||
+ {pass "after attach2, exit"}
|
||||
+ -re "$gdb_prompt $" {fail "after attach2, exit"}
|
||||
+ timeout {fail "(timeout) after attach2, exit"}
|
||||
+ }
|
||||
+ gdb_test "continue" {\[Inferior .* exited normally\]} "after attach2, exit"
|
||||
+
|
||||
+ # Make sure we don't leave a process around to confuse
|
||||
+ # the next test run (and prevent the compile by keeping
|
||||
@ -831,7 +825,7 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.exp
|
||||
+ # Get rid of the process
|
||||
+ #
|
||||
+ gdb_test "p should_exit = 1" ".*"
|
||||
+ gdb_test "c" ".*Program exited normally.*"
|
||||
+ gdb_test "c" {\[Inferior .* exited normally\]}
|
||||
+
|
||||
+ # Be paranoid
|
||||
+ #
|
||||
@ -860,10 +854,10 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.exp 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/break.exp 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,966 @@
|
||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
+# 2000, 2002, 2003, 2004
|
||||
@ -1831,10 +1825,10 @@ Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/corefile.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/corefile.exp 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/corefile.exp 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,233 @@
|
||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
+# Free Software Foundation, Inc.
|
||||
@ -2069,10 +2063,10 @@ Index: gdb-7.2.50.20110305/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.2.50.20110305/gdb/testsuite/gdb.pie/Makefile.in
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.pie/Makefile.in 2011-03-05 08:26:28.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.pie/Makefile.in 2011-03-20 20:21:43.000000000 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+VPATH = @srcdir@
|
||||
+srcdir = @srcdir@
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.2.50.20110213/gdb/event-top.c
|
||||
Index: gdb-7.2.50.20110320/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/event-top.c 2011-01-01 16:33:03.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/event-top.c 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/event-top.c 2011-03-16 16:18:58.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/event-top.c 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
||||
#include "main.h"
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.2.50.20110213/gdb/event-top.c
|
||||
/* Each interpreter has its own rules on displaying the command
|
||||
prompt. */
|
||||
if (!current_interp_display_prompt_p ())
|
||||
Index: gdb-7.2.50.20110213/gdb/elfread.c
|
||||
Index: gdb-7.2.50.20110320/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/elfread.c 2011-02-13 19:21:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/elfread.c 2011-02-13 19:21:49.000000000 +0100
|
||||
@@ -42,6 +42,7 @@
|
||||
--- gdb-7.2.50.20110320.orig/gdb/elfread.c 2011-03-20 15:22:34.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/elfread.c 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.2.50.20110213/gdb/elfread.c
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -1374,8 +1375,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1623,8 +1624,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.2.50.20110213/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1429,11 +1783,17 @@ missing_filepair_change (void)
|
||||
@@ -1678,11 +2032,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -421,7 +421,7 @@ Index: gdb-7.2.50.20110213/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1500,14 +1860,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1749,14 +2109,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.2.50.20110213/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.2.50.20110213/gdb/symfile.h
|
||||
Index: gdb-7.2.50.20110320/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/symfile.h 2011-02-13 19:21:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/symfile.h 2011-02-13 19:21:49.000000000 +0100
|
||||
@@ -560,6 +560,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.2.50.20110320.orig/gdb/symfile.h 2011-03-20 15:19:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/symfile.h 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -617,6 +617,8 @@ extern struct build_id *build_id_addr_ge
|
||||
extern char *build_id_to_filename (struct build_id *build_id,
|
||||
char **link_return, int add_debug_suffix);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
@ -477,11 +477,11 @@ Index: gdb-7.2.50.20110213/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.2.50.20110213/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/testsuite/lib/gdb.exp 2011-02-13 19:21:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/testsuite/lib/gdb.exp 2011-02-13 19:21:49.000000000 +0100
|
||||
@@ -1395,7 +1395,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/gdb.exp 2011-03-20 15:19:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -1397,7 +1397,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,10 +490,10 @@ Index: gdb-7.2.50.20110213/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.2.50.20110213/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/testsuite/lib/mi-support.exp 2011-02-13 19:21:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/testsuite/lib/mi-support.exp 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/mi-support.exp 2011-03-20 15:19:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
@ -503,10 +503,10 @@ Index: gdb-7.2.50.20110213/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.2.50.20110213/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.2.50.20110320/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/tui/tui-interp.c 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/tui/tui-interp.c 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
@ -524,10 +524,10 @@ Index: gdb-7.2.50.20110213/gdb/tui/tui-interp.c
|
||||
/* Tell readline what the prompt to display is and what function
|
||||
it will need to call after a whole line is read. This also
|
||||
displays the first prompt. */
|
||||
Index: gdb-7.2.50.20110213/gdb/aclocal.m4
|
||||
Index: gdb-7.2.50.20110320/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/aclocal.m4 2010-05-23 02:56:59.000000000 +0200
|
||||
+++ gdb-7.2.50.20110213/gdb/aclocal.m4 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/aclocal.m4 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -19,6 +19,162 @@ You have another version of autoconf. I
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
@ -691,10 +691,10 @@ Index: gdb-7.2.50.20110213/gdb/aclocal.m4
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
Index: gdb-7.2.50.20110213/gdb/config.in
|
||||
Index: gdb-7.2.50.20110320/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/config.in 2011-01-14 14:38:23.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/config.in 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/config.in 2011-03-17 14:19:09.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/config.in 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -46,6 +46,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -705,7 +705,7 @@ Index: gdb-7.2.50.20110213/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -229,6 +232,9 @@
|
||||
@@ -233,6 +236,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -715,10 +715,10 @@ Index: gdb-7.2.50.20110213/gdb/config.in
|
||||
/* Define if libunwind library is being used. */
|
||||
#undef HAVE_LIBUNWIND
|
||||
|
||||
Index: gdb-7.2.50.20110213/gdb/configure
|
||||
Index: gdb-7.2.50.20110320/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/configure 2011-02-11 10:57:24.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/configure 2011-02-13 19:22:37.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/configure 2011-03-17 14:19:09.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/configure 2011-03-20 15:23:29.000000000 +0100
|
||||
@@ -682,6 +682,9 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
@ -747,7 +747,7 @@ Index: gdb-7.2.50.20110213/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1653,6 +1660,8 @@ Optional Packages:
|
||||
@@ -1652,6 +1659,8 @@ Optional Packages:
|
||||
[DATADIR/gdb]
|
||||
--with-relocated-sources=PATH
|
||||
automatically relocate this path for source files
|
||||
@ -756,7 +756,7 @@ Index: gdb-7.2.50.20110213/gdb/configure
|
||||
--with-libunwind use libunwind frame unwinding support
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1688,6 +1697,9 @@ Some influential environment variables:
|
||||
@@ -1687,6 +1696,9 @@ Some influential environment variables:
|
||||
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
@ -766,7 +766,7 @@ Index: gdb-7.2.50.20110213/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.
|
||||
@@ -7885,6 +7897,486 @@ _ACEOF
|
||||
@@ -7884,6 +7896,486 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
@ -1253,10 +1253,10 @@ Index: gdb-7.2.50.20110213/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.2.50.20110213/gdb/configure.ac
|
||||
Index: gdb-7.2.50.20110320/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/configure.ac 2011-02-11 10:57:25.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/configure.ac 2011-02-13 19:22:30.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/configure.ac 2011-03-17 14:19:10.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/configure.ac 2011-03-20 15:23:17.000000000 +0100
|
||||
@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||
[Relocated directory for source files. ])
|
||||
])
|
||||
@ -1455,12 +1455,12 @@ Index: gdb-7.2.50.20110213/gdb/configure.ac
|
||||
+fi
|
||||
+
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
AC_CONFIG_SUBDIRS(common)
|
||||
|
||||
Index: gdb-7.2.50.20110213/gdb/acinclude.m4
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.2.50.20110320/gdb/acinclude.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.2.50.20110213/gdb/acinclude.m4 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.2.50.20110320/gdb/acinclude.m4 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
+# serial 1
|
||||
+
|
||||
@ -1476,10 +1476,10 @@ Index: gdb-7.2.50.20110213/gdb/acinclude.m4
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
Index: gdb-7.2.50.20110213/gdb/corelow.c
|
||||
Index: gdb-7.2.50.20110320/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110213.orig/gdb/corelow.c 2011-02-13 19:21:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110213/gdb/corelow.c 2011-02-13 19:21:49.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/corelow.c 2011-03-20 15:19:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/corelow.c 2011-03-20 15:22:51.000000000 +0100
|
||||
@@ -320,7 +320,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/corelow.c
|
||||
Index: gdb-7.2.50.20110320/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/corelow.c 2011-01-05 23:22:47.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/corelow.c 2011-01-17 15:52:06.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/corelow.c 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -47,6 +47,9 @@
|
||||
#include "filenames.h"
|
||||
#include "progspace.h"
|
||||
@ -90,11 +90,11 @@ Index: gdb-7.2.50.20110117/gdb/corelow.c
|
||||
+ NULL, NULL, NULL,
|
||||
+ &setlist, &showlist);
|
||||
}
|
||||
Index: gdb-7.2.50.20110117/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.2.50.20110320/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/doc/gdb.texinfo 2011-01-17 15:50:41.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/doc/gdb.texinfo 2011-01-17 15:52:06.000000000 +0100
|
||||
@@ -15220,6 +15220,27 @@ information files.
|
||||
--- gdb-7.2.50.20110320.orig/gdb/doc/gdb.texinfo 2011-03-20 15:17:44.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/doc/gdb.texinfo 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -15343,6 +15343,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@ -122,10 +122,10 @@ Index: gdb-7.2.50.20110117/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.2.50.20110117/gdb/solib-svr4.c
|
||||
Index: gdb-7.2.50.20110320/gdb/solib-svr4.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/solib-svr4.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/solib-svr4.c 2011-01-17 15:52:06.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/solib-svr4.c 2011-03-20 15:17:43.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/solib-svr4.c 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -1179,9 +1179,49 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
@ -179,13 +179,13 @@ Index: gdb-7.2.50.20110117/gdb/solib-svr4.c
|
||||
}
|
||||
xfree (buffer);
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
Index: gdb-7.2.50.20110320/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/elfread.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/elfread.c 2011-01-17 15:52:06.000000000 +0100
|
||||
@@ -38,6 +38,10 @@
|
||||
#include "demangle.h"
|
||||
#include "psympriv.h"
|
||||
--- gdb-7.2.50.20110320.orig/gdb/elfread.c 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/elfread.c 2011-03-20 15:22:34.000000000 +0100
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "stap-probe.h"
|
||||
#include "arch-utils.h"
|
||||
#include "gdbtypes.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "gdbcore.h"
|
||||
@ -194,8 +194,8 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -823,16 +827,65 @@ resolve_gnu_ifunc (const char *function_
|
||||
return 0;
|
||||
@@ -1072,16 +1076,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
update_breakpoint_locations (b, sals);
|
||||
}
|
||||
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
@ -262,7 +262,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -848,6 +901,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1097,6 +1150,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -611,7 +611,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
|
||||
|
||||
static int
|
||||
@@ -862,7 +1257,7 @@ build_id_verify (const char *filename, s
|
||||
@@ -1111,7 +1506,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -620,7 +620,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
|
||||
if (found == NULL)
|
||||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
@@ -880,14 +1275,16 @@ build_id_verify (const char *filename, s
|
||||
@@ -1129,14 +1524,16 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -641,7 +641,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
|
||||
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
|
||||
cause "/.build-id/..." lookups. */
|
||||
@@ -918,7 +1315,10 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1167,7 +1564,10 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
@ -653,7 +653,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
|
||||
/* lrealpath() is expensive even for the usually non-existent files. */
|
||||
if (access (link, F_OK) == 0)
|
||||
@@ -931,26 +1331,201 @@ build_id_to_debug_filename (struct build
|
||||
@@ -1180,26 +1580,201 @@ build_id_to_debug_filename (struct build
|
||||
}
|
||||
|
||||
if (retval != NULL)
|
||||
@ -723,9 +723,9 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
+
|
||||
+ retval = obstack_alloc (&missing_filepair_obstack, size);
|
||||
+ memset (retval, 0, size);
|
||||
return retval;
|
||||
}
|
||||
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+static hashval_t
|
||||
+missing_filepair_hash_func (const struct missing_filepair *elem)
|
||||
+{
|
||||
@ -735,9 +735,9 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
+ if (elem->debug != NULL)
|
||||
+ retval ^= htab_hash_string (elem->debug);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
+static int
|
||||
+missing_filepair_eq (const struct missing_filepair *elem1,
|
||||
+ const struct missing_filepair *elem2)
|
||||
@ -859,7 +859,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
xfree (build_id);
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
|
||||
@@ -960,7 +1535,7 @@ find_separate_debug_file_by_buildid (str
|
||||
@@ -1209,7 +1784,7 @@ find_separate_debug_file_by_buildid (str
|
||||
xfree (build_id_name);
|
||||
}
|
||||
else if (build_id_name != NULL)
|
||||
@ -868,9 +868,9 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1148,9 +1723,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1407,9 +1982,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
`.note.gnu.build-id'. */
|
||||
if (!objfile_has_partial_symbols (objfile))
|
||||
else if (!objfile_has_partial_symbols (objfile))
|
||||
{
|
||||
- char *debugfile;
|
||||
+ char *debugfile, *build_id_filename;
|
||||
@ -881,7 +881,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
|
||||
if (debugfile == NULL)
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1162,6 +1738,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1421,6 +1997,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
xfree (debugfile);
|
||||
}
|
||||
@ -894,10 +894,10 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1337,4 +1919,16 @@ void
|
||||
_initialize_elfread (void)
|
||||
{
|
||||
add_symtab_fns (&elf_sym_fns);
|
||||
@@ -1879,4 +2461,16 @@ _initialize_elfread (void)
|
||||
|
||||
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
|
||||
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
|
||||
+
|
||||
+ add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
|
||||
+ _("\
|
||||
@ -911,11 +911,11 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
+
|
||||
+ observer_attach_executable_changed (debug_print_executable_changed);
|
||||
}
|
||||
Index: gdb-7.2.50.20110117/gdb/symfile.h
|
||||
Index: gdb-7.2.50.20110320/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/symfile.h 2011-01-11 22:53:24.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/symfile.h 2011-01-17 15:52:06.000000000 +0100
|
||||
@@ -554,6 +554,13 @@ void free_symfile_segment_data (struct s
|
||||
--- gdb-7.2.50.20110320.orig/gdb/symfile.h 2011-03-20 15:17:43.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/symfile.h 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -611,6 +611,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -929,11 +929,11 @@ Index: gdb-7.2.50.20110117/gdb/symfile.h
|
||||
/* From dwarf2read.c */
|
||||
|
||||
extern int dwarf2_has_info (struct objfile *);
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/lib/gdb.exp 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/lib/gdb.exp 2011-01-17 15:52:06.000000000 +0100
|
||||
@@ -1395,6 +1395,16 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/gdb.exp 2011-03-20 15:17:43.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/lib/gdb.exp 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -1397,6 +1397,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -950,10 +950,10 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/lib/gdb.exp
|
||||
return 0;
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/lib/mi-support.exp 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/lib/mi-support.exp 2011-01-17 15:52:06.000000000 +0100
|
||||
--- gdb-7.2.50.20110320.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/lib/mi-support.exp 2011-03-20 15:19:52.000000000 +0100
|
||||
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
@ -971,13 +971,13 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/lib/mi-support.exp
|
||||
|
||||
detect_async
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/objfiles.h
|
||||
Index: gdb-7.2.50.20110320/gdb/objfiles.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/objfiles.h 2011-01-10 21:38:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/objfiles.h 2011-01-17 15:52:26.000000000 +0100
|
||||
@@ -434,6 +434,10 @@ struct objfile
|
||||
--- gdb-7.2.50.20110320.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/objfiles.h 2011-03-20 15:20:29.000000000 +0100
|
||||
@@ -441,6 +441,10 @@ struct objfile
|
||||
|
||||
#define OBJF_USERLOADED (1 << 3) /* User loaded */
|
||||
#define OBJF_PSYMTABS_READ (1 << 4)
|
||||
|
||||
+/* This file was loaded according to the BUILD_ID_CORE_LOADS rules. */
|
||||
+
|
||||
|
@ -3,11 +3,11 @@
|
||||
Port to GDB-6.8pre.
|
||||
Remove the `[' character from the GDB-6.8 default message.
|
||||
|
||||
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
||||
Index: gdb-7.2.50.20110320/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:31.000000000 +0100
|
||||
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:23:28.000000000 +0100
|
||||
@@ -724,7 +724,7 @@ holding the child stopped. Try \"set de
|
||||
--- gdb-7.2.50.20110320.orig/gdb/linux-nat.c 2011-03-20 16:59:51.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/linux-nat.c 2011-03-20 16:59:51.000000000 +0100
|
||||
@@ -716,7 +716,7 @@ holding the child stopped. Try \"set de
|
||||
remove_breakpoints_pid (GET_PID (inferior_ptid));
|
||||
}
|
||||
|
||||
@ -16,10 +16,10 @@ Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
||||
{
|
||||
target_terminal_ours ();
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c 2010-01-15 03:22:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.c 2011-03-20 16:59:51.000000000 +0100
|
||||
@@ -0,0 +1,57 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -78,10 +78,10 @@ Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp 2010-01-15 03:22:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/fork-detach.exp 2011-03-20 17:12:22.000000000 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -117,5 +117,5 @@ Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
+gdb_run_cmd
|
||||
+# `Starting program: .*' prefix is available since gdb-6.7.
|
||||
+gdb_test "" \
|
||||
+ "Detaching after fork from child process.*Program exited normally\\..*" \
|
||||
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
|
||||
+ "Info message caught"
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.1.90.20100711/bfd/elf-bfd.h
|
||||
Index: gdb-7.2.50.20110320/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/bfd/elf-bfd.h 2010-06-27 06:07:51.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/bfd/elf-bfd.h 2010-07-12 23:00:04.000000000 +0200
|
||||
@@ -2171,8 +2171,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
--- gdb-7.2.50.20110320.orig/bfd/elf-bfd.h 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/bfd/elf-bfd.h 2011-03-20 15:24:02.000000000 +0100
|
||||
@@ -2193,8 +2193,10 @@ extern Elf_Internal_Phdr * _bfd_elf_find
|
||||
/* Exported interface for writing elf corefile notes. */
|
||||
extern char *elfcore_write_note
|
||||
(bfd *, char *, int *, const char *, int, const void *, int);
|
||||
@ -14,11 +14,11 @@ Index: gdb-7.1.90.20100711/bfd/elf-bfd.h
|
||||
extern char *elfcore_write_prstatus
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char * elfcore_write_pstatus
|
||||
Index: gdb-7.1.90.20100711/bfd/elf.c
|
||||
Index: gdb-7.2.50.20110320/bfd/elf.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/bfd/elf.c 2010-05-18 05:31:05.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/bfd/elf.c 2010-07-12 22:51:17.000000000 +0200
|
||||
@@ -8582,13 +8582,12 @@ elfcore_write_note (bfd *abfd,
|
||||
--- gdb-7.2.50.20110320.orig/bfd/elf.c 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/bfd/elf.c 2011-03-20 15:24:02.000000000 +0100
|
||||
@@ -8814,13 +8814,12 @@ elfcore_write_note (bfd *abfd,
|
||||
return buf;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ Index: gdb-7.1.90.20100711/bfd/elf.c
|
||||
{
|
||||
const char *note_name = "CORE";
|
||||
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
@@ -8596,48 +8595,55 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
@@ -8828,48 +8827,55 @@ elfcore_write_prpsinfo (bfd *abfd,
|
||||
if (bed->elf_backend_write_core_note != NULL)
|
||||
{
|
||||
char *ret;
|
||||
@ -109,11 +109,11 @@ Index: gdb-7.1.90.20100711/bfd/elf.c
|
||||
|
||||
#if defined (HAVE_PRSTATUS_T)
|
||||
char *
|
||||
Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
||||
Index: gdb-7.2.50.20110320/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/linux-nat.c 2010-07-12 23:05:22.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/linux-nat.c 2010-07-12 22:57:34.000000000 +0200
|
||||
@@ -4466,6 +4466,131 @@ linux_spu_make_corefile_notes (bfd *obfd
|
||||
--- gdb-7.2.50.20110320.orig/gdb/linux-nat.c 2011-03-20 15:17:46.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/linux-nat.c 2011-03-20 15:25:36.000000000 +0100
|
||||
@@ -4603,6 +4603,131 @@ linux_spu_make_corefile_notes (bfd *obfd
|
||||
return args.note_data;
|
||||
}
|
||||
|
||||
@ -245,11 +245,11 @@ Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
||||
/* Fills the "to_make_corefile_note" target vector. Builds the note
|
||||
section for a corefile, and returns it in a malloc buffer. */
|
||||
|
||||
@@ -4484,26 +4609,11 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
@@ -4621,26 +4746,11 @@ linux_nat_make_corefile_notes (bfd *obfd
|
||||
|
||||
if (get_exec_file (0))
|
||||
{
|
||||
- strncpy (fname, strrchr (get_exec_file (0), '/') + 1, sizeof (fname));
|
||||
- strncpy (fname, lbasename (get_exec_file (0)), sizeof (fname));
|
||||
- strncpy (psargs, get_exec_file (0), sizeof (psargs));
|
||||
- if (get_inferior_args ())
|
||||
- {
|
||||
@ -275,11 +275,11 @@ Index: gdb-7.1.90.20100711/gdb/linux-nat.c
|
||||
}
|
||||
|
||||
/* Dump information for threads. */
|
||||
Index: gdb-7.1.90.20100711/gdb/procfs.c
|
||||
Index: gdb-7.2.50.20110320/gdb/procfs.c
|
||||
===================================================================
|
||||
--- gdb-7.1.90.20100711.orig/gdb/procfs.c 2010-07-07 18:15:16.000000000 +0200
|
||||
+++ gdb-7.1.90.20100711/gdb/procfs.c 2010-07-12 23:05:23.000000000 +0200
|
||||
@@ -5770,6 +5770,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
--- gdb-7.2.50.20110320.orig/gdb/procfs.c 2011-03-09 13:48:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/procfs.c 2011-03-20 15:24:02.000000000 +0100
|
||||
@@ -5752,6 +5752,7 @@ procfs_make_note_section (bfd *obfd, int
|
||||
note_data = (char *) elfcore_write_prpsinfo (obfd,
|
||||
note_data,
|
||||
note_size,
|
||||
|
@ -170,4 +170,4 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads
|
||||
+gdb_run_cmd ${binfile_nothreads} ${binfile_threads} 0
|
||||
|
||||
gdb_test_multiple {} "Program exited" {
|
||||
-re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
|
||||
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
|
||||
|
49
gdb-ada-gdbarch-crash.patch
Normal file
49
gdb-ada-gdbarch-crash.patch
Normal file
@ -0,0 +1,49 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg00946.html
|
||||
Subject: [patch] ada: Fix rashes on gdbarch garbage
|
||||
|
||||
Hi Joel,
|
||||
|
||||
for gdb.ada/str_ref_cmp.exp on x86_64-fedora15-linux-gnu it turns:
|
||||
|
||||
(gdb) print String_Var (1 .. 3) = "Hel"
|
||||
ERROR: Process no longer exists
|
||||
UNRESOLVED: gdb.ada/str_ref_cmp.exp: print String_Var (1 .. 3) = "Hel"
|
||||
->
|
||||
(gdb) print String_Var (1 .. 3) = "Hel"
|
||||
$1 = false
|
||||
(gdb) FAIL: gdb.ada/str_ref_cmp.exp: print String_Var (1 .. 3) = "Hel"
|
||||
|
||||
GDB crashes the former way without this fix on:
|
||||
gcc-gnat-4.6.0-0.14.fc15.x86_64
|
||||
gcc-gnat-4.5.1-4.fc14.x86_64
|
||||
|
||||
I cannot test FSF gcc <=4.5 myself as its Ada build errors out for me on:
|
||||
uintp.adb:242:22: expect type "Hnum" defined at line 91
|
||||
|
||||
GDB PASSes on these GNATs even without this fix but that is not the point:
|
||||
GNAT 4.7.0 20110320 (experimental)
|
||||
GNAT 4.6.0 20110320 (prerelease)
|
||||
|
||||
This is only a suggestion, I do not know much about the ada-* code.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* ada-lang.c (replace_operator_with_call): Copy also GDBARCH.
|
||||
|
||||
--- a/gdb/ada-lang.c
|
||||
+++ b/gdb/ada-lang.c
|
||||
@@ -3661,6 +3661,7 @@ replace_operator_with_call (struct expression **expp, int pc, int nargs,
|
||||
|
||||
newexp->nelts = exp->nelts + 7 - oplen;
|
||||
newexp->language_defn = exp->language_defn;
|
||||
+ newexp->gdbarch = exp->gdbarch;
|
||||
memcpy (newexp->elts, exp->elts, EXP_ELEM_TO_BYTES (pc));
|
||||
memcpy (newexp->elts + pc + 7, exp->elts + pc + oplen,
|
||||
EXP_ELEM_TO_BYTES (exp->nelts - pc - oplen));
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.50.20110222/gdb/breakpoint.c
|
||||
Index: gdb-7.2.50.20110320/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110222.orig/gdb/breakpoint.c 2011-02-23 00:12:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20110222/gdb/breakpoint.c 2011-02-23 00:13:04.000000000 +0100
|
||||
@@ -10547,6 +10547,50 @@ update_breakpoint_locations (struct brea
|
||||
--- gdb-7.2.50.20110320.orig/gdb/breakpoint.c 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/breakpoint.c 2011-03-20 15:28:48.000000000 +0100
|
||||
@@ -10678,6 +10678,50 @@ update_breakpoint_locations (struct brea
|
||||
update_global_location_list (1);
|
||||
}
|
||||
|
||||
@ -53,25 +53,25 @@ Index: gdb-7.2.50.20110222/gdb/breakpoint.c
|
||||
/* Reset a breakpoint given it's struct breakpoint * BINT.
|
||||
The value we return ends up being the return value from catch_errors.
|
||||
Unused in this case. */
|
||||
Index: gdb-7.2.50.20110222/gdb/breakpoint.h
|
||||
Index: gdb-7.2.50.20110320/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110222.orig/gdb/breakpoint.h 2011-02-23 00:12:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20110222/gdb/breakpoint.h 2011-02-23 00:13:16.000000000 +0100
|
||||
@@ -1192,4 +1192,7 @@ extern int user_breakpoint_p (struct bre
|
||||
--- gdb-7.2.50.20110320.orig/gdb/breakpoint.h 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/breakpoint.h 2011-03-20 15:29:33.000000000 +0100
|
||||
@@ -1210,4 +1210,7 @@ extern struct breakpoint *iterate_over_b
|
||||
|
||||
extern int get_number_or_range (char **pp);
|
||||
extern int user_breakpoint_p (struct breakpoint *);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.2.50.20110222/gdb/objfiles.c
|
||||
Index: gdb-7.2.50.20110320/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110222.orig/gdb/objfiles.c 2011-01-10 21:38:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110222/gdb/objfiles.c 2011-02-23 00:13:04.000000000 +0100
|
||||
@@ -846,6 +846,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
obj_section_addr (s));
|
||||
}
|
||||
--- gdb-7.2.50.20110320.orig/gdb/objfiles.c 2011-03-20 15:17:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110320/gdb/objfiles.c 2011-03-20 15:29:05.000000000 +0100
|
||||
@@ -851,6 +851,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
|
||||
new_offsets, delta);
|
||||
|
||||
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
|
||||
+ their addresses match. */
|
||||
|
5003
gdb-archer.patch
5003
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -1,619 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||
|
||||
Index: gdb-7.2.50.20110206/gdb/cp-support.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/cp-support.c 2011-02-06 23:12:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/cp-support.c 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "exceptions.h"
|
||||
#include "expression.h"
|
||||
#include "value.h"
|
||||
+#include "language.h"
|
||||
|
||||
#include "safe-ctype.h"
|
||||
|
||||
@@ -936,7 +937,8 @@ make_symbol_overload_list_qualified (con
|
||||
ALL_OBJFILES (objfile)
|
||||
{
|
||||
if (objfile->sf)
|
||||
- objfile->sf->qf->expand_symtabs_for_function (objfile, func_name);
|
||||
+ objfile->sf->qf->expand_symtabs_for_function (objfile, func_name,
|
||||
+ language_cplus);
|
||||
}
|
||||
|
||||
/* Search upwards from currently selected frame (so that we can
|
||||
Index: gdb-7.2.50.20110206/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/dwarf2read.c 2011-02-06 23:12:22.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/dwarf2read.c 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -2373,7 +2373,8 @@ dw2_lookup_symtab (struct objfile *objfi
|
||||
|
||||
static struct symtab *
|
||||
dw2_lookup_symbol (struct objfile *objfile, int block_index,
|
||||
- const char *name, domain_enum domain)
|
||||
+ const char *name, domain_enum domain,
|
||||
+ enum language language)
|
||||
{
|
||||
/* We do all the work in the pre_expand_symtabs_matching hook
|
||||
instead. */
|
||||
@@ -2449,7 +2450,8 @@ dw2_relocate (struct objfile *objfile, s
|
||||
|
||||
static void
|
||||
dw2_expand_symtabs_for_function (struct objfile *objfile,
|
||||
- const char *func_name)
|
||||
+ const char *func_name,
|
||||
+ enum language language)
|
||||
{
|
||||
dw2_do_expand_symtabs_matching (objfile, func_name);
|
||||
}
|
||||
@@ -2509,7 +2511,8 @@ dw2_expand_symtabs_with_filename (struct
|
||||
}
|
||||
|
||||
static const char *
|
||||
-dw2_find_symbol_file (struct objfile *objfile, const char *name)
|
||||
+dw2_find_symbol_file (struct objfile *objfile, const char *name,
|
||||
+ enum language language)
|
||||
{
|
||||
struct dwarf2_per_cu_data *per_cu;
|
||||
offset_type *vec;
|
||||
Index: gdb-7.2.50.20110206/gdb/linespec.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/linespec.c 2011-02-06 23:12:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/linespec.c 2011-02-06 23:12:26.000000000 +0100
|
||||
@@ -1226,7 +1226,7 @@ decode_objc (char **argptr, int funfirst
|
||||
|
||||
static struct symtabs_and_lines
|
||||
decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
- char *saved_arg, char *p, int *not_found_ptr)
|
||||
+ char *the_real_saved_arg, char *p, int *not_found_ptr)
|
||||
{
|
||||
struct symtabs_and_lines values;
|
||||
char *p2;
|
||||
@@ -1237,7 +1237,23 @@ decode_compound (char **argptr, int funf
|
||||
struct symbol *sym_class;
|
||||
struct type *t;
|
||||
char *saved_java_argptr = NULL;
|
||||
+ char *saved_arg;
|
||||
|
||||
+ /* THE_REAL_SAVED_ARG cannot be altered, so make a copy that can be. */
|
||||
+ saved_arg = alloca (strlen (the_real_saved_arg) + 1);
|
||||
+ strcpy (saved_arg, the_real_saved_arg);
|
||||
+
|
||||
+ /* If the user specified "'foo::bar(baz)'" (note the quotes -- often
|
||||
+ added to workaround completer issues) -- saved_arg will be
|
||||
+ encapsulated in single-quotes. They are superfluous, so just strip
|
||||
+ them off. */
|
||||
+ if (*saved_arg == '\'')
|
||||
+ {
|
||||
+ char *end = skip_quoted (saved_arg);
|
||||
+ memmove (saved_arg, saved_arg + 1, end - saved_arg);
|
||||
+ memmove (end - 2, end, strlen (saved_arg) + 1);
|
||||
+ }
|
||||
+
|
||||
/* First check for "global" namespace specification, of the form
|
||||
"::foo". If found, skip over the colons and jump to normal
|
||||
symbol processing. I.e. the whole line specification starts with
|
||||
@@ -1489,7 +1505,7 @@ decode_compound (char **argptr, int funf
|
||||
up. The quotes are important if copy is empty. */
|
||||
if (not_found_ptr)
|
||||
*not_found_ptr = 1;
|
||||
- cplusplus_error (saved_arg,
|
||||
+ cplusplus_error (the_real_saved_arg,
|
||||
"Can't find member of namespace, "
|
||||
"class, struct, or union named \"%s\"\n",
|
||||
copy);
|
||||
Index: gdb-7.2.50.20110206/gdb/psymtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/psymtab.c 2011-02-06 23:12:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/psymtab.c 2011-02-06 23:12:54.000000000 +0100
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "readline/readline.h"
|
||||
#include "gdb_regex.h"
|
||||
#include "dictionary.h"
|
||||
+#include "language.h"
|
||||
+#include "cp-support.h"
|
||||
|
||||
#ifndef DEV_TTY
|
||||
#define DEV_TTY "/dev/tty"
|
||||
@@ -55,7 +57,8 @@ static struct partial_symbol *match_part
|
||||
|
||||
static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
|
||||
const char *, int,
|
||||
- domain_enum);
|
||||
+ domain_enum,
|
||||
+ enum language);
|
||||
|
||||
static char *psymtab_to_fullname (struct partial_symtab *ps);
|
||||
|
||||
@@ -418,15 +421,35 @@ fixup_psymbol_section (struct partial_sy
|
||||
static struct symtab *
|
||||
lookup_symbol_aux_psymtabs (struct objfile *objfile,
|
||||
int block_index, const char *name,
|
||||
- const domain_enum domain)
|
||||
+ const domain_enum domain, enum language language)
|
||||
{
|
||||
struct partial_symtab *ps;
|
||||
const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0);
|
||||
|
||||
ALL_OBJFILE_PSYMTABS (objfile, ps)
|
||||
{
|
||||
- if (!ps->readin && lookup_partial_symbol (ps, name, psymtab_index, domain))
|
||||
- return PSYMTAB_TO_SYMTAB (ps);
|
||||
+ if (!ps->readin
|
||||
+ && lookup_partial_symbol (ps, name, psymtab_index, domain, language))
|
||||
+ {
|
||||
+ struct symbol *sym;
|
||||
+ struct symtab *stab = PSYMTAB_TO_SYMTAB (ps);
|
||||
+ sym = NULL;
|
||||
+
|
||||
+ /* Some caution must be observed with overloaded functions
|
||||
+ and methods, since the psymtab will not contain any overload
|
||||
+ information (but NAME might contain it). */
|
||||
+ if (stab->primary)
|
||||
+ {
|
||||
+ struct blockvector *bv = BLOCKVECTOR (stab);
|
||||
+ struct block *block = BLOCKVECTOR_BLOCK (bv, block_index);
|
||||
+ sym = lookup_block_symbol (block, name, domain);
|
||||
+ }
|
||||
+
|
||||
+ if (sym && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
|
||||
+ return stab;
|
||||
+
|
||||
+ /* Keep looking through other psymtabs. */
|
||||
+ }
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -519,22 +542,58 @@ pre_expand_symtabs_matching_psymtabs (st
|
||||
/* Nothing. */
|
||||
}
|
||||
|
||||
+/* Returns the name used to search psymtabs. Unlike symtabs, psymtabs do
|
||||
+ not contain any method/function instance information (since this would
|
||||
+ force reading type information while reading psymtabs). Therefore,
|
||||
+ if NAME contains overload information, it must be stripped before searching
|
||||
+ psymtabs.
|
||||
+
|
||||
+ The caller is responsible for freeing the return result. */
|
||||
+
|
||||
+static const char *
|
||||
+psymtab_search_name (const char *name, enum language language)
|
||||
+{
|
||||
+ switch (language)
|
||||
+ {
|
||||
+ case language_cplus:
|
||||
+ case language_java:
|
||||
+ {
|
||||
+ if (strchr (name, '('))
|
||||
+ {
|
||||
+ char *ret = cp_remove_params (name);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return xstrdup (name);
|
||||
+}
|
||||
+
|
||||
/* Look, in partial_symtab PST, for symbol whose natural name is NAME.
|
||||
Check the global symbols if GLOBAL, the static symbols if not. */
|
||||
|
||||
static struct partial_symbol *
|
||||
lookup_partial_symbol (struct partial_symtab *pst, const char *name,
|
||||
- int global, domain_enum domain)
|
||||
+ int global, domain_enum domain, enum language language)
|
||||
{
|
||||
struct partial_symbol **start, **psym;
|
||||
struct partial_symbol **top, **real_top, **bottom, **center;
|
||||
int length = (global ? pst->n_global_syms : pst->n_static_syms);
|
||||
int do_linear_search = 1;
|
||||
+ const char *search_name;
|
||||
+ struct cleanup *cleanup;
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
+
|
||||
+ search_name = psymtab_search_name (name, language);
|
||||
+ cleanup = make_cleanup (xfree, (void *) search_name);
|
||||
start = (global ?
|
||||
pst->objfile->global_psymbols.list + pst->globals_offset :
|
||||
pst->objfile->static_psymbols.list + pst->statics_offset);
|
||||
@@ -563,7 +622,8 @@ lookup_partial_symbol (struct partial_sy
|
||||
{
|
||||
do_linear_search = 1;
|
||||
}
|
||||
- if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center), name) >= 0)
|
||||
+ if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center),
|
||||
+ search_name) >= 0)
|
||||
{
|
||||
top = center;
|
||||
}
|
||||
@@ -577,11 +637,14 @@ lookup_partial_symbol (struct partial_sy
|
||||
_("failed internal consistency check"));
|
||||
|
||||
while (top <= real_top
|
||||
- && SYMBOL_MATCHES_SEARCH_NAME (*top, name))
|
||||
+ && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
{
|
||||
if (symbol_matches_domain (SYMBOL_LANGUAGE (*top),
|
||||
SYMBOL_DOMAIN (*top), domain))
|
||||
- return (*top);
|
||||
+ {
|
||||
+ do_cleanups (cleanup);
|
||||
+ return (*top);
|
||||
+ }
|
||||
top++;
|
||||
}
|
||||
}
|
||||
@@ -595,11 +658,15 @@ lookup_partial_symbol (struct partial_sy
|
||||
{
|
||||
if (symbol_matches_domain (SYMBOL_LANGUAGE (*psym),
|
||||
SYMBOL_DOMAIN (*psym), domain)
|
||||
- && SYMBOL_MATCHES_SEARCH_NAME (*psym, name))
|
||||
- return (*psym);
|
||||
+ && SYMBOL_MATCHES_SEARCH_NAME (*psym, search_name))
|
||||
+ {
|
||||
+ do_cleanups (cleanup);
|
||||
+ return (*psym);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
+ do_cleanups (cleanup);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -911,7 +978,8 @@ dump_psymtabs_for_objfile (struct objfil
|
||||
by matching FUNC_NAME. Make sure we read that symbol table in. */
|
||||
|
||||
static void
|
||||
-read_symtabs_for_function (struct objfile *objfile, const char *func_name)
|
||||
+read_symtabs_for_function (struct objfile *objfile, const char *func_name,
|
||||
+ enum language language)
|
||||
{
|
||||
struct partial_symtab *ps;
|
||||
|
||||
@@ -920,9 +988,9 @@ read_symtabs_for_function (struct objfil
|
||||
if (ps->readin)
|
||||
continue;
|
||||
|
||||
- if ((lookup_partial_symbol (ps, func_name, 1, VAR_DOMAIN)
|
||||
+ if ((lookup_partial_symbol (ps, func_name, 1, VAR_DOMAIN, language)
|
||||
!= NULL)
|
||||
- || (lookup_partial_symbol (ps, func_name, 0, VAR_DOMAIN)
|
||||
+ || (lookup_partial_symbol (ps, func_name, 0, VAR_DOMAIN, language)
|
||||
!= NULL))
|
||||
psymtab_to_symtab (ps);
|
||||
}
|
||||
@@ -1042,13 +1110,14 @@ psymtab_to_fullname (struct partial_symt
|
||||
}
|
||||
|
||||
static const char *
|
||||
-find_symbol_file_from_partial (struct objfile *objfile, const char *name)
|
||||
+find_symbol_file_from_partial (struct objfile *objfile, const char *name,
|
||||
+ enum language language)
|
||||
{
|
||||
struct partial_symtab *pst;
|
||||
|
||||
ALL_OBJFILE_PSYMTABS (objfile, pst)
|
||||
{
|
||||
- if (lookup_partial_symbol (pst, name, 1, VAR_DOMAIN))
|
||||
+ if (lookup_partial_symbol (pst, name, 1, VAR_DOMAIN, language))
|
||||
return pst->filename;
|
||||
}
|
||||
return NULL;
|
||||
Index: gdb-7.2.50.20110206/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/symfile.h 2011-02-06 23:12:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/symfile.h 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -167,14 +167,15 @@ struct quick_symbol_functions
|
||||
/* Check to see if the symbol is defined in a "partial" symbol table
|
||||
of OBJFILE. KIND should be either GLOBAL_BLOCK or STATIC_BLOCK,
|
||||
depending on whether we want to search global symbols or static
|
||||
- symbols. NAME is the name of the symbol to look for. DOMAIN
|
||||
- indicates what sort of symbol to search for.
|
||||
+ symbols. NAME (valid in LANGUAGE) is the name of the symbol to look for.
|
||||
+ DOMAIN indicates what sort of symbol to search for.
|
||||
|
||||
Returns the newly-expanded symbol table in which the symbol is
|
||||
defined, or NULL if no such symbol table exists. */
|
||||
struct symtab *(*lookup_symbol) (struct objfile *objfile,
|
||||
int kind, const char *name,
|
||||
- domain_enum domain);
|
||||
+ domain_enum domain,
|
||||
+ enum language language);
|
||||
|
||||
/* This is called to expand symbol tables before looking up a
|
||||
symbol. A backend can choose to implement this and then have its
|
||||
@@ -200,10 +201,11 @@ struct quick_symbol_functions
|
||||
struct section_offsets *new_offsets,
|
||||
struct section_offsets *delta);
|
||||
|
||||
- /* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
|
||||
- the corresponding symbol tables are loaded. */
|
||||
+ /* Find all the symbols in OBJFILE named FUNC_NAME (valid in LANGUAGE),
|
||||
+ and ensure that the corresponding symbol tables are loaded. */
|
||||
void (*expand_symtabs_for_function) (struct objfile *objfile,
|
||||
- const char *func_name);
|
||||
+ const char *func_name,
|
||||
+ enum language language);
|
||||
|
||||
/* Read all symbol tables associated with OBJFILE. */
|
||||
void (*expand_all_symtabs) (struct objfile *objfile);
|
||||
@@ -217,8 +219,10 @@ struct quick_symbol_functions
|
||||
const char *filename);
|
||||
|
||||
/* Return the file name of the file holding the symbol in OBJFILE
|
||||
- named NAME. If no such symbol exists in OBJFILE, return NULL. */
|
||||
- const char *(*find_symbol_file) (struct objfile *objfile, const char *name);
|
||||
+ named NAME (valid in LANGUAGE). If no such symbol exists in OBJFILE,
|
||||
+ return NULL. */
|
||||
+ const char *(*find_symbol_file) (struct objfile *objfile, const char *name,
|
||||
+ enum language language);
|
||||
|
||||
/* Find global or static symbols in all tables that are in NAMESPACE
|
||||
and for which MATCH (symbol name, NAME) == 0, passing each to
|
||||
Index: gdb-7.2.50.20110206/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/symtab.c 2011-02-06 23:12:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/symtab.c 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -1380,7 +1380,8 @@ lookup_symbol_aux_quick (struct objfile
|
||||
|
||||
if (!objfile->sf)
|
||||
return NULL;
|
||||
- symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, domain);
|
||||
+ symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, domain,
|
||||
+ current_language->la_language);
|
||||
if (!symtab)
|
||||
return NULL;
|
||||
|
||||
@@ -1554,7 +1555,8 @@ basic_lookup_transparent_type_quick (str
|
||||
|
||||
if (!objfile->sf)
|
||||
return NULL;
|
||||
- symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, STRUCT_DOMAIN);
|
||||
+ symtab = objfile->sf->qf->lookup_symbol (objfile, kind, name, STRUCT_DOMAIN,
|
||||
+ current_language->la_language);
|
||||
if (!symtab)
|
||||
return NULL;
|
||||
|
||||
@@ -1686,7 +1688,8 @@ find_main_filename (void)
|
||||
|
||||
if (!objfile->sf)
|
||||
continue;
|
||||
- result = objfile->sf->qf->find_symbol_file (objfile, name);
|
||||
+ result = objfile->sf->qf->find_symbol_file (objfile, name,
|
||||
+ current_language->la_language);
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-1.cc 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ pr11734 *p = new pr11734;
|
||||
+ p->foo ();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-2.cc 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-3.cc 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (int a)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734-4.cc 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (char *a)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734.exp 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,55 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# 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 file is part of the gdb testsuite.
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+
|
||||
+set testfile "pr11734"
|
||||
+set class $testfile
|
||||
+
|
||||
+set srcfiles {}
|
||||
+for {set i 1} {$i < 5} {incr i} {
|
||||
+ lappend srcfiles $testfile-$i.cc
|
||||
+}
|
||||
+
|
||||
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
|
||||
+
|
||||
+if {![runto_main]} {
|
||||
+ perror "couldn't run to breakpoint"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# An array holding the overload types for the method pr11734::foo. The
|
||||
+# first element is the overloaded method parameter. The second element
|
||||
+# is the expected source file number, e.g. "pr11734-?.cc".
|
||||
+array set tests {
|
||||
+ "char*" 4
|
||||
+ "int" 3
|
||||
+ "" 2
|
||||
+}
|
||||
+
|
||||
+# Test each overload instance twice: once quoted, once unquoted
|
||||
+foreach ovld [array names tests] {
|
||||
+ set method "${class}::foo\($ovld\)"
|
||||
+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
|
||||
+ gdb_test "break $method" $result
|
||||
+ gdb_test "break '$method'" $result
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+return 0
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr11734.h 2011-02-06 23:12:22.000000000 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+class pr11734
|
||||
+{
|
||||
+ public:
|
||||
+ void foo ();
|
||||
+ void foo (int);
|
||||
+ void foo (char *);
|
||||
+};
|
||||
+
|
@ -1,18 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-01/msg00460.html
|
||||
|
||||
Index: gdb-7.2/gdb/linespec.c
|
||||
===================================================================
|
||||
--- gdb-7.2.orig/gdb/linespec.c 2011-02-03 22:59:46.000000000 +0100
|
||||
+++ gdb-7.2/gdb/linespec.c 2011-02-03 23:03:28.000000000 +0100
|
||||
@@ -1230,7 +1230,10 @@ decode_compound (char **argptr, int funf
|
||||
{
|
||||
char *end = skip_quoted (saved_arg);
|
||||
memmove (saved_arg, saved_arg + 1, end - saved_arg);
|
||||
- memmove (end - 2, end, strlen (saved_arg) + 1);
|
||||
+ if (&end[-2] >= saved_arg && end[-2] == '\'')
|
||||
+ memmove (end - 2, end, strlen (end) + 1);
|
||||
+ else
|
||||
+ memmove (end - 1, end, strlen (end) + 1);
|
||||
}
|
||||
|
||||
/* First check for "global" namespace specification, of the form
|
@ -1,207 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||
|
||||
Index: gdb-7.2.50.20110206/gdb/linespec.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/linespec.c 2011-02-06 23:06:26.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/linespec.c 2011-02-06 23:08:23.000000000 +0100
|
||||
@@ -1057,6 +1057,10 @@ locate_first_half (char **argptr, int *i
|
||||
error (_("malformed template specification in command"));
|
||||
p = temp_end;
|
||||
}
|
||||
+
|
||||
+ if (p[0] == '(')
|
||||
+ p = find_method_overload_end (p);
|
||||
+
|
||||
/* Check for a colon and a plus or minus and a [ (which
|
||||
indicates an Objective-C method). */
|
||||
if (is_objc_method_format (p))
|
||||
@@ -1272,8 +1276,10 @@ decode_compound (char **argptr, int funf
|
||||
find_method.
|
||||
|
||||
2) AAA::inA isn't the name of a class. In that case, either the
|
||||
- user made a typo or AAA::inA is the name of a namespace.
|
||||
- Either way, we just look up AAA::inA::fun with lookup_symbol.
|
||||
+ user made a typo, AAA::inA is the name of a namespace, or it is
|
||||
+ the name of a minimal symbol.
|
||||
+ We just look up AAA::inA::fun with lookup_symbol. If that fails,
|
||||
+ try lookup_minimal_symbol.
|
||||
|
||||
Thus, our first task is to find everything before the last set of
|
||||
double-colons and figure out if it's the name of a class. So we
|
||||
@@ -1294,6 +1300,8 @@ decode_compound (char **argptr, int funf
|
||||
|
||||
while (1)
|
||||
{
|
||||
+ static char *break_characters = " \t\'(";
|
||||
+
|
||||
/* Move pointer up to next possible class/namespace token. */
|
||||
|
||||
p = p2 + 1; /* Restart with old value +1. */
|
||||
@@ -1304,8 +1312,7 @@ decode_compound (char **argptr, int funf
|
||||
/* PASS2: p2->"::fun", p->":fun" */
|
||||
|
||||
/* Move pointer ahead to next double-colon. */
|
||||
- while (*p && (p[0] != ' ') && (p[0] != '\t') && (p[0] != '\'')
|
||||
- && (*p != '('))
|
||||
+ while (*p && strchr (break_characters, *p) == NULL)
|
||||
{
|
||||
if (current_language->la_language == language_cplus)
|
||||
p += cp_validate_operator (p);
|
||||
@@ -1329,9 +1336,12 @@ decode_compound (char **argptr, int funf
|
||||
else if ((p[0] == ':') && (p[1] == ':'))
|
||||
break; /* Found double-colon. */
|
||||
else
|
||||
- /* PASS2: We'll keep getting here, until p->"", at which point
|
||||
- we exit this loop. */
|
||||
- p++;
|
||||
+ {
|
||||
+ /* PASS2: We'll keep getting here, until P points to one of the
|
||||
+ break characters, at which point we exit this loop. */
|
||||
+ if (strchr (break_characters, *p) == NULL)
|
||||
+ p++;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (*p != ':')
|
||||
@@ -1340,7 +1350,7 @@ decode_compound (char **argptr, int funf
|
||||
unsuccessfully all the components of the
|
||||
string, and p->""(PASS2). */
|
||||
|
||||
- /* We get here if p points to ' ', '\t', '\'', "::" or ""(i.e
|
||||
+ /* We get here if p points to one of the break characters or ""(i.e
|
||||
string ended). */
|
||||
/* Save restart for next time around. */
|
||||
p2 = p;
|
||||
@@ -1491,6 +1501,18 @@ decode_compound (char **argptr, int funf
|
||||
/* We couldn't find a class, so we're in case 2 above. We check the
|
||||
entire name as a symbol instead. */
|
||||
|
||||
+ if (current_language->la_language == language_cplus
|
||||
+ || current_language->la_language == language_java)
|
||||
+ {
|
||||
+ char *paren = strchr (p, '(');
|
||||
+ if (paren != NULL)
|
||||
+ p = find_method_overload_end (paren);
|
||||
+
|
||||
+ /* Make sure we keep important kewords like "const" */
|
||||
+ if (strncmp (p, " const", 6) == 0)
|
||||
+ p += 6;
|
||||
+ }
|
||||
+
|
||||
copy = (char *) alloca (p - saved_arg2 + 1);
|
||||
memcpy (copy, saved_arg2, p - saved_arg2);
|
||||
/* Note: if is_quoted should be true, we snuff out quote here
|
||||
@@ -1503,9 +1525,18 @@ decode_compound (char **argptr, int funf
|
||||
sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
|
||||
if (sym)
|
||||
return symbol_found (funfirstline, canonical, copy, sym, NULL);
|
||||
+ else
|
||||
+ {
|
||||
+ struct minimal_symbol *msym;
|
||||
+
|
||||
+ /* Couldn't find any interpretation as classes/namespaces. As a last
|
||||
+ resort, try the minimal symbol tables. */
|
||||
+ msym = lookup_minimal_symbol (copy, NULL, NULL);
|
||||
+ if (msym != NULL)
|
||||
+ return minsym_found (funfirstline, msym);
|
||||
+ }
|
||||
|
||||
- /* Couldn't find any interpretation as classes/namespaces, so give
|
||||
- up. The quotes are important if copy is empty. */
|
||||
+ /* Couldn't find a minimal symbol, either, so give up. */
|
||||
if (not_found_ptr)
|
||||
*not_found_ptr = 1;
|
||||
cplusplus_error (the_real_saved_arg,
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr12273.cc 2011-02-06 23:07:19.000000000 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This test case is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+template <typename T>
|
||||
+class GDB
|
||||
+{
|
||||
+ public:
|
||||
+ static int simple (void) { return 0; }
|
||||
+ static int harder (T a) { return 1; }
|
||||
+ template <typename X>
|
||||
+ static X even_harder (T a) { return static_cast<X> (a); }
|
||||
+ int operator == (GDB const& other)
|
||||
+ { return 1; }
|
||||
+};
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ GDB<int> a, b;
|
||||
+ if (a == b)
|
||||
+ return GDB<char>::harder('a') + GDB<int>::harder(3)
|
||||
+ + GDB<char>::even_harder<int> ('a');
|
||||
+ return GDB<int>::simple ();
|
||||
+}
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.cp/pr12273.exp 2011-02-06 23:07:19.000000000 +0100
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# 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 file is part of the gdb testsuite.
|
||||
+
|
||||
+if {[skip_cplus_tests]} { continue }
|
||||
+
|
||||
+set testfile "pr12273"
|
||||
+# Do NOT compile with debug flag.
|
||||
+prepare_for_testing pr12273 $testfile $testfile.cc {c++}
|
||||
+
|
||||
+gdb_test_no_output "set language c++"
|
||||
+
|
||||
+# A list of minimal symbol names to check.
|
||||
+# Note that GDB<char>::even_harder<int>(char) is quoted and includes
|
||||
+# the return type. This is necessary because this is the demangled name
|
||||
+# of the minimal symbol.
|
||||
+set min_syms [list \
|
||||
+ "GDB<int>::operator ==" \
|
||||
+ "GDB<int>::operator==(GDB<int> const&)" \
|
||||
+ "GDB<char>::harder(char)" \
|
||||
+ "GDB<int>::harder(int)" \
|
||||
+ {"int GDB<char>::even_harder<int>(char)"} \
|
||||
+ "GDB<int>::simple()"]
|
||||
+
|
||||
+foreach sym $min_syms {
|
||||
+ if {[gdb_breakpoint $sym]} {
|
||||
+ pass "setting breakpoint at $sym"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
@ -1,153 +0,0 @@
|
||||
http://sourceware.org/ml/archer/2011-q1/msg00024.html
|
||||
Subject: [patch] Fix RH BZ 672235
|
||||
|
||||
|
||||
Bug:
|
||||
|
||||
http://bugzilla.redhat.com/show_bug.cgi?id=672235
|
||||
|
||||
The latter half of this bug was caused by removing the value function
|
||||
from gdb.Symbol. This happened quite some time ago, so I am a little
|
||||
surprised it took this long to surface.
|
||||
|
||||
The old Symbol.value function never returned anything except a gdb.Block
|
||||
if the symbol happened to represent a function a block. Anything else
|
||||
raised an error. Way back when, I removed this function as it was an
|
||||
obvious stub, and it was superseded by frame.read_var() which is a more
|
||||
accurate method of determining the value of a symbol.
|
||||
|
||||
Wind forward to today, and it turns out one of the unported
|
||||
archer-tromey-python scripts we ship in Fedora relies on this (symbol ->
|
||||
block) API. I thought about ways of trying to fix this. I thought about
|
||||
just changing FrameWrapper to just take a block instead of a symbol
|
||||
representing a function. But FrameWrapper has an API that we shipped.
|
||||
I tried to find the block through the existing API, but that did not
|
||||
work too well. The gdb.Block method block_for_pc can return a block
|
||||
from a pc but this just turned out to be expensive and convoluted. I
|
||||
eventually just elected to add a block() function to gdb.Symbol which,
|
||||
if the symbol represented a method or a function, would return the block.
|
||||
Yet I am still not entirely satisfied. It seems weird to ask the user
|
||||
to retrieve symbol value from frame.read_var for most symbols, but in
|
||||
the case of a function or method, use block(). I tried to use read_var
|
||||
for this, but it returns a gdb.Value, and I could not figure out a way to
|
||||
transform a gdb.Value to a gdb.Block.
|
||||
|
||||
Before I submit this for upstream review I'd like to see if anyone has
|
||||
any comments.
|
||||
|
||||
Cheers
|
||||
|
||||
Phil
|
||||
|
||||
--
|
||||
|
||||
Index: gdb-7.2.50.20110305/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/doc/gdb.texinfo 2011-03-05 08:27:09.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/doc/gdb.texinfo 2011-03-05 08:28:33.000000000 +0100
|
||||
@@ -22919,6 +22919,13 @@ The result is a @code{gdb.Symbol} object
|
||||
is not found.
|
||||
@end defun
|
||||
|
||||
+A @code{gdb.Symbol} object has the following methods:
|
||||
+
|
||||
+@defmethod Symbol block
|
||||
+Returns a @code{gdb.Block} object if the symbol is a function or a
|
||||
+method. @xref{Blocks In Python}.
|
||||
+@end defmethod
|
||||
+
|
||||
A @code{gdb.Symbol} object has the following attributes:
|
||||
|
||||
@table @code
|
||||
Index: gdb-7.2.50.20110305/gdb/python/lib/gdb/FrameWrapper.py
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/python/lib/gdb/FrameWrapper.py 2011-03-05 08:26:12.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/python/lib/gdb/FrameWrapper.py 2011-03-05 08:27:22.000000000 +0100
|
||||
@@ -46,7 +46,7 @@ class FrameWrapper:
|
||||
return
|
||||
|
||||
first = True
|
||||
- block = func.value
|
||||
+ block = func.block ()
|
||||
|
||||
for sym in block:
|
||||
if sym.is_argument:
|
||||
@@ -60,7 +60,7 @@ class FrameWrapper:
|
||||
return
|
||||
|
||||
first = True
|
||||
- block = func.value
|
||||
+ block = func.block ()
|
||||
|
||||
for sym in block:
|
||||
if not sym.is_argument:
|
||||
Index: gdb-7.2.50.20110305/gdb/python/py-symbol.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/python/py-symbol.c 2011-02-26 03:07:09.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/python/py-symbol.c 2011-03-05 08:27:22.000000000 +0100
|
||||
@@ -167,6 +167,27 @@ sympy_is_variable (PyObject *self, void
|
||||
|| class == LOC_OPTIMIZED_OUT));
|
||||
}
|
||||
|
||||
+static PyObject *
|
||||
+sympy_get_block (PyObject *self, PyObject *args)
|
||||
+{
|
||||
+ struct symbol *symbol = NULL;
|
||||
+
|
||||
+ SYMPY_REQUIRE_VALID (self, symbol);
|
||||
+
|
||||
+ if (SYMBOL_CLASS (symbol) == LOC_BLOCK)
|
||||
+ {
|
||||
+ struct symtab *symt = SYMBOL_SYMTAB (symbol);
|
||||
+
|
||||
+ return block_to_block_object (SYMBOL_BLOCK_VALUE (symbol),
|
||||
+ symt->objfile);
|
||||
+ }
|
||||
+ else
|
||||
+ PyErr_SetString (PyExc_RuntimeError,
|
||||
+ _("Symbol is not a block class."));
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* Given a symbol, and a symbol_object that has previously been
|
||||
allocated and initialized, populate the symbol_object with the
|
||||
struct symbol data. Also, register the symbol_object life-cycle
|
||||
@@ -396,6 +417,13 @@ gdbpy_initialize_symbols (void)
|
||||
|
||||
|
||||
|
||||
+static PyMethodDef symbol_object_methods[] = {
|
||||
+ { "block", sympy_get_block, METH_NOARGS,
|
||||
+ "block () -> gdb.Block.\n\
|
||||
+Return the block of this symbol, if the symbol represents a function." },
|
||||
+ {NULL} /* Sentinel */
|
||||
+};
|
||||
+
|
||||
static PyGetSetDef symbol_object_getset[] = {
|
||||
{ "symtab", sympy_get_symtab, NULL,
|
||||
"Symbol table in which the symbol appears.", NULL },
|
||||
@@ -449,7 +477,7 @@ PyTypeObject symbol_object_type = {
|
||||
0, /*tp_weaklistoffset */
|
||||
0, /*tp_iter */
|
||||
0, /*tp_iternext */
|
||||
- 0, /*tp_methods */
|
||||
+ symbol_object_methods, /*tp_methods */
|
||||
0, /*tp_members */
|
||||
symbol_object_getset /*tp_getset */
|
||||
};
|
||||
Index: gdb-7.2.50.20110305/gdb/testsuite/gdb.python/py-symbol.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110305.orig/gdb/testsuite/gdb.python/py-symbol.exp 2011-02-22 23:48:12.000000000 +0100
|
||||
+++ gdb-7.2.50.20110305/gdb/testsuite/gdb.python/py-symbol.exp 2011-03-05 08:27:22.000000000 +0100
|
||||
@@ -76,6 +76,10 @@ gdb_test "python print func.print_name"
|
||||
gdb_test "python print func.linkage_name" "func" "Test func.linkage_name"
|
||||
gdb_test "python print func.addr_class == gdb.SYMBOL_LOC_BLOCK" "True" "Test func.addr_class"
|
||||
|
||||
+# Test block() method
|
||||
+gdb_py_test_silent_cmd "python func = frame.block().function" "Get block" 0
|
||||
+gdb_test "python print func.block().function.name" "func" "Test block method"
|
||||
+
|
||||
gdb_breakpoint [gdb_get_line_number "Break at end."]
|
||||
gdb_continue_to_breakpoint "Break at end."
|
||||
gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
|
59
gdb-stap-warnings.patch
Executable file
59
gdb-stap-warnings.patch
Executable file
@ -0,0 +1,59 @@
|
||||
http://sourceware.org/ml/archer/2011-q1/msg00136.html
|
||||
Subject: archer-sergiodj-stap -O2 -Wall warnings=errors
|
||||
|
||||
Hi Sergio,
|
||||
|
||||
with -O2 (+some -Wall or so options possibly - what applies for Fedora builds)
|
||||
one gets:
|
||||
|
||||
gcc-4.6.0-0.14.fc15.x86_64
|
||||
stap-probe.c: In function $B!F(Bstap_fetch_reg_value$B!G(B:
|
||||
stap-probe.c:923:12: error: $B!F(Baop$B!G(B may be used uninitialized in this function [-Werror=uninitialized]
|
||||
stap-probe.c:919:10: error: $B!F(Bret$B!G(B may be used uninitialized in this function [-Werror=uninitialized]
|
||||
stap-probe.c: In function $B!F(Bstap_evaluate_conditionally$B!G(B:
|
||||
stap-probe.c:1184:3: error: $B!F(Bres$B!G(B may be used uninitialized in this function [-Werror=uninitialized]
|
||||
|
||||
The attached patch needs a review, I have only briefly checked it is not
|
||||
completely bogus.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
--- a/gdb/stap-probe.c
|
||||
+++ b/gdb/stap-probe.c
|
||||
@@ -780,7 +780,9 @@ stap_fetch_reg_value (struct stap_evaluation_info *eval_info,
|
||||
#define REG_NAME_MAX_SIZE 20
|
||||
char regname[REG_NAME_MAX_SIZE + 1];
|
||||
int len, regnum, indirect_p = 0;
|
||||
- struct value *ret;
|
||||
+ /* GCC false warning: $B!F(Bret$B!G(B may be used uninitialized in this function
|
||||
+ */
|
||||
+ struct value *ret = NULL;
|
||||
|
||||
/* The function which called us did not check if the expression
|
||||
buffer was empty. */
|
||||
@@ -851,7 +853,9 @@ stap_fetch_reg_value (struct stap_evaluation_info *eval_info,
|
||||
if (indirect_p)
|
||||
{
|
||||
struct type *t = NULL;
|
||||
- enum agent_op aop;
|
||||
+ /* GCC false warning: $B!F(Baop$B!G(B may be used uninitialized in this function.
|
||||
+ */
|
||||
+ enum agent_op aop = 0;
|
||||
|
||||
/* If the user has specified that the register must be indirected,
|
||||
we should know what's the correct type to cast it before making
|
||||
@@ -949,7 +953,9 @@ stap_evaluate_single_operand (struct stap_evaluation_info *eval_info)
|
||||
struct gdbarch *gdbarch = eval_info->gdbarch;
|
||||
struct frame_info *frame = eval_info->frame;
|
||||
enum stap_arg_bitness bitness = eval_info->bitness;
|
||||
- struct value *res;
|
||||
+ /* GCC false warning: $B!F(Bres$B!G(B may be used uninitialized in this function
|
||||
+ */
|
||||
+ struct value *res = NULL;
|
||||
|
||||
switch (*eval_info->exp_buf)
|
||||
{
|
||||
|
@ -1,66 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-cvs/2011-03/msg00077.html
|
||||
|
||||
### src/gdb/gdbserver/ChangeLog 2011/03/04 06:31:54 1.463
|
||||
### src/gdb/gdbserver/ChangeLog 2011/03/05 03:45:26 1.464
|
||||
## -1,3 +1,10 @@
|
||||
+2011-03-05 Yao Qi <yao@codesourcery.com>
|
||||
+
|
||||
+ * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
|
||||
+ (subdir_do): New make target. Copied from gdb/Makefile.
|
||||
+ (maintainer-clean, realclean, distclean, clean): Call corresponding
|
||||
+ make targets in common/Makefile.
|
||||
+
|
||||
2011-03-04 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* Makefile.in: Remove GNU make feature --directory.
|
||||
--- src/gdb/gdbserver/Makefile.in 2011/03/04 06:31:54 1.104
|
||||
+++ src/gdb/gdbserver/Makefile.in 2011/03/05 03:45:26 1.105
|
||||
@@ -136,6 +136,9 @@
|
||||
LIBCOMMON = $(LIBCOMMON_DIR)/libcommon.a
|
||||
LIBCOMMON_SRC = $(srcdir)/$(LIBCOMMON_DIR)
|
||||
|
||||
+CLEANDIRS = $(LIBCOMMON_DIR)
|
||||
+REQUIRED_SUBDIRS = $(LIBCOMMON_DIR)
|
||||
+
|
||||
SOURCES = $(SFILES)
|
||||
TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
|
||||
|
||||
@@ -291,6 +294,7 @@
|
||||
tags: TAGS
|
||||
|
||||
clean:
|
||||
+ @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
|
||||
rm -f *.o ${ADD_FILES} *~
|
||||
rm -f version.c
|
||||
rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log
|
||||
@@ -314,6 +318,7 @@
|
||||
rm -f i386-mmx.c i386-mmx-linux.c
|
||||
|
||||
maintainer-clean realclean distclean: clean
|
||||
+ @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(CLEANDIRS)" subdir_do
|
||||
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
|
||||
rm -f Makefile
|
||||
|
||||
@@ -321,6 +326,22 @@
|
||||
stamp-h: config.in config.status
|
||||
CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
|
||||
|
||||
+subdir_do: force
|
||||
+ @for i in $(DODIRS); do \
|
||||
+ case $$i in \
|
||||
+ $(REQUIRED_SUBDIRS)) \
|
||||
+ if [ ! -f ./$$i/Makefile ] ; then \
|
||||
+ echo "Missing $$i/Makefile" >&2 ; \
|
||||
+ exit 1 ; \
|
||||
+ fi ;; \
|
||||
+ esac ; \
|
||||
+ if [ -f ./$$i/Makefile ] ; then \
|
||||
+ if (cd ./$$i; \
|
||||
+ $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
|
||||
+ else exit 1 ; fi ; \
|
||||
+ else true ; fi ; \
|
||||
+ done
|
||||
+
|
||||
Makefile: Makefile.in config.status
|
||||
CONFIG_HEADERS="" $(SHELL) ./config.status
|
||||
|
35
gdb.spec
35
gdb.spec
@ -23,11 +23,11 @@ Name: gdb%{?_with_debug:-debug}
|
||||
# Set version to contents of gdb/version.in.
|
||||
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
|
||||
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
|
||||
Version: 7.2.50.20110305
|
||||
Version: 7.2.50.20110320
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 28%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 29%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
||||
Group: Development/Debuggers
|
||||
@ -264,7 +264,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
# Backported fixups post the source tarball.
|
||||
#Xdrop: Just backports.
|
||||
Patch232: gdb-upstream.patch
|
||||
#Patch232: gdb-upstream.patch
|
||||
|
||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
#=fedoratest+ppc
|
||||
@ -549,18 +549,15 @@ Patch555: gdb-gcc46-typedef.patch
|
||||
# =push
|
||||
Patch556: gdb-gcc46-stdarg-prologue.patch
|
||||
|
||||
# Fix Python new-backtrace command (BZ 672235, Phil Muldoon).
|
||||
# =push
|
||||
Patch557: gdb-python-newbacktrace.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
Patch565: gdb-physname-pr11734-1of2.patch
|
||||
Patch566: gdb-physname-pr11734-2of2.patch
|
||||
Patch567: gdb-physname-pr12273.patch
|
||||
|
||||
# Fix attach/core-load of {,un}prelinked i386 libs (bugreport by Michal Toman).
|
||||
Patch571: gdb-prelink-rela.patch
|
||||
|
||||
# [stap] Fix -O2 warnings.
|
||||
Patch576: gdb-stap-warnings.patch
|
||||
|
||||
# Fix Ada support crash on uninitialized gdbarch.
|
||||
Patch577: gdb-ada-gdbarch-crash.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
Requires: readline%{?_isa}
|
||||
BuildRequires: readline-devel%{?_isa}
|
||||
@ -717,7 +714,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
|
||||
%if 0%{!?_with_upstream:1}
|
||||
|
||||
%patch232 -p1
|
||||
#patch232 -p1
|
||||
%patch349 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
@ -828,11 +825,9 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch554 -p1
|
||||
%patch555 -p1
|
||||
%patch556 -p1
|
||||
%patch557 -p1
|
||||
%patch565 -p1
|
||||
%patch566 -p1
|
||||
%patch567 -p1
|
||||
%patch571 -p1
|
||||
%patch576 -p1
|
||||
%patch577 -p1
|
||||
|
||||
%patch390 -p1
|
||||
%patch393 -p1
|
||||
@ -1258,6 +1253,12 @@ fi
|
||||
%{_infodir}/gdb.info*
|
||||
|
||||
%changelog
|
||||
* Sun Mar 20 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110320-29.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110320 (which is a 7.3 pre-release).
|
||||
- Merge archer-sergiodj-stap, the SystemTap probes breakpoints feature.
|
||||
- [stap] Fix -O2 warnings.
|
||||
- Fix Ada support crash on uninitialized gdbarch.
|
||||
|
||||
* Sat Mar 5 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110305-28.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110305 (which is a 7.3 pre-release).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user