[lldb-dev] [Bug 33156] New: no warning when standalone debug file does not match

via lldb-dev lldb-dev at lists.llvm.org
Wed May 24 09:39:01 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33156

            Bug ID: 33156
           Summary: no warning when standalone debug file does not match
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org

I was testing a FreeBSD upgrade in a chroot and sh segfaulted. When examining
the core lldb opens /usr/lib/debug/bin/sh.debug, not the one in the chroot dir;
this is as expected. However, it provides no warning or error that the .debug
file does not match the binary.

For example:

root at nuc:/nroot # lldb bin/sh -c sh.core
(lldb) target create "bin/sh" --core "sh.core"
Core file '/nroot/sh.core' (x86_64) was loaded.
(lldb) bt
* thread #1, name = 'sh', stop reason = signal SIGABRT
  * frame #0: 0x0000007640cb66ca libc.so.7`___lldb_unnamed_symbol480$$libc.so.7
+ 26
    frame #1: 0x0000007640cb65f0 libc.so.7`___lldb_unnamed_symbol476$$libc.so.7
+ 48
    frame #2: 0x0000007640d071be libc.so.7`__res_nsend + 126
(lldb) image list
[  0] F8ED646E-0000-0000-0000-000000000000                    /nroot/bin/sh 
[  1] F12453D1-0000-0000-0000-000000000000                    /bin/sh 
      /usr/lib/debug/bin/sh.debug
[  2] 8B7D0D02-0000-0000-0000-000000000000                    /lib/libedit.so.7 
[  3] 4118A645-0000-0000-0000-000000000000                    /lib/libc.so.7 
[  4] 33FC476C-0000-0000-0000-000000000000                   
/lib/libncursesw.so.8 
[  5] 34772837-0000-0000-0000-000000000000                   
/libexec/ld-elf.so.1 
      /usr/lib/debug/libexec/ld-elf.so.1.debug

gdb's behaviour seems sensible, providing warnings for (some of) these cases:

root at nuc:/nroot # gdb7121 bin/sh sh.core
GNU gdb (GDB) 7.12.1 [GDB v7.12.1 for FreeBSD]
Copyright (C) 2017 Free Software Foundation, Inc.
...
warning: .dynamic section for "/lib/libedit.so.7" is not at the expected
address (wrong library or version mismatch?)

warning: .dynamic section for "/lib/libncursesw.so.8" is not at the expected
address (wrong library or version mismatch?)

warning: .dynamic section for "/libexec/ld-elf.so.1" is not at the expected
address (wrong library or version mismatch?)

warning: the debug information found in
"/usr/lib/debug//lib/libedit.so.7.debug" does not match "/lib/libedit.so.7"
(CRC mismatch).

warning: the debug information found in "/usr/lib/debug//lib/libc.so.7.debug"
does not match "/lib/libc.so.7" (CRC mismatch).

warning: the debug information found in
"/usr/lib/debug//lib/libncursesw.so.8.debug" does not match
"/lib/libncursesw.so.8" (CRC mismatch).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170524/0a54b092/attachment.html>


More information about the lldb-dev mailing list