Open tylzh97 opened 1 year ago
That's not currently something that's exposed to python.
There's a few ways to get at that value. The easiest of which would likely be adding a PANDA API function in the same way that panda.rr_guest_get_instr_count
has:
You would need to add a function near here: https://github.com/panda-re/panda/blob/35339e878c00e7dd15bdd023d64191ca1b343fe5/panda/src/panda_api.c#L132-L134
add the definition to the header file and also add a method in panda.py: https://github.com/panda-re/panda/blob/35339e878c00e7dd15bdd023d64191ca1b343fe5/panda/python/core/pandare/panda.py#L1342-L1344
I found in Python Pandas that the function
panda.rr_get_guest_instr_count()
can get the number of instructions currently executed, and I also found inrr_log.h
that the total number of instructions in the current replay file can be obtained throughrr_nondet_log->last_prog_point.guest_instr_count
. So how can I get this value in Python?