This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: About the "info locals" command of gdb and python pretty printer
- From: Tom Tromey <tromey at redhat dot com>
- To: asmwarrior <asmwarrior at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 21 Jun 2010 14:08:25 -0600
- Subject: Re: About the "info locals" command of gdb and python pretty printer
- References: <4C1DDBB0.9010202@gmail.com>
- Reply-to: tromey at redhat dot com
>>>>> ">" == Asm gmail <asmwarrior@gmail.com> writes:
>> At this time, if we run the "info locals" with python stl pretty
>> printer enabled, as you see, if you breakpoint is still at the first
>> line "int aaa = 1;", then bbbb and cccc are not initialized, this may
>> cause the python script to plot random values, some times, gdb or
>> python will get crashed.
I think the real problem here is that gdb crashed. That should not
happen. Can you find out what went wrong?
Python exceptions are "normal" in the sense that they should not cause
gdb any problems.
We should fix the problem that exceptions during pretty-printing can
cause problems. I think there are a few parts to this. We
should differentiate the different types of gdb exception in Python, so
that things like memory errors can cause nicer behavior. We should also
make lazy strings truly lazy during printing. This will eliminate some
problems when trying to print a lazy string with length==-1.
Tom