Opened 3 months ago

#19021 new bug

Debugger can't resolve some function names when using lld

Reported by: Zardshard Owned by: anevilyak
Priority: normal Milestone: Unscheduled
Component: Applications/Debugger Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I've encountered this bug a lot when working with HaikuWebKit.

Sometimes, when using lld for linking, Debugger fails to decode the function name in a back trace and instead display something like /Storage/haikuwebkit/WebKitBuild/Debug/lib/libWebKit.so.1.9.11 + 0x249414d. However, running addr2line -f -e /Storage/haikuwebkit/WebKitBuild/Debug/lib/libWebKit.so.1.9.11 0x249414d does show the symbol name.

Reproducing

Take a simple C++ file, such as

#include <OS.h>

int main() {
    debugger("");
}

and compile it with g++ -fuse-ld=lld -g <file>.

Run it, open Debugger, and instead of seeing _main in the backtrace, you should see /boot/home/Desktop/test/main + 0x18ae.

System information

Haiku x86_64 hrev57966
gcc version 13.3.0_2023_08_10-1
llvm17_lld version 17.0.6-3

Change History (0)

Note: See TracTickets for help on using tickets.