- Merge from gdb-7.4.50.20120603-3.fc18.src.rpm. * Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18 - Disable -lmcheck in the development builds. - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18 - Fix Release. - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120602-1.fc18 - Rebase to FSF GDB 7.4.50.20120602. - [testsuite] BuildRequire gcc-go. - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). - Use librpm.so.3 for rpm-4.10.0 in Fedora 18. - Revert recent breakage of UNIX objfiles order for symbols lookup. * Sat Jun 2 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-48.fc17 - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). * Mon May 28 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-47.fc17 - Workaround PR libc/14166 for inferior calls of strstr. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-46.fc17 - [RHEL5] Workaround doc build race. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-45.fc17 - Rename "set auto-load" patchset variable $ddir to $datadir. * Wed May 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-44.fc17 OBS-URL: https://build.opensuse.org/request/show/125095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=88
58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
--- gdb-7.4.50.20120120/gdb/solib-svr4.c.orig 2012-03-17 10:23:11.000000000 +0100
|
|
+++ gdb-7.4.50.20120120/gdb/solib-svr4.c 2012-03-17 10:36:22.265628529 +0100
|
|
@@ -1228,14 +1228,27 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
|
}
|
|
|
|
{
|
|
- struct build_id *build_id;
|
|
+ struct build_id *build_id = NULL;
|
|
|
|
strncpy (new->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
|
new->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
|
/* May get overwritten below. */
|
|
strcpy (new->so_name, new->so_original_name);
|
|
|
|
- build_id = build_id_addr_get (new->lm_info->l_ld);
|
|
+ /* In the case the main executable was found according to its build-id
|
|
+ (from a core file) prevent loading a different build of a library
|
|
+ with accidentally the same SO_NAME.
|
|
+
|
|
+ It suppresses bogus backtraces (and prints "??" there instead) if
|
|
+ the on-disk files no longer match the running program version.
|
|
+
|
|
+ If the main executable was not loaded according to its build-id do
|
|
+ not do any build-id checking of the libraries. There may be missing
|
|
+ build-ids dumped in the core file and we would map all the libraries
|
|
+ to the only existing file loaded that time - the executable. */
|
|
+ if (symfile_objfile != NULL
|
|
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
|
+ build_id = build_id_addr_get (new->lm_info->l_ld);
|
|
if (build_id != NULL)
|
|
{
|
|
char *name, *build_id_filename;
|
|
@@ -1250,23 +1263,7 @@ svr4_read_so_list (CORE_ADDR lm, struct
|
|
xfree (name);
|
|
}
|
|
else
|
|
- {
|
|
- debug_print_missing (new->so_name, build_id_filename);
|
|
-
|
|
- /* In the case the main executable was found according to
|
|
- its build-id (from a core file) prevent loading
|
|
- a different build of a library with accidentally the
|
|
- same SO_NAME.
|
|
-
|
|
- It suppresses bogus backtraces (and prints "??" there
|
|
- instead) if the on-disk files no longer match the
|
|
- running program version. */
|
|
-
|
|
- if (symfile_objfile != NULL
|
|
- && (symfile_objfile->flags
|
|
- & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
|
- new->so_name[0] = 0;
|
|
- }
|
|
+ debug_print_missing (new->so_name, build_id_filename);
|
|
|
|
xfree (build_id_filename);
|
|
xfree (build_id);
|