File tree 1 file changed +16
-1
lines changed 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -213,11 +213,26 @@ child processes.
213
213
The same goes for ``printf ``. If it's called in a child process you won't see
214
214
the output.
215
215
216
- In these cases consider either interactive debugging ``lldb-server `` or
216
+ In these cases consider interactive debugging ``lldb-server `` or
217
217
working out a more specific command such that it does not have to spawn a
218
218
subprocess. For example if you start with ``platform `` mode, work out what
219
219
``gdbserver `` mode process it spawns and run that command instead.
220
220
221
+ Another option if you have ``strace `` available is to trace the whole process
222
+ tree and inspect the logs after the session has ended. ::
223
+
224
+ $ strace -ff -o log -p $(pidof lldb-server)
225
+
226
+ This will log all syscalls made by ``lldb-server `` and processes that it forks.
227
+ ``-ff `` tells ``strace `` to trace child processes and write the results to a
228
+ separate file for each process, named using the prefix given by ``-o ``.
229
+
230
+ Search the log files for specific terms to find the process you're interested
231
+ in. For example, to find a process that acted as a ``gdbserver `` instance::
232
+
233
+ $ grep "gdbserver" log.*
234
+ log.<N>:execve("<...>/lldb-server", [<...> "gdbserver", <...>) = 0
235
+
221
236
Remote Debugging
222
237
----------------
223
238
You can’t perform that action at this time.
0 commit comments