|
|
8febcd |
commit 93104368952c37268da724231487058ea3eaf1dc
|
|
|
8febcd |
Author: Tom Hughes <tom@compton.nu>
|
|
|
8febcd |
Date: Thu May 20 17:16:06 2021 +0100
|
|
|
8febcd |
|
|
|
8febcd |
Don't look for separate debuginfo if the image has a .debug_info section
|
|
|
8febcd |
|
|
|
8febcd |
Fixes BZ#435908
|
|
|
8febcd |
|
|
|
8febcd |
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
|
|
|
8febcd |
index b0f062ddc..e424e3e7e 100644
|
|
|
8febcd |
--- a/coregrind/m_debuginfo/readelf.c
|
|
|
8febcd |
+++ b/coregrind/m_debuginfo/readelf.c
|
|
|
8febcd |
@@ -2879,13 +2879,15 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
|
|
|
8febcd |
/* Look for a build-id */
|
|
|
8febcd |
HChar* buildid = find_buildid(mimg, False, False);
|
|
|
8febcd |
|
|
|
8febcd |
- /* Look for a debug image that matches either the build-id or
|
|
|
8febcd |
+ /* If we don't have a .debug_info section in the main image then
|
|
|
8febcd |
+ look for a debug image that matches either the build-id or
|
|
|
8febcd |
the debuglink-CRC32 in the main image. If the main image
|
|
|
8febcd |
doesn't contain either of those then this won't even bother
|
|
|
8febcd |
to try looking. This looks in all known places, including
|
|
|
8febcd |
the --extra-debuginfo-path if specified and on the
|
|
|
8febcd |
--debuginfo-server if specified. */
|
|
|
8febcd |
- if (buildid != NULL || debuglink_escn.img != NULL) {
|
|
|
8febcd |
+ if (debug_info_escn.img == NULL &&
|
|
|
8febcd |
+ (buildid != NULL || debuglink_escn.img != NULL)) {
|
|
|
8febcd |
/* Do have a debuglink section? */
|
|
|
8febcd |
if (debuglink_escn.img != NULL) {
|
|
|
8febcd |
UInt crc_offset
|