[lldb-dev] lldb with app using shared lib not working
Andre Alefeld via lldb-dev
lldb-dev at lists.llvm.org
Thu Nov 19 04:24:46 PST 2015
Hi,
if I try to debug an application from the terminal that is using a
shared lib lldb complains always about not finding the library even
though everything is loading correctly when starting the app directly
from the same terminal:
echo $DYLD_LIBRARY_PATH/
<some path>
running with debugger, shared lib can be loaded:
test_app
otool -L DARWIN_X64/test_app
DARWIN_X64/test_app:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1225.1.1)
libmyapp.dylib (compatibility version 0.0.0, current version 0.0.0)
lldb -f DARWIN_X64/test_app
(lldb) target create "DARWIN_X64/test_app"
Current executable set to 'DARWIN_X64/test_app' (x86_64).
(lldb) r
Process 32234 launched: '/Users/xxx/yyy/zzz/source/DARWIN_X64/test_app'
(x86_64)
dyld: Library not loaded: libmyapp.dylib
Referenced from: /Users/xxx/yyy/zzz/source/DARWIN_X64/test_app
Reason: image not found
Process 32234 stopped
* thread #1: tid = 0x85c524, 0x00007fff5fc01075 dyld`dyld_fatal_error +
1, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
frame #0: 0x00007fff5fc01075 dyld`dyld_fatal_error + 1
dyld`dyld_fatal_error:
-> 0x7fff5fc01075 <+1>: nop
dyld`dyldbootstrap::start:
0x7fff5fc01076 <+0>: pushq %rbp
0x7fff5fc01077 <+1>: movq %rsp, %rbp
0x7fff5fc0107a <+4>: pushq %r15
how can I achieve that the shared lib is used in the debugger correctly,
do I have to set some additional environment variables. Is there a
special r (process launch) syntax that I need to use ?
in gdb it used to work like a charm...
thanks for any help you can deliver in advance,
Andre
More information about the lldb-dev
mailing list