From: Martin Runge <martin.runge@web.de>
To: gdb-patches@sourceware.org
Cc: asmwarrior <asmwarrior@gmail.com>, Tom Tromey <tromey@redhat.com>
Subject: Fwd: [patch] avoid the crash of gdb+pretty printer on initialized local variables
Date: Mon, 05 Dec 2011 10:13:00 -0000 [thread overview]
Message-ID: <CAF4KFGoXAo-+0xvUFp-7_4Uj5RKGc1_39wRkTS+U6_kM8oYeEw@mail.gmail.com> (raw)
In-Reply-To: <CAF4KFGp2cDOzKdV62MfX0vpHUAxj1D2W0W3cBZnZpYHPYxZEuA@mail.gmail.com>
Hello,
I have seen gdb running into very long loops on Linux, too (Ubuntu
11.04, gdb 7.2 and 7.3). It looks like gdb is frozen, but it uses 100%
CPU. When attaching to that gdb process, I observed gdb fetching a lot
of values (address increasing, but the range was by far too large). I
guess this comes from a pretty printer, asking gdb to fetch too many
values. libstdc++ and Qt4 pretty printers were in use in my case.
Although the error is probably somewhere in the pretty_printers, the
user experience is very confusing. E.g. with Eclipse CDT on top, gdb
does not respond to mi commands any more. As gdb does not give any
"progress" of "still alive" messages via mi to Eclipse, it runs into a
timeout and assumes gdb dead, debug session is broken and needs to be
restarted.
I think, only few people write their pretty printers themselves. Most
get them "somewhere from the Internet", so its hard to guarantee
quality or rely on it.
Would it be a good idea in your eyes, if
- gdb would guarantee a response time to mi commands ( limit the time
spent in a mi command -> stop fetching values when time is over)?
- gdb gave some progress reports "still working, nn% done" in regular
intervals, so mi clients like Eclipse can restart their timeout? For
Example smartcards do so. If asked for a long running operation, the
smartcard first replies by asking the terminal (== card reader) to
extend the timeout before starting work. This can be repeated as often
as neccessary to complete the operation and the terminal gets regular
feedback. The card terminal may not deny the smartcard's wish.
- some possibly long running mi commands could be aborted over mi
(those that run a loop over many small operations, like
pretty-printers)?
best regards
Martin
next prev parent reply other threads:[~2011-12-05 10:13 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 ` Martin Runge [this message]
2011-12-05 12:48 ` Fwd: " André Pönitz
2011-12-20 14:38 ` Tom Tromey
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=CAF4KFGoXAo-+0xvUFp-7_4Uj5RKGc1_39wRkTS+U6_kM8oYeEw@mail.gmail.com \
--to=martin.runge@web.de \
--cc=asmwarrior@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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