[llvm-bugs] [Bug 52553] New: lld's liberal usages of `using namespace ...` seem to confuse LLDB

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 18 18:25:53 PST 2021


            Bug ID: 52553
           Summary: lld's liberal usages of `using namespace ...` seem to
                    confuse LLDB
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: vyng at google.com
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

(not really a bug - more of a question)

Should we change this? Currently this confuses the debugger and makes it a bit


lldb -- ld64.lld.darwninnew <... rest of args>

Set a breakpoint anywhere - but for best effect, here:

(ie., right after `symtab` is set)

Try and print `symtab` or `in.got`:

(lldb) b Driver.cpp:1139
Breakpoint 1: 3 locations.
(lldb) run
Process 13244 launched:
'/Users/vyng/repo/llvm-project/build_lld/bin/ld64.lld.darwinnew' (x86_64)
Process 13244 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
    frame #0: 0x0000000100a0856f
ld64.lld.darwinnew`lld::macho::link(argsArr=ArrayRef<const char *> @
0x00007ff7bfefeeb0, canExitEarly=true, stdoutOS=0x00000001093b83a8,
stderrOS=0x00000001093b8410) at Driver.cpp:1139:12
   1137   config = make<Configuration>();
   1138   symtab = make<SymbolTable>();
-> 1139   target = createTargetInfo(args);
   1140   depTracker =
   1142   if (errorCount())
Target 0: (ld64.lld.darwinnew) stopped.
(lldb) print symtab
(lld::elf::SymbolTable *) $0 = nullptr
(lldb) print in.got
(lld::elf::GotSection *) $1 = nullptr
(lldb) print lld::macho::in.got

Note that LLDB prints the ELF's objects rather than macho's ones!!!

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211119/8b1b8e14/attachment-0001.html>

More information about the llvm-bugs mailing list