-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the lldbvis wiki!
This will explain how lldbvis can be used to debug your program. After you've written a (C++) program, you can start up lldbvis and return to this page.
The lldbvis program comes with a simple code editor which can be opened by clicking the Editor menu item. This can be used as a code editor as well as adding breakpoints, which can be done by clicking the line number on the left.
A program can be selected from the dialog that pops up when clicking the Run Target menu item. An executable program needs to be selected (e.g. the compiled executable from a C++ program). Then in the bottom widget of the main window, you can press the Run button and the program will start running and stop at the first breakpoint. The text editor inside this widget shows at what line the currently running program is and where breakpoints can be found (note that it can't be used to edit code or set/unset breakpoints).
During execution some breakpoints will be encountered. You can run the rest of the code by pressing the Run button again or use one of the step buttons:
- Step Over
- Step Into
- Step Out
- Step Instruction
- Step Out Of Frame I won't go over explaining the use cases of these different stepping functions.
Any printing commands (either normal or erroring messages) will be output to the console which is in the bottom right corner by default.
A program runs in a single process, but can consist of separate threads. You can check the frames of all running threads by selecting a thread from the selection box in the top left widget (note this will not change the currently running thread).
The visualizer is the center widget of the main window. It gives a tree graph of the objects in memory. There are different kind of nodes: the root node represents the main process, children nodes of the root are threads, then come the frames and frames consist of variables. Each individual node can be selected in this visualizer and extra information is displayed in the top right widget.
The information in the top right widget depends on the kind of node that is selected. Most important is information on a variable. This includes the name, value, type and members (if the variable is an array or an object with instance variables). Furthermore, this widget gives an easier way to navigate the debug tree by e.g. going to parent nodes. Also a button is included which will bring you to the declaration of a variable.
The bottom left widget has an extra tab called Commands. When you click the button, a tab will show up which you can use to execute lldb commands. There are some example commands ready for simple usage. Executing a command will give output in the text box below. Other commands that you can use, can be found here or in this pdf