[lldb-dev] Enabling single-step mode and acting on each executed instruction

Ted Woodward via lldb-dev lldb-dev at lists.llvm.org
Fri Jun 28 07:09:19 PDT 2019


You want to set up a stop-hook.

See “help target stop-hook”, specifically “help target stop-hook add”.

target stop-hook add -o “register read pc”
will read the pc each time the target stops.

From: lldb-dev <lldb-dev-bounces at lists.llvm.org> On Behalf Of Vangelis Tsiatsianas via lldb-dev
Sent: Friday, June 28, 2019 6:16 AM
To: via lldb-dev <lldb-dev at lists.llvm.org>
Cc: Vangelis Tsiatsianas <vangelists at icloud.com>
Subject: [EXT] [lldb-dev] Enabling single-step mode and acting on each executed instruction

Hello,

I would like to set the target in single-step mode and perform an action right after each instruction is executed. Notably, it is crucial to do so transparently, i.e. without interfering with user breakpoints, watchpoints, stepping etc..

Could you provide me with some guidance on how to accomplish it? 🙂

I have found the target.process.thread.trace-thread option and the relevant classes (ThreadPlanTracer and ThreadPlanAssemblyTracer), which although seem to not work and also crash the debugger when enabled.

Thank you very much, in advance.


― Vangelis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190628/59dcdeaf/attachment.html>


More information about the lldb-dev mailing list