[lldb-dev] Stepping in a breakpoint callback with Python

Nikita Karetnikov via lldb-dev lldb-dev at lists.llvm.org
Wed Sep 18 19:59:08 PDT 2019


I'm trying to figure out how to write a simple tracer.  Specifically, I
want to
perform some 'step's after a breakpoint callback fires.  How do I do that in
async mode?

Here's my attempt:

The problem is that pc is not updated (pc: 0xffffffffffffffff) when the loop
executes the second time.

I've also attempted to refactor this code based on:

My idea was to have a similar loop as the one that's after 'listener =
...'.  It
would sit there waiting for events, and I would somehow broadcast an event
the callback.  Maybe with 'state == lldb.eStateStopped' and a global
allowing me to distinguish this event type from the rest.

But I can't find a way to do this.  Either I get the same behavior as
events or my events are ignored completely (likely because I use them

I haven't published the code of the event version, but I can do that later
unless someone proposes a working solution right away.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190919/0139dfe3/attachment.html>

More information about the lldb-dev mailing list