def print_thread_disassembly(tid): # Request debug privileges. System.request_debug_privileges() # Instance a Thread object. thread = Thread(tid) # Suspend the thread execution. thread.suspend() # Get the thread's currently running code. try: eip = thread.get_pc() code = thread.disassemble_around(eip) # You can also do this: # code = thread.disassemble_around_pc() # Or even this: # process = thread.get_process() # code = process.disassemble_around( eip ) # Resume the thread execution. finally: thread.resume() # Display the disassembled code. print() print(CrashDump.dump_code(code, eip), end=' ')
def print_thread_disassembly( tid ): # Request debug privileges. System.request_debug_privileges() # Instance a Thread object. thread = Thread( tid ) # Suspend the thread execution. thread.suspend() # Get the thread's currently running code. try: eip = thread.get_pc() code = thread.disassemble_around( eip ) # You can also do this: # code = thread.disassemble_around_pc() # Or even this: # process = thread.get_process() # code = process.disassemble_around( eip ) # Resume the thread execution. finally: thread.resume() # Display the disassembled code. print print CrashDump.dump_code( code, eip ),
def print_thread_context(tid): System.request_debug_privileges() thread = Thread(tid) thread.suspend() try: context = thread.get_context() finally: thread.resume() print print CrashDump.dump_registers(context)
def print_thread_disassembly(tid): System.request_debug_privileges() thread = Thread(tid) thread.suspend() try: eip = thread.get_pc() code = thread.disassemble_around(eip) #or code = thread.disassemble_around_pc() #or process = thread.get_process() # code = process.disassemble_around(eip) finally: thread.resume() print print CrashDump.dump_code(code, eip)
def print_thread_context( tid ): # Request debug privileges. System.request_debug_privileges() # Instance a Thread object. thread = Thread( tid ) # Suspend the thread execution. thread.suspend() # Get the thread context. try: context = thread.get_context() # Resume the thread execution. finally: thread.resume() # Display the thread context. print() print (CrashDump.dump_registers( context ),)
def print_thread_context( tid ): # Request debug privileges. System.request_debug_privileges() # Instance a Thread object. thread = Thread( tid ) # Suspend the thread execution. thread.suspend() # Get the thread context. try: context = thread.get_context() # Resume the thread execution. finally: thread.resume() # Display the thread context. print print CrashDump.dump_registers( context ),