[Python-checkins] python/dist/src/Misc gdbinit,1.2,1.3

jhylton at users.sourceforge.net jhylton at users.sourceforge.net
Fri Oct 3 16:56:18 EDT 2003


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv3137

Modified Files:
	gdbinit 
Log Message:
A helper to dump info about the current frame, 
assuming it is the variable f.


Index: gdbinit
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/gdbinit,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gdbinit	24 Jan 2001 04:18:13 -0000	1.2
--- gdbinit	3 Oct 2003 20:56:15 -0000	1.3
***************
*** 26,27 ****
--- 26,36 ----
  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





More information about the Python-checkins mailing list