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).
This commit is contained in:
Jan Kratochvil 2011-04-11 22:48:13 +02:00
parent 1cd4f3809f
commit 09dd7775eb
12 changed files with 792 additions and 2370 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/libstdc++-v3-python-r155978.tar.bz2
/gdb-7.2.50.20110328.tar.bz2
/gdb-7.2.90.20110411.tar.bz2

View File

@ -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. */

View File

@ -1,7 +1,7 @@
Index: gdb-7.2.50.20110328/gdb/corelow.c
Index: gdb-7.2.90.20110411/gdb/corelow.c
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
+++ gdb-7.2.50.20110328/gdb/corelow.c 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/corelow.c 2011-02-26 03:07:07.000000000 +0100
+++ gdb-7.2.90.20110411/gdb/corelow.c 2011-04-11 19:16:15.000000000 +0200
@@ -47,6 +47,9 @@
#include "filenames.h"
#include "progspace.h"
@ -90,11 +90,11 @@ Index: gdb-7.2.50.20110328/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
Index: gdb-7.2.50.20110328/gdb/doc/gdb.texinfo
Index: gdb-7.2.90.20110411/gdb/doc/gdb.texinfo
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/doc/gdb.texinfo 2011-03-28 18:40:15.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/doc/gdb.texinfo 2011-03-28 18:41:20.000000000 +0200
@@ -15346,6 +15346,27 @@ information files.
--- gdb-7.2.90.20110411.orig/gdb/doc/gdb.texinfo 2011-04-11 19:15:51.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/doc/gdb.texinfo 2011-04-11 19:16:15.000000000 +0200
@@ -15356,6 +15356,27 @@ information files.
@end table
@ -122,10 +122,10 @@ Index: gdb-7.2.50.20110328/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.20110328/gdb/solib-svr4.c
Index: gdb-7.2.90.20110411/gdb/solib-svr4.c
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/solib-svr4.c 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/solib-svr4.c 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/solib-svr4.c 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/solib-svr4.c 2011-04-11 19:16:15.000000000 +0200
@@ -1179,9 +1179,49 @@ svr4_current_sos (void)
safe_strerror (errcode));
else
@ -179,14 +179,14 @@ Index: gdb-7.2.50.20110328/gdb/solib-svr4.c
}
xfree (buffer);
Index: gdb-7.2.50.20110328/gdb/elfread.c
Index: gdb-7.2.90.20110411/gdb/elfread.c
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/elfread.c 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/elfread.c 2011-03-28 18:45:39.000000000 +0200
@@ -45,6 +45,10 @@
--- gdb-7.2.90.20110411.orig/gdb/elfread.c 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/elfread.c 2011-04-11 19:17:40.000000000 +0200
@@ -49,6 +49,10 @@
#include "infcall.h"
#include "gdbthread.h"
#include "regcache.h"
#include "stap-probe.h"
#include "arch-utils.h"
+#include "libbfd.h"
+#include "gdbcore.h"
+#include "gdbcmd.h"
@ -194,13 +194,10 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
extern void _initialize_elfread (void);
@@ -1072,16 +1076,65 @@ elf_gnu_ifunc_resolver_return_stop (stru
update_breakpoint_locations (b, sals);
@@ -1077,16 +1081,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 +217,9 @@ Index: gdb-7.2.50.20110328/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 +262,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
{
struct build_id *retval;
@@ -1097,6 +1150,348 @@ build_id_bfd_get (bfd *abfd)
@@ -1102,6 +1155,348 @@ build_id_bfd_get (bfd *abfd)
return retval;
}
@ -611,7 +611,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int
@@ -1111,7 +1506,7 @@ build_id_verify (const char *filename, s
@@ -1116,7 +1511,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL)
return 0;
@ -620,7 +620,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename);
@@ -1129,14 +1524,16 @@ build_id_verify (const char *filename, s
@@ -1134,14 +1529,16 @@ build_id_verify (const char *filename, s
return retval;
}
@ -641,7 +641,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
@@ -1167,7 +1564,10 @@ build_id_to_debug_filename (struct build
@@ -1172,7 +1569,10 @@ build_id_to_debug_filename (struct build
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@ -653,7 +653,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
/* lrealpath() is expensive even for the usually non-existent files. */
if (access (link, F_OK) == 0)
@@ -1180,26 +1580,201 @@ build_id_to_debug_filename (struct build
@@ -1185,26 +1585,201 @@ build_id_to_debug_filename (struct build
}
if (retval != NULL)
@ -859,7 +859,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
xfree (build_id);
/* Prevent looping on a stripped .debug file. */
if (build_id_name != NULL
@@ -1210,7 +1785,7 @@ find_separate_debug_file_by_buildid (str
@@ -1215,7 +1790,7 @@ find_separate_debug_file_by_buildid (str
xfree (build_id_name);
}
else if (build_id_name != NULL)
@ -868,7 +868,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
}
return NULL;
}
@@ -1408,9 +1983,10 @@ elf_symfile_read (struct objfile *objfil
@@ -1413,9 +1988,10 @@ elf_symfile_read (struct objfile *objfil
`.note.gnu.build-id'. */
else if (!objfile_has_partial_symbols (objfile))
{
@ -881,7 +881,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
if (debugfile == NULL)
debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1422,6 +1998,12 @@ elf_symfile_read (struct objfile *objfil
@@ -1427,6 +2003,12 @@ elf_symfile_read (struct objfile *objfil
symbol_file_add_separate (abfd, symfile_flags, objfile);
xfree (debugfile);
}
@ -894,7 +894,7 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
}
}
@@ -1873,4 +2455,16 @@ _initialize_elfread (void)
@@ -1906,4 +2488,16 @@ _initialize_elfread (void)
elf_objfile_gnu_ifunc_cache_data = register_objfile_data ();
gnu_ifunc_fns_p = &elf_gnu_ifunc_fns;
@ -911,10 +911,10 @@ Index: gdb-7.2.50.20110328/gdb/elfread.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
}
Index: gdb-7.2.50.20110328/gdb/symfile.h
Index: gdb-7.2.90.20110411/gdb/symfile.h
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/symfile.h 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/symfile.h 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/symfile.h 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/symfile.h 2011-04-11 19:16:15.000000000 +0200
@@ -611,6 +611,13 @@ void free_symfile_segment_data (struct s
extern struct cleanup *increment_reading_symtab (void);
@ -929,10 +929,10 @@ Index: gdb-7.2.50.20110328/gdb/symfile.h
/* From dwarf2read.c */
extern int dwarf2_has_info (struct objfile *);
Index: gdb-7.2.50.20110328/gdb/testsuite/lib/gdb.exp
Index: gdb-7.2.90.20110411/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/testsuite/lib/gdb.exp 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/testsuite/lib/gdb.exp 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/testsuite/lib/gdb.exp 2011-04-11 19:11:55.000000000 +0200
+++ gdb-7.2.90.20110411/gdb/testsuite/lib/gdb.exp 2011-04-11 19:16:15.000000000 +0200
@@ -1381,6 +1381,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
@ -950,10 +950,10 @@ Index: gdb-7.2.50.20110328/gdb/testsuite/lib/gdb.exp
return 0;
}
Index: gdb-7.2.50.20110328/gdb/testsuite/lib/mi-support.exp
Index: gdb-7.2.90.20110411/gdb/testsuite/lib/mi-support.exp
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
+++ gdb-7.2.50.20110328/gdb/testsuite/lib/mi-support.exp 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/testsuite/lib/mi-support.exp 2011-03-07 17:03:04.000000000 +0100
+++ gdb-7.2.90.20110411/gdb/testsuite/lib/mi-support.exp 2011-04-11 19:16:15.000000000 +0200
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
}
}
@ -971,10 +971,10 @@ Index: gdb-7.2.50.20110328/gdb/testsuite/lib/mi-support.exp
detect_async
Index: gdb-7.2.50.20110328/gdb/objfiles.h
Index: gdb-7.2.90.20110411/gdb/objfiles.h
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
+++ gdb-7.2.50.20110328/gdb/objfiles.h 2011-03-28 18:41:20.000000000 +0200
--- gdb-7.2.90.20110411.orig/gdb/objfiles.h 2011-03-07 17:17:29.000000000 +0100
+++ gdb-7.2.90.20110411/gdb/objfiles.h 2011-04-11 19:16:15.000000000 +0200
@@ -441,6 +441,10 @@ struct objfile
#define OBJF_PSYMTABS_READ (1 << 4)

View File

@ -1,9 +1,9 @@
Index: gdb-7.2.50.20110328/gdb/breakpoint.c
Index: gdb-7.2.90.20110411/gdb/breakpoint.c
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/breakpoint.c 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/breakpoint.c 2011-03-28 18:45:57.000000000 +0200
@@ -10707,6 +10707,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,11 +53,11 @@ Index: gdb-7.2.50.20110328/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.20110328/gdb/breakpoint.h
Index: gdb-7.2.90.20110411/gdb/breakpoint.h
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/breakpoint.h 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/breakpoint.h 2011-03-28 18:46:07.000000000 +0200
@@ -1219,4 +1219,7 @@ extern int user_breakpoint_p (struct bre
--- 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 void modify_semaphore (struct bp_location *location, int set);
@ -65,10 +65,10 @@ Index: gdb-7.2.50.20110328/gdb/breakpoint.h
+ struct section_offsets *delta);
+
#endif /* !defined (BREAKPOINT_H) */
Index: gdb-7.2.50.20110328/gdb/objfiles.c
Index: gdb-7.2.90.20110411/gdb/objfiles.c
===================================================================
--- gdb-7.2.50.20110328.orig/gdb/objfiles.c 2011-03-28 18:40:14.000000000 +0200
+++ gdb-7.2.50.20110328/gdb/objfiles.c 2011-03-28 18:45:57.000000000 +0200
--- 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);

File diff suppressed because it is too large Load Diff

View File

@ -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)
{

View File

@ -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);

View File

@ -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. */

View File

@ -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"

View File

@ -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

View File

@ -23,11 +23,11 @@ Name: gdb%{?_with_debug:-debug}
# Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
Version: 7.2.50.20110328
Version: 7.2.90.20110411
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 33%{?_with_upstream:.upstream}%{?dist}
Release: 34%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@ -468,10 +468,6 @@ Patch412: gdb-unused-revert.patch
#=push+work: It should be fixed properly instead.
Patch417: gdb-bz541866-rwatch-before-run.patch
# Fix crash when using GNU IFUNC call from breakpoint condition.
#=drop: After archer-jankratochvil-ifunc gets in this one gets obsoleted.
Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
#=push+work: Currently it is still not fully safe.
Patch459: gdb-moribund-utrace-workaround.patch
@ -502,10 +498,6 @@ Patch491: gdb-gdb-add-index-script.patch
#=drop+work: Inferior objects should be read in parts, then this patch gets obsoleted.
Patch496: gdb-bz568248-oom-is-error.patch
# Workaround false GCC warning(s).
#=push
Patch497: gdb-false-gcc-warning.patch
# Fix gcore writer for -Wl,-z,relro (PR corefiles/11804).
#=push: There is different patch on gdb-patches, waiting now for resolution in kernel.
Patch504: gdb-bz623749-gcore-relro.patch
@ -536,10 +528,6 @@ Patch547: gdb-test-dw2-aranges.patch
# =fedoratest
Patch548: gdb-test-expr-cumulative-archer.patch
# Fix DWARF-3+ DW_AT_accessibility default assumption for F15 gcc-4.6.
# =push
Patch554: gdb-dwarf3-accessibility.patch
# Temporary fix of F15 gcc-4.6 child DIEs of DW_TAG_typedef (BZ 672230).
# =push
Patch555: gdb-gcc46-typedef.patch
@ -814,7 +802,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch408 -p1
%patch412 -p1
%patch417 -p1
%patch454 -p1
%patch459 -p1
%patch470 -p1
%patch475 -p1
@ -824,7 +811,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch490 -p1
%patch491 -p1
%patch496 -p1
%patch497 -p1
%patch504 -p1
%patch510 -p1
%patch511 -p1
@ -833,13 +819,13 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch542 -p1
%patch547 -p1
%patch548 -p1
%patch554 -p1
%patch555 -p1
%patch556 -p1
%patch571 -p1
%patch572 -p1
%patch573 -p1
%patch574 -p1
%patch579 -p1
%patch390 -p1
%patch393 -p1
@ -857,8 +843,6 @@ fi
%patch487 -p1
%endif # 0%{?rhel:1}
%patch579 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@ -1270,6 +1254,10 @@ fi
%{_infodir}/gdb.info*
%changelog
* 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:

View File

@ -1,2 +1,2 @@
04e5c4b1b9e633422cc48990fe61958d libstdc++-v3-python-r155978.tar.bz2
b590e0c12a506011ef2c27f677aa69f7 gdb-7.2.50.20110328.tar.bz2
7095f3f412e27a73c39df4aa737a386a gdb-7.2.90.20110411.tar.bz2