Accepting request 78265 from devel:gcc
- Merge from gdb-7.3-41.fc15.src.rpm. [fate#310741] * Tue Jul 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3-41.fc15 - Rebase to the final FSF GDB 7.3 release. - Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471). * Sun Jul 3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15 - Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release). - Adjust the `print errno' patch due to the DW_AT_linkage_name following again. * Fri Jun 24 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-39.fc15 - Fix install-info for the gdb-doc subpackage (BZ 715228). - Merge from gdb-7.2.90.20110525-38.fc15.src.rpm. [fate#310741] * Wed May 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-38.fc15 - Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release). - [stap] Fix double free (Sergio Durigan Junior). * Tue May 3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-37.fc15 - Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377). - Merge from gdb-7.2.90.20110429-36.fc15.src.rpm. * Mon May 2 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-36.fc15 - Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131). - Use --without-system-readline, disable Requires and BuildRequires of readline. - Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch. * Fri Apr 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-35.fc15 - Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release). - Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253). - Fix case insensitive symbols for Fortran by iFort (BZ 645773). OBS-URL: https://build.opensuse.org/request/show/78265 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=85
This commit is contained in:
parent
406af14c2a
commit
ab51a8efb0
@ -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
|
||||
|
@ -11,10 +11,10 @@
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/doc/gdb.texinfo
|
||||
Index: gdb-7.2.90.20110411/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/doc/gdb.texinfo 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/doc/gdb.texinfo 2011-01-17 15:50:41.000000000 +0100
|
||||
--- gdb-7.2.90.20110411.orig/gdb/doc/gdb.texinfo 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/doc/gdb.texinfo 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -1007,6 +1007,12 @@ Read each symbol file's entire symbol ta
|
||||
the default, which is to read it incrementally as it is needed.
|
||||
This makes startup slower, but makes future operations faster.
|
||||
@ -28,11 +28,11 @@ Index: gdb-7.2.50.20110117/gdb/doc/gdb.texinfo
|
||||
@end table
|
||||
|
||||
@node Mode Options
|
||||
Index: gdb-7.2.50.20110117/gdb/main.c
|
||||
Index: gdb-7.2.90.20110411/gdb/main.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/main.c 2011-01-17 15:50:21.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/main.c 2011-01-17 15:50:41.000000000 +0100
|
||||
@@ -395,6 +395,7 @@ captured_main (void *data)
|
||||
--- gdb-7.2.90.20110411.orig/gdb/main.c 2011-04-11 19:11:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/main.c 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -398,6 +398,7 @@ captured_main (void *data)
|
||||
{"xdb", no_argument, &xdb_commands, 1},
|
||||
{"dbx", no_argument, &dbx_commands, 1},
|
||||
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||
@ -40,7 +40,7 @@ Index: gdb-7.2.50.20110117/gdb/main.c
|
||||
{"r", no_argument, &readnow_symbol_files, 1},
|
||||
{"quiet", no_argument, &quiet, 1},
|
||||
{"q", no_argument, &quiet, 1},
|
||||
@@ -1061,6 +1062,7 @@ Options:\n\n\
|
||||
@@ -1064,6 +1065,7 @@ Options:\n\n\
|
||||
fputs_unfiltered (_("\
|
||||
--quiet Do not print version number on startup.\n\
|
||||
--readnow Fully read symbol files on first access.\n\
|
||||
@ -48,10 +48,10 @@ Index: gdb-7.2.50.20110117/gdb/main.c
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||
Index: gdb-7.2.50.20110117/gdb/symfile.c
|
||||
Index: gdb-7.2.90.20110411/gdb/symfile.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/symfile.c 2011-01-11 22:53:24.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/symfile.c 2011-01-17 15:50:53.000000000 +0100
|
||||
--- gdb-7.2.90.20110411.orig/gdb/symfile.c 2011-03-23 19:23:55.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/symfile.c 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
|
||||
|
||||
/* Global variables owned by this file. */
|
||||
@ -60,19 +60,19 @@ Index: gdb-7.2.50.20110117/gdb/symfile.c
|
||||
|
||||
/* External variables and functions referenced. */
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
Index: gdb-7.2.90.20110411/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/dwarf2read.c 2011-01-17 15:50:41.000000000 +0100
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "vec.h"
|
||||
--- gdb-7.2.90.20110411.orig/gdb/dwarf2read.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/dwarf2read.c 2011-04-11 19:16:01.000000000 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "c-lang.h"
|
||||
#include "valprint.h"
|
||||
#include <ctype.h>
|
||||
+#include "top.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "gdb_string.h"
|
||||
@@ -1350,8 +1351,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
@@ -1351,8 +1352,9 @@ dwarf2_has_info (struct objfile *objfile
|
||||
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
|
||||
dwarf2_per_objfile->objfile = objfile;
|
||||
}
|
||||
@ -84,10 +84,10 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
}
|
||||
|
||||
/* When loading sections, we can either look for ".<name>", or for
|
||||
Index: gdb-7.2.50.20110117/gdb/top.h
|
||||
Index: gdb-7.2.90.20110411/gdb/top.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/top.h 2011-01-01 16:33:18.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/top.h 2011-01-17 15:50:41.000000000 +0100
|
||||
--- gdb-7.2.90.20110411.orig/gdb/top.h 2011-01-01 16:33:18.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/top.h 2011-04-11 19:15:51.000000000 +0200
|
||||
@@ -61,6 +61,7 @@ extern void set_prompt (char *);
|
||||
|
||||
/* From random places. */
|
||||
|
@ -1,40 +1,40 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/configure.ac
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/configure.ac 2011-01-05 06:09:55.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/configure.ac 2011-01-17 15:50:03.000000000 +0100
|
||||
@@ -144,6 +144,6 @@ AC_OUTPUT([Makefile \
|
||||
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
|
||||
gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile \
|
||||
--- 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 \
|
||||
gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \
|
||||
- gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
|
||||
+ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile \
|
||||
gdb.python/Makefile gdb.reverse/Makefile \
|
||||
gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \
|
||||
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/configure
|
||||
Index: gdb-7.2.50.20110320/gdb/testsuite/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/configure 2011-01-07 03:51:09.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/configure 2011-01-17 15:50:09.000000000 +0100
|
||||
@@ -3515,7 +3515,7 @@ done
|
||||
--- 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
|
||||
|
||||
|
||||
|
||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
-ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
|
||||
+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cell/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.hp/Makefile gdb.hp/gdb.objdbg/Makefile gdb.hp/gdb.base-hp/Makefile gdb.hp/gdb.aCC/Makefile gdb.hp/gdb.compat/Makefile gdb.hp/gdb.defects/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile 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"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -4233,6 +4233,7 @@ do
|
||||
@@ -4173,6 +4173,7 @@ do
|
||||
"gdb.opencl/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opencl/Makefile" ;;
|
||||
"gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
|
||||
"gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
|
||||
+ "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;;
|
||||
"gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
|
||||
"gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;;
|
||||
"gdb.threads/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.pie/attach.c
|
||||
"gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;;
|
||||
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.20110117/gdb/testsuite/gdb.pie/attach.c 2011-01-17 15:50:03.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.20110117/gdb/testsuite/gdb.pie/attach.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/attach2.c 2011-01-17 15:50:03.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.20110117/gdb/testsuite/gdb.pie/attach2.c
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/break.c 2011-01-17 15:50:03.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.20110117/gdb/testsuite/gdb.pie/break.c
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/break1.c 2011-01-17 15:50:03.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.20110117/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.20110117/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.20110117/gdb/testsuite/gdb.pie/coremaker.c 2011-01-17 15:50:03.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.20110117/gdb/testsuite/gdb.pie/coremaker.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/attach.exp 2011-01-17 15:50:03.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.20110117/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.20110117/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.20110117/gdb/testsuite/gdb.pie/attach.exp
|
||||
+do_call_attach_tests
|
||||
+
|
||||
+return 0
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/break.exp 2011-01-17 15:50:03.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.20110117/gdb/testsuite/gdb.pie/break.exp
|
||||
+ send_gdb "set args main\n"
|
||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||
+}
|
||||
Index: gdb-7.2.50.20110117/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.20110117/gdb/testsuite/gdb.pie/corefile.exp 2011-01-17 15:50:03.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.20110117/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.20110117/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.20110117/gdb/testsuite/gdb.pie/Makefile.in 2011-01-17 15:50:03.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@
|
||||
|
@ -19,6 +19,8 @@ will get:
|
||||
Attached suggestion patch how to deal with the most common "errno" symbol
|
||||
for the most common under-ggdb3 compiled programs.
|
||||
|
||||
Original patch hooked into target_translate_tls_address. But its inferior
|
||||
call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||
|
||||
|
||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
@ -30,114 +32,21 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/gdbtypes.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/gdbtypes.c 2010-11-16 07:53:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/gdbtypes.c 2010-11-16 08:01:33.000000000 +0100
|
||||
@@ -4262,6 +4262,9 @@ gdbtypes_post_init (struct gdbarch *gdba
|
||||
= arch_type (gdbarch, TYPE_CODE_INTERNAL_FUNCTION, 0,
|
||||
"<internal function>");
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -967,6 +967,8 @@ print_command_1 (char *exp, int inspect, int voidprint)
|
||||
|
||||
+ builtin_type->nodebug_text_symbol_errno_location
|
||||
+ = lookup_function_type (lookup_pointer_type (builtin_type->builtin_int));
|
||||
+
|
||||
return builtin_type;
|
||||
}
|
||||
|
||||
Index: gdb-7.2.50.20101116/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/gdbtypes.h 2010-11-16 07:53:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/gdbtypes.h 2010-11-16 08:01:33.000000000 +0100
|
||||
@@ -1294,6 +1294,8 @@ struct builtin_type
|
||||
|
||||
/* This type is used to represent a GDB internal function. */
|
||||
struct type *internal_fn;
|
||||
+
|
||||
+ struct type *nodebug_text_symbol_errno_location;
|
||||
};
|
||||
|
||||
/* Return the type table for the specified architecture. */
|
||||
Index: gdb-7.2.50.20101116/gdb/parse.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/parse.c 2010-11-16 07:53:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/parse.c 2010-11-16 08:01:33.000000000 +0100
|
||||
@@ -530,7 +530,11 @@ write_exp_msymbol (struct minimal_symbol
|
||||
case mst_text:
|
||||
case mst_file_text:
|
||||
case mst_solib_trampoline:
|
||||
- write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
|
||||
+ if (builtin_type (gdbarch)->nodebug_text_symbol_errno_location != NULL
|
||||
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol), "__errno_location") == 0)
|
||||
+ write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol_errno_location);
|
||||
+ else
|
||||
+ write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
|
||||
break;
|
||||
|
||||
case mst_text_gnu_ifunc:
|
||||
Index: gdb-7.2.50.20101116/gdb/target.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101116.orig/gdb/target.c 2010-11-16 08:00:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20101116/gdb/target.c 2010-11-16 08:01:52.000000000 +0100
|
||||
@@ -1067,6 +1067,25 @@ target_is_pushed (struct target_ops *t)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+resolve_errno (void *arg)
|
||||
+{
|
||||
+ CORE_ADDR *arg_addr = arg;
|
||||
+ struct expression *expr;
|
||||
+ struct cleanup *old_chain = 0;
|
||||
+ struct value *val;
|
||||
+
|
||||
+ expr = parse_expression ("__errno_location()");
|
||||
+ old_chain = make_cleanup (free_current_contents, &expr);
|
||||
+ val = evaluate_expression (expr);
|
||||
+ *arg_addr = value_as_address (val);
|
||||
+ release_value (val);
|
||||
+ value_free (val);
|
||||
+ do_cleanups (old_chain);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/* Using the objfile specified in OBJFILE, find the address for the
|
||||
current thread's thread-local storage with offset OFFSET. */
|
||||
CORE_ADDR
|
||||
@@ -1157,7 +1176,28 @@ target_translate_tls_address (struct obj
|
||||
/* It wouldn't be wrong here to try a gdbarch method, too; finding
|
||||
TLS is an ABI-specific thing. But we don't do that yet. */
|
||||
else
|
||||
- error (_("Cannot find thread-local variables on this target"));
|
||||
+ {
|
||||
+ struct minimal_symbol *msymbol;
|
||||
+
|
||||
+ msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
|
||||
+ if (msymbol != NULL
|
||||
+ && SYMBOL_VALUE_ADDRESS (msymbol) == offset
|
||||
+ && (SYMBOL_OBJ_SECTION (msymbol)->objfile == objfile
|
||||
+ || (objfile->separate_debug_objfile != NULL
|
||||
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
|
||||
+ == objfile->separate_debug_objfile)
|
||||
+ || (objfile->separate_debug_objfile_backlink != NULL
|
||||
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
|
||||
+ == objfile->separate_debug_objfile_backlink)))
|
||||
+ {
|
||||
+ if (!catch_errors (resolve_errno, (void *) &addr, "",
|
||||
+ RETURN_MASK_ALL))
|
||||
+ error (_("TLS symbol `errno' not resolved for non-TLS program."
|
||||
+ " You should compile the program with `gcc -pthread'."));
|
||||
+ }
|
||||
+ else
|
||||
+ error (_("Cannot find thread-local variables on this target"));
|
||||
+ }
|
||||
|
||||
return addr;
|
||||
}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
if (exp && *exp)
|
||||
{
|
||||
+ if (strcmp (exp, "errno") == 0)
|
||||
+ exp = "*((int *(*) (void)) __errno_location) ()";
|
||||
expr = parse_expression (exp);
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
cleanup = 1;
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2010-11-16 08:01:33.000000000 +0100
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2011-03-29 10:55:35.000000000 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
@ -167,10 +76,10 @@ Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
+
|
||||
+ return 0; /* breakpoint */
|
||||
+}
|
||||
Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20101116/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2010-11-16 08:01:33.000000000 +0100
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2011-03-29 10:55:35.000000000 +0200
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
|
@ -1,165 +0,0 @@
|
||||
Fix Valgrind paste of >= 256 * (screen width) characters (as 130001).
|
||||
|
||||
Invalid write of size 4
|
||||
at 0x8203BD9: rl_redisplay (display.c:812)
|
||||
by 0x81F5130: _rl_internal_char_cleanup (readline.c:427)
|
||||
by 0x81F52B3: readline_internal_char (readline.c:508)
|
||||
by 0x8209817: rl_callback_read_char (callback.c:184)
|
||||
by 0x8135312: rl_callback_read_char_wrapper (event-top.c:179)
|
||||
by 0x8135B7B: stdin_event_handler (event-top.c:432)
|
||||
by 0x81349F2: handle_file_event (event-loop.c:730)
|
||||
by 0x81342AB: process_event (event-loop.c:343)
|
||||
by 0x81342F4: gdb_do_one_event (event-loop.c:380)
|
||||
by 0x81313AC: catch_errors (exceptions.c:515)
|
||||
by 0x80CE8CA: tui_command_loop (tui-interp.c:151)
|
||||
by 0x81318B9: current_interp_command_loop (interps.c:278)
|
||||
Address 0x43DCEB8 is 0 bytes after a block of size 1,024 alloc'd
|
||||
at 0x4005400: malloc (vg_replace_malloc.c:149)
|
||||
by 0x8087084: xmalloc (utils.c:959)
|
||||
by 0x8202CA7: init_line_structures (display.c:440)
|
||||
by 0x8202D14: rl_redisplay (display.c:471)
|
||||
by 0x81F4F53: readline_internal_setup (readline.c:363)
|
||||
by 0x820958C: _rl_callback_newline (callback.c:89)
|
||||
by 0x82095BB: rl_callback_handler_install (callback.c:101)
|
||||
by 0x80CE896: tui_command_loop (tui-interp.c:138)
|
||||
by 0x81318B9: current_interp_command_loop (interps.c:278)
|
||||
by 0x807E69A: captured_command_loop (main.c:101)
|
||||
by 0x81313AC: catch_errors (exceptions.c:515)
|
||||
by 0x807F55A: captured_main (main.c:826)
|
||||
|
||||
|
||||
2006-11-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* readline/display.c (line_state, line_state_array, line_state_visible,
|
||||
line_state_invisible): Encapsulate _rl_wrapped_line, inv_lbreaks,
|
||||
inv_lbsize, vis_lbreaks, vis_lbsize, visible_line, invisible_line.
|
||||
(init_line_structures): Initialize both _rl_wrapped_line ones now.
|
||||
(rl_redisplay): Fix _rl_wrapped_line handling by using its own size.
|
||||
Swap whole `line_state_visible' / `line_state_invisible' structures.
|
||||
(update_line): Update for new `_rl_wrapped_line'.
|
||||
|
||||
|
||||
Index: ./readline/display.c
|
||||
===================================================================
|
||||
--- ./readline/display.c 5 May 2006 18:26:12 -0000 1.11
|
||||
+++ ./readline/display.c 8 Nov 2006 18:23:33 -0000
|
||||
@@ -73,15 +73,31 @@ static void delete_chars PARAMS((int));
|
||||
static void insert_some_chars PARAMS((char *, int, int));
|
||||
static void cr PARAMS((void));
|
||||
|
||||
+struct line_state
|
||||
+ {
|
||||
+ char *line;
|
||||
+ int *lbreaks;
|
||||
+ int lbreaks_size;
|
||||
+#if defined (HANDLE_MULTIBYTE)
|
||||
+ int *wrapped_line;
|
||||
+ int wrapped_line_size;
|
||||
+#endif
|
||||
+ };
|
||||
+static struct line_state line_state_array[2];
|
||||
+static struct line_state *line_state_visible = &line_state_array[0];
|
||||
+static struct line_state *line_state_invisible = &line_state_array[1];
|
||||
+
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
static int _rl_col_width PARAMS((const char *, int, int));
|
||||
-static int *_rl_wrapped_line;
|
||||
#else
|
||||
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
|
||||
#endif
|
||||
|
||||
-static int *inv_lbreaks, *vis_lbreaks;
|
||||
-static int inv_lbsize, vis_lbsize;
|
||||
+/* FIXME: Backward compatible naming. */
|
||||
+#define inv_lbreaks (line_state_invisible->lbreaks)
|
||||
+#define inv_lbsize (line_state_invisible->lbreaks_size)
|
||||
+#define vis_lbreaks (line_state_visible->lbreaks)
|
||||
+#define vis_lbsize (line_state_visible->lbreaks_size)
|
||||
|
||||
/* Heuristic used to decide whether it is faster to move from CUR to NEW
|
||||
by backing up or outputting a carriage return and moving forward. */
|
||||
@@ -150,8 +166,9 @@ static int last_lmargin;
|
||||
|
||||
/* The line display buffers. One is the line currently displayed on
|
||||
the screen. The other is the line about to be displayed. */
|
||||
-static char *visible_line = (char *)NULL;
|
||||
-static char *invisible_line = (char *)NULL;
|
||||
+/* FIXME: Backward compatible naming. */
|
||||
+#define visible_line (line_state_visible->line)
|
||||
+#define invisible_line (line_state_invisible->line)
|
||||
|
||||
/* A buffer for `modeline' messages. */
|
||||
static char msg_buf[128];
|
||||
@@ -437,7 +454,10 @@ init_line_structures (minsize)
|
||||
inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
|
||||
vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
- _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int));
|
||||
+ line_state_visible->wrapped_line_size = vis_lbsize;
|
||||
+ line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wrapped_line_size * sizeof (int));
|
||||
+ line_state_invisible->wrapped_line_size = inv_lbsize;
|
||||
+ line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wrapped_line_size * sizeof (int));
|
||||
#endif
|
||||
inv_lbreaks[0] = vis_lbreaks[0] = 0;
|
||||
}
|
||||
@@ -572,10 +592,15 @@ rl_redisplay ()
|
||||
{ \
|
||||
inv_lbsize *= 2; \
|
||||
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
|
||||
- _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
|
||||
} \
|
||||
inv_lbreaks[++newlines] = out; \
|
||||
- _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \
|
||||
+ if (newlines >= (line_state_invisible->wrapped_line_size - 1)) \
|
||||
+ { \
|
||||
+ line_state_invisible->wrapped_line_size *= 2; \
|
||||
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, \
|
||||
+ line_state_invisible->wrapped_line_size * sizeof (int)); \
|
||||
+ } \
|
||||
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \
|
||||
lpos = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -605,7 +630,7 @@ rl_redisplay ()
|
||||
#endif
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
- memset (_rl_wrapped_line, 0, vis_lbsize);
|
||||
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wrapped_line_size * sizeof (int));
|
||||
num = 0;
|
||||
#endif
|
||||
|
||||
@@ -1118,17 +1143,10 @@ rl_redisplay ()
|
||||
|
||||
/* Swap visible and non-visible lines. */
|
||||
{
|
||||
- char *vtemp = visible_line;
|
||||
- int *itemp = vis_lbreaks, ntemp = vis_lbsize;
|
||||
-
|
||||
- visible_line = invisible_line;
|
||||
- invisible_line = vtemp;
|
||||
-
|
||||
- vis_lbreaks = inv_lbreaks;
|
||||
- inv_lbreaks = itemp;
|
||||
-
|
||||
- vis_lbsize = inv_lbsize;
|
||||
- inv_lbsize = ntemp;
|
||||
+ struct line_state *line_state_temp = line_state_visible;
|
||||
+
|
||||
+ line_state_visible = line_state_invisible;
|
||||
+ line_state_invisible = line_state_temp;
|
||||
|
||||
rl_display_fixed = 0;
|
||||
/* If we are displaying on a single line, and last_lmargin is > 0, we
|
||||
@@ -1194,8 +1212,9 @@ update_line (old, new, current_line, oma
|
||||
/* This fixes only double-column characters, but if the wrapped
|
||||
character comsumes more than three columns, spaces will be
|
||||
inserted in the string buffer. */
|
||||
- if (_rl_wrapped_line[current_line] > 0)
|
||||
- _rl_clear_to_eol (_rl_wrapped_line[current_line]);
|
||||
+ if (current_line < line_state_visible->wrapped_line_size
|
||||
+ && line_state_visible->wrapped_line[current_line] > 0)
|
||||
+ _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
|
||||
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.2.50.20101231/gdb/event-top.c
|
||||
Index: gdb-7.2.90.20110429/gdb/event-top.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/event-top.c 2010-12-29 01:58:14.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/event-top.c 2011-01-01 01:07:37.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/event-top.c 2011-03-16 16:18:58.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/event-top.c 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "cli/cli-script.h" /* for reset_command_nest_depth */
|
||||
#include "main.h"
|
||||
@ -28,19 +28,19 @@ Index: gdb-7.2.50.20101231/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.20101231/gdb/elfread.c
|
||||
Index: gdb-7.2.90.20110429/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/elfread.c 2011-01-01 01:05:01.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/elfread.c 2011-01-01 01:05:10.000000000 +0100
|
||||
@@ -42,6 +42,7 @@
|
||||
--- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:21:22.000000000 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "observer.h"
|
||||
+#include "elf/external.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -1371,8 +1372,361 @@ build_id_to_filename (struct build_id *b
|
||||
@@ -1655,8 +1656,361 @@ build_id_to_filename (struct build_id *b
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ Index: gdb-7.2.50.20101231/gdb/elfread.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -1426,11 +1780,17 @@ missing_filepair_change (void)
|
||||
@@ -1710,11 +2064,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.20101231/gdb/elfread.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -1497,14 +1857,35 @@ debug_print_missing (const char *binary,
|
||||
@@ -1781,14 +2141,35 @@ debug_print_missing (const char *binary,
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -464,11 +464,11 @@ Index: gdb-7.2.50.20101231/gdb/elfread.c
|
||||
}
|
||||
|
||||
static char *
|
||||
Index: gdb-7.2.50.20101231/gdb/symfile.h
|
||||
Index: gdb-7.2.90.20110429/gdb/symfile.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/symfile.h 2011-01-01 01:05:01.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/symfile.h 2011-01-01 01:05:10.000000000 +0100
|
||||
@@ -559,6 +559,8 @@ extern struct build_id *build_id_addr_ge
|
||||
--- gdb-7.2.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -611,6 +611,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.20101231/gdb/symfile.h
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/lib/gdb.exp
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/testsuite/lib/gdb.exp 2011-01-01 01:05:01.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/lib/gdb.exp 2011-01-01 01:05:10.000000000 +0100
|
||||
@@ -1389,7 +1389,7 @@ proc default_gdb_start { } {
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -1381,7 +1381,7 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -490,10 +490,10 @@ Index: gdb-7.2.50.20101231/gdb/testsuite/lib/gdb.exp
|
||||
send_gdb "set build-id-verbose 0\n"
|
||||
gdb_expect 10 {
|
||||
-re "$gdb_prompt $" {
|
||||
Index: gdb-7.2.50.20101231/gdb/testsuite/lib/mi-support.exp
|
||||
Index: gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/testsuite/lib/mi-support.exp 2011-01-01 01:05:01.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/testsuite/lib/mi-support.exp 2011-01-01 01:05:10.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -221,7 +221,7 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
@ -503,11 +503,11 @@ Index: gdb-7.2.50.20101231/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.20101231/gdb/tui/tui-interp.c
|
||||
Index: gdb-7.2.90.20110429/gdb/tui/tui-interp.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/tui/tui-interp.c 2010-05-18 00:21:43.000000000 +0200
|
||||
+++ gdb-7.2.50.20101231/gdb/tui/tui-interp.c 2011-01-01 01:05:10.000000000 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
--- gdb-7.2.90.20110429.orig/gdb/tui/tui-interp.c 2011-01-01 16:33:52.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/tui/tui-interp.c 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "exceptions.h"
|
||||
@ -515,7 +515,7 @@ Index: gdb-7.2.50.20101231/gdb/tui/tui-interp.c
|
||||
|
||||
/* Set to 1 when the TUI mode must be activated when we first start
|
||||
gdb. */
|
||||
@@ -146,6 +147,8 @@ tui_command_loop (void *data)
|
||||
@@ -147,6 +148,8 @@ tui_command_loop (void *data)
|
||||
char *a_prompt;
|
||||
char *gdb_prompt = get_prompt ();
|
||||
|
||||
@ -524,10 +524,10 @@ Index: gdb-7.2.50.20101231/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.20101231/gdb/aclocal.m4
|
||||
Index: gdb-7.2.90.20110429/gdb/aclocal.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/aclocal.m4 2010-05-23 02:56:59.000000000 +0200
|
||||
+++ gdb-7.2.50.20101231/gdb/aclocal.m4 2011-01-01 01:05:10.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/aclocal.m4 2011-02-15 22:05:53.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/aclocal.m4 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -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.20101231/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.20101231/gdb/config.in
|
||||
Index: gdb-7.2.90.20110429/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/config.in 2010-09-02 19:12:35.000000000 +0200
|
||||
+++ gdb-7.2.50.20101231/gdb/config.in 2011-01-01 01:05:10.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/config.in 2011-03-17 14:19:09.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/config.in 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -46,6 +46,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
@ -705,7 +705,7 @@ Index: gdb-7.2.50.20101231/gdb/config.in
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
@@ -232,6 +235,9 @@
|
||||
@@ -233,6 +236,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
@ -715,11 +715,11 @@ Index: gdb-7.2.50.20101231/gdb/config.in
|
||||
/* Define if libunwind library is being used. */
|
||||
#undef HAVE_LIBUNWIND
|
||||
|
||||
Index: gdb-7.2.50.20101231/gdb/configure
|
||||
Index: gdb-7.2.90.20110429/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/configure 2010-12-14 08:17:14.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/configure 2011-01-01 01:08:50.000000000 +0100
|
||||
@@ -680,6 +680,9 @@ REPORT_BUGS_TO
|
||||
--- gdb-7.2.90.20110429.orig/gdb/configure 2011-04-03 18:32:40.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/configure 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -682,6 +682,9 @@ REPORT_BUGS_TO
|
||||
PKGVERSION
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -729,7 +729,7 @@ Index: gdb-7.2.50.20101231/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
am__fastdepCC_FALSE
|
||||
@@ -946,6 +949,7 @@ enable_dependency_tracking
|
||||
@@ -948,6 +951,7 @@ enable_dependency_tracking
|
||||
with_separate_debug_dir
|
||||
with_gdb_datadir
|
||||
with_relocated_sources
|
||||
@ -737,7 +737,7 @@ Index: gdb-7.2.50.20101231/gdb/configure
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbcli
|
||||
@@ -987,6 +991,9 @@ LDFLAGS
|
||||
@@ -989,6 +993,9 @@ LDFLAGS
|
||||
LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
@ -747,7 +747,7 @@ Index: gdb-7.2.50.20101231/gdb/configure
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1650,6 +1657,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.20101231/gdb/configure
|
||||
--with-libunwind use libunwind frame unwinding support
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1685,6 +1694,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.20101231/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.
|
||||
@@ -7882,6 +7894,486 @@ _ACEOF
|
||||
@@ -7884,6 +7896,486 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
@ -1253,10 +1253,10 @@ Index: gdb-7.2.50.20101231/gdb/configure
|
||||
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
Index: gdb-7.2.50.20101231/gdb/configure.ac
|
||||
Index: gdb-7.2.90.20110429/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/configure.ac 2010-12-14 08:17:15.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/configure.ac 2011-01-01 01:08:28.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/configure.ac 2011-04-03 18:32:40.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/configure.ac 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -108,6 +108,199 @@ AS_HELP_STRING([--with-relocated-sources
|
||||
[Relocated directory for source files. ])
|
||||
])
|
||||
@ -1457,10 +1457,10 @@ Index: gdb-7.2.50.20101231/gdb/configure.ac
|
||||
AC_CONFIG_SUBDIRS(testsuite)
|
||||
|
||||
# Check whether to support alternative target configurations
|
||||
Index: gdb-7.2.50.20101231/gdb/acinclude.m4
|
||||
Index: gdb-7.2.90.20110429/gdb/acinclude.m4
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.2.50.20101231/gdb/acinclude.m4 2011-01-01 01:05:10.000000000 +0100
|
||||
--- gdb-7.2.90.20110429.orig/gdb/acinclude.m4 2010-05-27 05:40:45.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/acinclude.m4 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -1,3 +1,5 @@
|
||||
+# serial 1
|
||||
+
|
||||
@ -1476,11 +1476,11 @@ Index: gdb-7.2.50.20101231/gdb/acinclude.m4
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
Index: gdb-7.2.50.20101231/gdb/corelow.c
|
||||
Index: gdb-7.2.90.20110429/gdb/corelow.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20101231.orig/gdb/corelow.c 2011-01-01 01:05:01.000000000 +0100
|
||||
+++ gdb-7.2.50.20101231/gdb/corelow.c 2011-01-01 01:05:10.000000000 +0100
|
||||
@@ -317,7 +317,7 @@ build_id_locate_exec (int from_tty)
|
||||
--- gdb-7.2.90.20110429.orig/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:21:11.000000000 +0200
|
||||
@@ -320,7 +320,7 @@ build_id_locate_exec (int from_tty)
|
||||
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
|
||||
}
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/corelow.c
|
||||
Index: gdb-7.2.90.20110429/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.90.20110429.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/corelow.c 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -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.90.20110429/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.90.20110429.orig/gdb/doc/gdb.texinfo 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/doc/gdb.texinfo 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -15356,6 +15356,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.90.20110429/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.90.20110429.orig/gdb/solib-svr4.c 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/solib-svr4.c 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -1179,9 +1179,49 @@ svr4_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
@ -179,28 +179,26 @@ 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.90.20110429/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"
|
||||
#include "gdbtypes.h"
|
||||
--- gdb-7.2.90.20110429.orig/gdb/elfread.c 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/elfread.c 2011-05-03 05:19:27.000000000 +0200
|
||||
@@ -49,6 +49,11 @@
|
||||
#include "infcall.h"
|
||||
#include "gdbthread.h"
|
||||
#include "regcache.h"
|
||||
+#include "libbfd.h"
|
||||
+#include "gdbcore.h"
|
||||
+#include "gdbcmd.h"
|
||||
+#include "observer.h"
|
||||
+#include <sys/stat.h>
|
||||
|
||||
extern void _initialize_elfread (void);
|
||||
|
||||
@@ -823,16 +827,65 @@ resolve_gnu_ifunc (const char *function_
|
||||
return 0;
|
||||
@@ -1077,16 +1082,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
|
||||
update_breakpoint_locations (b, sals, sals_end);
|
||||
}
|
||||
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
|
||||
+
|
||||
+#define BUILD_ID_VERBOSE_NONE 0
|
||||
+#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
+#define BUILD_ID_VERBOSE_BINARY_PARSE 2
|
||||
@ -220,6 +218,9 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
};
|
||||
|
||||
-/* Locate NT_GNU_BUILD_ID from ABFD and return its content. */
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
|
||||
+
|
||||
+struct build_id *
|
||||
+build_id_buf_get (bfd *templ, gdb_byte *buf, bfd_size_type size)
|
||||
+{
|
||||
@ -262,7 +263,7 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
{
|
||||
struct build_id *retval;
|
||||
|
||||
@@ -848,6 +901,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
@@ -1102,6 +1156,348 @@ build_id_bfd_get (bfd *abfd)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -611,7 +612,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
|
||||
@@ -1116,7 +1512,7 @@ build_id_verify (const char *filename, s
|
||||
if (abfd == NULL)
|
||||
return 0;
|
||||
|
||||
@ -620,7 +621,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
|
||||
@@ -1134,14 +1530,15 @@ build_id_verify (const char *filename, s
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -636,24 +637,69 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
|
||||
- link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
|
||||
- + 2 * build_id->size + (sizeof ".debug" - 1) + 1);
|
||||
+ link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
|
||||
+ + 2 * build_id->size + (sizeof ".debug" - 1) + 1);
|
||||
+ link = xmalloc (strlen (debug_file_directory) + 2 * build_id->size + 50);
|
||||
|
||||
/* 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
|
||||
@@ -1152,6 +1549,8 @@ build_id_to_debug_filename (struct build
|
||||
char *s, *debugdir_end;
|
||||
gdb_byte *data = build_id->data;
|
||||
size_t size = build_id->size;
|
||||
+ unsigned seqno;
|
||||
+ struct stat statbuf_trash;
|
||||
|
||||
while (*debugdir == DIRNAME_SEPARATOR)
|
||||
debugdir++;
|
||||
@@ -1172,39 +1571,242 @@ build_id_to_debug_filename (struct build
|
||||
*s++ = '/';
|
||||
while (size-- > 0)
|
||||
s += sprintf (s, "%02x", (unsigned) *data++);
|
||||
- strcpy (s, ".debug");
|
||||
+ if (add_debug_suffix)
|
||||
+ strcpy (s, ".debug");
|
||||
+ else
|
||||
+ *s = 0;
|
||||
-
|
||||
- /* lrealpath() is expensive even for the usually non-existent files. */
|
||||
- if (access (link, F_OK) == 0)
|
||||
- retval = lrealpath (link);
|
||||
|
||||
/* 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
|
||||
- if (retval != NULL && !build_id_verify (retval, build_id))
|
||||
+ for (seqno = 0;; seqno++)
|
||||
{
|
||||
- xfree (retval);
|
||||
- retval = NULL;
|
||||
+ char *s2;
|
||||
+
|
||||
+ if (seqno)
|
||||
+ {
|
||||
+ /* There can be multiple build-id symlinks pointing to real files
|
||||
+ with the same build-id (such as hard links). Some of the real
|
||||
+ files may not be installed. */
|
||||
+
|
||||
+ s2 = s + sprintf (s, ".%u", seqno);
|
||||
+ }
|
||||
+ else
|
||||
+ s2 = s;
|
||||
+
|
||||
+ if (add_debug_suffix)
|
||||
+ strcpy (s2, ".debug");
|
||||
+ else
|
||||
+ *s2 = 0;
|
||||
+
|
||||
+ /* `access' automatically dereferences LINK. */
|
||||
+ if (lstat (link, &statbuf_trash) != 0)
|
||||
+ {
|
||||
+ /* Stop increasing SEQNO. */
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ retval = lrealpath (link);
|
||||
+
|
||||
+ if (retval != NULL && !build_id_verify (retval, build_id))
|
||||
+ {
|
||||
+ xfree (retval);
|
||||
+ retval = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (retval)
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (retval != NULL)
|
||||
@ -858,8 +904,8 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
+ 1);
|
||||
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
|
||||
if (build_id_name != NULL
|
||||
@@ -1215,7 +1817,7 @@ find_separate_debug_file_by_buildid (str
|
||||
xfree (build_id_name);
|
||||
}
|
||||
else if (build_id_name != NULL)
|
||||
@ -868,9 +914,9 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1148,9 +1723,10 @@ elf_symfile_read (struct objfile *objfil
|
||||
@@ -1418,9 +2020,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 +927,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
|
||||
@@ -1432,6 +2035,12 @@ elf_symfile_read (struct objfile *objfil
|
||||
symbol_file_add_separate (abfd, symfile_flags, objfile);
|
||||
xfree (debugfile);
|
||||
}
|
||||
@ -894,10 +940,10 @@ Index: gdb-7.2.50.20110117/gdb/elfread.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1337,4 +1919,16 @@ void
|
||||
_initialize_elfread (void)
|
||||
{
|
||||
add_symtab_fns (&elf_sym_fns);
|
||||
@@ -1911,4 +2520,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 +957,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.90.20110429/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.90.20110429.orig/gdb/symfile.h 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symfile.h 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -605,6 +605,13 @@ void free_symfile_segment_data (struct s
|
||||
|
||||
extern struct cleanup *increment_reading_symtab (void);
|
||||
|
||||
@ -929,11 +975,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.90.20110429/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.90.20110429.orig/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:56.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/gdb.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -1381,6 +1381,16 @@ proc default_gdb_start { } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
@ -950,10 +996,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.90.20110429/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.90.20110429.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/testsuite/lib/mi-support.exp 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
|
||||
}
|
||||
}
|
||||
@ -971,13 +1017,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.90.20110429/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.90.20110429.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
|
||||
+++ gdb-7.2.90.20110429/gdb/objfiles.h 2011-05-03 05:14:57.000000000 +0200
|
||||
@@ -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-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Normal file
49
gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Normal file
@ -0,0 +1,49 @@
|
||||
--- gdb-7.2.50.20110328.orig/gdb/dwarf2read.c 2011-03-30 12:52:20.395450001 +0200
|
||||
+++ gdb-7.2.50.20110328/gdb/dwarf2read.c 2011-03-30 13:41:55.485450006 +0200
|
||||
@@ -66,12 +66,14 @@
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED ((void *) -1)
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
typedef struct symbol *symbolp;
|
||||
DEF_VEC_P (symbolp);
|
||||
@@ -1563,6 +1565,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
if (pagesize == 0)
|
||||
pagesize = getpagesize ();
|
||||
@@ -1589,6 +1592,7 @@
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* If we get here, we are a normal, not-compressed section. */
|
||||
info->buffer = buf
|
||||
@@ -15439,6 +15443,7 @@
|
||||
{
|
||||
if (info->was_mmapped)
|
||||
{
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
intptr_t begin = (intptr_t) info->buffer;
|
||||
intptr_t map_begin = begin & ~(pagesize - 1);
|
||||
@@ -15449,6 +15454,7 @@
|
||||
/* Without HAVE_MMAP, we should never be here to begin with. */
|
||||
gdb_assert_not_reached ("no mmap support");
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:481e5fb3f97cd023b74aff94090ae1d0c05bf0257addbd87e9a9b1b379dcab43
|
||||
size 19762129
|
3
gdb-7.3.tar.bz2
Normal file
3
gdb-7.3.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9edc83ed921660b77aa2b2fc168b81639aab0f49a94d4b38f2f01bf51d5d2ba
|
||||
size 19091650
|
@ -1,9 +1,9 @@
|
||||
Index: gdb-7.2.50.20110206/gdb/breakpoint.c
|
||||
Index: gdb-7.2.90.20110411/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/breakpoint.c 2011-02-06 20:39:24.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/breakpoint.c 2011-02-06 20:39:44.000000000 +0100
|
||||
@@ -10587,6 +10587,50 @@ update_breakpoint_locations (struct brea
|
||||
update_global_location_list (1);
|
||||
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/breakpoint.c 2011-04-11 19:18:10.000000000 +0200
|
||||
@@ -11233,6 +11233,50 @@ re_set_breakpoint (struct breakpoint *b)
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
|
||||
+void
|
||||
@ -53,25 +53,25 @@ Index: gdb-7.2.50.20110206/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.20110206/gdb/breakpoint.h
|
||||
Index: gdb-7.2.90.20110411/gdb/breakpoint.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/breakpoint.h 2011-02-06 20:39:24.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/breakpoint.h 2011-02-06 20:40:00.000000000 +0100
|
||||
@@ -1194,4 +1194,7 @@ extern struct breakpoint *iterate_over_b
|
||||
--- gdb-7.2.90.20110411.orig/gdb/breakpoint.h 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/breakpoint.h 2011-04-11 19:17:53.000000000 +0200
|
||||
@@ -1245,4 +1245,7 @@ extern int user_breakpoint_p (struct bre
|
||||
|
||||
extern int user_breakpoint_p (struct breakpoint *);
|
||||
extern void modify_semaphore (struct bp_location *location, int set);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
#endif /* !defined (BREAKPOINT_H) */
|
||||
Index: gdb-7.2.50.20110206/gdb/objfiles.c
|
||||
Index: gdb-7.2.90.20110411/gdb/objfiles.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/objfiles.c 2011-01-10 21:38:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/objfiles.c 2011-02-06 20:39:44.000000000 +0100
|
||||
@@ -846,6 +846,11 @@ objfile_relocate1 (struct objfile *objfi
|
||||
obj_section_addr (s));
|
||||
}
|
||||
--- gdb-7.2.90.20110411.orig/gdb/objfiles.c 2011-04-11 19:11:55.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/objfiles.c 2011-04-11 19:17:53.000000000 +0200
|
||||
@@ -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. */
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c 2011-01-17 15:56:23.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/dwarf2read.c 2011-01-17 16:00:14.000000000 +0100
|
||||
@@ -7475,7 +7475,12 @@ read_common_block (struct die_info *die,
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:12:35.000000000 +0200
|
||||
@@ -7675,7 +7675,12 @@ read_common_block (struct die_info *die,
|
||||
{
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
@ -16,7 +16,7 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||
if (attr)
|
||||
@@ -7484,6 +7489,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -7684,6 +7689,7 @@ read_common_block (struct die_info *die,
|
||||
if (attr_form_is_block (attr))
|
||||
{
|
||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||
@ -24,15 +24,15 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
}
|
||||
else if (attr_form_is_section_offset (attr))
|
||||
{
|
||||
@@ -7545,12 +7551,15 @@ read_common_block (struct die_info *die,
|
||||
else
|
||||
dwarf2_complex_location_expr_complaint ();
|
||||
|
||||
- SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
|
||||
@@ -7736,12 +7742,15 @@ read_common_block (struct die_info *die,
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
- SYMBOL_VALUE_ADDRESS (sym) = base + offset;
|
||||
+ if (!base_p)
|
||||
+ dwarf2_invalid_attrib_class_complaint
|
||||
+ ("DW_AT_data_member_location", "common block member");
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset + baseaddr;
|
||||
+ SYMBOL_VALUE_ADDRESS (sym) = base + offset + baseaddr;
|
||||
add_symbol_to_list (sym, &global_symbols);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
else
|
||||
SET_FIELD_PHYSNAME (*field, SYMBOL_LINKAGE_NAME (sym));
|
||||
FIELD_TYPE (*field) = SYMBOL_TYPE (sym);
|
||||
@@ -7564,7 +7573,7 @@ read_common_block (struct die_info *die,
|
||||
@@ -7755,7 +7764,7 @@ read_common_block (struct die_info *die,
|
||||
|
||||
sym = new_symbol (die, type, cu);
|
||||
/* SYMBOL_VALUE_ADDRESS never gets used as all its fields are static. */
|
||||
@ -51,11 +51,11 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
|
||||
set_die_type (die, type, cu);
|
||||
}
|
||||
Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
Index: gdb-7.2.90.20110525/gdb/gdbtypes.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/gdbtypes.h 2011-01-17 15:51:03.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/gdbtypes.h 2011-01-17 16:00:32.000000000 +0100
|
||||
@@ -394,6 +394,7 @@ enum type_instance_flag_value
|
||||
--- gdb-7.2.90.20110525.orig/gdb/gdbtypes.h 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/gdbtypes.h 2011-05-25 17:11:10.000000000 +0200
|
||||
@@ -396,6 +396,7 @@ enum type_instance_flag_value
|
||||
enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /* bitpos */
|
||||
@ -63,7 +63,7 @@ Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
|
||||
FIELD_LOC_KIND_PHYSNAME /* physname */
|
||||
};
|
||||
@@ -576,6 +577,7 @@ struct main_type
|
||||
@@ -580,6 +581,7 @@ struct main_type
|
||||
is the location (in the target) of the static field.
|
||||
Otherwise, physname is the mangled label of the static field. */
|
||||
|
||||
@ -71,7 +71,7 @@ Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
CORE_ADDR physaddr;
|
||||
char *physname;
|
||||
}
|
||||
@@ -1102,6 +1104,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1106,6 +1108,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
|
||||
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
|
||||
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
|
||||
@ -79,7 +79,7 @@ Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
|
||||
@@ -1109,6 +1112,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1113,6 +1116,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define SET_FIELD_PHYSNAME(thisfld, name) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
|
||||
FIELD_STATIC_PHYSNAME (thisfld) = (name))
|
||||
@ -87,7 +87,7 @@ Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1121,6 +1125,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
@@ -1125,6 +1129,7 @@ extern void allocate_gnat_aux_type (stru
|
||||
#define TYPE_FIELD_LOC_KIND(thistype, n) FIELD_LOC_KIND (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
|
||||
@ -95,10 +95,10 @@ Index: gdb-7.2.50.20110117/gdb/gdbtypes.h
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
|
||||
Index: gdb-7.2.50.20110117/gdb/jv-lang.c
|
||||
Index: gdb-7.2.90.20110525/gdb/jv-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/jv-lang.c 2011-01-09 04:08:57.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/jv-lang.c 2011-01-17 16:00:59.000000000 +0100
|
||||
--- gdb-7.2.90.20110525.orig/gdb/jv-lang.c 2011-03-02 01:42:53.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/jv-lang.c 2011-05-25 17:11:10.000000000 +0200
|
||||
@@ -414,7 +414,8 @@ java_link_class_type (struct gdbarch *gd
|
||||
|
||||
fields = NULL;
|
||||
@ -119,11 +119,11 @@ Index: gdb-7.2.50.20110117/gdb/jv-lang.c
|
||||
else
|
||||
TYPE_FIELD_BITPOS (type, i) = 8 * boffset;
|
||||
if (accflags & 0x8000) /* FIELD_UNRESOLVED_FLAG */
|
||||
Index: gdb-7.2.50.20110117/gdb/value.c
|
||||
Index: gdb-7.2.90.20110525/gdb/value.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/value.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/value.c 2011-01-17 16:00:14.000000000 +0100
|
||||
@@ -1997,7 +1997,8 @@ value_static_field (struct type *type, i
|
||||
--- gdb-7.2.90.20110525.orig/gdb/value.c 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/value.c 2011-05-25 17:11:10.000000000 +0200
|
||||
@@ -2492,7 +2492,8 @@ value_static_field (struct type *type, i
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
|
||||
|
7532
gdb-archer.patch
7532
gdb-archer.patch
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
--- ./gdb/breakpoint.c 2010-04-26 02:35:53.000000000 +0200
|
||||
+++ ./gdb/breakpoint.c 2010-04-26 02:33:26.000000000 +0200
|
||||
@@ -8499,6 +8499,11 @@ update_breakpoint_locations (struct brea
|
||||
{
|
||||
struct gdb_exception e;
|
||||
|
||||
+ /* Temporary workaround before the non-intrusive ifunc patch gets in.
|
||||
+ exp parsing can now call inferior function invalidating
|
||||
+ EXISTING_LOCATIONS. */
|
||||
+ existing_locations = NULL;
|
||||
+
|
||||
s = b->cond_string;
|
||||
TRY_CATCH (e, RETURN_MASK_ERROR)
|
||||
{
|
@ -11,6 +11,47 @@ Index: gdb-7.2.50.20110117/gdb/config/i386/linux64.mh
|
||||
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||
|
||||
# The dynamically loaded libthread_db needs access to symbols in the
|
||||
--- gdb-7.2/gdb/config/i386/linux.mh-orig 2010-06-11 14:08:51.000000000 +0200
|
||||
+++ gdb-7.2/gdb/config/i386/linux.mh 2011-03-18 12:00:32.000000000 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
|
||||
-NAT_FILE= config/nm-linux.h
|
||||
+NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||
i386-nat.o i386-linux-nat.o \
|
||||
proc-service.o linux-thread-db.o \
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.1.90.20100711/gdb/config/i386/nm-linux.h 2010-07-13 19:02:28.000000000 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ 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/>. */
|
||||
+
|
||||
+#ifndef NM_LINUX_H
|
||||
+#define NM_LINUX_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Red Hat backward compatibility with gdb-6.8. */
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
Index: gdb-7.2.50.20110117/gdb/config/i386/nm-linux64.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
|
@ -12,10 +12,10 @@
|
||||
* gdb.python/pr10659.exp. New file.
|
||||
* gdb.python/pr10659.py: New file.
|
||||
|
||||
Index: gdb-7.2.50.20110206/gdb/valprint.h
|
||||
Index: gdb-7.2.50.20110218/gdb/valprint.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/valprint.h 2011-01-25 18:59:00.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/valprint.h 2011-02-06 20:55:59.000000000 +0100
|
||||
--- gdb-7.2.50.20110218.orig/gdb/valprint.h 2011-02-14 12:35:45.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/valprint.h 2011-02-18 10:44:32.000000000 +0100
|
||||
@@ -90,6 +90,9 @@ struct value_print_options
|
||||
|
||||
/* If nonzero, print the value in "summary" form. */
|
||||
@ -26,10 +26,10 @@ Index: gdb-7.2.50.20110206/gdb/valprint.h
|
||||
};
|
||||
|
||||
/* The global print options set by the user. In general this should
|
||||
Index: gdb-7.2.50.20110206/gdb/python/py-prettyprint.c
|
||||
Index: gdb-7.2.50.20110218/gdb/python/py-prettyprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/python/py-prettyprint.c 2011-01-26 21:58:48.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/python/py-prettyprint.c 2011-02-06 20:56:30.000000000 +0100
|
||||
--- gdb-7.2.50.20110218.orig/gdb/python/py-prettyprint.c 2011-02-14 12:10:53.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/python/py-prettyprint.c 2011-02-18 10:45:02.000000000 +0100
|
||||
@@ -501,7 +501,7 @@ print_children (PyObject *printer, const
|
||||
|
||||
/* Use the prettyprint_arrays option if we are printing an array,
|
||||
@ -103,15 +103,15 @@ Index: gdb-7.2.50.20110206/gdb/python/py-prettyprint.c
|
||||
}
|
||||
|
||||
done:
|
||||
@@ -690,6 +713,7 @@ apply_val_pretty_printer (struct type *t
|
||||
@@ -689,6 +712,7 @@ apply_val_pretty_printer (struct type *t
|
||||
char *hint = NULL;
|
||||
struct cleanup *cleanups;
|
||||
int result = 0;
|
||||
enum string_repr_result print_result;
|
||||
+ struct value_print_options *options_copy;
|
||||
cleanups = ensure_python_env (gdbarch, language);
|
||||
enum string_repr_result print_result;
|
||||
|
||||
/* Instantiate the printer. */
|
||||
@@ -721,9 +745,21 @@ apply_val_pretty_printer (struct type *t
|
||||
/* No pretty-printer support for unavailable values. */
|
||||
@@ -726,9 +750,21 @@ apply_val_pretty_printer (struct type *t
|
||||
|
||||
/* If we are printing a map, we want some special formatting. */
|
||||
hint = gdbpy_get_display_hint (printer);
|
||||
@ -133,10 +133,10 @@ Index: gdb-7.2.50.20110206/gdb/python/py-prettyprint.c
|
||||
print_result = print_string_repr (printer, hint, stream, recurse,
|
||||
options, language, gdbarch);
|
||||
if (print_result != string_repr_error)
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.cc
|
||||
Index: gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.cc 2011-02-06 20:55:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.cc 2011-02-18 10:44:32.000000000 +0100
|
||||
@@ -0,0 +1,43 @@
|
||||
+#include <list>
|
||||
+#include <vector> // /usr/include/c++/4.4.1/bits/vector.tcc
|
||||
@ -181,10 +181,10 @@ Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.cc
|
||||
+
|
||||
+ return 0; // break
|
||||
+}
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.exp
|
||||
Index: gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.exp 2011-02-06 20:55:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.exp 2011-02-18 10:44:32.000000000 +0100
|
||||
@@ -0,0 +1,82 @@
|
||||
+#Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -268,10 +268,10 @@ Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.exp
|
||||
+#
|
||||
+
|
||||
+
|
||||
Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.py
|
||||
Index: gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.py
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.py 2011-02-06 20:55:59.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/testsuite/gdb.python/pr10659.py 2011-02-18 10:44:32.000000000 +0100
|
||||
@@ -0,0 +1,109 @@
|
||||
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -382,10 +382,10 @@ Index: gdb-7.2.50.20110206/gdb/testsuite/gdb.python/pr10659.py
|
||||
+fake_pretty_printers_dict = {}
|
||||
+
|
||||
+build_libfakecxx_dictionary ()
|
||||
Index: gdb-7.2.50.20110206/gdb/valprint.c
|
||||
Index: gdb-7.2.50.20110218/gdb/valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110206.orig/gdb/valprint.c 2011-02-06 20:55:52.000000000 +0100
|
||||
+++ gdb-7.2.50.20110206/gdb/valprint.c 2011-02-06 20:55:59.000000000 +0100
|
||||
--- gdb-7.2.50.20110218.orig/gdb/valprint.c 2011-02-18 10:44:16.000000000 +0100
|
||||
+++ gdb-7.2.50.20110218/gdb/valprint.c 2011-02-18 10:44:32.000000000 +0100
|
||||
@@ -85,7 +85,8 @@ struct value_print_options user_print_op
|
||||
1, /* static_field_print */
|
||||
1, /* pascal_static_field_print */
|
||||
|
84
gdb-bz645773-case-insensitive-1of5.patch
Normal file
84
gdb-bz645773-case-insensitive-1of5.patch
Normal file
@ -0,0 +1,84 @@
|
||||
[patch] Code cleanup: New SYMBOL_HASH_NEXT
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00022.html
|
||||
http://sourceware.org/ml/gdb-cvs/2011-04/msg00043.html
|
||||
|
||||
### src/gdb/ChangeLog 2011/04/06 03:24:22 1.12908
|
||||
### src/gdb/ChangeLog 2011/04/06 19:50:03 1.12909
|
||||
## -1,3 +1,12 @@
|
||||
+2011-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
+
|
||||
+ Code cleanup.
|
||||
+ * dictionary.c (dict_hash): Use SYMBOL_HASH_NEXT.
|
||||
+ * dwarf2read.c (mapped_index_string_hash): Refer to SYMBOL_HASH_NEXT
|
||||
+ in the function comment, a new note on values compatibility.
|
||||
+ * minsyms.c (msymbol_hash_iw, msymbol_hash): Use SYMBOL_HASH_NEXT.
|
||||
+ * symtab.h (SYMBOL_HASH_NEXT): New.
|
||||
+
|
||||
2011-04-06 Thiago Jung Bauermann <bauerman@br.ibm.com>
|
||||
|
||||
* ppc-linux-nat.c (check_condition): Add len output parameter.
|
||||
--- src/gdb/dictionary.c 2011/01/07 19:36:15 1.21
|
||||
+++ src/gdb/dictionary.c 2011/04/06 19:50:04 1.22
|
||||
@@ -826,7 +826,7 @@
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
default:
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
string += 1;
|
||||
break;
|
||||
}
|
||||
--- src/gdb/dwarf2read.c 2011/04/04 14:10:12 1.520
|
||||
+++ src/gdb/dwarf2read.c 2011/04/06 19:50:04 1.521
|
||||
@@ -1962,11 +1962,11 @@
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
|
||||
-/* The hash function for strings in the mapped index. This is the
|
||||
- same as the hashtab.c hash function, but we keep a separate copy to
|
||||
- maintain control over the implementation. This is necessary
|
||||
- because the hash function is tied to the format of the mapped index
|
||||
- file. */
|
||||
+/* The hash function for strings in the mapped index. This is the same as
|
||||
+ SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
|
||||
+ implementation. This is necessary because the hash function is tied to the
|
||||
+ format of the mapped index file. The hash values do not have to match with
|
||||
+ SYMBOL_HASH_NEXT. */
|
||||
|
||||
static hashval_t
|
||||
mapped_index_string_hash (const void *p)
|
||||
--- src/gdb/minsyms.c 2011/03/28 20:29:51 1.81
|
||||
+++ src/gdb/minsyms.c 2011/04/06 19:50:05 1.82
|
||||
@@ -91,7 +91,7 @@
|
||||
++string;
|
||||
if (*string && *string != '(')
|
||||
{
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
++string;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@
|
||||
unsigned int hash = 0;
|
||||
|
||||
for (; *string; ++string)
|
||||
- hash = hash * 67 + *string - 113;
|
||||
+ hash = SYMBOL_HASH_NEXT (hash, *string);
|
||||
return hash;
|
||||
}
|
||||
|
||||
--- src/gdb/symtab.h 2011/04/04 15:19:59 1.177
|
||||
+++ src/gdb/symtab.h 2011/04/06 19:50:05 1.178
|
||||
@@ -1004,6 +1004,12 @@
|
||||
|
||||
extern unsigned int msymbol_hash (const char *);
|
||||
|
||||
+/* Compute the next hash value from previous HASH and the character C. This
|
||||
+ is only a GDB in-memory computed value with no external files compatibility
|
||||
+ requirements. */
|
||||
+
|
||||
+#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113)
|
||||
+
|
||||
extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
|
||||
|
||||
extern void
|
139
gdb-bz645773-case-insensitive-2of5.patch
Normal file
139
gdb-bz645773-case-insensitive-2of5.patch
Normal file
@ -0,0 +1,139 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00124.html
|
||||
Subject: [patch 1/3] case insensitive: Reformat code
|
||||
|
||||
Hi,
|
||||
|
||||
just some reformatting to make the later patch more clear. There should be no
|
||||
functionality difference by this patch. c1+c2 are a bit ugly but I found any
|
||||
other solution a bit ugly.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Format the code for the next patch.
|
||||
* dwarf2read.c (struct mapped_index): Include delimiting newlines.
|
||||
* utils.c (strcmp_iw_ordered): Reformat the code for the next patch.
|
||||
New variables c1 and c2.
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -150,14 +150,19 @@ struct mapped_index
|
||||
{
|
||||
/* The total length of the buffer. */
|
||||
off_t total_size;
|
||||
+
|
||||
/* A pointer to the address table data. */
|
||||
const gdb_byte *address_table;
|
||||
+
|
||||
/* Size of the address table data in bytes. */
|
||||
offset_type address_table_size;
|
||||
+
|
||||
/* The symbol table, implemented as a hash table. */
|
||||
const offset_type *symbol_table;
|
||||
+
|
||||
/* Size in slots, each slot is 2 offset_types. */
|
||||
offset_type symbol_table_slots;
|
||||
+
|
||||
/* A pointer to the constant pool. */
|
||||
const char *constant_pool;
|
||||
};
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -3023,48 +3023,55 @@ strcmp_iw (const char *string1, const char *string2)
|
||||
int
|
||||
strcmp_iw_ordered (const char *string1, const char *string2)
|
||||
{
|
||||
- while ((*string1 != '\0') && (*string2 != '\0'))
|
||||
+ /* Formatting stub. */
|
||||
+ if (1)
|
||||
{
|
||||
- while (isspace (*string1))
|
||||
- {
|
||||
- string1++;
|
||||
- }
|
||||
- while (isspace (*string2))
|
||||
- {
|
||||
- string2++;
|
||||
- }
|
||||
- if (*string1 != *string2)
|
||||
+ /* C1 and C2 are valid only if *string1 != '\0' && *string2 != '\0'.
|
||||
+ Provide stub characters if we are already at the end of one of the
|
||||
+ strings. */
|
||||
+ char c1 = 'X', c2 = 'X';
|
||||
+
|
||||
+ while (*string1 != '\0' && *string2 != '\0')
|
||||
{
|
||||
- break;
|
||||
+ while (isspace (*string1))
|
||||
+ string1++;
|
||||
+ while (isspace (*string2))
|
||||
+ string2++;
|
||||
+
|
||||
+ c1 = *string1;
|
||||
+ c2 = *string2;
|
||||
+ if (c1 != c2)
|
||||
+ break;
|
||||
+
|
||||
+ if (*string1 != '\0')
|
||||
+ {
|
||||
+ string1++;
|
||||
+ string2++;
|
||||
+ }
|
||||
}
|
||||
- if (*string1 != '\0')
|
||||
+
|
||||
+ switch (*string1)
|
||||
{
|
||||
- string1++;
|
||||
- string2++;
|
||||
+ /* Characters are non-equal unless they're both '\0'; we want to
|
||||
+ make sure we get the comparison right according to our
|
||||
+ comparison in the cases where one of them is '\0' or '('. */
|
||||
+ case '\0':
|
||||
+ if (*string2 == '\0')
|
||||
+ return 0;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ case '(':
|
||||
+ if (*string2 == '\0')
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ default:
|
||||
+ if (*string2 == '\0' || *string2 == '(')
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return c1 - c2;
|
||||
}
|
||||
}
|
||||
-
|
||||
- switch (*string1)
|
||||
- {
|
||||
- /* Characters are non-equal unless they're both '\0'; we want to
|
||||
- make sure we get the comparison right according to our
|
||||
- comparison in the cases where one of them is '\0' or '('. */
|
||||
- case '\0':
|
||||
- if (*string2 == '\0')
|
||||
- return 0;
|
||||
- else
|
||||
- return -1;
|
||||
- case '(':
|
||||
- if (*string2 == '\0')
|
||||
- return 1;
|
||||
- else
|
||||
- return -1;
|
||||
- default:
|
||||
- if (*string2 == '(')
|
||||
- return 1;
|
||||
- else
|
||||
- return *string1 - *string2;
|
||||
- }
|
||||
}
|
||||
|
||||
/* A simple comparison function with opposite semantics to strcmp. */
|
||||
|
188
gdb-bz645773-case-insensitive-3of5.patch
Normal file
188
gdb-bz645773-case-insensitive-3of5.patch
Normal file
@ -0,0 +1,188 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00125.html
|
||||
Subject: [patch 2/3] case insensitive: re_comp->regcomp
|
||||
|
||||
Hi,
|
||||
|
||||
re_comp cannot be passed REG_ICASE. Therefore change the code. The should
|
||||
have no functionality impact.
|
||||
|
||||
The new boolean field `preg_p' could be maybe replaced by a conditional
|
||||
`preg.buffer != NULL' which would work with libiberty regcomp implementation
|
||||
but I do not see it guaranteed anywhere. GDB is always using static libiberty
|
||||
implementation which I do not see why in the case it is running on glibc.
|
||||
But if it gets fixed one day and it starts to use externally linked
|
||||
regcomp/regexec I would find the `preg.buffer != NULL' conditional dangerous.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Replace re_comp/re_exec by regcomp/regexec.
|
||||
* symtab.c (struct search_symbols_data): New fields preg, preg_p.
|
||||
(search_symbols_name_matches): Use them, use regexec.
|
||||
(search_symbols): New variable retval_chain, adjust the use of
|
||||
old_chain against it. Replace re_comp by regcomp. Use the new struct
|
||||
search_symbols_data fields, use regexec instead of re_exec.
|
||||
|
||||
Index: gdb-7.2.90.20110429/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110429.orig/gdb/symtab.c 2011-04-29 09:43:33.000000000 +0200
|
||||
+++ gdb-7.2.90.20110429/gdb/symtab.c 2011-04-29 09:43:55.000000000 +0200
|
||||
@@ -2958,7 +2958,10 @@ struct search_symbols_data
|
||||
{
|
||||
int nfiles;
|
||||
char **files;
|
||||
- char *regexp;
|
||||
+
|
||||
+ /* It is true if PREG contains valid data, false otherwise. */
|
||||
+ unsigned preg_p : 1;
|
||||
+ regex_t preg;
|
||||
};
|
||||
|
||||
/* A callback for expand_symtabs_matching. */
|
||||
@@ -2976,7 +2979,7 @@ search_symbols_name_matches (const char
|
||||
{
|
||||
struct search_symbols_data *data = user_data;
|
||||
|
||||
- return data->regexp == NULL || re_exec (symname);
|
||||
+ return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
|
||||
}
|
||||
|
||||
/* Search the symbol table for matches to the regular expression REGEXP,
|
||||
@@ -3023,9 +3026,13 @@ search_symbols (char *regexp, domain_enu
|
||||
struct symbol_search *sr;
|
||||
struct symbol_search *psr;
|
||||
struct symbol_search *tail;
|
||||
- struct cleanup *old_chain = NULL;
|
||||
struct search_symbols_data datum;
|
||||
|
||||
+ /* OLD_CHAIN .. RETVAL_CHAIN is always freed, RETVAL_CHAIN .. current
|
||||
+ CLEANUP_CHAIN is freed only in the case of an error. */
|
||||
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
|
||||
+ struct cleanup *retval_chain;
|
||||
+
|
||||
if (kind < VARIABLES_DOMAIN || kind >= ALL_DOMAIN)
|
||||
error (_("must search on specific domain"));
|
||||
|
||||
@@ -3036,6 +3043,7 @@ search_symbols (char *regexp, domain_enu
|
||||
|
||||
sr = *matches = NULL;
|
||||
tail = NULL;
|
||||
+ datum.preg_p = 0;
|
||||
|
||||
if (regexp != NULL)
|
||||
{
|
||||
@@ -3045,6 +3053,7 @@ search_symbols (char *regexp, domain_enu
|
||||
and <TYPENAME> or <OPERATOR>. */
|
||||
char *opend;
|
||||
char *opname = operator_chars (regexp, &opend);
|
||||
+ int errcode;
|
||||
|
||||
if (*opname)
|
||||
{
|
||||
@@ -3073,8 +3082,16 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
- if (0 != (val = re_comp (regexp)))
|
||||
- error (_("Invalid regexp (%s): %s"), val, regexp);
|
||||
+ errcode = regcomp (&datum.preg, regexp, REG_NOSUB);
|
||||
+ if (errcode != 0)
|
||||
+ {
|
||||
+ char *err = get_regcomp_error (errcode, &datum.preg);
|
||||
+
|
||||
+ make_cleanup (xfree, err);
|
||||
+ error (_("Invalid regexp (%s): %s"), err, regexp);
|
||||
+ }
|
||||
+ datum.preg_p = 1;
|
||||
+ make_regfree_cleanup (&datum.preg);
|
||||
}
|
||||
|
||||
/* Search through the partial symtabs *first* for all symbols
|
||||
@@ -3083,7 +3100,6 @@ search_symbols (char *regexp, domain_enu
|
||||
|
||||
datum.nfiles = nfiles;
|
||||
datum.files = files;
|
||||
- datum.regexp = regexp;
|
||||
ALL_OBJFILES (objfile)
|
||||
{
|
||||
if (objfile->sf)
|
||||
@@ -3094,6 +3110,8 @@ search_symbols (char *regexp, domain_enu
|
||||
&datum);
|
||||
}
|
||||
|
||||
+ retval_chain = old_chain;
|
||||
+
|
||||
/* Here, we search through the minimal symbol tables for functions
|
||||
and variables that match, and force their symbols to be read.
|
||||
This is in particular necessary for demangled variable names,
|
||||
@@ -3117,8 +3135,9 @@ search_symbols (char *regexp, domain_enu
|
||||
MSYMBOL_TYPE (msymbol) == ourtype3 ||
|
||||
MSYMBOL_TYPE (msymbol) == ourtype4)
|
||||
{
|
||||
- if (regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
|
||||
+ if (!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
|
||||
+ NULL, 0) == 0)
|
||||
{
|
||||
if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))
|
||||
{
|
||||
@@ -3156,8 +3175,9 @@ search_symbols (char *regexp, domain_enu
|
||||
QUIT;
|
||||
|
||||
if (file_matches (real_symtab->filename, files, nfiles)
|
||||
- && ((regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0)
|
||||
+ && ((!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (sym), 0,
|
||||
+ NULL, 0) == 0)
|
||||
&& ((kind == VARIABLES_DOMAIN
|
||||
&& SYMBOL_CLASS (sym) != LOC_TYPEDEF
|
||||
&& SYMBOL_CLASS (sym) != LOC_UNRESOLVED
|
||||
@@ -3199,7 +3219,7 @@ search_symbols (char *regexp, domain_enu
|
||||
tail = sort_search_symbols (&dummy, nfound);
|
||||
sr = dummy.next;
|
||||
|
||||
- old_chain = make_cleanup_free_search_symbols (sr);
|
||||
+ make_cleanup_free_search_symbols (sr);
|
||||
}
|
||||
else
|
||||
tail = sort_search_symbols (prevtail, nfound);
|
||||
@@ -3221,8 +3241,9 @@ search_symbols (char *regexp, domain_enu
|
||||
MSYMBOL_TYPE (msymbol) == ourtype3 ||
|
||||
MSYMBOL_TYPE (msymbol) == ourtype4)
|
||||
{
|
||||
- if (regexp == NULL
|
||||
- || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
|
||||
+ if (!datum.preg_p
|
||||
+ || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
|
||||
+ NULL, 0) == 0)
|
||||
{
|
||||
/* Functions: Look up by address. */
|
||||
if (kind != FUNCTIONS_DOMAIN ||
|
||||
@@ -3244,7 +3265,7 @@ search_symbols (char *regexp, domain_enu
|
||||
if (tail == NULL)
|
||||
{
|
||||
sr = psr;
|
||||
- old_chain = make_cleanup_free_search_symbols (sr);
|
||||
+ make_cleanup_free_search_symbols (sr);
|
||||
}
|
||||
else
|
||||
tail->next = psr;
|
||||
@@ -3256,9 +3277,9 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
+ discard_cleanups (retval_chain);
|
||||
+ do_cleanups (old_chain);
|
||||
*matches = sr;
|
||||
- if (sr != NULL)
|
||||
- discard_cleanups (old_chain);
|
||||
}
|
||||
|
||||
/* Helper function for symtab_symbol_info, this function uses
|
669
gdb-bz645773-case-insensitive-4of5.patch
Normal file
669
gdb-bz645773-case-insensitive-4of5.patch
Normal file
@ -0,0 +1,669 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00418.html
|
||||
Subject: Re: [patch 3/3] case insensitive: the fix [rediff]
|
||||
|
||||
On Fri, 22 Apr 2011 21:05:07 +0200, Eli Zaretskii wrote:
|
||||
> This @table will look weird in the manual: it produces lines that
|
||||
> begin with a lower-case letter. Perhaps reorder thusly:
|
||||
|
||||
OK, thanks for the review.
|
||||
|
||||
|
||||
Regards,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/doc/
|
||||
2011-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* gdb.texinfo (Index Section Format): Change the version to 5.
|
||||
Describe the different formula.
|
||||
|
||||
gdb/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c: Include ctype.h.
|
||||
(struct mapped_index): New field version.
|
||||
(mapped_index_string_hash): New parameter index_version. New comment
|
||||
for it. Call tolower appropriately.
|
||||
(find_slot_in_mapped_hash): New variable cmp, initialize it, use it.
|
||||
Choose the right index version for mapped_index_string_hash.
|
||||
(dwarf2_read_index): Support also the index version 5. Initialize the
|
||||
new struct mapped_index field version.
|
||||
(hash_strtab_entry): Pass INT_MAX for the new parameter, explain why.
|
||||
(find_slot): Explain the version needs. Pass INT_MAX for the new
|
||||
parameter.
|
||||
(write_psymtabs_to_index): Produce version 5.
|
||||
* minsyms.c (lookup_minimal_symbol): New variable cmp, initialize it,
|
||||
use it. New comment for SYMBOL_MATCHES_SEARCH_NAME.
|
||||
* psymtab.c (lookup_partial_symbol): Find the
|
||||
SYMBOL_MATCHES_SEARCH_NAME start of the found block of matching
|
||||
entries.
|
||||
* symtab.c (lookup_symbol_in_language): Remove the case_sensitive_off
|
||||
NAME lowercasing.
|
||||
(search_symbols): Pass REG_ICASE to regcomp for case_sensitive_off.
|
||||
(completion_list_add_name): New variable ncmp, initialize it, use it.
|
||||
* symtab.h (SYMBOL_HASH_NEXT): Always call tolower.
|
||||
* utils.c (strcmp_iw): Support case_sensitive_off.
|
||||
(strcmp_iw_ordered): Sort in a way compatible with case_sensitive_off.
|
||||
New function comment part. New variables saved_string1,
|
||||
saved_string2 and case_pass. Add a proper second pass.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-04-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/fortran-sym-case.c: New file.
|
||||
* gdb.base/fortran-sym-case.exp: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive-debug.S: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive.c: New file.
|
||||
* gdb.dwarf2/dw2-case-insensitive.exp: New file.
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 19:12:33.000000000 +0200
|
||||
@@ -152,6 +152,9 @@ DEF_VEC_I (offset_type);
|
||||
a comment by the code that writes the index. */
|
||||
struct mapped_index
|
||||
{
|
||||
+ /* Index data format version. */
|
||||
+ int version;
|
||||
+
|
||||
/* The total length of the buffer. */
|
||||
off_t total_size;
|
||||
|
||||
@@ -1997,17 +2000,23 @@ create_addrmap_from_index (struct objfil
|
||||
SYMBOL_HASH_NEXT, but we keep a separate copy to maintain control over the
|
||||
implementation. This is necessary because the hash function is tied to the
|
||||
format of the mapped index file. The hash values do not have to match with
|
||||
- SYMBOL_HASH_NEXT. */
|
||||
+ SYMBOL_HASH_NEXT.
|
||||
+
|
||||
+ Use INT_MAX for INDEX_VERSION if you generate the current index format. */
|
||||
|
||||
static hashval_t
|
||||
-mapped_index_string_hash (const void *p)
|
||||
+mapped_index_string_hash (int index_version, const void *p)
|
||||
{
|
||||
const unsigned char *str = (const unsigned char *) p;
|
||||
hashval_t r = 0;
|
||||
unsigned char c;
|
||||
|
||||
while ((c = *str++) != 0)
|
||||
- r = r * 67 + c - 113;
|
||||
+ {
|
||||
+ if (index_version >= 5)
|
||||
+ c = tolower (c);
|
||||
+ r = r * 67 + c - 113;
|
||||
+ }
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -2023,6 +2032,7 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
struct cleanup *back_to = make_cleanup (null_cleanup, 0);
|
||||
offset_type hash;
|
||||
offset_type slot, step;
|
||||
+ int (*cmp) (const char *, const char *);
|
||||
|
||||
if (current_language->la_language == language_cplus
|
||||
|| current_language->la_language == language_java
|
||||
@@ -2045,9 +2055,16 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
}
|
||||
}
|
||||
|
||||
- hash = mapped_index_string_hash (name);
|
||||
+ /* Index version 4 did not support case insensitive searches. But the
|
||||
+ indexes for case insensitive languages are built in lowercase, therefore
|
||||
+ simulate our NAME being searched is also lowercased. */
|
||||
+ hash = mapped_index_string_hash ((index->version == 4
|
||||
+ && case_sensitivity == case_sensitive_off
|
||||
+ ? 5 : index->version),
|
||||
+ name);
|
||||
slot = hash & (index->symbol_table_slots - 1);
|
||||
step = ((hash * 17) & (index->symbol_table_slots - 1)) | 1;
|
||||
+ cmp = (case_sensitivity == case_sensitive_on ? strcmp : strcasecmp);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -2061,7 +2078,7 @@ find_slot_in_mapped_hash (struct mapped_
|
||||
}
|
||||
|
||||
str = index->constant_pool + MAYBE_SWAP (index->symbol_table[i]);
|
||||
- if (!strcmp (name, str))
|
||||
+ if (!cmp (name, str))
|
||||
{
|
||||
*vec_out = (offset_type *) (index->constant_pool
|
||||
+ MAYBE_SWAP (index->symbol_table[i + 1]));
|
||||
@@ -2105,15 +2122,17 @@ dwarf2_read_index (struct objfile *objfi
|
||||
/* Versions earlier than 3 emitted every copy of a psymbol. This
|
||||
causes the index to behave very poorly for certain requests. Version 3
|
||||
contained incomplete addrmap. So, it seems better to just ignore such
|
||||
- indices. */
|
||||
+ indices. Index version 4 uses a different hash function than index
|
||||
+ version 5 and later. */
|
||||
if (version < 4)
|
||||
return 0;
|
||||
/* Indexes with higher version than the one supported by GDB may be no
|
||||
longer backward compatible. */
|
||||
- if (version > 4)
|
||||
+ if (version > 5)
|
||||
return 0;
|
||||
|
||||
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
|
||||
+ map->version = version;
|
||||
map->total_size = dwarf2_per_objfile->gdb_index.size;
|
||||
|
||||
metadata = (offset_type *) (addr + sizeof (offset_type));
|
||||
@@ -15692,13 +15711,16 @@ struct strtab_entry
|
||||
const char *str;
|
||||
};
|
||||
|
||||
-/* Hash function for a strtab_entry. */
|
||||
+/* Hash function for a strtab_entry.
|
||||
+
|
||||
+ Function is used only during write_hash_table so no index format backward
|
||||
+ compatibility is needed. */
|
||||
|
||||
static hashval_t
|
||||
hash_strtab_entry (const void *e)
|
||||
{
|
||||
const struct strtab_entry *entry = e;
|
||||
- return mapped_index_string_hash (entry->str);
|
||||
+ return mapped_index_string_hash (INT_MAX, entry->str);
|
||||
}
|
||||
|
||||
/* Equality function for a strtab_entry. */
|
||||
@@ -15836,12 +15858,15 @@ cleanup_mapped_symtab (void *p)
|
||||
}
|
||||
|
||||
/* Find a slot in SYMTAB for the symbol NAME. Returns a pointer to
|
||||
- the slot. */
|
||||
+ the slot.
|
||||
+
|
||||
+ Function is used only during write_hash_table so no index format backward
|
||||
+ compatibility is needed. */
|
||||
|
||||
static struct symtab_index_entry **
|
||||
find_slot (struct mapped_symtab *symtab, const char *name)
|
||||
{
|
||||
- offset_type index, step, hash = mapped_index_string_hash (name);
|
||||
+ offset_type index, step, hash = mapped_index_string_hash (INT_MAX, name);
|
||||
|
||||
index = hash & (symtab->size - 1);
|
||||
step = ((hash * 17) & (symtab->size - 1)) | 1;
|
||||
@@ -16369,7 +16394,7 @@ write_psymtabs_to_index (struct objfile
|
||||
total_len = size_of_contents;
|
||||
|
||||
/* The version number. */
|
||||
- val = MAYBE_SWAP (4);
|
||||
+ val = MAYBE_SWAP (5);
|
||||
obstack_grow (&contents, &val, sizeof (val));
|
||||
|
||||
/* The offset of the CU list from the start of the file. */
|
||||
Index: gdb-7.2.90.20110525/gdb/minsyms.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/minsyms.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/minsyms.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -239,11 +239,16 @@ lookup_minimal_symbol (const char *name,
|
||||
|
||||
if (pass == 1)
|
||||
{
|
||||
- match = strcmp (SYMBOL_LINKAGE_NAME (msymbol),
|
||||
- modified_name) == 0;
|
||||
+ int (*cmp) (const char *, const char *);
|
||||
+
|
||||
+ cmp = (case_sensitivity == case_sensitive_on
|
||||
+ ? strcmp : strcasecmp);
|
||||
+ match = cmp (SYMBOL_LINKAGE_NAME (msymbol),
|
||||
+ modified_name) == 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
+ /* The function respects CASE_SENSITIVITY. */
|
||||
match = SYMBOL_MATCHES_SEARCH_NAME (msymbol,
|
||||
modified_name);
|
||||
}
|
||||
Index: gdb-7.2.90.20110525/gdb/psymtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/psymtab.c 2011-04-20 22:10:29.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/psymtab.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -690,8 +690,15 @@ lookup_partial_symbol (struct partial_sy
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
- while (top <= real_top
|
||||
- && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
+ /* For `case_sensitivity == case_sensitive_off' strcmp_iw_ordered will
|
||||
+ search more exactly than what matches SYMBOL_MATCHES_SEARCH_NAME. */
|
||||
+ while (top >= start && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
+ top--;
|
||||
+
|
||||
+ /* Fixup to have a symbol which matches SYMBOL_MATCHES_SEARCH_NAME. */
|
||||
+ top++;
|
||||
+
|
||||
+ while (top <= real_top && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
|
||||
{
|
||||
if (symbol_matches_domain (SYMBOL_LANGUAGE (*top),
|
||||
SYMBOL_DOMAIN (*top), domain))
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.c 2011-05-25 17:13:49.000000000 +0200
|
||||
@@ -1062,19 +1062,6 @@ lookup_symbol_in_language (const char *n
|
||||
}
|
||||
}
|
||||
|
||||
- if (case_sensitivity == case_sensitive_off)
|
||||
- {
|
||||
- char *copy;
|
||||
- int len, i;
|
||||
-
|
||||
- len = strlen (name);
|
||||
- copy = (char *) alloca (len + 1);
|
||||
- for (i= 0; i < len; i++)
|
||||
- copy[i] = tolower (name[i]);
|
||||
- copy[len] = 0;
|
||||
- modified_name = copy;
|
||||
- }
|
||||
-
|
||||
returnval = lookup_symbol_aux (modified_name, block, domain, lang,
|
||||
is_a_field_of_this);
|
||||
do_cleanups (cleanup);
|
||||
@@ -3106,7 +3093,9 @@ search_symbols (char *regexp, domain_enu
|
||||
}
|
||||
}
|
||||
|
||||
- errcode = regcomp (&datum.preg, regexp, REG_NOSUB);
|
||||
+ errcode = regcomp (&datum.preg, regexp,
|
||||
+ REG_NOSUB | (case_sensitivity == case_sensitive_off
|
||||
+ ? REG_ICASE : 0));
|
||||
if (errcode != 0)
|
||||
{
|
||||
char *err = get_regcomp_error (errcode, &datum.preg);
|
||||
@@ -3546,7 +3535,11 @@ rbreak_command (char *regexp, int from_t
|
||||
static int
|
||||
compare_symbol_name (const char *name, const char *sym_text, int sym_text_len)
|
||||
{
|
||||
- if (strncmp (name, sym_text, sym_text_len) != 0)
|
||||
+ int (*ncmp) (const char *, const char *, size_t);
|
||||
+
|
||||
+ ncmp = (case_sensitivity == case_sensitive_on ? strncmp : strncasecmp);
|
||||
+
|
||||
+ if (ncmp (name, sym_text, sym_text_len) != 0)
|
||||
return 0;
|
||||
|
||||
if (sym_text[sym_text_len] == '(')
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.h 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.h 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -1036,7 +1036,8 @@ extern unsigned int msymbol_hash (const
|
||||
is only a GDB in-memory computed value with no external files compatibility
|
||||
requirements. */
|
||||
|
||||
-#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113)
|
||||
+#define SYMBOL_HASH_NEXT(hash, c) \
|
||||
+ ((hash) * 67 + tolower ((unsigned char) (c)) - 113)
|
||||
|
||||
extern struct objfile * msymbol_objfile (struct minimal_symbol *sym);
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **aRGv)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.base/fortran-sym-case.exp 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,27 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile fortran-sym-case
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "set language fortran" {Warning: the current language does not match this frame\.}
|
||||
+
|
||||
+gdb_test "frame" ", aRGv=.*"
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,102 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+ .section .debug_info
|
||||
+.Lcu1_begin:
|
||||
+ /* CU header */
|
||||
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
|
||||
+.Lcu1_start:
|
||||
+ .2byte 2 /* DWARF Version */
|
||||
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
|
||||
+ .byte 4 /* Pointer size */
|
||||
+
|
||||
+ /* CU die */
|
||||
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
||||
+ .byte 8 /* DW_AT_language (DW_LANG_Fortran90) */
|
||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
||||
+ .4byte main /* DW_AT_high_pc */
|
||||
+
|
||||
+ .uleb128 3 /* Abbrev: DW_TAG_subprogram */
|
||||
+ .byte 1 /* DW_AT_external */
|
||||
+ .ascii "FUNC_lang\0" /* DW_AT_name */
|
||||
+ .4byte FUNC_lang /* DW_AT_low_pc */
|
||||
+ .4byte main /* DW_AT_high_pc */
|
||||
+ .byte 1 /* DW_AT_prototyped */
|
||||
+ .4byte .Ltype - .Lcu1_begin /* DW_AT_type */
|
||||
+
|
||||
+.Ltype:
|
||||
+ .uleb128 0x5 /* Abbrev: DW_TAG_base_type */
|
||||
+ .byte 0x4 /* DW_AT_byte_size */
|
||||
+ .byte 0x5 /* DW_AT_encoding */
|
||||
+ .ascii "foo\0" /* DW_AT_name */
|
||||
+
|
||||
+ .byte 0 /* End of children of CU */
|
||||
+.Lcu1_end:
|
||||
+
|
||||
+/* Abbrev table */
|
||||
+ .section .debug_abbrev
|
||||
+.Labbrev1_begin:
|
||||
+ .uleb128 1 /* Abbrev code */
|
||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x25 /* DW_AT_producer */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x13 /* DW_AT_language */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 3 /* Abbrev code */
|
||||
+ .uleb128 0x2e /* DW_TAG_subprogram */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3f /* DW_AT_external */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x11 /* DW_AT_low_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x12 /* DW_AT_high_pc */
|
||||
+ .uleb128 0x1 /* DW_FORM_addr */
|
||||
+ .uleb128 0x27 /* DW_AT_prototyped */
|
||||
+ .uleb128 0xc /* DW_FORM_flag */
|
||||
+ .uleb128 0x49 /* DW_AT_type */
|
||||
+ .uleb128 0x13 /* DW_FORM_ref4 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x5 /* Abbrev code */
|
||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
||||
+ .byte 0x0 /* DW_children_no */
|
||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+/* Use DW_LANG_Fortran90 for case insensitive DWARF. */
|
||||
+
|
||||
+void
|
||||
+FUNC_lang (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+/* Symbol is present only in ELF .symtab. */
|
||||
+
|
||||
+void
|
||||
+FUNC_symtab (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ FUNC_lang ();
|
||||
+ FUNC_symtab ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -0,0 +1,49 @@
|
||||
+# Copyright 2011 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/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-case-insensitive"
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "show case-sensitive" {Case sensitivity in name search is "auto; currently on"\.}
|
||||
+
|
||||
+gdb_test "info functions fUnC_lang" \
|
||||
+ "All functions matching regular expression \"fUnC_lang\":" \
|
||||
+ "regexp case-sensitive on"
|
||||
+
|
||||
+gdb_test "set case-sensitive off" {warning: the current case sensitivity setting does not match the language\.}
|
||||
+
|
||||
+gdb_test "info functions fUnC_lang" \
|
||||
+ "All functions matching regular expression \"fUnC_lang\":\[\r\n\]+File file1.txt:\r\nfoo FUNC_lang\\(void\\);" \
|
||||
+ "regexp case-sensitive off"
|
||||
+
|
||||
+gdb_test "p fuNC_lang" { = {foo \(void\)} 0x[0-9a-f]+ <FUNC_lang>}
|
||||
+gdb_test "p fuNC_symtab" { = {<text variable, no debug info>} 0x[0-9a-f]+ <FUNC_symtab>}
|
||||
+
|
||||
+if {[gdb_breakpoint "fuNC_lang"] == 1} {
|
||||
+ pass "setting breakpoint at fuNC_lang"
|
||||
+}
|
||||
+
|
||||
+if {[gdb_breakpoint "fuNC_symtab"] == 1} {
|
||||
+ pass "setting breakpoint at fuNC_symtab"
|
||||
+}
|
||||
Index: gdb-7.2.90.20110525/gdb/utils.c
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/utils.c 2011-05-25 17:12:51.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/utils.c 2011-05-25 17:13:13.000000000 +0200
|
||||
@@ -3003,10 +3003,12 @@ strcmp_iw (const char *string1, const ch
|
||||
{
|
||||
string2++;
|
||||
}
|
||||
- if (*string1 != *string2)
|
||||
- {
|
||||
- break;
|
||||
- }
|
||||
+ if (case_sensitivity == case_sensitive_on && *string1 != *string2)
|
||||
+ break;
|
||||
+ if (case_sensitivity == case_sensitive_off
|
||||
+ && (tolower ((unsigned char) *string1)
|
||||
+ != tolower ((unsigned char) *string2)))
|
||||
+ break;
|
||||
if (*string1 != '\0')
|
||||
{
|
||||
string1++;
|
||||
@@ -3027,6 +3029,10 @@ strcmp_iw (const char *string1, const ch
|
||||
strcmp_iw(LIST_ELT, NAME), then the place to start looking is right
|
||||
where this function would put NAME.
|
||||
|
||||
+ This function must be neutral to the CASE_SENSITIVITY setting as the user
|
||||
+ may choose it during later lookup. Therefore this function always sorts
|
||||
+ primarily case-insensitively and secondarily case-sensitively.
|
||||
+
|
||||
Here are some examples of why using strcmp to sort is a bad idea:
|
||||
|
||||
Whitespace example:
|
||||
@@ -3052,8 +3058,10 @@ strcmp_iw (const char *string1, const ch
|
||||
int
|
||||
strcmp_iw_ordered (const char *string1, const char *string2)
|
||||
{
|
||||
- /* Formatting stub. */
|
||||
- if (1)
|
||||
+ const char *saved_string1 = string1, *saved_string2 = string2;
|
||||
+ enum case_sensitivity case_pass = case_sensitive_off;
|
||||
+
|
||||
+ for (;;)
|
||||
{
|
||||
/* C1 and C2 are valid only if *string1 != '\0' && *string2 != '\0'.
|
||||
Provide stub characters if we are already at the end of one of the
|
||||
@@ -3067,8 +3075,17 @@ strcmp_iw_ordered (const char *string1,
|
||||
while (isspace (*string2))
|
||||
string2++;
|
||||
|
||||
+ switch (case_pass)
|
||||
+ {
|
||||
+ case case_sensitive_off:
|
||||
+ c1 = tolower ((unsigned char) *string1);
|
||||
+ c2 = tolower ((unsigned char) *string2);
|
||||
+ break;
|
||||
+ case case_sensitive_on:
|
||||
c1 = *string1;
|
||||
c2 = *string2;
|
||||
+ break;
|
||||
+ }
|
||||
if (c1 != c2)
|
||||
break;
|
||||
|
||||
@@ -3086,7 +3103,7 @@ strcmp_iw_ordered (const char *string1,
|
||||
comparison in the cases where one of them is '\0' or '('. */
|
||||
case '\0':
|
||||
if (*string2 == '\0')
|
||||
- return 0;
|
||||
+ break;
|
||||
else
|
||||
return -1;
|
||||
case '(':
|
||||
@@ -3097,9 +3114,22 @@ strcmp_iw_ordered (const char *string1,
|
||||
default:
|
||||
if (*string2 == '\0' || *string2 == '(')
|
||||
return 1;
|
||||
- else
|
||||
- return c1 - c2;
|
||||
+ else if (c1 > c2)
|
||||
+ return 1;
|
||||
+ else if (c1 < c2)
|
||||
+ return -1;
|
||||
+ /* PASSTHRU */
|
||||
}
|
||||
+
|
||||
+ if (case_pass == case_sensitive_on)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Otherwise the strings were equal in case insensitive way, make
|
||||
+ a more fine grained comparison in a case sensitive way. */
|
||||
+
|
||||
+ case_pass = case_sensitive_on;
|
||||
+ string1 = saved_string1;
|
||||
+ string2 = saved_string2;
|
||||
}
|
||||
}
|
||||
|
21252
gdb-bz701131-readline62-1of3.patch
Normal file
21252
gdb-bz701131-readline62-1of3.patch
Normal file
File diff suppressed because it is too large
Load Diff
231
gdb-bz701131-readline62-2of3.patch
Normal file
231
gdb-bz701131-readline62-2of3.patch
Normal file
@ -0,0 +1,231 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html
|
||||
Subject: [patch] testsuite: Test readline-6.2 "ask" regression
|
||||
|
||||
Hi,
|
||||
|
||||
this problem does not affect default FSF GDB build as it is using bundled
|
||||
readline-5.1. But with system readline-6.2 and build using:
|
||||
--with-system-readline use installed readline library
|
||||
|
||||
GDB will no longer ask about displaying too many symbols and dumps them all
|
||||
immediately.
|
||||
PASS:
|
||||
$ gdb gdb
|
||||
(gdb) p <tab><tab>
|
||||
Display all 21482 possibilities? (y or n)_
|
||||
FAIL:
|
||||
$ gdb gdb
|
||||
(gdb) p <tab><tab>
|
||||
Display all 22129 possibilities? (y or n)
|
||||
../../bfd/aout-target.h cs_to_section
|
||||
../../bfd/aout32.c ctime
|
||||
<screens and screens of dumps without any question>
|
||||
|
||||
This regression will soon start affecting distros:
|
||||
FSF GDB HEAD - PASS - using bundled readline-5.1
|
||||
fedora-15 - FAIL - using system readline-6.2
|
||||
fedora-14 - PASS - using system readline-6.1
|
||||
debian-6.0 - PASS - using system readline-6.1
|
||||
kubuntu-10.10 - PASS - using system readline-6.1
|
||||
|
||||
I have asked about it on readline ml:
|
||||
Re: [Bug-readline] callback mode pager disable status
|
||||
https://lists.gnu.org/archive/html/bug-readline/2011-04/msg00012.html
|
||||
The suggested workaround (in fact the readline-5.1 code state) going to patch
|
||||
into the proposed FSF GDB bundled readline-6.2. Distros then can stop using
|
||||
--with-system-readline to still feature recent and system matching readline
|
||||
until readline-7.0 gets released.
|
||||
|
||||
This regression has been so far caught only with system debug infos installed:
|
||||
-PASS: gdb.base/completion.exp: complete (2) 'p no_var_named_this-'
|
||||
-PASS: gdb.base/completion.exp: complete 'p values[0].a'
|
||||
-PASS: gdb.base/completion.exp: complete 'p values[0] . a'
|
||||
-PASS: gdb.base/completion.exp: complete 'p &values[0] -> a'
|
||||
-PASS: gdb.base/completion.exp: copmletion of field in anonymous union
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete (2) 'p no_var_named_this-'
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0].a' 2
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p values[0] . a' 2
|
||||
+FAIL: gdb.base/completion.exp: (timeout) complete 'p &values[0] -> a' 2
|
||||
+FAIL: gdb.base/completion.exp: copmletion of field in anonymous union
|
||||
|
||||
I will check it in with no comments.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/testsuite/
|
||||
2011-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/readline-ask.c: New file.
|
||||
* gdb.base/readline-ask.exp: New file.
|
||||
* gdb.base/readline-ask.inputrc: New file.
|
||||
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.c
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+int
|
||||
+symbol_01_length_40_____________________,
|
||||
+symbol_02_length_40_____________________,
|
||||
+symbol_03_length_40_____________________,
|
||||
+symbol_04_length_40_____________________,
|
||||
+symbol_10_length_40_____________________;
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.exp
|
||||
@@ -0,0 +1,118 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile readline-ask
|
||||
+set executable ${testfile}.x
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${executable}
|
||||
+set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
|
||||
+ untested ${testfile}.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# INPUTRC gets reset for the next testfile.
|
||||
+setenv INPUTRC $inputrc
|
||||
+clean_restart ${executable}
|
||||
+
|
||||
+gdb_test_no_output "set width 50"
|
||||
+gdb_test_no_output "set height 3"
|
||||
+
|
||||
+set cmd "p symbol_0"
|
||||
+send_gdb "$cmd\t"
|
||||
+set test "bell for more message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "$cmd\007$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "\t"
|
||||
+set test "more message for 01 and 02"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "$gdb_prompt " {
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# There get some VT100 characters printed.
|
||||
+
|
||||
+send_gdb "\r"
|
||||
+set test "more message for 03"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\rsymbol_03_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# "$gdb_prompt $" will not match as $cmd gets output: $gdb_prompt p symbol_0
|
||||
+# And "$gdb_prompt p symbol_0" cannot be matched as the default "$gdb_prompt $"
|
||||
+# string from gdb_test_multiple could match earlier.
|
||||
+
|
||||
+send_gdb "\r"
|
||||
+set test "more finish for 04"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\rsymbol_04_length_40_____________________\r\n$gdb_prompt " {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "foo" {No symbol "symbol_0foo" in current context\.} "abort more message"
|
||||
+
|
||||
+set cmd "p symbol_"
|
||||
+send_gdb "$cmd\t"
|
||||
+set test "bell for ask message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "$cmd\007$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "\t"
|
||||
+set test "ask message"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "$gdb_prompt " {
|
||||
+ fail $test
|
||||
+ return 0
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+send_gdb "y"
|
||||
+set test "ask message for 01 and 02"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# There get some VT100 characters printed.
|
||||
+# See the "$gdb_prompt " match like in "more finish for 04".
|
||||
+
|
||||
+send_gdb "n"
|
||||
+set test "ask message no"
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "\r$gdb_prompt " {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_test "foo" {No symbol "symbol_foo" in current context\.} "abort ask message"
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-ask.inputrc
|
||||
@@ -0,0 +1,16 @@
|
||||
+# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set completion-query-items 5
|
||||
|
120
gdb-bz701131-readline62-3of3.patch
Normal file
120
gdb-bz701131-readline62-3of3.patch
Normal file
@ -0,0 +1,120 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html
|
||||
Subject: [patch 4/3] readline-6.2: Substitute inc-hist.texinfo
|
||||
|
||||
Hi,
|
||||
|
||||
forgot the patchset had a `make doc' regression:
|
||||
make: *** No rule to make target `../../../gdb/doc/../../readline/doc/inc-hist.texinfo', needed by `gdb.info'. Stop.
|
||||
|
||||
There was a copy hsuser.texi -> inc-hist.texinfo before with this diff:
|
||||
@node Using History Interactively
|
||||
@chapter Using History Interactively
|
||||
|
||||
-@ifclear BashFeatures
|
||||
-@defcodeindex bt
|
||||
-@end ifclear
|
||||
+@c @ifclear BashFeatures
|
||||
+@c @defcodeindex bt
|
||||
+@c @end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library
|
||||
@end ifset
|
||||
@ifclear BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library interactively,
|
||||
-from a user's standpoint. It should be considered a user's guide. For
|
||||
-information on using the @sc{gnu} History Library in your own programs,
|
||||
-@pxref{Programming with GNU History}.
|
||||
+from a user's standpoint. It should be considered a user's guide.
|
||||
+For information on using the @sc{gnu} History Library in other programs,
|
||||
+see the @sc{gnu} Readline Library Manual.
|
||||
@end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
|
||||
Used slightly alternative one with IMO better reference and I have also kept
|
||||
hsuser.texi in place as readline/ in src/ is no longer a standalone readline
|
||||
distribution anyway.
|
||||
|
||||
|
||||
Sorry,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/doc/
|
||||
2011-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
|
||||
hsuser.texi.
|
||||
* gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and
|
||||
comment to hsuser.texi. Change rluser.texi name in the comment.
|
||||
|
||||
readline/doc/
|
||||
2011-05-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* hsuser.texi (Using History Interactively): Disable !BashFeatures
|
||||
@defcodeindex. Make the `Programming with GNU History' reference
|
||||
external.
|
||||
|
||||
Index: gdb-7.2.90.20110525/gdb/doc/Makefile.in
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/doc/Makefile.in 2011-01-03 14:01:05.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/doc/Makefile.in 2011-05-25 19:16:35.000000000 +0200
|
||||
@@ -117,7 +117,7 @@ GDB_DOC_SOURCE_INCLUDES = \
|
||||
$(srcdir)/gpl.texi \
|
||||
$(srcdir)/agentexpr.texi \
|
||||
$(READLINE_DIR)/rluser.texi \
|
||||
- $(READLINE_DIR)/inc-hist.texinfo
|
||||
+ $(READLINE_DIR)/hsuser.texi
|
||||
GDB_DOC_BUILD_INCLUDES = \
|
||||
gdb-cfg.texi \
|
||||
GDBvn.texi
|
||||
Index: gdb-7.2.90.20110525/gdb/doc/gdb.texinfo
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/gdb/doc/gdb.texinfo 2011-05-25 19:14:36.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/doc/gdb.texinfo 2011-05-25 19:17:01.000000000 +0200
|
||||
@@ -31095,13 +31095,13 @@ things without first using the debugger
|
||||
|
||||
@c The readline documentation is distributed with the readline code
|
||||
@c and consists of the two following files:
|
||||
-@c rluser.texinfo
|
||||
-@c inc-hist.texinfo
|
||||
+@c rluser.texi
|
||||
+@c hsuser.texi
|
||||
@c Use -I with makeinfo to point to the appropriate directory,
|
||||
@c environment var TEXINPUTS with TeX.
|
||||
@ifclear SYSTEM_READLINE
|
||||
@include rluser.texi
|
||||
-@include inc-hist.texinfo
|
||||
+@include hsuser.texi
|
||||
@end ifclear
|
||||
|
||||
@node In Memoriam
|
||||
Index: gdb-7.2.90.20110525/readline/doc/hsuser.texi
|
||||
===================================================================
|
||||
--- gdb-7.2.90.20110525.orig/readline/doc/hsuser.texi 2011-05-25 19:16:17.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/readline/doc/hsuser.texi 2011-05-25 19:16:35.000000000 +0200
|
||||
@@ -26,9 +26,10 @@ into another language, under the above c
|
||||
@node Using History Interactively
|
||||
@chapter Using History Interactively
|
||||
|
||||
-@ifclear BashFeatures
|
||||
-@defcodeindex bt
|
||||
-@end ifclear
|
||||
+@c GDB bundling modification:
|
||||
+@c @ifclear BashFeatures
|
||||
+@c @defcodeindex bt
|
||||
+@c @end ifclear
|
||||
|
||||
@ifset BashFeatures
|
||||
This chapter describes how to use the @sc{gnu} History Library
|
||||
@@ -41,7 +42,8 @@ see the @sc{gnu} Readline Library Manual
|
||||
This chapter describes how to use the @sc{gnu} History Library interactively,
|
||||
from a user's standpoint. It should be considered a user's guide. For
|
||||
information on using the @sc{gnu} History Library in your own programs,
|
||||
-@pxref{Programming with GNU History}.
|
||||
+@c GDB bundling modification:
|
||||
+@pxref{Programming with GNU History, , , history, GNU History Library}.
|
||||
@end ifclear
|
||||
|
||||
@ifset BashFeatures
|
154
gdb-core-thread-internalerr-1of3.patch
Normal file
154
gdb-core-thread-internalerr-1of3.patch
Normal file
@ -0,0 +1,154 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00679.html
|
||||
Subject: Re: [patch 1/3] Code cleanup: gdb.threads/gcore-thread.exp
|
||||
|
||||
On Thu, 24 Feb 2011 08:20:09 +0100, Joel Brobecker wrote:
|
||||
> Just a thought: Do we really need to worry about restoring
|
||||
> the timeout at the end of the testcase, given that this is
|
||||
> automatically done at the start of each testcase (see gdb.exp:
|
||||
> gdb_init)?
|
||||
|
||||
I see now:
|
||||
Re: [RFA/testsuite] Reset the timeout duration at the start of each testcase.
|
||||
http://sourceware.org/ml/gdb-patches/2010-02/msg00202.html
|
||||
commit 501c57da40fd27c8036a5fc995f750b0559272ad
|
||||
|
||||
Patch updated.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/gcore-thread.exp ($testfile): Match it the .exp
|
||||
filename.
|
||||
($srcfile): Preserve the original value.
|
||||
($testfile): Match it the .exp filename.
|
||||
($corefile): New variable. Substitute it around.
|
||||
Use clean_restart.
|
||||
($prev_timeout): Remove.
|
||||
(load_core): Move core loading into this proc.
|
||||
Fix restore of $timeout if load_core fails.
|
||||
|
||||
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
@@ -21,11 +21,11 @@ if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
|
||||
-
|
||||
# Single-threaded test case
|
||||
-set testfile "pthreads"
|
||||
-set srcfile ${testfile}.c
|
||||
-set binfile ${objdir}/${subdir}/gcore-${testfile}
|
||||
+set testfile "gcore-thread"
|
||||
+set srcfile pthreads.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+set corefile ${objdir}/${subdir}/${testfile}.test
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@@ -41,10 +41,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
-gdb_exit
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
+clean_restart ${testfile}
|
||||
|
||||
# regexp for "horizontal" text (i.e. doesn't include newline or
|
||||
# carriage return)
|
||||
@@ -53,7 +50,6 @@ set horiz "\[^\n\r\]*"
|
||||
# regexp for newline
|
||||
set nl "\[\r\n\]+"
|
||||
|
||||
-set prev_timeout $timeout
|
||||
set timeout 30
|
||||
|
||||
gdb_test_multiple "help gcore" "help gcore" {
|
||||
@@ -92,10 +88,9 @@ delete_breakpoints
|
||||
gdb_breakpoint "thread2"
|
||||
gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
|
||||
|
||||
-set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
|
||||
+set escapedfilename [string_to_regexp $corefile]
|
||||
# Drop corefile
|
||||
-gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
|
||||
- "save a corefile" \
|
||||
+gdb_test_multiple "gcore $corefile" "save a corefile" \
|
||||
{
|
||||
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||
pass "save a corefile"
|
||||
@@ -114,31 +109,38 @@ if {!$core_supported} {
|
||||
return -1
|
||||
}
|
||||
|
||||
+
|
||||
# Now restart gdb and load the corefile.
|
||||
-gdb_exit
|
||||
-gdb_start
|
||||
-gdb_reinitialize_dir $srcdir/$subdir
|
||||
-gdb_load ${binfile}
|
||||
-
|
||||
-gdb_test_multiple "core ${objdir}/${subdir}/gcore.test" \
|
||||
- "re-load generated corefile" {
|
||||
- -re ".* is not a core dump:.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (bad file format)"
|
||||
- # No use proceeding from here.
|
||||
- return;
|
||||
- }
|
||||
- -re ".*: No such file or directory.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (file not found)"
|
||||
- # No use proceeding from here.
|
||||
- return;
|
||||
- }
|
||||
- -re ".*Couldn't find .* registers in core file.*$gdb_prompt $" {
|
||||
- fail "re-load generated corefile (incomplete note section)"
|
||||
- }
|
||||
- -re "Core was generated by .*$gdb_prompt $" {
|
||||
- pass "re-load generated corefile"
|
||||
+clean_restart ${testfile}
|
||||
+
|
||||
+proc load_core { corefile } {
|
||||
+ global gdb_prompt
|
||||
+
|
||||
+ gdb_test_multiple "core $corefile" \
|
||||
+ "re-load generated corefile" {
|
||||
+ -re " is not a core dump:.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (bad file format)"
|
||||
+ # No use proceeding from here.
|
||||
+ return 0;
|
||||
+ }
|
||||
+ -re ": No such file or directory.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (file not found)"
|
||||
+ # No use proceeding from here.
|
||||
+ return 0;
|
||||
+ }
|
||||
+ -re "Couldn't find .* registers in core file.*\r\n$gdb_prompt $" {
|
||||
+ fail "re-load generated corefile (incomplete note section)"
|
||||
+ }
|
||||
+ -re "Core was generated by .*\r\n$gdb_prompt $" {
|
||||
+ pass "re-load generated corefile"
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+if ![load_core $corefile] {
|
||||
+ return
|
||||
+}
|
||||
|
||||
# FIXME: now what can we test about the thread state?
|
||||
# We do not know for certain that there should be at least
|
||||
@@ -158,5 +160,3 @@ gdb_test "info threads" ".* thread2 .*" \
|
||||
|
||||
gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \
|
||||
"thread2 is current thread in corefile"
|
||||
-
|
||||
-set timeout $prev_timeout
|
||||
|
102
gdb-core-thread-internalerr-2of3.patch
Normal file
102
gdb-core-thread-internalerr-2of3.patch
Normal file
@ -0,0 +1,102 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00680.html
|
||||
Subject: [patch 2/3] Fix threading internal error on corrupted memory [rediff]
|
||||
|
||||
[rediff]
|
||||
|
||||
gdb/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* linux-thread-db.c (find_new_threads_callback): Exit on zero TI_TID
|
||||
even if !TARGET_HAS_EXECUTION.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/gcore-thread.exp ($core0file): New variable.
|
||||
(clear __stack_user.next, clear stack_used.next)
|
||||
(save a zeroed-threads corefile): New test.
|
||||
Call core_load for $core0file.
|
||||
(zeroed-threads cannot be listed): New test.
|
||||
|
||||
--- a/gdb/linux-thread-db.c
|
||||
+++ b/gdb/linux-thread-db.c
|
||||
@@ -1335,7 +1335,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
|
||||
return 0; /* A zombie -- ignore. */
|
||||
|
||||
- if (ti.ti_tid == 0 && target_has_execution)
|
||||
+ if (ti.ti_tid == 0)
|
||||
{
|
||||
/* A thread ID of zero means that this is the main thread, but
|
||||
glibc has not yet initialized thread-local storage and the
|
||||
@@ -1347,10 +1347,13 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
need this glibc bug workaround. */
|
||||
info->need_stale_parent_threads_check = 0;
|
||||
|
||||
- err = info->td_thr_event_enable_p (th_p, 1);
|
||||
- if (err != TD_OK)
|
||||
- error (_("Cannot enable thread event reporting for LWP %d: %s"),
|
||||
- (int) ti.ti_lid, thread_db_err_str (err));
|
||||
+ if (target_has_execution)
|
||||
+ {
|
||||
+ err = info->td_thr_event_enable_p (th_p, 1);
|
||||
+ if (err != TD_OK)
|
||||
+ error (_("Cannot enable thread event reporting for LWP %d: %s"),
|
||||
+ (int) ti.ti_lid, thread_db_err_str (err));
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
|
||||
@@ -26,6 +26,7 @@ set testfile "gcore-thread"
|
||||
set srcfile pthreads.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set corefile ${objdir}/${subdir}/${testfile}.test
|
||||
+set core0file ${objdir}/${subdir}/${testfile}0.test
|
||||
|
||||
if [istarget "*-*-linux"] then {
|
||||
set target_cflags "-D_MIT_POSIX_THREADS"
|
||||
@@ -110,6 +111,29 @@ if {!$core_supported} {
|
||||
}
|
||||
|
||||
|
||||
+# Test the uninitialized thread list.
|
||||
+# Provide the case of glibc td_thr_get_info handling of:
|
||||
+# /* Special case for the main thread before initialization. */
|
||||
+
|
||||
+foreach symbol {__stack_user stack_used} {
|
||||
+ set test "clear ${symbol}.next"
|
||||
+ gdb_test_multiple "p *(void **) &${symbol} = 0" $test {
|
||||
+ -re " = \\(void \\*\\) 0x0\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "No symbol \"${symbol}\" in current context\\.\r\n$gdb_prompt $" {
|
||||
+ xfail $test
|
||||
+ # Do not do the verification.
|
||||
+ set core0file ""
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+if {"$core0file" != ""} {
|
||||
+ gdb_test "gcore $core0file" "Saved corefile .*" "save a zeroed-threads corefile"
|
||||
+}
|
||||
+
|
||||
+
|
||||
# Now restart gdb and load the corefile.
|
||||
clean_restart ${testfile}
|
||||
|
||||
@@ -160,3 +184,11 @@ gdb_test "info threads" ".* thread2 .*" \
|
||||
|
||||
gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \
|
||||
"thread2 is current thread in corefile"
|
||||
+
|
||||
+
|
||||
+# Test the uninitialized thread list.
|
||||
+
|
||||
+if {"$core0file" != "" && [load_core $core0file]} {
|
||||
+
|
||||
+ gdb_test "info threads" "Cannot find new threads: .*" "zeroed-threads cannot be listed"
|
||||
+}
|
||||
|
101
gdb-core-thread-internalerr-3of3.patch
Normal file
101
gdb-core-thread-internalerr-3of3.patch
Normal file
@ -0,0 +1,101 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00675.html
|
||||
Subject: [patch 3/3] Display core reasons even during thread error
|
||||
|
||||
[ rediff ]
|
||||
|
||||
Hi,
|
||||
|
||||
this is mostly unrelated. But after the patch 2/3 it will still FAIL:
|
||||
Loaded symbols for /lib64/ld-linux-x86-64.so.2
|
||||
Cannot find new threads: debugger service failed
|
||||
(gdb) FAIL: gdb.threads/gcore-thread.exp: re-load generated corefile
|
||||
|
||||
as it is a common bug I dislike for years I have fixed it here:
|
||||
Loaded symbols for /lib64/ld-linux-x86-64.so.2
|
||||
Cannot find new threads: debugger service failed
|
||||
Core was generated by `.../gdb/testsuite/gdb.threads/gcore-thread'.
|
||||
Program terminated with signal 5, Trace/breakpoint trap.
|
||||
#0 thread2 (arg=0xdeadbeef) at ./gdb.threads/pthreads.c:91
|
||||
91 int k = 0;
|
||||
(gdb) PASS: gdb.threads/gcore-thread.exp: re-load generated corefile
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* corelow.c: Include wrapper.h.
|
||||
(core_open): Call now gdb_target_find_new_threads.
|
||||
* wrapper.c: Include target.h.
|
||||
(gdb_target_find_new_threads): New.
|
||||
* wrapper.h (gdb_target_find_new_threads): New declaration.
|
||||
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "auxv.h"
|
||||
#include "elf/common.h"
|
||||
#include "gdbcmd.h"
|
||||
+#include "wrapper.h"
|
||||
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
@@ -428,7 +429,7 @@ core_open (char *filename, int from_tty)
|
||||
may be a thread_stratum target loaded on top of target core by
|
||||
now. The layer above should claim threads found in the BFD
|
||||
sections. */
|
||||
- target_find_new_threads ();
|
||||
+ gdb_target_find_new_threads ();
|
||||
|
||||
p = bfd_core_file_failing_command (core_bfd);
|
||||
if (p)
|
||||
--- a/gdb/wrapper.c
|
||||
+++ b/gdb/wrapper.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "exceptions.h"
|
||||
#include "wrapper.h"
|
||||
#include "ui-out.h"
|
||||
+#include "target.h"
|
||||
|
||||
int
|
||||
gdb_parse_exp_1 (char **stringptr, struct block *block, int comma,
|
||||
@@ -161,3 +162,24 @@ gdb_value_struct_elt (struct ui_out *uiout, struct value **result,
|
||||
return GDB_RC_FAIL;
|
||||
return GDB_RC_OK;
|
||||
}
|
||||
+
|
||||
+/* Call target_find_new_threads without throwing exception. Exception is
|
||||
+ printed if it got thrown. */
|
||||
+
|
||||
+int
|
||||
+gdb_target_find_new_threads (void)
|
||||
+{
|
||||
+ volatile struct gdb_exception except;
|
||||
+
|
||||
+ TRY_CATCH (except, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ target_find_new_threads ();
|
||||
+ }
|
||||
+
|
||||
+ if (except.reason < 0)
|
||||
+ {
|
||||
+ exception_print (gdb_stderr, except);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
--- a/gdb/wrapper.h
|
||||
+++ b/gdb/wrapper.h
|
||||
@@ -48,4 +48,6 @@ extern int gdb_value_ind (struct value *val, struct value ** rval);
|
||||
|
||||
extern int gdb_parse_and_eval_type (char *, int, struct type **);
|
||||
|
||||
+extern int gdb_target_find_new_threads (void);
|
||||
+
|
||||
#endif /* wrapper.h */
|
||||
|
@ -1,86 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-01/msg00507.html
|
||||
Subject: [patch] Fix DWARF-3+ DW_AT_accessibility default assumption
|
||||
|
||||
Hi,
|
||||
|
||||
GDB regresses on default compiler option -gdwarf-3 on gcc-4.6+ as this gcc
|
||||
started to omit DW_AT_accessibility for the default value case. Normal
|
||||
upstream gcc still has -gdwarf-2 default (Fedora uses -gdwarf-3 default).
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
(There are other regressions to be fixed due to gcc45->gcc46.)
|
||||
|
||||
I will check it in in some time.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
-FAIL: gdb.cp/casts.exp: dynamic_cast simple downcast
|
||||
-FAIL: gdb.cp/casts.exp: dynamic_cast simple downcast to intermediate class
|
||||
-FAIL: gdb.cp/casts.exp: dynamic_cast unique downcast
|
||||
-FAIL: gdb.cp/casts.exp: dynamic_cast to sibling
|
||||
-FAIL: gdb.cp/classes.exp: ptype class default_private_class // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/classes.exp: ptype class explicit_private_class // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/classes.exp: ptype class mixed_protection_class // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype A // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype B // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype a // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype b // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype pAa // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype pAe // wrong access specifier for field: public
|
||||
-FAIL: gdb.cp/virtfunc.exp: ptype pBe // wrong access specifier for field: public
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of class A
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.public
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.private
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.protected
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.protected.b
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.protected.b.public
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of A.protected.b.private
|
||||
-FAIL: gdb.mi/gdb792.exp: list children of class C
|
||||
-FAIL: gdb.python/py-value.exp: python print bool(gdb.parse_and_eval('base').dynamic_cast(gdb.lookup_type('Derived').pointer()))
|
||||
|
||||
|
||||
gdb/
|
||||
2011-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix DWARF-3+ DW_AT_accessibility default assumption.
|
||||
* dwarf2read.c (dwarf2_add_field): Fix new_field->accessibility for
|
||||
cu->header.version >= 3.
|
||||
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -6186,13 +6186,25 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
|
||||
}
|
||||
fip->nfields++;
|
||||
|
||||
- /* Handle accessibility and virtuality of field.
|
||||
- The default accessibility for members is public, the default
|
||||
- accessibility for inheritance is private. */
|
||||
- if (die->tag != DW_TAG_inheritance)
|
||||
- new_field->accessibility = DW_ACCESS_public;
|
||||
+ if (cu->header.version < 3)
|
||||
+ {
|
||||
+ /* The default DWARF 2 accessibility for members is public, the default
|
||||
+ accessibility for inheritance is private. */
|
||||
+
|
||||
+ if (die->tag != DW_TAG_inheritance)
|
||||
+ new_field->accessibility = DW_ACCESS_public;
|
||||
+ else
|
||||
+ new_field->accessibility = DW_ACCESS_private;
|
||||
+ }
|
||||
else
|
||||
- new_field->accessibility = DW_ACCESS_private;
|
||||
+ {
|
||||
+ /* DWARF 3 specifies the default accessibility explicitly. */
|
||||
+
|
||||
+ if (die->parent->tag == DW_TAG_class_type)
|
||||
+ new_field->accessibility = DW_ACCESS_private;
|
||||
+ else
|
||||
+ new_field->accessibility = DW_ACCESS_public;
|
||||
+ }
|
||||
new_field->virtuality = DW_VIRTUALITY_none;
|
||||
|
||||
attr = dwarf2_attr (die, DW_AT_accessibility, cu);
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gdb-7.1.90.20100806/gdb/infcall.c.orig 2010-08-10 00:34:10.000000000 +0200
|
||||
+++ gdb-7.1.90.20100806/gdb/infcall.c 2010-08-10 00:36:03.000000000 +0200
|
||||
@@ -284,7 +284,7 @@ find_function_addr (struct value *functi
|
||||
struct type *ftype = check_typedef (value_type (function));
|
||||
struct gdbarch *gdbarch = get_type_arch (ftype);
|
||||
struct type *value_type = NULL;
|
||||
- CORE_ADDR funaddr;
|
||||
+ CORE_ADDR funaddr = 0; /* GCC false -fprofile-use warning. */
|
||||
|
||||
/* If it's a member function, just look at the function
|
||||
part of it. */
|
@ -1,8 +1,8 @@
|
||||
Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
Index: gdb-7.2.90.20110525/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/dwarf2read.c 2011-01-17 15:50:41.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/dwarf2read.c 2011-01-17 15:56:23.000000000 +0100
|
||||
@@ -7465,12 +7465,14 @@ read_set_type (struct die_info *die, str
|
||||
--- gdb-7.2.90.20110525.orig/gdb/dwarf2read.c 2011-05-25 17:06:19.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/dwarf2read.c 2011-05-25 17:10:46.000000000 +0200
|
||||
@@ -7665,12 +7665,14 @@ read_set_type (struct die_info *die, str
|
||||
return set_die_type (die, set_type, cu);
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
struct attribute *attr;
|
||||
struct symbol *sym;
|
||||
CORE_ADDR base = (CORE_ADDR) 0;
|
||||
@@ -7495,10 +7497,40 @@ read_common_block (struct die_info *die,
|
||||
@@ -7695,20 +7697,67 @@ read_common_block (struct die_info *die,
|
||||
}
|
||||
if (die->child != NULL)
|
||||
{
|
||||
@ -52,16 +52,17 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
child_die = die->child;
|
||||
while (child_die && child_die->tag)
|
||||
{
|
||||
LONGEST offset;
|
||||
|
||||
+ /* Create the symbol in the DW_TAG_common_block block in the current
|
||||
+ symbol scope. */
|
||||
sym = new_symbol (child_die, NULL, cu);
|
||||
+
|
||||
+ /* Undocumented in DWARF3, when it can be present? */
|
||||
attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
|
||||
if (sym != NULL && attr != NULL)
|
||||
if (sym != NULL
|
||||
&& handle_data_member_location (child_die, cu, &offset))
|
||||
{
|
||||
@@ -7516,8 +7548,25 @@ read_common_block (struct die_info *die,
|
||||
SYMBOL_VALUE_ADDRESS (sym) = base + byte_offset;
|
||||
SYMBOL_VALUE_ADDRESS (sym) = base + offset;
|
||||
add_symbol_to_list (sym, &global_symbols);
|
||||
}
|
||||
+
|
||||
@ -86,7 +87,7 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11111,6 +11160,13 @@ new_symbol_full (struct die_info *die, s
|
||||
@@ -11376,6 +11425,13 @@ new_symbol_full (struct die_info *die, s
|
||||
{
|
||||
var_decode_location (attr, sym, cu);
|
||||
attr2 = dwarf2_attr (die, DW_AT_external, cu);
|
||||
@ -100,7 +101,7 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
if (SYMBOL_CLASS (sym) == LOC_STATIC
|
||||
&& SYMBOL_VALUE_ADDRESS (sym) == 0
|
||||
&& !dwarf2_per_objfile->has_section_at_zero)
|
||||
@@ -11283,6 +11339,11 @@ new_symbol_full (struct die_info *die, s
|
||||
@@ -11548,6 +11604,11 @@ new_symbol_full (struct die_info *die, s
|
||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||
list_to_add = &global_symbols;
|
||||
break;
|
||||
@ -112,10 +113,10 @@ Index: gdb-7.2.50.20110117/gdb/dwarf2read.c
|
||||
default:
|
||||
/* Not a tag we recognize. Hopefully we aren't processing
|
||||
trash data, but since we must specifically ignore things
|
||||
Index: gdb-7.2.50.20110117/gdb/f-lang.c
|
||||
Index: gdb-7.2.90.20110525/gdb/f-lang.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/f-lang.c 2011-01-17 15:56:07.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/f-lang.c 2011-01-17 15:56:48.000000000 +0100
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-lang.c 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-lang.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -446,27 +446,3 @@ _initialize_f_language (void)
|
||||
|
||||
add_language (&f_language_defn);
|
||||
@ -144,10 +145,10 @@ Index: gdb-7.2.50.20110117/gdb/f-lang.c
|
||||
- }
|
||||
- return (NULL);
|
||||
-}
|
||||
Index: gdb-7.2.50.20110117/gdb/f-lang.h
|
||||
Index: gdb-7.2.90.20110525/gdb/f-lang.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/f-lang.h 2011-01-17 15:54:14.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/f-lang.h 2011-01-17 15:56:23.000000000 +0100
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-lang.h 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-lang.h 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -52,36 +52,8 @@ enum f90_range_type
|
||||
NONE_BOUND_DEFAULT /* "(low:high)" */
|
||||
};
|
||||
@ -185,10 +186,10 @@ Index: gdb-7.2.50.20110117/gdb/f-lang.h
|
||||
|
||||
/* When reasonable array bounds cannot be fetched, such as when
|
||||
you ask to 'mt print symbols' and there is no stack frame and
|
||||
Index: gdb-7.2.50.20110117/gdb/f-valprint.c
|
||||
Index: gdb-7.2.90.20110525/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/f-valprint.c 2011-01-17 15:54:36.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/f-valprint.c 2011-01-17 15:59:38.000000000 +0100
|
||||
--- gdb-7.2.90.20110525.orig/gdb/f-valprint.c 2011-05-25 17:06:22.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/f-valprint.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "gdbcore.h"
|
||||
#include "command.h"
|
||||
@ -198,7 +199,7 @@ Index: gdb-7.2.50.20110117/gdb/f-valprint.c
|
||||
|
||||
extern void _initialize_f_valprint (void);
|
||||
static void info_common_command (char *, int);
|
||||
@@ -489,22 +491,54 @@ f_val_print (struct type *type, const gd
|
||||
@@ -501,22 +503,54 @@ f_val_print (struct type *type, const gd
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -266,7 +267,7 @@ Index: gdb-7.2.50.20110117/gdb/f-valprint.c
|
||||
}
|
||||
|
||||
/* This function is used to print out the values in a given COMMON
|
||||
@@ -514,11 +548,9 @@ list_all_visible_commons (char *funname)
|
||||
@@ -526,11 +560,9 @@ list_all_visible_commons (char *funname)
|
||||
static void
|
||||
info_common_command (char *comname, int from_tty)
|
||||
{
|
||||
@ -280,7 +281,7 @@ Index: gdb-7.2.50.20110117/gdb/f-valprint.c
|
||||
|
||||
/* We have been told to display the contents of F77 COMMON
|
||||
block supposedly visible in this function. Let us
|
||||
@@ -530,74 +562,31 @@ info_common_command (char *comname, int
|
||||
@@ -542,74 +574,31 @@ info_common_command (char *comname, int
|
||||
/* The following is generally ripped off from stack.c's routine
|
||||
print_frame_info(). */
|
||||
|
||||
@ -371,11 +372,11 @@ Index: gdb-7.2.50.20110117/gdb/f-valprint.c
|
||||
}
|
||||
|
||||
void
|
||||
Index: gdb-7.2.50.20110117/gdb/stack.c
|
||||
Index: gdb-7.2.90.20110525/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/stack.c 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/stack.c 2011-01-17 15:56:23.000000000 +0100
|
||||
@@ -1498,6 +1498,8 @@ iterate_over_block_locals (struct block
|
||||
--- gdb-7.2.90.20110525.orig/gdb/stack.c 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/stack.c 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -1525,6 +1525,8 @@ iterate_over_block_locals (struct block
|
||||
case LOC_COMPUTED:
|
||||
if (SYMBOL_IS_ARGUMENT (sym))
|
||||
break;
|
||||
@ -384,26 +385,26 @@ Index: gdb-7.2.50.20110117/gdb/stack.c
|
||||
(*cb) (SYMBOL_PRINT_NAME (sym), sym, cb_data);
|
||||
break;
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/symtab.h
|
||||
Index: gdb-7.2.90.20110525/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/symtab.h 2011-01-17 15:47:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/symtab.h 2011-01-17 15:56:23.000000000 +0100
|
||||
@@ -408,7 +408,10 @@ typedef enum domain_enum_tag
|
||||
FUNCTIONS_DOMAIN,
|
||||
--- gdb-7.2.90.20110525.orig/gdb/symtab.h 2011-05-25 17:05:21.000000000 +0200
|
||||
+++ gdb-7.2.90.20110525/gdb/symtab.h 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -411,7 +411,10 @@ typedef enum domain_enum_tag
|
||||
TYPES_DOMAIN,
|
||||
|
||||
/* All defined types */
|
||||
- TYPES_DOMAIN
|
||||
+ TYPES_DOMAIN,
|
||||
/* Any type. */
|
||||
- ALL_DOMAIN
|
||||
+ ALL_DOMAIN,
|
||||
+
|
||||
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
|
||||
+ COMMON_BLOCK_DOMAIN
|
||||
}
|
||||
domain_enum;
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.exp 2011-01-17 15:56:23.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.exp 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -0,0 +1,101 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@ -506,10 +507,10 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.exp
|
||||
+gdb_test "p ix_x" " = 1 *" "p ix_x in"
|
||||
+gdb_test "p iy_y" " = 2 *" "p iy_y in"
|
||||
+gdb_test "p iz_z2" " = 3 *" "p iz_z2 in"
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.f90
|
||||
Index: gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.fortran/common-block.f90 2011-01-17 15:56:23.000000000 +0100
|
||||
+++ gdb-7.2.90.20110525/gdb/testsuite/gdb.fortran/common-block.f90 2011-05-25 17:07:02.000000000 +0200
|
||||
@@ -0,0 +1,67 @@
|
||||
+! Copyright 2008 Free Software Foundation, Inc.
|
||||
+!
|
||||
|
@ -1,24 +1,709 @@
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 6a98d57..9fa9c3c 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -10371,6 +10371,9 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
http://sourceware.org/ml/gdb-patches/2011-07/msg00645.html
|
||||
Subject: [patch] workaround gcc46: prologue skip skips too far (PR 12435) #2
|
||||
|
||||
if (op_code >= lh->opcode_base)
|
||||
Hi,
|
||||
|
||||
this is an improved patch of a former:
|
||||
[patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01108.html
|
||||
cancel/FYI: Re: [patch] workaround gcc46: prologue skip skips too far (PR 12435)
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg01123.html
|
||||
|
||||
For example `break error' does not work for debugging GDB with gcc-4.6.x.
|
||||
|
||||
As gcc-4.6.0 and now even 4.6.1 still has this bug and I have seen a user(s?)
|
||||
on non-Fedora platform asking about this bug and as there may be enough
|
||||
binaries out there (although it affects only -O0 -g compilation) coded it
|
||||
properly I have coded the workaround properly this time.
|
||||
|
||||
It does not solve overlays well, but the code just does not work for overlays,
|
||||
it has no other negative effect.
|
||||
|
||||
I will update the code after FSF gcc gets fixed to minimize the workaround.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
|
||||
|
||||
I would welcome a comment whether it is suitable for FSF GDB.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
|
||||
next_sal, buf, offset and xmmreg. Advance PC if it sees the PR.
|
||||
* dwarf2read.c (process_full_comp_unit): Initialize
|
||||
amd64_prologue_line_bug.
|
||||
* symtab.h (struct symtab): New field amd64_prologue_line_bug.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR breakpoints/12435
|
||||
* gdb.arch/amd64-prologue-xmm.c: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.exp: New file.
|
||||
* gdb.arch/amd64-prologue-xmm.s: New file.
|
||||
|
||||
Index: gdb-7.3/gdb/amd64-tdep.c
|
||||
===================================================================
|
||||
--- gdb-7.3.orig/gdb/amd64-tdep.c 2011-03-18 19:52:29.000000000 +0100
|
||||
+++ gdb-7.3/gdb/amd64-tdep.c 2011-07-26 22:09:15.000000000 +0200
|
||||
@@ -1902,6 +1902,9 @@ amd64_skip_prologue (struct gdbarch *gdb
|
||||
{
|
||||
+ CORE_ADDR saved_address = address;
|
||||
+ unsigned int saved_line = line;
|
||||
struct amd64_frame_cache cache;
|
||||
CORE_ADDR pc;
|
||||
+ struct symtab_and_line start_pc_sal, next_sal;
|
||||
+ gdb_byte buf[4 + 8 * 7];
|
||||
+ int offset, xmmreg;
|
||||
|
||||
amd64_init_frame_cache (&cache);
|
||||
pc = amd64_analyze_prologue (gdbarch, start_pc, 0xffffffffffffffffLL,
|
||||
@@ -1909,7 +1912,71 @@ amd64_skip_prologue (struct gdbarch *gdb
|
||||
if (cache.frameless_p)
|
||||
return start_pc;
|
||||
|
||||
- return pc;
|
||||
+ /* GCC PR debug/48827 produced false prologue end:
|
||||
+ 84 c0 test %al,%al
|
||||
+ 74 23 je after
|
||||
+ <-- here is 0 lines advance - the false prologue end marker.
|
||||
+ 0f 29 85 70 ff ff ff movaps %xmm0,-0x90(%rbp)
|
||||
+ 0f 29 4d 80 movaps %xmm1,-0x80(%rbp)
|
||||
+ 0f 29 55 90 movaps %xmm2,-0x70(%rbp)
|
||||
+ 0f 29 5d a0 movaps %xmm3,-0x60(%rbp)
|
||||
+ 0f 29 65 b0 movaps %xmm4,-0x50(%rbp)
|
||||
+ 0f 29 6d c0 movaps %xmm5,-0x40(%rbp)
|
||||
+ 0f 29 75 d0 movaps %xmm6,-0x30(%rbp)
|
||||
+ 0f 29 7d e0 movaps %xmm7,-0x20(%rbp)
|
||||
+ after: */
|
||||
+
|
||||
/* Special operand. */
|
||||
adj_opcode = op_code - lh->opcode_base;
|
||||
address += (((op_index + (adj_opcode / lh->line_range))
|
||||
@@ -10383,7 +10386,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
||||
dwarf2_debug_line_missing_file_complaint ();
|
||||
/* For now we ignore lines not starting on an
|
||||
instruction boundary. */
|
||||
- else if (op_index == 0)
|
||||
+ else if (op_index == 0
|
||||
+ && (address != saved_address || line != saved_line))
|
||||
{
|
||||
lh->file_names[file - 1].included_p = 1;
|
||||
if (!decode_for_pst_p && is_stmt)
|
||||
+ if (pc == start_pc)
|
||||
+ return pc;
|
||||
+
|
||||
+ start_pc_sal = find_pc_sect_line (start_pc, NULL, 0);
|
||||
+ if (start_pc_sal.symtab == NULL
|
||||
+ || !start_pc_sal.symtab->amd64_prologue_line_bug
|
||||
+ || start_pc_sal.pc != start_pc || pc >= start_pc_sal.end)
|
||||
+ return pc;
|
||||
+
|
||||
+ next_sal = find_pc_sect_line (start_pc_sal.end, NULL, 0);
|
||||
+ if (next_sal.line != start_pc_sal.line)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* START_PC can be from overlayed memory, ignored here. */
|
||||
+ if (target_read_memory (next_sal.pc - 4, buf, sizeof (buf)) != 0)
|
||||
+ return pc;
|
||||
+
|
||||
+ /* test %al,%al */
|
||||
+ if (buf[0] != 0x84 || buf[1] != 0xc0)
|
||||
+ return pc;
|
||||
+ /* je AFTER */
|
||||
+ if (buf[2] != 0x74)
|
||||
+ return pc;
|
||||
+
|
||||
+ offset = 4;
|
||||
+ for (xmmreg = 0; xmmreg < 8; xmmreg++)
|
||||
+ {
|
||||
+ /* movaps %xmmreg?,-0x??(%rbp) */
|
||||
+ if (buf[offset] != 0x0f || buf[offset + 1] != 0x29
|
||||
+ || (buf[offset + 2] & 0b00111111) != (xmmreg << 3 | 0b101))
|
||||
+ return pc;
|
||||
+
|
||||
+ if ((buf[offset + 2] & 0b11000000) == 0b01000000)
|
||||
+ {
|
||||
+ /* 8-bit displacement. */
|
||||
+ offset += 4;
|
||||
+ }
|
||||
+ else if ((buf[offset + 2] & 0b11000000) == 0b10000000)
|
||||
+ {
|
||||
+ /* 32-bit displacement. */
|
||||
+ offset += 7;
|
||||
+ }
|
||||
+ else
|
||||
+ return pc;
|
||||
+ }
|
||||
+
|
||||
+ /* je AFTER */
|
||||
+ if (offset - 4 != buf[3])
|
||||
+ return pc;
|
||||
+
|
||||
+ return next_sal.end;
|
||||
}
|
||||
|
||||
|
||||
Index: gdb-7.3/gdb/dwarf2read.c
|
||||
===================================================================
|
||||
--- gdb-7.3.orig/gdb/dwarf2read.c 2011-07-26 22:08:59.000000000 +0200
|
||||
+++ gdb-7.3/gdb/dwarf2read.c 2011-07-26 22:11:07.000000000 +0200
|
||||
@@ -4647,6 +4647,42 @@ producer_is_gcc_ge_4_0 (struct dwarf2_cu
|
||||
return major >= 4;
|
||||
}
|
||||
|
||||
+static int
|
||||
+producer_is_gcc_ge_4_6 (struct dwarf2_cu *cu)
|
||||
+{
|
||||
+ const char *cs;
|
||||
+ int major, minor;
|
||||
+
|
||||
+ if (cu->producer == NULL)
|
||||
+ {
|
||||
+ /* For unknown compilers expect their behavior is not compliant. For GCC
|
||||
+ this case can also happen for -gdwarf-4 type units supported since
|
||||
+ gcc-4.5. */
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Skip any identifier after "GNU " - such as "C++" or "Java". */
|
||||
+
|
||||
+ if (strncmp (cu->producer, "GNU ", strlen ("GNU ")) != 0)
|
||||
+ {
|
||||
+ /* For non-GCC compilers expect their behavior is not compliant. */
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+ cs = &cu->producer[strlen ("GNU ")];
|
||||
+ while (*cs && !isdigit (*cs))
|
||||
+ cs++;
|
||||
+ if (sscanf (cs, "%d.%d", &major, &minor) != 2)
|
||||
+ {
|
||||
+ /* Not recognized as GCC. */
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return major >= 4 && minor >= 6;
|
||||
+}
|
||||
+
|
||||
/* Generate full symbol information for PST and CU, whose DIEs have
|
||||
already been loaded into memory. */
|
||||
|
||||
@@ -4706,6 +4742,9 @@ process_full_comp_unit (struct dwarf2_pe
|
||||
*/
|
||||
if (cu->has_loclist && producer_is_gcc_ge_4_0 (cu))
|
||||
symtab->locations_valid = 1;
|
||||
+
|
||||
+ if (producer_is_gcc_ge_4_6 (cu))
|
||||
+ symtab->amd64_prologue_line_bug = 1;
|
||||
}
|
||||
|
||||
if (dwarf2_per_objfile->using_index)
|
||||
Index: gdb-7.3/gdb/symtab.h
|
||||
===================================================================
|
||||
--- gdb-7.3.orig/gdb/symtab.h 2011-07-26 22:08:57.000000000 +0200
|
||||
+++ gdb-7.3/gdb/symtab.h 2011-07-26 22:09:39.000000000 +0200
|
||||
@@ -779,6 +779,11 @@ struct symtab
|
||||
|
||||
unsigned int locations_valid : 1;
|
||||
|
||||
+ /* At least GCC 4.6.0 and 4.6.1 can produce invalid false prologue and marker
|
||||
+ on amd64. This flag is set independently of the symtab arch. */
|
||||
+
|
||||
+ unsigned amd64_prologue_line_bug : 1;
|
||||
+
|
||||
/* The macro table for this symtab. Like the blockvector, this
|
||||
may be shared between different symtabs --- and normally is for
|
||||
all the symtabs in a given compilation unit. */
|
||||
Index: gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.c 2011-07-26 22:09:15.000000000 +0200
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+static volatile int v, fail;
|
||||
+
|
||||
+static void
|
||||
+func (int i, ...)
|
||||
+{
|
||||
+ v = i;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+marker (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ func (1);
|
||||
+ fail = 1;
|
||||
+ marker ();
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp 2011-07-26 22:09:15.000000000 +0200
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2011 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/>.
|
||||
+
|
||||
+# Test GCC PR debug/48827 workaround in GDB.
|
||||
+
|
||||
+set testfile "amd64-prologue-xmm"
|
||||
+set srcfile ${testfile}.s
|
||||
+set csrcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}.x
|
||||
+set opts {}
|
||||
+
|
||||
+if [info exists COMPILE] {
|
||||
+ # make check RUNTESTFLAGS='gdb.arch/amd64-prologue-xmm.exp COMPILE=1'
|
||||
+ set srcfile ${csrcfile}
|
||||
+ lappend opts debug optimize=-O0
|
||||
+} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||
+ verbose "Skipping amd64-prologue-xmm test."
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint "func"
|
||||
+gdb_breakpoint "marker"
|
||||
+
|
||||
+gdb_continue_to_breakpoint "func"
|
||||
+
|
||||
+gdb_test "p fail" " = 0" "stopped at func"
|
||||
Index: gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.3/gdb/testsuite/gdb.arch/amd64-prologue-xmm.s 2011-07-26 22:09:15.000000000 +0200
|
||||
@@ -0,0 +1,400 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This file is compiled from gdb.arch/amd64-prologue-xmm.c
|
||||
+ using -g -dA -S. */
|
||||
+
|
||||
+ .file "amd64-prologue-xmm.c"
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .local v
|
||||
+ .comm v,4,4
|
||||
+ .local fail
|
||||
+ .comm fail,4,4
|
||||
+ .type func, @function
|
||||
+func:
|
||||
+.LFB0:
|
||||
+ .file 1 "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ subq $72, %rsp
|
||||
+ movq %rsi, -168(%rbp)
|
||||
+ movq %rdx, -160(%rbp)
|
||||
+ movq %rcx, -152(%rbp)
|
||||
+ movq %r8, -144(%rbp)
|
||||
+ movq %r9, -136(%rbp)
|
||||
+ testb %al, %al
|
||||
+ je .L2
|
||||
+ # basic block 3
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:22
|
||||
+ .loc 1 22 0
|
||||
+ movaps %xmm0, -128(%rbp)
|
||||
+ movaps %xmm1, -112(%rbp)
|
||||
+ movaps %xmm2, -96(%rbp)
|
||||
+ movaps %xmm3, -80(%rbp)
|
||||
+ movaps %xmm4, -64(%rbp)
|
||||
+ movaps %xmm5, -48(%rbp)
|
||||
+ movaps %xmm6, -32(%rbp)
|
||||
+ movaps %xmm7, -16(%rbp)
|
||||
+.L2:
|
||||
+ # basic block 4
|
||||
+ movl %edi, -180(%rbp)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:23
|
||||
+ .loc 1 23 0
|
||||
+ movl -180(%rbp), %eax
|
||||
+ movl %eax, v(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:24
|
||||
+ .loc 1 24 0
|
||||
+ leave
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE0:
|
||||
+ .size func, .-func
|
||||
+ .type marker, @function
|
||||
+marker:
|
||||
+.LFB1:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:28
|
||||
+ .loc 1 28 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:29
|
||||
+ .loc 1 29 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE1:
|
||||
+ .size marker, .-marker
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB2:
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:33
|
||||
+ .loc 1 33 0
|
||||
+ .cfi_startproc
|
||||
+ # basic block 2
|
||||
+ pushq %rbp
|
||||
+ .cfi_def_cfa_offset 16
|
||||
+ .cfi_offset 6, -16
|
||||
+ movq %rsp, %rbp
|
||||
+ .cfi_def_cfa_register 6
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:34
|
||||
+ .loc 1 34 0
|
||||
+ movl $1, %edi
|
||||
+ movl $0, %eax
|
||||
+ call func
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:35
|
||||
+ .loc 1 35 0
|
||||
+ movl $1, fail(%rip)
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:36
|
||||
+ .loc 1 36 0
|
||||
+ call marker
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:37
|
||||
+ .loc 1 37 0
|
||||
+ movl $0, %eax
|
||||
+ # gdb.arch/amd64-prologue-xmm.c:38
|
||||
+ .loc 1 38 0
|
||||
+ popq %rbp
|
||||
+ .cfi_def_cfa 7, 8
|
||||
+ ret
|
||||
+ .cfi_endproc
|
||||
+.LFE2:
|
||||
+ .size main, .-main
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 0xc0 # Length of Compilation Unit Info
|
||||
+ .value 0x4 # DWARF version number
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .byte 0x8 # Pointer Size (in bytes)
|
||||
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
|
||||
+ .long .LASF1 # DW_AT_producer: "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .byte 0x1 # DW_AT_language
|
||||
+ .long .LASF2 # DW_AT_name: "gdb.arch/amd64-prologue-xmm.c"
|
||||
+ .long .LASF3 # DW_AT_comp_dir: ""
|
||||
+ .quad .Ltext0 # DW_AT_low_pc
|
||||
+ .quad .Letext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
|
||||
+ .long .LASF4 # DW_AT_name: "func"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .long 0x59 # DW_AT_sibling
|
||||
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_formal_parameter)
|
||||
+ .ascii "i\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x15 # DW_AT_decl_line
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0x3 # DW_AT_location
|
||||
+ .byte 0x91 # DW_OP_fbreg
|
||||
+ .sleb128 -196
|
||||
+ .uleb128 0x4 # (DIE (0x57) DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # end of children of DIE 0x2d
|
||||
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .uleb128 0x6 # (DIE (0x60) DW_TAG_subprogram)
|
||||
+ .long .LASF5 # DW_AT_name: "marker"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x1b # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .quad .LFB1 # DW_AT_low_pc
|
||||
+ .quad .LFE1 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_call_sites
|
||||
+ .uleb128 0x7 # (DIE (0x79) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF6 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x20 # DW_AT_decl_line
|
||||
+ # DW_AT_prototyped
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .quad .LFB2 # DW_AT_low_pc
|
||||
+ .quad .LFE2 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_GNU_all_tail_call_sites
|
||||
+ .uleb128 0x8 # (DIE (0x96) DW_TAG_variable)
|
||||
+ .ascii "v\0" # DW_AT_name
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad v
|
||||
+ .uleb128 0x9 # (DIE (0xa9) DW_TAG_volatile_type)
|
||||
+ .long 0x59 # DW_AT_type
|
||||
+ .uleb128 0xa # (DIE (0xae) DW_TAG_variable)
|
||||
+ .long .LASF0 # DW_AT_name: "fail"
|
||||
+ .byte 0x1 # DW_AT_decl_file (gdb.arch/amd64-prologue-xmm.c)
|
||||
+ .byte 0x12 # DW_AT_decl_line
|
||||
+ .long 0xa9 # DW_AT_type
|
||||
+ .uleb128 0x9 # DW_AT_location
|
||||
+ .byte 0x3 # DW_OP_addr
|
||||
+ .quad fail
|
||||
+ .byte 0 # end of children of DIE 0xb
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x25 # (DW_AT_producer)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x13 # (DW_AT_language)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x1b # (DW_AT_comp_dir)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x1 # (DW_AT_sibling)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x4 # (abbrev code)
|
||||
+ .uleb128 0x18 # (TAG: DW_TAG_unspecified_parameters)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x5 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3e # (DW_AT_encoding)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x6 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x7 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x27 # (DW_AT_prototyped)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x2116 # (DW_AT_GNU_all_tail_call_sites)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x8 # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x9 # (abbrev code)
|
||||
+ .uleb128 0x35 # (TAG: DW_TAG_volatile_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0xa # (abbrev code)
|
||||
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x2 # (DW_AT_location)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x2c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF Version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x8 # Size of Address
|
||||
+ .byte 0 # Size of Segment Descriptor
|
||||
+ .value 0 # Pad to 16 byte boundary
|
||||
+ .value 0
|
||||
+ .quad .Ltext0 # Address
|
||||
+ .quad .Letext0-.Ltext0 # Length
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF3:
|
||||
+ .string ""
|
||||
+.LASF0:
|
||||
+ .string "fail"
|
||||
+.LASF4:
|
||||
+ .string "func"
|
||||
+.LASF1:
|
||||
+ .string "GNU C 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+.LASF2:
|
||||
+ .string "gdb.arch/amd64-prologue-xmm.c"
|
||||
+.LASF5:
|
||||
+ .string "marker"
|
||||
+.LASF6:
|
||||
+ .string "main"
|
||||
+ .ident "GCC: (GNU) 4.6.1 20110715 (Red Hat 4.6.1-3)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
|
@ -1,17 +1,218 @@
|
||||
internal-error: could not find partial DIE
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=672230
|
||||
http://sourceware.org/ml/gdb-patches/2011-04/msg00154.html
|
||||
Subject: [patch] Workaround buggy GCC PR 47510 produced code
|
||||
|
||||
Hi,
|
||||
|
||||
GCC PR debug/47510 is already fixed and GDB has the proper support for it:
|
||||
RFC: update for GCC PR 47510
|
||||
http://sourceware.org/ml/gdb-patches/2011-03/msg00916.html
|
||||
|
||||
Still FSF GDB HEAD will crash on a binary produced by older/buggy GCC:
|
||||
Reading symbols from .../gcc46.o...dwarf2read.c:9329: internal-error: could not find partial DIE 0x9a in cache [from module .../gcc46.o]
|
||||
|
||||
Which may not give much clue to the user.
|
||||
|
||||
The proposed patch could make false warnings if any code out there has
|
||||
DW_TAG_typedef with children, it does not check for specific GCC versions.
|
||||
Still such DWARF is invalid, although in such case complaint() would be more
|
||||
appropriate than warning(). Does it make sense to differentiate it?
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c (struct dwarf2_per_objfile): New field
|
||||
typedef_children_warning_printed.
|
||||
(load_partial_dies): Read in any children of DW_TAG_typedef with
|
||||
a warning in such case.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.dwarf2/dw2-typedef-children.S: New file.
|
||||
* gdb.dwarf2/dw2-typedef-children.exp: New file.
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 6a98d57..f33a327 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -8796,8 +8796,7 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
@@ -209,6 +209,9 @@ struct dwarf2_per_objfile
|
||||
or we are faking it for OBJF_READNOW's sake. */
|
||||
unsigned char using_index;
|
||||
|
||||
+ /* Print the GCC PR debug/47510 warning only once per objfile. */
|
||||
+ unsigned typedef_children_warning_printed : 1;
|
||||
+
|
||||
/* The mapped index, or NULL if .gdb_index is missing or not being used. */
|
||||
struct mapped_index *index_table;
|
||||
|
||||
@@ -8951,7 +8954,7 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
if (parent_die == NULL
|
||||
&& part_die->has_specification == 0
|
||||
&& part_die->is_declaration == 0
|
||||
- && (part_die->tag == DW_TAG_typedef
|
||||
- || part_die->tag == DW_TAG_base_type
|
||||
+ && (part_die->tag == DW_TAG_base_type
|
||||
+ && ((part_die->tag == DW_TAG_typedef && !part_die->has_children)
|
||||
|| part_die->tag == DW_TAG_base_type
|
||||
|| part_die->tag == DW_TAG_subrange_type))
|
||||
{
|
||||
if (building_psymtab && part_die->name != NULL)
|
||||
@@ -8964,6 +8967,20 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
||||
continue;
|
||||
}
|
||||
|
||||
+ /* The exception for DW_TAG_typedef with has_children above is
|
||||
+ a workaround of GCC PR debug/47510. GDB crashed on broken GCC output
|
||||
+ as it skipped children of DW_TAG_typedef by the shortcut above and
|
||||
+ then it could not find the child DIEs referenced later. */
|
||||
+
|
||||
+ if (!dwarf2_per_objfile->typedef_children_warning_printed
|
||||
+ && part_die->tag == DW_TAG_typedef && part_die->has_children)
|
||||
+ {
|
||||
+ warning (_("DW_TAG_typedef has childen - GCC PR debug/47510 bug "
|
||||
+ "- DIE at 0x%x [in module %s]"),
|
||||
+ part_die->offset, cu->objfile->name);
|
||||
+ dwarf2_per_objfile->typedef_children_warning_printed = 1;
|
||||
+ }
|
||||
+
|
||||
/* If we're at the second level, and we're an enumerator, and
|
||||
our parent has no specification (meaning possibly lives in a
|
||||
namespace elsewhere), then we can add the partial symbol now
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-typedef-children.S
|
||||
@@ -0,0 +1,92 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2011 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/>. */
|
||||
+
|
||||
+/* Debug information */
|
||||
+
|
||||
+ .section .debug_info
|
||||
+.Lcu1_begin:
|
||||
+ /* CU header */
|
||||
+ .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
|
||||
+.Lcu1_start:
|
||||
+ .2byte 2 /* DWARF Version */
|
||||
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
|
||||
+ .byte 4 /* Pointer size */
|
||||
+
|
||||
+ /* CU die */
|
||||
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
|
||||
+ .ascii "file1.txt\0" /* DW_AT_name */
|
||||
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
|
||||
+ .byte 1 /* DW_AT_language (C) */
|
||||
+
|
||||
+.Ltype_int:
|
||||
+ .uleb128 2 /* Abbrev: DW_TAG_base_type */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+ .byte 5 /* DW_AT_encoding */
|
||||
+
|
||||
+ .uleb128 0x3 /* (DIE (0x38) DW_TAG_typedef) */
|
||||
+ .ascii "new\0" /* DW_AT_name */
|
||||
+ .long .Ltype_int - .Lcu1_begin /* DW_AT_type */
|
||||
+
|
||||
+ .uleb128 2 /* Abbrev: DW_TAG_base_type */
|
||||
+ .ascii "int\0" /* DW_AT_name */
|
||||
+ .byte 4 /* DW_AT_byte_size */
|
||||
+ .byte 5 /* DW_AT_encoding */
|
||||
+
|
||||
+ .uleb128 0 /* End of DW_TAG_typedef */
|
||||
+ .uleb128 0 /* End of DW_TAG_compile_unit */
|
||||
+.Lcu1_end:
|
||||
+
|
||||
+/* Abbrev table */
|
||||
+ .section .debug_abbrev
|
||||
+.Labbrev1_begin:
|
||||
+ .uleb128 1 /* Abbrev code */
|
||||
+ .uleb128 0x11 /* DW_TAG_compile_unit */
|
||||
+ .byte 1 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x25 /* DW_AT_producer */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0x13 /* DW_AT_language */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 2 /* Abbrev code */
|
||||
+ .uleb128 0x24 /* DW_TAG_base_type */
|
||||
+ .byte 0 /* has_children */
|
||||
+ .uleb128 0x3 /* DW_AT_name */
|
||||
+ .uleb128 0x8 /* DW_FORM_string */
|
||||
+ .uleb128 0xb /* DW_AT_byte_size */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .uleb128 0x3e /* DW_AT_encoding */
|
||||
+ .uleb128 0xb /* DW_FORM_data1 */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+
|
||||
+ .uleb128 0x3 /* (abbrev code) */
|
||||
+ .uleb128 0x16 /* (TAG: DW_TAG_typedef) */
|
||||
+ .byte 0x1 /* DW_children_yes */
|
||||
+ .uleb128 0x3 /* (DW_AT_name) */
|
||||
+ .uleb128 0x8 /* (DW_FORM_string) */
|
||||
+ .uleb128 0x49 /* (DW_AT_type) */
|
||||
+ .uleb128 0x13 /* (DW_FORM_ref4) */
|
||||
+ .byte 0x0
|
||||
+ .byte 0x0
|
||||
+
|
||||
+ .byte 0x0 /* Terminator */
|
||||
+ .byte 0x0 /* Terminator */
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-typedef-children.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2011 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/>.
|
||||
+load_lib dwarf.exp
|
||||
+
|
||||
+# Note: Inspired from dw2-basic.exp.
|
||||
+
|
||||
+# This test can only be run on targets which support DWARF-2 and use gas.
|
||||
+if {![dwarf2_support]} {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+set testfile "dw2-typedef-children"
|
||||
+set srcfile ${testfile}.S
|
||||
+set binfile ${objdir}/${subdir}/${testfile}.x
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+
|
||||
+gdb_test "file $binfile" \
|
||||
+ "warning: DW_TAG_typedef has childen - GCC PR debug/47510 bug - DIE at .*" \
|
||||
+ "warning message"
|
||||
|
||||
|
@ -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
|
141
gdb-prelink-rela.patch
Normal file
141
gdb-prelink-rela.patch
Normal file
@ -0,0 +1,141 @@
|
||||
http://sourceware.org/ml/gdb-patches/2011-02/msg00630.html
|
||||
Subject: [patch] [i386] Fix {,un}prelinked libraries for attach/core-load
|
||||
|
||||
Hi,
|
||||
|
||||
please see comments in the patch. The adjusted testcase FAILs on i386.
|
||||
|
||||
"Prelink", March 4, 2004 - by Jakub Jelinek:
|
||||
http://people.redhat.com/jakub/prelink.pdf
|
||||
primarily section 7 - REL to RELA conversion
|
||||
|
||||
An example of unprelinked -> prelinked library change:
|
||||
Program Headers:
|
||||
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||||
- LOAD 0x000000 0x00000000 0x00000000 0x00538 0x00538 R E 0x1000
|
||||
- LOAD 0x000538 0x00001538 0x00001538 0x00100 0x00110 RW 0x1000
|
||||
- DYNAMIC 0x000550 0x00001550 0x00001550 0x000c8 0x000c8 RW 0x4
|
||||
- NOTE 0x0000f4 0x000000f4 0x000000f4 0x00024 0x00024 R 0x4
|
||||
- GNU_EH_FRAME 0x0004e8 0x000004e8 0x000004e8 0x00014 0x00014 R 0x4
|
||||
+ LOAD 0x000000 0x411b3000 0x411b3000 0x00558 0x00558 R E 0x1000
|
||||
+ LOAD 0x000558 0x411b4558 0x411b4558 0x00100 0x00110 RW 0x1000
|
||||
+ DYNAMIC 0x000570 0x411b4570 0x411b4570 0x000c8 0x000c8 RW 0x4
|
||||
+ NOTE 0x0000f4 0x411b30f4 0x411b30f4 0x00024 0x00024 R 0x4
|
||||
+ GNU_EH_FRAME 0x000508 0x411b3508 0x411b3508 0x00014 0x00014 R 0x4
|
||||
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
|
||||
|
||||
So far GDB expected all such displacements will be always PAGE_SIZE aligned.
|
||||
This applies for example for re-prelinking of an already prelinked file.
|
||||
But it does not apply for prelinking of an unprelinked file or unprelinking of
|
||||
a prelinked file, there can be arbitrary displacement.
|
||||
|
||||
It affects i386 (=i686, prelink doc reports also ARM and MIPS) which uses REL.
|
||||
x86_64 always uses RELA, therefore I have not noticed it so far. i386 still
|
||||
has to be supported.
|
||||
|
||||
This affects both attachment to a PID and core file loads.
|
||||
|
||||
This applies in real world if you transfer a core file between hosts and try to
|
||||
backtrace them, libraries of both hosts may differ whether they are / are not
|
||||
prelinked.
|
||||
|
||||
I could implement some (displacement-forgiving and prelink-modifications
|
||||
forgiving) comparison of both DYNAMIC segments found. But I do not think it is
|
||||
useful, if the DYNAMIC address from linkmap vs. bfd do not match it is still a
|
||||
better chance to try a displacement to make them match. Keeping the file
|
||||
relocation cannot work anyway when the DYNAMIC address is verified as wrong.
|
||||
|
||||
No regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu.
|
||||
|
||||
Mostly do you agree the DYNAMIC content does not have to be verifed?
|
||||
Do you have any comments on the in-code long comments?
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2011-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix libraries displacement if they change whether they were prelinked.
|
||||
* solib-svr4.c (LM_ADDR_CHECK): Set L_ADDR even if the DYNAMIC pointer
|
||||
does not match. Comment why.
|
||||
|
||||
gdb/testsuite/
|
||||
2011-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/break-interp-lib.c (v, vptr): New variables.
|
||||
* gdb.base/break-interp.exp (test_attach): New comment.
|
||||
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -237,11 +237,11 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
|
||||
|
||||
Even on PPC it must be zero-aligned at least for MINPAGESIZE. */
|
||||
|
||||
+ l_addr = l_dynaddr - dynaddr;
|
||||
+
|
||||
if ((l_addr & (minpagesize - 1)) == 0
|
||||
&& (l_addr & align) == ((l_dynaddr - dynaddr) & align))
|
||||
{
|
||||
- l_addr = l_dynaddr - dynaddr;
|
||||
-
|
||||
if (info_verbose)
|
||||
printf_unfiltered (_("Using PIC (Position Independent Code) "
|
||||
"prelink displacement %s for \"%s\".\n"),
|
||||
@@ -249,9 +249,20 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
|
||||
so->so_name);
|
||||
}
|
||||
else
|
||||
- warning (_(".dynamic section for \"%s\" "
|
||||
- "is not at the expected address "
|
||||
- "(wrong library or version mismatch?)"), so->so_name);
|
||||
+ {
|
||||
+ /* There is no way to verify the library file matches. prelink
|
||||
+ can during prelinking of an unprelinked file (or unprelinking
|
||||
+ of a prelinked file) shift the DYNAMIC segment by arbitrary
|
||||
+ offset without any page size alignment. There is no way to
|
||||
+ find out the ELF header and/or Program Headers for a limited
|
||||
+ verification if it they match. One could do a verification
|
||||
+ of the DYNAMIC segment. Still the found address is the best
|
||||
+ one GDB could find. */
|
||||
+
|
||||
+ warning (_(".dynamic section for \"%s\" "
|
||||
+ "is not at the expected address "
|
||||
+ "(wrong library or version mismatch?)"), so->so_name);
|
||||
+ }
|
||||
}
|
||||
|
||||
set_addr:
|
||||
--- a/gdb/testsuite/gdb.base/break-interp-lib.c
|
||||
+++ b/gdb/testsuite/gdb.base/break-interp-lib.c
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+/* Force REL->RELA conversion on i386, see "Prelink", March 4, 2004. */
|
||||
+volatile int v[2];
|
||||
+volatile int *vptr = &v[1];
|
||||
+
|
||||
void
|
||||
libfunc (const char *action)
|
||||
{
|
||||
--- a/gdb/testsuite/gdb.base/break-interp.exp
|
||||
+++ b/gdb/testsuite/gdb.base/break-interp.exp
|
||||
@@ -352,6 +352,14 @@ proc test_attach {file displacement {relink_args ""}} {
|
||||
# test simplicity, we merged this test and the test above by not
|
||||
# restoring $INTERP after $EXEC prelink. $INTERP gets restored
|
||||
# later below.
|
||||
+ #
|
||||
+ # `(wrong library or version mismatch?)' messages are printed for
|
||||
+ # $binfile_lib on platforms converting REL->RELA relocations by
|
||||
+ # prelink (such as on i386). There is no reliable way to verify
|
||||
+ # the library file matches the running library in such case but
|
||||
+ # GDB at least attempts to set the right displacement. We test
|
||||
+ # `libfunc' is present in the backtrace and therefore the
|
||||
+ # displacement has been guessed right.
|
||||
|
||||
if [prelink$relink $relink_args [file tail $exec]] {
|
||||
# /proc/PID/exe cannot be loaded as it is "EXECNAME (deleted)".
|
||||
|
@ -1,154 +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
|
||||
|
||||
--
|
||||
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 161ac1f..55eca2a 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -22718,6 +22718,13 @@ domain constant defined in the @code{gdb} module and described later
|
||||
in this chapter.
|
||||
@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
|
||||
diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
index b790a54..5d98b0f 100644
|
||||
--- a/gdb/python/lib/gdb/FrameWrapper.py
|
||||
+++ b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
@@ -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:
|
||||
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
|
||||
index e072dc8..1dfe394 100644
|
||||
--- a/gdb/python/py-symbol.c
|
||||
+++ b/gdb/python/py-symbol.c
|
||||
@@ -167,6 +167,27 @@ sympy_is_variable (PyObject *self, void *closure)
|
||||
|| 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
|
||||
@@ -362,6 +383,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 },
|
||||
@@ -415,7 +443,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 */
|
||||
};
|
||||
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
|
||||
index 8e3aec1..6d43566 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-symbol.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
|
||||
@@ -69,6 +69,10 @@ gdb_test "python print func.print_name" "func" "Test 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
|
||||
|
@ -1,266 +0,0 @@
|
||||
http://sourceware.org/ml/gdb-patches/2009-11/msg00596.html
|
||||
Subject: [gdb FYI-patch] callback-mode readline-6.0 regression
|
||||
|
||||
Hi Chet,
|
||||
|
||||
FSF GDB currently ships bundled with readline-5.2 which works fine.
|
||||
But using --with-system-readline and readline-6.0-patchlevel4 has
|
||||
a regression:
|
||||
|
||||
readline-5.2: Run `gdb -nx -q' and type CTRL-C:
|
||||
(gdb) Quit
|
||||
(gdb) _
|
||||
|
||||
readline-6.0: Run `gdb -nx -q' and type CTRL-C:
|
||||
(gdb) _
|
||||
= nothing happens (it gets buffered and executed later)
|
||||
(It does also FAIL on gdb.gdb/selftest.exp.)
|
||||
|
||||
It is because GDB waits in its own poll() mainloop and readline uses via
|
||||
rl_callback_handler_install and rl_callback_handler_remove. This way the
|
||||
readline internal variable _rl_interrupt_immediately remains 0 and CTRL-C gets
|
||||
only stored to _rl_caught_signal but not executed.
|
||||
|
||||
Seen in rl_signal_handler even if _rl_interrupt_immediately is set and
|
||||
_rl_handle_signal is called then the signal is still stored to
|
||||
_rl_caught_signal. In the _rl_interrupt_immediately case it should not be
|
||||
stored when it was already processed.
|
||||
|
||||
rl_signal_handler does `_rl_interrupt_immediately = 0;' - while I am not aware
|
||||
of its meaning it breaks the nest-counting of other routines which do
|
||||
`_rl_interrupt_immediately++;' and `_rl_interrupt_immediately--;' possibly
|
||||
creating problematic `_rl_interrupt_immediately == -1'.
|
||||
|
||||
`_rl_interrupt_immediately' is an internal variable, how it could be accessed
|
||||
by a readline application? (OK, maybe it should not be used.)
|
||||
|
||||
Attaching a current GDB-side patch but it must access readline internal
|
||||
variable _rl_caught_signal and it is generally just a workaround. Could you
|
||||
please include support for signals in this asynchronous mode in readline-6.1?
|
||||
I find it would be enough to make RL_CHECK_SIGNALS public?
|
||||
|
||||
|
||||
GDB: No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
|
||||
But this is not a patch intended to be accepted.
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
|
||||
gdb/
|
||||
2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* config.in, configure: Regenerate.
|
||||
* configure.ac (for readline_echoing_p): Move inside $LIBS change.
|
||||
(for _rl_caught_signal): New.
|
||||
* event-loop.c: Include readline/readline.h.
|
||||
(gdb_do_one_event) [HAVE_READLINE_CAUGHT_SIGNAL]: New.
|
||||
|
||||
gdb/testsuite/
|
||||
2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.gdb/selftest.exp (backtrace through signal handler): Move before
|
||||
SIGINT pass, drop the timeout case.
|
||||
(send SIGINT signal to child process): Use gdb_test.
|
||||
(backtrace through readline handler): New.
|
||||
|
||||
Index: gdb-7.2.50.20110107/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/config.in 2011-01-17 15:36:40.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/config.in 2011-01-17 15:37:09.000000000 +0100
|
||||
@@ -464,6 +464,9 @@
|
||||
/* Define to 1 if wcwidth is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_WCWIDTH
|
||||
|
||||
+/* readline-6.0 workaround of blocked signals. */
|
||||
+#undef HAVE_READLINE_CAUGHT_SIGNAL
|
||||
+
|
||||
/* Define to 1 if you have the `realpath' function. */
|
||||
#undef HAVE_REALPATH
|
||||
|
||||
Index: gdb-7.2.50.20110107/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/configure.ac 2011-01-17 15:36:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/configure.ac 2011-01-17 15:37:09.000000000 +0100
|
||||
@@ -736,17 +736,25 @@ if test "$with_system_readline" = yes; t
|
||||
# readline-6.0 started to use the name `_rl_echoing_p'.
|
||||
# `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
|
||||
|
||||
- AC_MSG_CHECKING([for readline_echoing_p])
|
||||
save_LIBS=$LIBS
|
||||
LIBS="$LIBS $READLINE"
|
||||
+ AC_MSG_CHECKING([for readline_echoing_p])
|
||||
AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
|
||||
return readline_echoing_p;]]),
|
||||
[READLINE_ECHOING_P=yes],
|
||||
[READLINE_ECHOING_P=no
|
||||
AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
|
||||
[readline-6.0 started to use different name.])])
|
||||
- LIBS="$save_LIBS"
|
||||
AC_MSG_RESULT([$READLINE_ECHOING_P])
|
||||
+ AC_MSG_CHECKING([for _rl_caught_signal])
|
||||
+ AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int volatile _rl_caught_signal;
|
||||
+ return _rl_caught_signal;]]),
|
||||
+ [READLINE_CAUGHT_SIGNAL=yes
|
||||
+ AC_DEFINE([HAVE_READLINE_CAUGHT_SIGNAL],,
|
||||
+ [readline-6.0 workaround of blocked signals.])],
|
||||
+ [READLINE_CAUGHT_SIGNAL=no])
|
||||
+ AC_MSG_RESULT([$READLINE_CAUGHT_SIGNAL])
|
||||
+ LIBS="$save_LIBS"
|
||||
else
|
||||
READLINE='$(READLINE_DIR)/libreadline.a'
|
||||
READLINE_DEPS='$(READLINE)'
|
||||
Index: gdb-7.2.50.20110107/gdb/event-loop.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/event-loop.c 2011-01-05 23:22:48.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/event-loop.c 2011-01-17 15:37:23.000000000 +0100
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "exceptions.h"
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_select.h"
|
||||
+#include "readline/readline.h"
|
||||
|
||||
/* Tell create_file_handler what events we are interested in.
|
||||
This is used by the select version of the event loop. */
|
||||
@@ -419,6 +420,9 @@ gdb_do_one_event (void *data)
|
||||
static int event_source_head = 0;
|
||||
const int number_of_sources = 3;
|
||||
int current = 0;
|
||||
+#ifdef HAVE_READLINE_CAUGHT_SIGNAL
|
||||
+ extern int volatile _rl_caught_signal;
|
||||
+#endif
|
||||
|
||||
/* Any events already waiting in the queue? */
|
||||
if (process_event ())
|
||||
@@ -463,6 +467,29 @@ gdb_do_one_event (void *data)
|
||||
if (gdb_wait_for_event (1) < 0)
|
||||
return -1;
|
||||
|
||||
+#ifdef HAVE_READLINE_CAUGHT_SIGNAL
|
||||
+ if (async_command_editing_p && RL_ISSTATE (RL_STATE_CALLBACK)
|
||||
+ && _rl_caught_signal)
|
||||
+ {
|
||||
+ char *prompt;
|
||||
+
|
||||
+ if (rl_prompt == NULL)
|
||||
+ {
|
||||
+ /* Should not happen, defensive only. */
|
||||
+ prompt = "";
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ prompt = alloca (strlen (rl_prompt) + 1);
|
||||
+ strcpy (prompt, rl_prompt);
|
||||
+ }
|
||||
+
|
||||
+ /* Call RL_CHECK_SIGNALS this way. */
|
||||
+ rl_callback_handler_remove ();
|
||||
+ rl_callback_handler_install (prompt, input_handler);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/* Handle any new events occurred while waiting. */
|
||||
if (process_event ())
|
||||
return 1;
|
||||
Index: gdb-7.2.50.20110107/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/testsuite/gdb.gdb/selftest.exp 2011-01-17 15:36:37.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/testsuite/gdb.gdb/selftest.exp 2011-01-17 15:37:09.000000000 +0100
|
||||
@@ -433,6 +433,28 @@ proc test_with_self { executable } {
|
||||
}
|
||||
}
|
||||
|
||||
+ # get a stack trace with the poll function
|
||||
+ #
|
||||
+ # This fails on some linux systems for unknown reasons. On the
|
||||
+ # systems where it fails, sometimes it works fine when run manually.
|
||||
+ # The testsuite failures may not be limited to just aout systems.
|
||||
+ setup_xfail "i*86-pc-linuxaout-gnu"
|
||||
+ set description "backtrace through signal handler"
|
||||
+ gdb_test_multiple "backtrace" "$description" {
|
||||
+ -re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
|
||||
+ pass "$description"
|
||||
+ }
|
||||
+ -re ".*$gdb_prompt $" {
|
||||
+ # On the alpha, we hit the infamous problem about gdb
|
||||
+ # being unable to get the frame pointer (mentioned in
|
||||
+ # gdb/README). As it is intermittent, there is no way to
|
||||
+ # XFAIL it which will give us an XPASS if the problem goes
|
||||
+ # away.
|
||||
+ setup_xfail "alpha*-*-osf*"
|
||||
+ fail "$description"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
set description "send SIGINT signal to child process"
|
||||
gdb_test "signal SIGINT" \
|
||||
"Continuing with signal SIGINT.*" \
|
||||
@@ -443,10 +465,11 @@ proc test_with_self { executable } {
|
||||
# This fails on some linux systems for unknown reasons. On the
|
||||
# systems where it fails, sometimes it works fine when run manually.
|
||||
# The testsuite failures may not be limited to just aout systems.
|
||||
+ # Optional system readline may not have symbols to be shown.
|
||||
setup_xfail "i*86-pc-linuxaout-gnu"
|
||||
- set description "backtrace through signal handler"
|
||||
+ set description "backtrace through readline handler"
|
||||
gdb_test_multiple "backtrace" "$description" {
|
||||
- -re "#0.*(read|poll).*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
|
||||
+ -re "#0.*gdb_do_one_event.*in main \\(.*\\) at .*gdb\\.c.*$gdb_prompt $" {
|
||||
pass "$description"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
Index: gdb-7.2.50.20110107/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110107.orig/gdb/configure 2011-01-17 15:36:42.000000000 +0100
|
||||
+++ gdb-7.2.50.20110107/gdb/configure 2011-01-17 15:37:09.000000000 +0100
|
||||
@@ -10237,10 +10237,10 @@ if test "$with_system_readline" = yes; t
|
||||
# readline-6.0 started to use the name `_rl_echoing_p'.
|
||||
# `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
|
||||
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
|
||||
-$as_echo_n "checking for readline_echoing_p... " >&6; }
|
||||
save_LIBS=$LIBS
|
||||
LIBS="$LIBS $READLINE"
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
|
||||
+$as_echo_n "checking for readline_echoing_p... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -10263,9 +10263,35 @@ $as_echo "#define readline_echoing_p _rl
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
- LIBS="$save_LIBS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
|
||||
$as_echo "$READLINE_ECHOING_P" >&6; }
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _rl_caught_signal" >&5
|
||||
+$as_echo_n "checking for _rl_caught_signal... " >&6; }
|
||||
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+extern int volatile _rl_caught_signal;
|
||||
+ return _rl_caught_signal;
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ READLINE_CAUGHT_SIGNAL=yes
|
||||
+
|
||||
+$as_echo "#define HAVE_READLINE_CAUGHT_SIGNAL /**/" >>confdefs.h
|
||||
+
|
||||
+else
|
||||
+ READLINE_CAUGHT_SIGNAL=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_CAUGHT_SIGNAL" >&5
|
||||
+$as_echo "$READLINE_CAUGHT_SIGNAL" >&6; }
|
||||
+ LIBS="$save_LIBS"
|
||||
else
|
||||
READLINE='$(READLINE_DIR)/libreadline.a'
|
||||
READLINE_DEPS='$(READLINE)'
|
57
gdb-stap-double-free.patch
Normal file
57
gdb-stap-double-free.patch
Normal file
@ -0,0 +1,57 @@
|
||||
--- a/gdb/stap-probe.c
|
||||
+++ b/gdb/stap-probe.c
|
||||
@@ -355,9 +355,7 @@ stap_free_args_info (void *args_info_ptr)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < a->n_args; i++)
|
||||
- {
|
||||
- xfree (a->arg[i].arg_str);
|
||||
- }
|
||||
+ xfree (a->arg[i].arg_str);
|
||||
|
||||
xfree (a->arg);
|
||||
xfree (a);
|
||||
@@ -401,6 +399,7 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
return;
|
||||
|
||||
args_info = xmalloc (sizeof (struct stap_args_info));
|
||||
+ args_info->n_args = 0;
|
||||
back_to = make_cleanup (stap_free_args_info, args_info);
|
||||
args_info->arg = xcalloc (STAP_MAX_ARGS, sizeof (struct stap_probe_arg));
|
||||
|
||||
@@ -493,6 +492,7 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
|
||||
args_info->arg[current_arg].arg_str
|
||||
= savestring (start, cur - start);
|
||||
+ ++args_info->n_args;
|
||||
/* Start it over again. */
|
||||
cur = skip_spaces ((char *) cur);
|
||||
current_state = NEW_ARG;
|
||||
@@ -513,7 +513,6 @@ stap_parse_probe_arguments (struct stap_probe *probe)
|
||||
}
|
||||
}
|
||||
|
||||
- args_info->n_args = current_arg + 1;
|
||||
args_info->arg = xrealloc (args_info->arg,
|
||||
args_info->n_args
|
||||
* sizeof (struct stap_probe_arg));
|
||||
@@ -1526,8 +1525,9 @@ stap_free_parsed_args (struct stap_args_info *parsed_args)
|
||||
return;
|
||||
|
||||
for (i = 0; i < parsed_args->n_args; i++)
|
||||
- xfree (parsed_args->arg);
|
||||
+ xfree (parsed_args->arg[i].arg_str);
|
||||
|
||||
+ xfree (parsed_args->arg);
|
||||
xfree (parsed_args);
|
||||
}
|
||||
|
||||
@@ -1859,7 +1859,7 @@ parse_stap_probe (char **argptr, struct linespec_result *canonical)
|
||||
if (canonical)
|
||||
{
|
||||
canonical->canonical = xrealloc (canonical->canonical,
|
||||
- result.nelts * sizeof (char **));
|
||||
+ result.nelts * sizeof (char *));
|
||||
canonical->canonical[result.nelts - 1] = xstrdup (full_arg);
|
||||
}
|
||||
}
|
@ -27,10 +27,10 @@ gdb/testsuite/
|
||||
* gdb.python/py-prettyprint.py (class pp_hint_error): New.
|
||||
(register_pretty_printers): Register it.
|
||||
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.c
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.c
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.c 2011-01-01 16:33:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.c 2011-01-17 16:08:16.000000000 +0100
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.c 2011-03-31 21:59:26.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.c 2011-04-11 19:42:10.000000000 +0200
|
||||
@@ -44,6 +44,10 @@ struct lazystring {
|
||||
const char *lazy_str;
|
||||
};
|
||||
@ -43,17 +43,17 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.c
|
||||
struct S : public s {
|
||||
int zs;
|
||||
@@ -215,6 +219,7 @@ main ()
|
||||
nostring_type nstype;
|
||||
nostring_type nstype, nstype2;
|
||||
struct ns ns, ns2;
|
||||
struct lazystring estring, estring2;
|
||||
+ struct hint_error hint_error;
|
||||
|
||||
nstype.elements = narray;
|
||||
nstype.len = 0;
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.exp
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.exp
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-01-01 16:33:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-01-17 16:08:33.000000000 +0100
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-03-07 17:03:03.000000000 +0100
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.exp 2011-04-11 19:41:56.000000000 +0200
|
||||
@@ -97,6 +97,8 @@ proc run_lang_tests {lang} {
|
||||
gdb_test_no_output "python pp_ls_encoding = 'UTF-8'"
|
||||
gdb_test "print estring2" "\"embedded \", <incomplete sequence \\\\302>"
|
||||
@ -63,11 +63,11 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.exp
|
||||
gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
|
||||
|
||||
gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
|
||||
Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.py
|
||||
Index: gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.py
|
||||
===================================================================
|
||||
--- gdb-7.2.50.20110117.orig/gdb/testsuite/gdb.python/py-prettyprint.py 2011-01-01 16:33:49.000000000 +0100
|
||||
+++ gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.py 2011-01-17 16:08:16.000000000 +0100
|
||||
@@ -156,6 +156,18 @@ class pp_ls:
|
||||
--- gdb-7.2.90.20110411.orig/gdb/testsuite/gdb.python/py-prettyprint.py 2011-03-31 21:59:26.000000000 +0200
|
||||
+++ gdb-7.2.90.20110411/gdb/testsuite/gdb.python/py-prettyprint.py 2011-04-11 19:41:56.000000000 +0200
|
||||
@@ -161,6 +161,18 @@ class pp_ls:
|
||||
def display_hint (self):
|
||||
return 'string'
|
||||
|
||||
@ -86,7 +86,7 @@ Index: gdb-7.2.50.20110117/gdb/testsuite/gdb.python/py-prettyprint.py
|
||||
class pp_outer:
|
||||
"Print struct outer"
|
||||
|
||||
@@ -241,6 +253,9 @@ def register_pretty_printers ():
|
||||
@@ -246,6 +258,9 @@ def register_pretty_printers ():
|
||||
pretty_printers_dict[re.compile ('^struct outerstruct$')] = pp_outer
|
||||
pretty_printers_dict[re.compile ('^outerstruct$')] = pp_outer
|
||||
|
||||
|
142
gdb.changes
142
gdb.changes
@ -1,3 +1,118 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 4 10:28:50 UTC 2011 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.3-41.fc15.src.rpm. [fate#310741]
|
||||
|
||||
* Tue Jul 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3-41.fc15
|
||||
- Rebase to the final FSF GDB 7.3 release.
|
||||
- Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
|
||||
|
||||
* Sun Jul 3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110703-40.fc15
|
||||
- Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
|
||||
- Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
|
||||
|
||||
* Fri Jun 24 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-39.fc15
|
||||
- Fix install-info for the gdb-doc subpackage (BZ 715228).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 16 09:18:33 UTC 2011 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.2.90.20110525-38.fc15.src.rpm. [fate#310741]
|
||||
|
||||
* Wed May 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110525-38.fc15
|
||||
- Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release).
|
||||
- [stap] Fix double free (Sergio Durigan Junior).
|
||||
|
||||
* Tue May 3 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-37.fc15
|
||||
- Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 18 11:01:03 UTC 2011 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.2.90.20110429-36.fc15.src.rpm.
|
||||
|
||||
* Mon May 2 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-36.fc15
|
||||
- Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
|
||||
- Use --without-system-readline, disable Requires and BuildRequires of readline.
|
||||
- Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch.
|
||||
|
||||
* Fri Apr 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110429-35.fc15
|
||||
- Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release).
|
||||
- Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253).
|
||||
- Fix case insensitive symbols for Fortran by iFort (BZ 645773).
|
||||
- Fix physname-related CU expansion issue for C++ (PR 12708).
|
||||
- Fix Python access to inlined frames (BZ 694824).
|
||||
|
||||
* Mon Apr 11 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.90.20110411-34.fc15
|
||||
- Rebase to FSF GDB 7.2.90.20110411 (which is a 7.3 pre-release).
|
||||
- Include the proper fix for anonymous struct typedefs (Tom Tromey, BZ 672230).
|
||||
|
||||
* Wed Mar 30 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 7.2.50.20110328-33.fc15
|
||||
- Cleanup spec file to add sparc|sparcv9|sparc64.
|
||||
- Add sparc specific workarounds to toolchain badness:
|
||||
- disable mmap in bdf/ via --without-mmap configure option.
|
||||
- add patch to not build mmap support on sparc for gdb/.
|
||||
- gdb code is NOT at fault, but we need a working gdb while we sort out
|
||||
the toolchain and rebuild all packages. this workaround is NOT for upstream.
|
||||
|
||||
* Tue Mar 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110328-32.fc15
|
||||
- Fix occasional crash on `print errno' with no -pthread and no -g3 (BZ 690908).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 14 12:50:20 UTC 2011 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.2.50.20110328-31.fc15.src.rpm.
|
||||
|
||||
* Mon Mar 28 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110328-31.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110328 (which is a 7.3 pre-release).
|
||||
- Bundle %%{libstdcxxpython}.tar.bz2 unconditionally - for rebulds on RHELs.
|
||||
|
||||
* Sun Mar 20 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110320-30.fc15
|
||||
- Fix threading internal error on corrupted memory (BZ 677654).
|
||||
- Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
|
||||
* 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).
|
||||
|
||||
* Fri Feb 25 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110222-27.fc15
|
||||
- Include doc also in the PDF form; new BuildRequires: texinfo-tex.
|
||||
|
||||
* Wed Feb 23 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110222-26.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110222 (which is a 7.3 pre-release).
|
||||
- Fix attach/core-load of {,un}prelinked i386 libs (bugreport by Michal Toman).
|
||||
|
||||
* Mon Feb 21 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110218-25.fc15
|
||||
- Drop %%{_datadir}/gdb/syscalls/* for unsupported arches.
|
||||
|
||||
* Fri Feb 18 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110218-24.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110218 (which is a 7.3 pre-release).
|
||||
- [vla] Fox Fortran vector slices for allocated arrays (for BZ 609782).
|
||||
|
||||
* Tue Feb 15 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110213-23.fc15
|
||||
- Move the GFDL License to gdb-doc.
|
||||
|
||||
* Tue Feb 15 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110213-22.fc15
|
||||
- Fix gdb-doc Group to be Documentation, also provide it as noarch.
|
||||
|
||||
* Tue Feb 15 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110213-21.fc15
|
||||
- Drop non-user (gdbint) and obsolete (stabs) documentation.
|
||||
- Install also HTML files besides the INFO file.
|
||||
- Create new subpackage gdb-doc for both INFO and HTML files.
|
||||
|
||||
* Sun Feb 13 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2.50.20110213-20.fc15
|
||||
- Rebase to FSF GDB 7.2.50.20110213 (which is a 7.3 pre-release).
|
||||
- Fix occasionall unfound source lines (affecting at least glibc debugging).
|
||||
- Fix const/volatile qualifiers of C++ types (PR c++/12328).
|
||||
- Be backward compatible for --rebuild with <=fc14 librpm.so.1.
|
||||
|
||||
- Revert documentation split.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 3 12:42:45 UTC 2011 - rguenther@novell.com
|
||||
|
||||
@ -193,37 +308,20 @@ Thu Apr 22 19:13:48 UTC 2010 - aj@suse.de
|
||||
Thu Apr 15 14:22:36 CEST 2010 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.1-12.fc13.src.rpm.
|
||||
- Re-write history to match SLE11 SP1 changelog
|
||||
* Drop some more strange RHEL stuff.
|
||||
* Fix build for SLE10.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 11 15:45:22 CET 2010 - rguenther@novell.com
|
||||
Mon Mar 15 11:21:05 CET 2010 - rguenther@novell.com
|
||||
|
||||
- Merge from gdb-7.0.1-33.fc12.src.rpm.
|
||||
- Fix info documentation registering. [bnc#588278]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 11 13:43:11 CET 2010 - kukuk@suse.de
|
||||
|
||||
- Re-Add baselibs.conf
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 15 16:18:42 CET 2010 - rguenther@suse.de
|
||||
|
||||
- Drop some more strange RHEL stuff.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 11 11:39:20 CET 2010 - rguenther@suse.de
|
||||
|
||||
- Merge from gdb-7.0.1-19.fc12.src.rpm.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 20 16:16:32 CET 2009 - rguenther@suse.de
|
||||
|
||||
- Fix build for SLE10.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 26 17:27:34 CET 2009 - rguenther@suse.de
|
||||
|
||||
- Merge from gdb-7.0-3.fc12.src.rpm.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 22 17:03:30 CEST 2009 - rguenther@suse.de
|
||||
|
||||
|
3
libstdc++-v3-python-r155978.tar.bz2
Normal file
3
libstdc++-v3-python-r155978.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b475a3ef42507a47b1ea4b7f9a4849287b4c713e5081ec86874eaa7da194f78b
|
||||
size 11754
|
@ -1,14 +0,0 @@
|
||||
--- readline/misc.c
|
||||
+++ readline/misc.c 2005-12-09 18:12:24.000000000 +0100
|
||||
@@ -210,8 +210,10 @@
|
||||
|
||||
r = _rl_arg_dispatch (_rl_argcxt, c);
|
||||
if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
|
||||
- break;
|
||||
+ return r;
|
||||
}
|
||||
+
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/* Create a default argument. */
|
Loading…
x
Reference in New Issue
Block a user