[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-bugs
Subject:    how to get current function?
From:       skip () Pobox ! com (Skip Montanaro)
Date:       2001-06-08 20:16:02
Message-ID: e9efca5e.0106081216.59607dfc () posting ! google ! com
[Download RAW message or body]

I'm using gdb to debug Python code.  From within gdb I'd like to print a
representation of the Python stack.  To do this I have to be able to walk up
the C stack, and any time I am in Python's eval_code2 function print out the 
current file, line number and Python function.  If I'm in eval_code2 I know
where all these bits are.  What I can't tell is if I'm in eval_code2.  Is there gdb magic
a variable I can check to see if I'm in eval_code2?  Failing that, I suppose
I can compare $pc with eval_code2 and see if I'm "close enough" to it.  Any
suggestions appreciated.

Thanks,

Skip


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic