Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "jian shen" <vicshen@gmail.com>
To: "jian shen" <vicshen@gmail.com>, gdb@sourceware.org
Subject: Re: gdb cannot understand some type with STL
Date: Sun, 23 Dec 2007 02:26:00 -0000	[thread overview]
Message-ID: <8b685e3f0712221825m40e44503p875481c26218c6fd@mail.gmail.com> (raw)
In-Reply-To: <20071222173507.GA21728@caradoc.them.org>

On 12/23/07, Daniel Jacobowitz <drow@false.org> wrote:
> What does "whatis l" print?  I believe this problem is because GDB
> does not know about default template parameters.
>
>  template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
>    class list : protected _List_base<_Tp, _Alloc>
>
> It's going to be a std::list<int, std::allocator<int> > or something
> like that.

You are right.

(gdb) whatis l
type = std::list<int, std::allocator<int> >
(gdb) whatis 'std::list<int, std::allocator<int> >'
type = std::list<int, std::allocator<int> >

>
> This is fixable, but it would require changes to both GCC and GDB that
> no one has worked on yet.
>
> > (gdb) whatis std::list<int>*
> > A syntax error in expression, near `'.
>
> This looks like a bug in GDB, in the c-exp.y parser.

Yes, this looks like a bug.
(gdb) whatis 'std::list<int, std::allocator<int> >*'
No symbol "std::list<int, std::allocator<int> >*" in current context.

Thanks,
Jian


  parent reply	other threads:[~2007-12-23  2:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-22  5:24 jian shen
2007-12-22 10:18 ` Eli Zaretskii
2007-12-22 10:35   ` jian shen
2007-12-22 17:35 ` Daniel Jacobowitz
2007-12-22 17:40   ` Eli Zaretskii
2007-12-22 17:45     ` Daniel Jacobowitz
2007-12-23  2:27     ` jian shen
2008-01-02 17:29     ` Gordon Prieur
2008-01-02 18:04       ` Daniel Jacobowitz
2007-12-23  2:26   ` jian shen [this message]
2008-01-03 22:23 Nick Roberts

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=8b685e3f0712221825m40e44503p875481c26218c6fd@mail.gmail.com \
    --to=vicshen@gmail.com \
    --cc=gdb@sourceware.org \
    /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