This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
gdb output for type information very verbose
- From: Rick Moseley <rmoseley at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Wed, 13 Aug 2008 09:44:57 -0500
- Subject: gdb output for type information very verbose
Hi all,
Recently we polled our resident C++ developers for comment on what the
archer project could do to improve the gdb debugging experience. The
main complaint was that "gdb output for type information very verbose".
The gdb UI interface Nemiver was given as an example of giving ouput
that "does a good job of separating out the debug type from derived
types, what is member data, etc." Here is an example of this using this
simple c++ program:
int main()
{
std::string s;
std::size_t i = s.size();
s += 'a';
return 0;
}
debugging session:
(gdb) finish
.
.
(gdb) ptype s
type = class std::basic_string<char, std::char_traits<char>,
std::allocator<char> > {
public:
static const size_t npos;
.
. (135 more lines output)
.
int compare(unsigned long, unsigned long, char const*) const;
int compare(unsigned long, unsigned long, char const*, unsigned
long) const;
}
It does seem that 140 or so lines of output is a bit excessive and for a
"ptype" command on a string variable. I'm not sure if this is the
expected output of this command or not. If not I need to file a bug.
If 140+ lines is the expected output, then maybe there needs to be some
sort of switch that can be set where the verbose output can be
abbreviated somehow. I can file a bugzilla on that as an enhancement
request.
Any comments/suggestions here are appreciated.
Thanks,
Rick