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

Class BthreadEndCmd

tools/gdb_bthread_stack.py:270–284  ·  view source on GitHub ↗

exit bthread debug mode

Source from the content-addressed store, hash-verified

268 print("OK")
269
270class BthreadEndCmd(gdb.Command):
271 """exit bthread debug mode"""
272 def __init__(self):
273 gdb.Command.__init__(self, "bthread_end", gdb.COMMAND_STACK, gdb.COMPLETE_NONE)
274
275 def invoke(self, arg, tty):
276 global status
277 if not status:
278 print("Not in bthread debug mode")
279 return
280 gdb.parse_and_eval("$rip = $saved_rip")
281 gdb.parse_and_eval("$rsp = $saved_rsp")
282 gdb.parse_and_eval("$rbp = $saved_rbp")
283 status = False
284 print("Exit bthread debug mode")
285
286BthreadListCmd()
287BthreadNumCmd()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected