public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: asmwarrior <asmwarrior@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: About the "info locals" command of gdb and python pretty printer
Date: Mon, 21 Jun 2010 20:08:00 -0000	[thread overview]
Message-ID: <m3tyowgnd2.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4C1DDBB0.9010202@gmail.com> (asmwarrior@gmail.com's message of	"Sun, 20 Jun 2010 17:13:20 +0800")

>>>>> ">" == 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

  parent reply	other threads:[~2010-06-21 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-20  9:13 asmwarrior
2010-06-21  7:48 ` André Pönitz
2010-06-21 20:08 ` Tom Tromey [this message]
2010-06-22  0:29   ` asmwarrior
2010-06-22  2:18     ` Tom Tromey
2010-06-23 12:30   ` asmwarrior
     [not found]   ` <4C21FCDC.5050503__12891.7291098789$1277296251$gmane$org@gmail.com>
2010-06-23 20:28     ` Tom Tromey
2010-06-24  1:16       ` asmwarrior
2010-07-02 10:57       ` Matthias Klose
2010-06-21  3:02 asmwarrior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tyowgnd2.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=asmwarrior@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).