[lldb-dev] [Bug 52585] New: Crash when when genarating backtrace

2021-11-22 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=52585

Bug ID: 52585
   Summary: Crash when when genarating backtrace
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: achro...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  lldb 0x0001042b8027
llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1  lldb 0x0001042b76e5 llvm::sys::RunSignalHandlers() +
85
2  lldb 0x0001042b88d6 SignalHandler(int) + 278
3  libsystem_platform.dylib 0x7fff20368d7d _sigtramp + 29
4  libsystem_platform.dylib 0x538103a0f43e36a0 _sigtramp + 6016953833237227840
5  LLDB 0x000107c97279
lldb_private::Module::ResolveSymbolContextForAddress(lldb_private::Address
const&, lldb::SymbolContextItem, lldb_private::SymbolContext&, bool) + 409
6  LLDB 0x000107c5ee7c
lldb_private::Address::CalculateSymbolContext(lldb_private::SymbolContext*,
lldb::SymbolContextItem) const + 204
7  LLDB 0x000107fe9cb0
lldb_private::SwiftLanguageRuntime::GetRuntimeUnwindPlan(std::__1::shared_ptr,
lldb_private::RegisterContext*, bool&) + 432
8  LLDB 0x000107dba582
lldb_private::LanguageRuntime::GetRuntimeUnwindPlan(lldb_private::Thread&,
lldb_private::RegisterContext*, bool&) + 306
9  LLDB 0x000107de5b03
lldb_private::RegisterContextUnwind::InitializeNonZerothFrame() + 563
10 LLDB 0x000107de4bd0
lldb_private::RegisterContextUnwind::RegisterContextUnwind(lldb_private::Thread&,
std::__1::shared_ptr const&,
lldb_private::SymbolContext&, unsigned int, lldb_private::UnwindLLDB&) + 224
11 LLDB 0x000107e49683
lldb_private::UnwindLLDB::GetOneMoreFrame(lldb_private::ABI*) + 243
12 LLDB 0x000107e4911b
lldb_private::UnwindLLDB::AddOneMoreFrame(lldb_private::ABI*) + 331
13 LLDB 0x000107e4946d
lldb_private::UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid(lldb_private::ABI*)
+ 61
14 LLDB 0x000107e48fc0
lldb_private::UnwindLLDB::AddFirstFrame() + 832
15 LLDB 0x000107e49b82
lldb_private::UnwindLLDB::DoGetFrameInfoAtIndex(unsigned int, unsigned long
long&, unsigned long long&, bool&) + 50
16 LLDB 0x000107dfa864
lldb_private::StackFrameList::GetFramesUpTo(unsigned int) + 2308
17 LLDB 0x000107dfba69
lldb_private::StackFrameList::GetFrameAtIndex(unsigned int) + 153
18 LLDB 0x000107e24bee
lldb_private::Thread::SelectMostRelevantFrame() + 62
19 LLDB 0x000107e24ea9 lldb_private::Thread::WillStop()
+ 89
20 LLDB 0x000107e2df25
lldb_private::ThreadList::ShouldStop(lldb_private::Event*) + 1109
21 LLDB 0x000107dd6015
lldb_private::Process::ShouldBroadcastEvent(lldb_private::Event*) + 421
22 LLDB 0x000107dd2648
lldb_private::Process::HandlePrivateEvent(std::__1::shared_ptr&)
+ 280
23 LLDB 0x000107dd6df5
lldb_private::Process::RunPrivateStateThread(bool) + 1477
24 LLDB 0x000107dd6435
lldb_private::Process::PrivateStateThread(void*) + 21
25 LLDB 0x000107d1c617
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 103
26 libsystem_pthread.dylib  0x7fff203238fc _pthread_start + 224
27 libsystem_pthread.dylib  0x7fff2031f443 thread_start + 15

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 52582] New: LLDB confuses multiple global variables with the same name (even when they are in different namespace)

2021-11-22 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=52582

Bug ID: 52582
   Summary: LLDB confuses multiple global variables with the same
name (even when they are in different namespace)
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: v...@google.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

Background
Our binary has multiple global variables with the same basename but in
different namespaces. (Eg., lld::macho::symtab vs lld::elf::symtab,
lld::macho::in vs lld::elf::in, ...)

Repro:
Run the LLD linker under LLDB: (best to use MachO port to demonstrate this
bug):


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

Set a breakpoint anywhere - but for best effect, here:
https://github.com/llvm/llvm-project/blob/2782cb8da0b3c180fa7c8627cb255a026f3d25a2/lld/MachO/Driver.cpp#L1141

(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: 0x000100a0856f
ld64.lld.darwinnew`lld::macho::link(argsArr=ArrayRef @
0x7ff7bfefeeb0, canExitEarly=true, stdoutOS=0x0001093b83a8,
stderrOS=0x0001093b8410) at Driver.cpp:1139:12
   1136 
   1137   config = make();
   1138   symtab = make();
-> 1139   target = createTargetInfo(args);
   1140   depTracker =
   1141  
make(args.getLastArgValue(OPT_dependency_info));
   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
```

Expected:
Since the code that the breakpoint stopped on referred to the variable as
simply `symtab`, I would have expected LLDB's print to allow me to also use
`symtab`.

What actually happened:
LLDB always picked the globals from lld::elf .
(presumably because it's alphabetically before ::macho)


-
(Tested this with GDB and it didn't have this issue)

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 49018] Incorrect help text for memory write -f and -s options

2021-11-22 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=49018

Venkata Ramanaiah Nalamothu  changed:

   What|Removed |Added

   Assignee|lldb-dev@lists.llvm.org |ramana.venka...@gmail.com
 Status|NEW |CONFIRMED

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev