@@ -9,8 +9,8 @@ As LLDB is generally split into 2 tools, ``lldb`` and ``lldb-server``
9
9
(``debugserver `` on Mac OS), the techniques shown here will not always apply to
10
10
both. With some knowledge of them all, you can mix and match as needed.
11
11
12
- In this document we refer to the initial ``lldb `` as the debugger and the
13
- program being debugged as the debugee .
12
+ In this document we refer to the initial ``lldb `` as the " debugger" and the
13
+ program being debugged as the "inferior" .
14
14
15
15
Building For Debugging
16
16
----------------------
@@ -63,11 +63,11 @@ makes it very confusing which one is which:
63
63
Process 1741640 launched: '<...>/bin/lldb' (aarch64)
64
64
Process 1741640 stopped and restarted: thread 1 received signal: SIGCHLD
65
65
66
- (the debugee )
66
+ (the inferior )
67
67
(lldb) target create "/tmp/test.o"
68
68
Current executable set to '/tmp/test.o' (aarch64).
69
69
70
- Another issue is that when you resume the debugee , it will not print the
70
+ Another issue is that when you resume the inferior , it will not print the
71
71
``(lldb) `` prompt because as far as it knows it hasn't changed state. A quick
72
72
way around that is to type something that is clearly not a command and hit
73
73
enter.
@@ -84,30 +84,30 @@ enter.
84
84
error: 'notacommand' is not a valid command.
85
85
(lldb)
86
86
87
- You could just remember whether you are in the debugger or the debugee but
88
- it's thinking overhead , and for interrupt based events you simply may not be
89
- able to know.
87
+ You could just remember whether you are in the debugger or the inferior but
88
+ it's more for you to remember , and for interrupt based events you simply may not
89
+ be able to know.
90
90
91
91
Here are some better approaches. First, you could use another debugger like GDB
92
92
to debug LLDB. Perhaps an IDE like Xcode or Visual Studio Code. Something which
93
93
runs LLDB under the hood so you don't have to type in commands to the debugger
94
94
yourself.
95
95
96
- Or you could change the prompt text for the debugger and/or debugee .
96
+ Or you could change the prompt text for the debugger and/or inferior .
97
97
98
98
::
99
99
100
100
$ ./bin/lldb -o "settings set prompt \"(lldb debugger) \"" -- \
101
- ./bin/lldb -o "settings set prompt \"(lldb debuggee ) \"" /tmp/test.o
101
+ ./bin/lldb -o "settings set prompt \"(lldb inferior ) \"" /tmp/test.o
102
102
<...>
103
103
(lldb) settings set prompt "(lldb debugger) "
104
104
(lldb debugger) run
105
105
<...>
106
- (lldb) settings set prompt "(lldb debuggee ) "
107
- (lldb debuggee )
106
+ (lldb) settings set prompt "(lldb inferior ) "
107
+ (lldb inferior )
108
108
109
- If you want spacial separation you can run the debugee in one terminal then
110
- attach to it in another. Remember that while paused in the debugger, the debugee
109
+ If you want spacial separation you can run the inferior in one terminal then
110
+ attach to it in another. Remember that while paused in the debugger, the inferior
111
111
will not respond to input so you will have to ``continue `` in the debugger
112
112
first.
113
113
@@ -122,14 +122,14 @@ first.
122
122
Placing Breakpoints
123
123
*******************
124
124
125
- Generally you will want to hit some breakpoint in the debugee ``lldb ``. To place
126
- that breakpoint you must first stop the debugee .
125
+ Generally you will want to hit some breakpoint in the inferior ``lldb ``. To place
126
+ that breakpoint you must first stop the inferior .
127
127
128
128
If you're debugging from another window this is done with ``process interrupt ``.
129
- The debugee will stop, you place the breakpoint and then ``continue ``. Go back
130
- to the debugee and input the command that should trigger the breakpoint.
129
+ The inferior will stop, you place the breakpoint and then ``continue ``. Go back
130
+ to the inferior and input the command that should trigger the breakpoint.
131
131
132
- If you are running debugger and debugee in the same window, input ``ctrl+c ``
132
+ If you are running debugger and inferior in the same window, input ``ctrl+c ``
133
133
instead of ``process interrupt `` and then folllow the rest of the steps.
134
134
135
135
If you are doing this with ``lldb-server `` and find your breakpoint is never
@@ -224,7 +224,7 @@ In the example below we're debugging an ``lldb-server`` ``gdbserver`` mode
224
224
command running on a remote machine.
225
225
226
226
For simplicity we'll use the same ``lldb-server `` as the debug server
227
- and the debugee , but it doesn't need to be that way. You can use ``gdbserver ``
227
+ and the inferior , but it doesn't need to be that way. You can use ``gdbserver ``
228
228
(as in, GDB's debug server program) or a system installed ``lldb-server `` if you
229
229
suspect your local copy is not stable. As is the case in many of these
230
230
scenarios.
0 commit comments