exit bthread debug mode
| 268 | print("OK") |
| 269 | |
| 270 | class 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 | |
| 286 | BthreadListCmd() |
| 287 | BthreadNumCmd() |