list active bthreads num
| 106 | print("#{}\t\t{}\t\t{}\t\t{}".format(i, t["tid"], t["fn"], "no" if str(t["stack"]) == "0x0" else "yes")) |
| 107 | |
| 108 | class BthreadNumCmd(gdb.Command): |
| 109 | """list active bthreads num""" |
| 110 | def __init__(self): |
| 111 | gdb.Command.__init__(self, "bthread_num", gdb.COMMAND_STACK, gdb.COMPLETE_NONE) |
| 112 | |
| 113 | def invoke(self, arg, tty): |
| 114 | res = get_bthread_num() |
| 115 | print(res) |
| 116 | |
| 117 | class BthreadFrameCmd(gdb.Command): |
| 118 | """bthread_frame <id>, select bthread frame by id""" |