public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/26050] New: GDB prints types that are unusable as inputs
@ 2020-05-27 0:02 douglasyung.llvm at gmail dot com
2020-05-27 1:21 ` [Bug gdb/26050] " dblaikie at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: douglasyung.llvm at gmail dot com @ 2020-05-27 0:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26050
Bug ID: 26050
Summary: GDB prints types that are unusable as inputs
Product: gdb
Version: 9.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: douglasyung.llvm at gmail dot com
Target Milestone: ---
I initially filed a related bug with clang, but it was pointed out that the
behavior shown was probably also a bug in gdb. Thanks to David Blaikie for the
following information.
Consider the following code:
template <class T>
struct t1 {
void f1() { }
~t1() { }
};
typedef t1<t1<int>> t2;
int main() {
t2 v1;
v1.f1();
}
Some commands that do 'interesting' things with the no-space '>>' debug info:
(gdb) print t2::~t1
There is no field named ~t1 // this is buggy - works fine for f1 below, works
with
//GCC's '> >' debug info
(gdb) print t2::f1
$1 = {void (t1<t1<int>> * const)} 0x401180 <t1<t1<int> >::f1()>
But also some quirks around this parsing in general, that happen with GCC or
Clang's debug info:
(gdb) ptype t1<t1<int> >
type = struct t1<t1<int>> [with T = t1<int>] {
public:
void f1(void);
~t1(void);
}
(gdb) ptype t1<t1<int>>
No symbol "t1<int>" in current context.
So GDB prints out a name ("t1<t1<int>>") you can't use as input to that ptype
command... - that's /probably/ not what the GDB developers intended/wanted to
happen here.
If it helps, the related clang but is
https://bugs.llvm.org/show_bug.cgi?id=46052.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug gdb/26050] GDB prints types that are unusable as inputs
2020-05-27 0:02 [Bug gdb/26050] New: GDB prints types that are unusable as inputs douglasyung.llvm at gmail dot com
@ 2020-05-27 1:21 ` dblaikie at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: dblaikie at gmail dot com @ 2020-05-27 1:21 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26050
David Blaikie <dblaikie at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dblaikie at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-27 1:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 0:02 [Bug gdb/26050] New: GDB prints types that are unusable as inputs douglasyung.llvm at gmail dot com
2020-05-27 1:21 ` [Bug gdb/26050] " dblaikie 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).