public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* Error in FrameIterator.py
@ 2009-04-11 15:12 Teng Lin
  2009-04-13 19:43 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Teng Lin @ 2009-04-11 15:12 UTC (permalink / raw)
  To: archer

Hi All,

I run into a problem when exploring new-backtrace command.

(gdb) source -p /opt/archer/share/gdb/python/gdb/command/backtrace.py
(gdb) new-backtrace
Traceback (most recent call last):
   File "/opt/archer/share/gdb/python/gdb/command/backtrace.py", line  
193, in invoke
     for pair in iter:
   File "/opt/archer/share/gdb/python/gdb/FrameIterator.py", line 30,  
in next
     if result == None:
TypeError: Frame object expected in comparison.
Error occurred in Python command: Frame object expected in comparison.


Simply changing "if result == None:" to "if result is None:" can fix  
the problem.

Apparently, the error message is thrown by frapy_richcompare function  
in python-frame.c. Shouldn't frapy_richcompare return Py_RETURN_FALSE.


I have a few other questions for Tom and other Archer developers.

An empty dictionary is always return when fields method from of a type  
is called. Do we actually implement it?
I have preliminary success of translating part of Misc/gdbinit to  
python. One thing I would like to achieve is to print the value of  
certain built-in type, like int, float, string, list, dict and tuple.
Tom, I recall you have a long term to support debugging python or  
other dynamic language  natively in gdb, can you elaborate the idea a  
bit?

Best regards,
Teng

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-13 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-11 15:12 Error in FrameIterator.py Teng Lin
2009-04-13 19:43 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).