2,034 questions
Score of 0
1 answer
63 views
How can I tell which NSWindow triggered a breakpoint in a multi-window Mac app?
I am developing a macOS app using AppKit. The app can have multiple windows open at the same time, similar to Finder or Safari.
When a breakpoint is hit, or when I am inspecting state in LLDB, I ...
Score of 0
0 answers
66 views
How to inspect structures like NSRect/NSSize using lldb?
I have previously used lldb to print structures like NSRect or NSSize of 3rd party processes without issues. But I am struggling in modern versions of Xcode to inspect them. Namely since the ...
Score of 1
0 answers
133 views
The iOS Watchdog kills a debugged daemon process 2 minutes into the debugging session
On a jailbroken iPhone, I'm attaching the debugserver to an iOS system daemon: debugserver 0.0.0.0:1234 -a <daemon-process>.
It is possible to connect to the iOS debugserver using lldb on my Mac....
Score of 0
1 answer
71 views
Disassembly view in Xcode: how can I symbolicate a function's address?
In Xcode, I set a breakpoint to a function which is a part of an iOS framework and the disassembly view showed up. All function calls except one (0x1bb286280) were symbolicated (i.e. Xcode showed the ...
Score of 1
1 answer
58 views
How can I skip uninteresting functions/files with lldb (in boost asio)?
I would like to skip the whole boost library details when stepping through the code in the debugger.
Example uninteresting things I would like to skip:
(lldb) n
Process 577286 stopped
* thread #1, ...
Score of 0
1 answer
43 views
Is there a way to debug macports provided packages with source code?
How do I debug a macports provided package with the source code?
I currently see the decompiled assembly language, what I need is the line on which the code crashed.
Process 90037 stopped
* thread #1, ...
Score of 1
2 answers
196 views
How to print swift object in LLDB for given address?
In ObjC++, I just use po $x0 to print the first argument of a function. If it's an object, it will display it in detail.
However, in Swift when I do this for an swift object, I got an error:
po $x0
...
Score of 0
0 answers
210 views
Debugger not stepping through code in VSCode with Rust – Unable to debug using `lldb` on Windows
I'm trying to debug my Rust project in VSCode but the debugger doesn't step through the code. I have lldb configured as the debugger, but breakpoints aren't hit, and I can't step through my code. I’m ...
Score of 2
1 answer
146 views
How to put source information in the debug symbols without embedding the full sources on Linux?
MSVC has a very useful flag /SOURCELINK. This allows you to tell where in your versioning system the sources are stored, such that they can be downloaded.
For example: (Also holds for C++)
{
"...
Score of 0
2 answers
81 views
How can I access synthetic children whose names have special characters in LLDB?
Consider this program.cpp:
struct Foo {
int field1;
int field2;
};
int main() {
Foo foo{.field1 = -1, .field2 = -2};
return 0;
}
I've implemented a custom LLDB data formatter for the Foo ...
Score of 1
0 answers
265 views
lldb can't attach to process directly
I'm having trouble attaching lldb directly to a running process on macOS. When I try lldb -p <PID>, I always get error: Connection shut down by remote side while waiting for reply to initial ...
Score of 0
1 answer
234 views
How does Xcode display the recorded stack frame, and can I retrieve it manually using LLDB?
In iOS development, I’ve noticed that when I set a breakpoint on a dispatch_* object (e.g., dispatch_async) in Xcode, it sometimes allows me to trace back to the original caller of the dispatch. In ...
Score of 0
1 answer
150 views
[LLDB][RUN][error: execve failed: Permission denied]
I used Clang to compile a large project to Linux X86_64 executable file my_out.
./my_out runs successfully.
When I try to use lldb my_out to debug the execution of my_out.
It can success launch the ...
Score of 0
1 answer
78 views
LLDB is invoking Xcode to display source code all of a sudden. How to switch back?
I'm debugging a C project on Mac using LLDB, and the relevant source codes no longer displays inside LLDB commandline, but instead in Xcode.
How do I disable this?
(lldb) version
lldb-1700.0.9.502
...
Score of -1
1 answer
319 views
lldb-dap exception 0x80000003 under Windows 11 / arm64
I just learned about the lldb-dap extension for VSCode and set about using it on a trivial hello world program. Well, things are running, but not comfortably. I set a breakpoint on the printf line, ...