- Upgrade to GDB 6.6. Drop redundant patches, forward-port remaining ones.

- Backported post gdb-6.6 release ia64 unwinding fixups.
- Testcase for exec() from threaded program (BZ 202689).
- Resolves: rhbz#221125
- Related: rhbz#202689
This commit is contained in:
Jan Kratochvil 2007-01-21 01:53:01 +00:00
commit aefb0e1e23
19 changed files with 785 additions and 1466 deletions

View file

@ -21,9 +21,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
(SYMBOL_FILE_INDEX, SYMBOL_FILE_SYMTAB): New macros.
--- ./gdb/buildsym.c 2005-12-17 22:33:59.000000000 +0000
+++ ./gdb/buildsym.c 2007-01-09 08:30:38.000000000 +0000
@@ -535,7 +535,7 @@ make_blockvector (struct objfile *objfil
Index: gdb-6.6/gdb/buildsym.c
===================================================================
--- gdb-6.6.orig/gdb/buildsym.c 2006-08-25 18:32:32.000000000 +0200
+++ gdb-6.6/gdb/buildsym.c 2007-01-20 13:59:48.000000000 +0100
@@ -540,7 +540,7 @@ make_blockvector (struct objfile *objfil
the directory in which it resides (or NULL if not known). */
void
@ -32,7 +34,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
{
struct subfile *subfile;
@@ -547,6 +547,17 @@ start_subfile (char *name, char *dirname
@@ -552,6 +552,17 @@ start_subfile (char *name, char *dirname
if (FILENAME_CMP (subfile->name, name) == 0)
{
current_subfile = subfile;
@ -50,7 +52,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
return;
}
}
@@ -562,6 +573,7 @@ start_subfile (char *name, char *dirname
@@ -567,6 +578,7 @@ start_subfile (char *name, char *dirname
current_subfile = subfile;
/* Save its name and compilation directory name */
@ -58,7 +60,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
subfile->name = (name == NULL) ? NULL : savestring (name, strlen (name));
subfile->dirname =
(dirname == NULL) ? NULL : savestring (dirname, strlen (dirname));
@@ -617,6 +629,13 @@ start_subfile (char *name, char *dirname
@@ -622,6 +634,13 @@ start_subfile (char *name, char *dirname
}
}
@ -72,7 +74,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
/* For stabs readers, the first N_SO symbol is assumed to be the
source file name, and the subfile struct is initialized using that
assumption. If another N_SO symbol is later seen, immediately
@@ -816,9 +835,12 @@ end_symtab (CORE_ADDR end_addr, struct o
@@ -821,9 +840,12 @@ end_symtab (CORE_ADDR end_addr, struct o
{
struct symtab *symtab = NULL;
struct blockvector *blockvector;
@ -86,7 +88,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
/* Finish the lexical context of the last function in the file; pop
the context stack. */
@@ -916,6 +938,18 @@ end_symtab (CORE_ADDR end_addr, struct o
@@ -921,6 +943,18 @@ end_symtab (CORE_ADDR end_addr, struct o
#endif
PROCESS_LINENUMBER_HOOK (); /* Needed for xcoff. */
@ -105,7 +107,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
/* Now create the symtab objects proper, one for each subfile. */
/* (The main file is the last one on the chain.) */
@@ -976,6 +1010,16 @@ end_symtab (CORE_ADDR end_addr, struct o
@@ -981,6 +1015,16 @@ end_symtab (CORE_ADDR end_addr, struct o
strlen (subfile->dirname) + 1);
strcpy (symtab->dirname, subfile->dirname);
}
@ -122,7 +124,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
else
{
symtab->dirname = NULL;
@@ -1004,6 +1048,13 @@ end_symtab (CORE_ADDR end_addr, struct o
@@ -1009,6 +1053,13 @@ end_symtab (CORE_ADDR end_addr, struct o
but the main file. */
symtab->primary = 0;
@ -136,7 +138,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
}
if (subfile->name != NULL)
{
@@ -1032,9 +1083,40 @@ end_symtab (CORE_ADDR end_addr, struct o
@@ -1037,9 +1088,40 @@ end_symtab (CORE_ADDR end_addr, struct o
symtab->primary = 1;
}
@ -177,8 +179,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
return symtab;
}
--- ./gdb/buildsym.h 2005-12-17 22:33:59.000000000 +0000
+++ ./gdb/buildsym.h 2007-01-09 08:17:17.000000000 +0000
Index: gdb-6.6/gdb/buildsym.h
===================================================================
--- gdb-6.6.orig/gdb/buildsym.h 2005-12-17 23:33:59.000000000 +0100
+++ gdb-6.6/gdb/buildsym.h 2007-01-20 13:59:48.000000000 +0100
@@ -63,6 +63,7 @@ EXTERN CORE_ADDR last_source_start_addr;
struct subfile
{
@ -197,9 +201,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
extern void start_subfile (char *name, char *dirname);
extern void patch_subfile_names (struct subfile *subfile, char *name);
--- ./gdb/dwarf2read.c 2007-01-08 22:28:24.000000000 +0000
+++ ./gdb/dwarf2read.c 2007-01-09 08:58:41.000000000 +0000
@@ -847,7 +847,7 @@ static struct line_header *(dwarf_decode
Index: gdb-6.6/gdb/dwarf2read.c
===================================================================
--- gdb-6.6.orig/gdb/dwarf2read.c 2007-01-20 06:43:04.000000000 +0100
+++ gdb-6.6/gdb/dwarf2read.c 2007-01-20 14:00:12.000000000 +0100
@@ -853,7 +853,7 @@ static struct line_header *(dwarf_decode
static void dwarf_decode_lines (struct line_header *, char *, bfd *,
struct dwarf2_cu *, struct partial_symtab *);
@ -208,7 +214,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
static struct symbol *new_symbol (struct die_info *, struct type *,
struct dwarf2_cu *);
@@ -6321,6 +6321,7 @@ add_file_name (struct line_header *lh,
@@ -6428,6 +6428,7 @@ add_file_name (struct line_header *lh,
unsigned int length)
{
struct file_entry *fe;
@ -216,7 +222,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
/* Grow the array if necessary. */
if (lh->file_names_size == 0)
@@ -6343,6 +6344,10 @@ add_file_name (struct line_header *lh,
@@ -6450,6 +6451,10 @@ add_file_name (struct line_header *lh,
fe->mod_time = mod_time;
fe->length = length;
fe->included_p = 0;
@ -227,7 +233,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
}
@@ -6560,7 +6565,7 @@ dwarf_decode_lines (struct line_header *
@@ -6668,7 +6673,7 @@ dwarf_decode_lines (struct line_header *
if (fe->dir_index)
dir = lh->include_dirs[fe->dir_index - 1];
@ -236,16 +242,16 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
}
/* Decode the table. */
@@ -6661,7 +6666,7 @@ dwarf_decode_lines (struct line_header *
dir = lh->include_dirs[fe->dir_index - 1];
@@ -6785,7 +6790,7 @@ dwarf_decode_lines (struct line_header *
if (!decode_for_pst_p)
- dwarf2_start_subfile (fe->name, dir, comp_dir);
+ dwarf2_start_subfile (fe->name, dir, comp_dir, file);
{
last_subfile = current_subfile;
- dwarf2_start_subfile (fe->name, dir, comp_dir);
+ dwarf2_start_subfile (fe->name, dir, comp_dir, file);
}
}
break;
case DW_LNS_set_column:
@@ -6764,7 +6769,8 @@ dwarf_decode_lines (struct line_header *
@@ -6889,7 +6894,8 @@ dwarf_decode_lines (struct line_header *
subfile's name. */
static void
@ -255,7 +261,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
{
char *fullname;
@@ -6783,7 +6789,7 @@ dwarf2_start_subfile (char *filename, ch
@@ -6908,7 +6914,7 @@ dwarf2_start_subfile (char *filename, ch
else
fullname = filename;
@ -264,7 +270,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
if (fullname != filename)
xfree (fullname);
@@ -6892,6 +6898,13 @@ new_symbol (struct die_info *die, struct
@@ -7017,6 +7023,13 @@ new_symbol (struct die_info *die, struct
{
SYMBOL_LINE (sym) = DW_UNSND (attr);
}
@ -278,8 +284,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
switch (die->tag)
{
case DW_TAG_label:
--- ./gdb/symtab.c 2007-01-08 22:28:25.000000000 +0000
+++ ./gdb/symtab.c 2007-01-09 08:19:05.000000000 +0000
Index: gdb-6.6/gdb/symtab.c
===================================================================
--- gdb-6.6.orig/gdb/symtab.c 2007-01-20 13:59:25.000000000 +0100
+++ gdb-6.6/gdb/symtab.c 2007-01-20 13:59:48.000000000 +0100
@@ -1129,6 +1129,10 @@ lookup_symbol (const char *name, const s
if (needtofreename)
xfree (demangled_name);
@ -309,8 +317,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
psr->symbol = sym;
psr->msymbol = NULL;
psr->next = NULL;
--- ./gdb/symtab.h 2007-01-08 22:28:25.000000000 +0000
+++ ./gdb/symtab.h 2007-01-09 08:44:02.000000000 +0000
Index: gdb-6.6/gdb/symtab.h
===================================================================
--- gdb-6.6.orig/gdb/symtab.h 2007-01-20 06:43:00.000000000 +0100
+++ gdb-6.6/gdb/symtab.h 2007-01-20 13:59:48.000000000 +0100
@@ -623,6 +623,18 @@ struct symbol
ENUM_BITFIELD(address_class) aclass : 6;