Kaydet (Commit) f64ec0f2 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

A helper to dump info about the current frame,

assuming it is the variable f.
üst d46e684e
......@@ -25,3 +25,12 @@ end
define pyg
print _PyGC_Dump($arg0)
end
# If you are in an eval_frame() function, calling pyframe with no
# arguments will print the filename, function name, and line number.
# It assumes that f is the name of the current frame.
define pyframe
x/s ((PyStringObject*)f->f_code->co_filename)->ob_sval
x/s ((PyStringObject*)f->f_code->co_name)->ob_sval
p f->f_lineno
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment