Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tools/photongdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def cprint(stat, *args):


def get_next_ready(p):
<<<<<<< HEAD
return gdb.parse_and_eval("(photon::thread*)%s" % p.dereference()['__next_ptr'])


Expand All @@ -66,6 +67,20 @@ def get_vcpu(p):
def get_sleepq(vcpu):
return vcpu['sleepq']['q']

=======
return gdb.parse_and_eval("(void*)gdb_get_next_thread((void*){})".format(p))


def get_current():
return gdb.parse_and_eval("(void*)gdb_get_current_thread()")


def get_vcpu(p):
return gdb.parse_and_eval("(void*)gdb_get_vcpu((void*){})".format(p))

def get_thread_stack_ptr(p):
return gdb.parse_and_eval("(void*)gdb_get_thread_stack_ptr((void*){})".format(p))
>>>>>>> 1dcabe0 (gdb eval with return type since debugger may not have source code to resolve)

def in_sleep(q):
size = q['_M_impl']['_M_finish'] - q['_M_impl']['_M_start']
Expand Down
Loading