[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
Hello,
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:
https://gist.github.com/nkaretnikov/6ee00afabf73332c5a89eacb610369c2
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:
http://llvm.org/svn/llvm-project/lldb/trunk/examples/python/process_events.py
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
from
the callback. Maybe with 'state == lldb.eStateStopped' and a global
variable
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
without
events or my events are ignored completely (likely because I use them
incorrectly).
I haven't published the code of the event version, but I can do that later
unless someone proposes a working solution right away.
Thanks,
Nikita
-------------- 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