【发布时间】:2019-01-04 01:50:32
【问题描述】:
我正在研究如何在 macOS 上调试 .NET 应用程序。到目前为止,我已经使用 libsosplugin.dylib 成功编译了 LLDB 3.9,并且已经学会了如何在其中打开应用程序。但是,我找不到列出源代码并在其中放置断点的方法。
$HOME/SDK/build/release/bin/lldb-3.9.1 \
-o "plugin load $HOME/SDK/coreclr/bin/Product/OSX.x64.Debug/libsosplugin.dylib" \
-o "process launch -s" \
dotnet ./bin/Debug/netcoreapp2.2/app.dll
当我使用 Crtl+C 停止应用程序并输入 l 作为来源时,它什么也不做。
Process 39465 stopped
* thread #1: tid = 0x979f6, 0x0000000102b85795 libcoreclr.dylib`WKS::gc_heap::mark_object_simple(unsigned char**) + 293, stop reason = signal SIGSTOP
frame #0: 0x0000000102b85795 libcoreclr.dylib`WKS::gc_heap::mark_object_simple(unsigned char**) + 293
libcoreclr.dylib`WKS::gc_heap::mark_object_simple:
-> 0x102b85795 <+293>: movq %rax, %rcx
0x102b85798 <+296>: orq $0x1, %rcx
0x102b8579c <+300>: movq %rcx, (%rdi)
0x102b8579f <+303>: testb $0x1, %al
(lldb) l
(lldb)
是否可以在 LLDB 中查看 dotnet 应用程序源?
【问题讨论】: