Accepting request 18027 from devel:gcc

Copy from devel:gcc/gdb based on submit request 18027 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/18027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=65
This commit is contained in:
OBS User autobuild
2009-08-17 13:40:03 +00:00
committed by Git OBS Bridge
parent 63e83ff75d
commit 721fd9d81e
9 changed files with 2408 additions and 1286 deletions

View File

@@ -1,7 +1,7 @@
Index: gdb-6.8.50.20090803/gdb/corelow.c
Index: gdb-6.8.50.20090809/gdb/corelow.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/corelow.c 2009-07-31 17:25:21.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/corelow.c 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/corelow.c 2009-07-31 17:25:21.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/corelow.c 2009-08-10 14:56:11.000000000 +0200
@@ -45,6 +45,10 @@
#include "exceptions.h"
#include "solib.h"
@@ -89,10 +89,10 @@ Index: gdb-6.8.50.20090803/gdb/corelow.c
+ NULL, NULL, NULL,
+ &setlist, &showlist);
}
Index: gdb-6.8.50.20090803/gdb/doc/gdb.texinfo
Index: gdb-6.8.50.20090809/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/doc/gdb.texinfo 2009-08-04 06:31:59.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/doc/gdb.texinfo 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/doc/gdb.texinfo 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/doc/gdb.texinfo 2009-08-10 14:56:11.000000000 +0200
@@ -13733,6 +13733,27 @@ information files.
@end table
@@ -121,10 +121,10 @@ Index: gdb-6.8.50.20090803/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-6.8.50.20090803/gdb/solib-svr4.c
Index: gdb-6.8.50.20090809/gdb/solib-svr4.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/solib-svr4.c 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/solib-svr4.c 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/solib-svr4.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/solib-svr4.c 2009-08-10 14:56:11.000000000 +0200
@@ -1101,9 +1101,33 @@ svr4_current_sos (void)
safe_strerror (errcode));
else
@@ -162,10 +162,10 @@ Index: gdb-6.8.50.20090803/gdb/solib-svr4.c
}
xfree (buffer);
Index: gdb-6.8.50.20090803/gdb/symfile.c
Index: gdb-6.8.50.20090809/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/symfile.c 2009-08-04 06:31:58.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/symfile.c 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/symfile.c 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.c 2009-08-10 14:58:53.000000000 +0200
@@ -55,6 +55,7 @@
#include "elf-bfd.h"
#include "solib.h"
@@ -174,7 +174,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
#include <sys/types.h>
#include <fcntl.h>
@@ -1193,16 +1194,65 @@ symbol_file_clear (int from_tty)
@@ -1195,16 +1196,65 @@ symbol_file_clear (int from_tty)
printf_unfiltered (_("No symbol file now.\n"));
}
@@ -242,7 +242,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
{
struct build_id *retval;
@@ -1218,6 +1268,348 @@ build_id_bfd_get (bfd *abfd)
@@ -1220,6 +1270,348 @@ build_id_bfd_get (bfd *abfd)
return retval;
}
@@ -591,7 +591,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int
@@ -1235,7 +1627,7 @@ build_id_verify (const char *filename, s
@@ -1237,7 +1629,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL)
return 0;
@@ -600,7 +600,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename);
@@ -1254,8 +1646,9 @@ build_id_verify (const char *filename, s
@@ -1256,8 +1648,9 @@ build_id_verify (const char *filename, s
return retval;
}
@@ -612,7 +612,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
{
char *link, *s, *retval = NULL;
gdb_byte *data = build_id->data;
@@ -1263,7 +1656,9 @@ build_id_to_debug_filename (struct build
@@ -1265,7 +1658,9 @@ build_id_to_debug_filename (struct build
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@@ -623,7 +623,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
if (size > 0)
{
@@ -1274,12 +1669,14 @@ build_id_to_debug_filename (struct build
@@ -1276,12 +1671,14 @@ build_id_to_debug_filename (struct build
*s++ = '/';
while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++);
@@ -640,7 +640,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
if (retval != NULL && !build_id_verify (retval, build_id))
{
@@ -1287,9 +1684,150 @@ build_id_to_debug_filename (struct build
@@ -1289,9 +1686,150 @@ build_id_to_debug_filename (struct build
retval = NULL;
}
@@ -649,9 +649,9 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
+ else
+ xfree (link);
+
+ return retval;
+}
+
return retval;
}
+/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
+ Try to install the hash file ...
+ avoidance. */
@@ -674,9 +674,9 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
+
+ retval = obstack_alloc (&missing_filepair_obstack, size);
+ memset (retval, 0, size);
return retval;
}
+ return retval;
+}
+
+static hashval_t
+missing_filepair_hash_func (const struct missing_filepair *elem)
+{
@@ -791,7 +791,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
static char *
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
{
@@ -1372,32 +1910,36 @@ static char *
@@ -1374,32 +1912,36 @@ static char *
find_separate_debug_file (struct objfile *objfile)
{
asection *sect;
@@ -836,7 +836,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
}
basename = get_debug_link_info (objfile, &crc32);
@@ -1405,7 +1947,7 @@ find_separate_debug_file (struct objfile
@@ -1407,7 +1949,7 @@ find_separate_debug_file (struct objfile
if (basename == NULL)
/* There's no separate debug info, hence there's no way we could
load it => no warning. */
@@ -845,18 +845,18 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
dir = xstrdup (objfile->name);
@@ -1421,23 +1963,19 @@ find_separate_debug_file (struct objfile
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
dir[i+1] = '\0';
@@ -1429,24 +1971,19 @@ find_separate_debug_file (struct objfile
if (canon_name && strlen (canon_name) > i)
i = strlen (canon_name);
- debugfile = alloca (strlen (debug_file_directory) + 1
- + strlen (dir)
- + i
- + strlen (DEBUG_SUBDIRECTORY)
- + strlen ("/")
- + strlen (basename)
- + 1);
+ debugfile = xmalloc (strlen (debug_file_directory) + 1
+ + strlen (dir)
+ + i
+ + strlen (DEBUG_SUBDIRECTORY)
+ + strlen ("/")
+ + strlen (basename)
@@ -870,39 +870,42 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */
strcpy (debugfile, dir);
@@ -1446,11 +1984,7 @@ find_separate_debug_file (struct objfile
@@ -1455,12 +1992,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* Then try in the global debugfile directory. */
strcpy (debugfile, debug_file_directory);
@@ -1459,11 +1993,7 @@ find_separate_debug_file (struct objfile
@@ -1469,12 +2001,7 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
- {
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
/* If the file is in the sysroot, try using its base path in the
global debugfile directory. */
@@ -1478,20 +2008,18 @@ find_separate_debug_file (struct objfile
@@ -1488,21 +2015,18 @@ find_separate_debug_file (struct objfile
strcat (debugfile, basename);
if (separate_debug_file_exists (debugfile, crc32, objfile->name))
@@ -910,17 +913,17 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
- xfree (canon_name);
- xfree (basename);
- xfree (dir);
- xfree (canon_name);
- return xstrdup (debugfile);
- }
+ goto cleanup_return_debugfile;
+ goto cleanup_return_debugfile;
}
-
- if (canon_name)
- xfree (canon_name);
+ debugfile = NULL;
+ debug_print_missing (objfile->name, build_id_filename);
+
+cleanup_return_debugfile:
+ xfree (build_id_filename);
+ xfree (canon_name);
@@ -931,7 +934,7 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
}
@@ -4243,4 +4771,16 @@ Show printing of symbol loading messages
@@ -4254,4 +4778,16 @@ Show printing of symbol loading messages
NULL,
NULL,
&setprintlist, &showprintlist);
@@ -948,10 +951,10 @@ Index: gdb-6.8.50.20090803/gdb/symfile.c
+
+ observer_attach_executable_changed (debug_print_executable_changed);
}
Index: gdb-6.8.50.20090803/gdb/symfile.h
Index: gdb-6.8.50.20090809/gdb/symfile.h
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/symfile.h 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/symfile.h 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/symfile.h 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/symfile.h 2009-08-10 14:56:11.000000000 +0200
@@ -388,6 +388,13 @@ extern int symfile_map_offsets_to_segmen
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
void free_symfile_segment_data (struct symfile_segment_data *data);
@@ -966,10 +969,10 @@ Index: gdb-6.8.50.20090803/gdb/symfile.h
/* From dwarf2read.c */
extern int dwarf2_has_info (struct objfile *);
Index: gdb-6.8.50.20090803/gdb/testsuite/lib/gdb.exp
Index: gdb-6.8.50.20090809/gdb/testsuite/lib/gdb.exp
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/lib/gdb.exp 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/lib/gdb.exp 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/testsuite/lib/gdb.exp 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/testsuite/lib/gdb.exp 2009-08-10 14:56:11.000000000 +0200
@@ -1248,6 +1248,16 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0."
}
@@ -987,10 +990,10 @@ Index: gdb-6.8.50.20090803/gdb/testsuite/lib/gdb.exp
return 0;
}
Index: gdb-6.8.50.20090803/gdb/testsuite/lib/mi-support.exp
Index: gdb-6.8.50.20090809/gdb/testsuite/lib/mi-support.exp
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/testsuite/lib/mi-support.exp 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/testsuite/lib/mi-support.exp 2009-08-04 06:32:12.000000000 +0200
--- gdb-6.8.50.20090809.orig/gdb/testsuite/lib/mi-support.exp 2009-08-10 00:50:30.000000000 +0200
+++ gdb-6.8.50.20090809/gdb/testsuite/lib/mi-support.exp 2009-08-10 14:56:11.000000000 +0200
@@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
}
}