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:
committed by
Git OBS Bridge
parent
406af14c2a
commit
ab51a8efb0
@@ -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. */
|
||||
+
|
||||
|
Reference in New Issue
Block a user