From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb@sources.redhat.com
Subject: Robustifying pretty-printers
Date: Sat, 13 Jun 2009 10:11:00 -0000 [thread overview]
Message-ID: <200906131411.34204.vladimir@codesourcery.com> (raw)
While playing with pretty-printers and KDevelop, I've got GDB
to "hang", with the below backtrace:
(gdb) where
#0 0xb7d0ed2a in strcmp () from /lib/tls/i686/cmov/libc.so.6
#1 0x081be1a7 in install_variable (var=0x191b0620) at /home/ghost/Work/CodeSourcery/Projects/egdb/gdb-cvs/gdb/varobj.c:1731
#2 0x081beef7 in create_child_with_value (parent=0x8a6e158, index=514255, name=0xb7bf8e14 "[514255]", value=0x191b03d0)
at /home/ghost/Work/CodeSourcery/Projects/egdb/gdb-cvs/gdb/varobj.c:1859
The '514255' above is sufficient to understand what happened. Our beloved GCC fails to emit
proper debug info, therefore a vector is considered in scope before constructor is executed,
and the vector is full of random bits.
Now, what are the best strategies for fix this (assuming GCC won't be
fixed for 10 years to come)? One approach is to make IDE check at what
line the variable is declared, and don't try to pretty-print it unless
the current line is above that. Alternatively, we might need to revive
the code to limit the number of children to fetch, and use some reasonable
limit, like 10. Comments?
- Volodya
next reply other threads:[~2009-06-13 10:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 10:11 Vladimir Prus [this message]
2009-06-13 10:21 ` Vladimir Prus
2009-06-15 12:28 ` Phil Muldoon
2009-06-15 12:39 ` Vladimir Prus
2009-06-15 12:55 ` Daniel Jacobowitz
2009-06-15 13:25 ` Vladimir Prus
2009-06-16 7:22 ` André Pönitz
2009-06-15 20:01 ` Tom Tromey
2009-06-16 8:22 ` Vladimir Prus
2009-07-07 21:48 ` Tom Tromey
2009-07-09 17:20 ` Vladimir Prus
2009-07-09 19:14 ` Tom Tromey
2009-07-10 6:13 ` Vladimir Prus
2009-07-10 16:25 ` Tom Tromey
2009-07-10 16:40 ` Vladimir Prus
2009-07-10 16:48 ` Tom Tromey
2009-07-10 18:46 ` Vladimir Prus
2009-07-10 18:52 ` 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=200906131411.34204.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb@sources.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