]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't look for separate debuginfo if the image has a .debug_info section
authorTom Hughes <tom@compton.nu>
Thu, 20 May 2021 16:16:06 +0000 (17:16 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 20 May 2021 16:16:06 +0000 (17:16 +0100)
Fixes BZ#435908

NEWS
coregrind/m_debuginfo/readelf.c

diff --git a/NEWS b/NEWS
index 2e8174e6f31787c515ca42070254fc73baf8b536..4cf932d3032e9c65583f1cb05d849b5196f01539 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,8 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 434840  PPC64 darn instruction not supported
 434296  s390x: False-positive memcheck diagnostics from vector string
         instructions
+435908  valgrind tries to fetch from deubginfod for files which already
+        have debug information
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index b0f062ddc6b4b197a013c1892c20f8860bc6994b..e424e3e7e8bb10ac33f2154636249c9a222bafc7 100644 (file)
@@ -2879,13 +2879,15 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
       /* Look for a build-id */
       HChar* buildid = find_buildid(mimg, False, False);
 
-      /* Look for a debug image that matches either the build-id or
+      /* If we don't have a .debug_info section in the main image then
+         look for a debug image that matches either the build-id or
          the debuglink-CRC32 in the main image.  If the main image
          doesn't contain either of those then this won't even bother
          to try looking.  This looks in all known places, including
          the --extra-debuginfo-path if specified and on the
          --debuginfo-server if specified. */
-      if (buildid != NULL || debuglink_escn.img != NULL) {
+      if (debug_info_escn.img == NULL &&
+          (buildid != NULL || debuglink_escn.img != NULL)) {
          /* Do have a debuglink section? */
          if (debuglink_escn.img != NULL) {
             UInt crc_offset