MCPcopy Create free account
hub / github.com/apache/brpc / BthreadRegRestoreCmd

Class BthreadRegRestoreCmd

tools/gdb_bthread_stack.py:255–268  ·  view source on GitHub ↗

restore registers

Source from the content-addressed store, hash-verified

253 print("Enter bthread debug mode, do not switch thread before exec 'bthread_end' !!!")
254
255class BthreadRegRestoreCmd(gdb.Command):
256 """restore registers"""
257 def __init__(self):
258 gdb.Command.__init__(self, "bthread_reg_restore", gdb.COMMAND_STACK, gdb.COMPLETE_NONE)
259
260 def invoke(self, arg, tty):
261 global status
262 if not status:
263 print("Not in bthread debug mode")
264 return
265 gdb.parse_and_eval("$rip = $saved_rip")
266 gdb.parse_and_eval("$rsp = $saved_rsp")
267 gdb.parse_and_eval("$rbp = $saved_rbp")
268 print("OK")
269
270class BthreadEndCmd(gdb.Command):
271 """exit bthread debug mode"""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected