Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Martin Runge <martin.runge@web.de>
Cc: gdb-patches@sourceware.org, asmwarrior <asmwarrior@gmail.com>
Subject: Re: Fwd: [patch] avoid the crash of gdb+pretty printer on initialized local variables
Date: Tue, 20 Dec 2011 14:38:00 -0000	[thread overview]
Message-ID: <m3sjkfmi4z.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAF4KFGoXAo-+0xvUFp-7_4Uj5RKGc1_39wRkTS+U6_kM8oYeEw@mail.gmail.com>	(Martin Runge's message of "Mon, 5 Dec 2011 11:13:25 +0100")

>>>>> "Martin" == Martin Runge <martin.runge@web.de> writes:

Martin> I have seen gdb running into very long loops on Linux, too (Ubuntu
Martin> 11.04, gdb 7.2 and 7.3). It looks like gdb is frozen, but it uses 100%
Martin> CPU. When attaching to that gdb process, I observed gdb fetching a lot
Martin> of values (address increasing, but the range was by far too large). I
Martin> guess this comes from a pretty printer, asking gdb to fetch too many
Martin> values. libstdc++ and Qt4 pretty printers were in use in my case.

Martin> Although the error is probably somewhere in the pretty_printers, the
Martin> user experience is very confusing. E.g. with Eclipse CDT on top, gdb
Martin> does not respond to mi commands any more. As gdb does not give any
Martin> "progress" of "still alive" messages via mi to Eclipse, it runs into a
Martin> timeout and assumes gdb dead, debug session is broken and needs to be
Martin> restarted.

Is Eclipse using the range limitation feature of dynamic varobjs?
That is intended to help prevent this sort of thing.

Martin> I think, only few people write their pretty printers themselves. Most
Martin> get them "somewhere from the Internet", so its hard to guarantee
Martin> quality or rely on it.

Yeah.

Martin> Would it be a good idea in your eyes, if
[...]

I am not sure what would be the best solution, but could you file a bug
report for the problem?

Tom


  parent reply	other threads:[~2011-12-20 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4ED379D8.4060808@gmail.com>
2011-12-02  4:32 ` asmwarrior
2011-12-02 16:51   ` Tom Tromey
2011-12-04  1:41     ` asmwarrior
     [not found]       ` <CAF4KFGqyz0WMWWJt9x1HZpO+urMo9jJLyudcRrHxUTqJf8mvqA@mail.gmail.com>
     [not found]         ` <CAF4KFGp2cDOzKdV62MfX0vpHUAxj1D2W0W3cBZnZpYHPYxZEuA@mail.gmail.com>
2011-12-05 10:13           ` Fwd: " Martin Runge
2011-12-05 12:48             ` André Pönitz
2011-12-20 14:38             ` Tom Tromey [this message]
2011-12-05 21:51       ` Tom Tromey
2011-12-06 10:34         ` asmwarrior
2011-12-06 15:41           ` Tom Tromey

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=m3sjkfmi4z.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=asmwarrior@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=martin.runge@web.de \
    /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