So, at a breakpoint, I have a random object instance. I want to figure out which objects have a pointer to this object. Is there a way to see this in the debugger console? Maybe something that shows me all the objects that have a retain on the object?
Example: I have a NSViewController
instance and I want to see all the other objects that hold a pointer this view controller instance. This would be helpful because it would allow me to see the view controller hierarchy that is encapsulating my instance.
Just a crazy thought I had that would really help at times.
lldb is a next generation, high-performance debugger. It is built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler.
LLDB (low-level debugger) is part of LLVM The LLVM compiler (low level virtual machine) creates programming languages. LLDB is Apple's “from the ground up” replacement for GDB. The LLDB debugger is analogous to GDB: (The GNU Project Debugger).
You can also expand the regsiters by register class: I'd like to know how to resize the various windows. If you resize the terminal, the size of the stack view pane seems to remain fixed, so the symbol names always end up truncated.
In lldb you can set breakpoints by typing either break or b followed by information on where you want the program to pause. After the b command, you can put either: a function name (e.g., b my_subroutine ) a line number (e.g., b 12 )
In lldb, use command script import lldb.macosx.heap
to install some memory-searching functions. The ptr_refs command should be able to do what you want; use ptr_refs --help
to learn more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With