public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11567] New: GDB should only print namespace of types when there is an ambiguity by default
@ 2010-05-04 19:00 k04jg02 at gmail dot com
0 siblings, 0 replies; only message in thread
From: k04jg02 at gmail dot com @ 2010-05-04 19:00 UTC (permalink / raw)
To: gdb-prs
One of the issues that makes C++ template code hard to read is that often the
templates and their type parameters are nested several levels deep in
namespaces. For example, here is an excerpt from a recent stack trace:
#8 0x0806a7fb in shmarmy::GarbageCollector<shmarmy::SHMStream<MyStreamNodeTest,
shmarmy::WriteSegment, 4u, 5u>, shmarmy::SHMStream<MyStreamUpdate,
shmarmy::WriteSegment, 4u, 5u>
>::tryDeleteHead<shmarmy::SHMStream<MyStreamNodeTest, shmarmy::WriteSegment, 4u,
5u>, MyStreamNodeTest> (this=0x80845a0, stream=..., head=0xf1e094f8,
prev_deleted_item=@0x8083f70, dont_delete=0x0)
In my app the only time there is any class or template named GarbageCollector or
WriteSegment or SHMStream is inside the shmarmy namespace. As long as there's no
ambiguity, it would be much easier to read if it looked like this:
#8 0x0806a7fb in GarbageCollector<SHMStream<MyStreamNodeTest, WriteSegment, 4u,
5u>, SHMStream<MyStreamUpdate, WriteSegment, 4u, 5u>
>::tryDeleteHead<SHMStream<MyStreamNodeTest, WriteSegment, 4u, 5u>,
MyStreamNodeTest> (this=0x80845a0, stream=..., head=0xf1e094f8,
prev_deleted_item=@0x8083f70, dont_delete=0x0)
Knowing the namespace even with no ambiguity could maybe be useful (maybe if
you're not sure which file you included somehow? not sure), so I'd suggest
having the current behavior be an option.
--
Summary: GDB should only print namespace of types when there is
an ambiguity by default
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at sourceware dot org
ReportedBy: k04jg02 at gmail dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11567
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-04 19:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-04 19:00 [Bug c++/11567] New: GDB should only print namespace of types when there is an ambiguity by default k04jg02 at gmail dot com
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).