This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to view content in stl vector
On Mon, Jun 18, 2007 at 04:34:31PM +0200, Maik Beckmann wrote:
> Am Montag, 18. Juni 2007 15:06:35 schrieb Daniel Jacobowitz:
>
> > You have to specify the instantiation manually
>
> hm, how is this be done?
> I tried this
> <gdb> call foo<int>(i) </gdb>
> but gdb responds
> <gdb>No symbol "foo<int>" in current context.</gdb>
>
> or is it about the mangled symbol from the disassembly?
> 0x08048972 <main+30>: call 0x8048b66 <_Z3fooIiEbT_>
>
> Doing
> <gdb>p _Z3fooIiEbT_(i) </gdb>
> crahes gdb.
> ( btw.
> <gdb>p p _Z3fooIiEbT_ </gdb>
> gives "{bool (int)} 0x8048b66 <bool foo<int>(int)>"
> )
>
> How looks the line for calling foo correctly?
I don't know. It may just be broken. I did provoke an amusing
internal error trying to get it to work...
(gdb) p 'int f<int>'()
/space/debian/gdb/build-area/gdb-6.6.dfsg/gdb/valops.c:2112:
internal-error: find_oload_champ_namespace_loop: Assertion
`new_oload_champ != -1' failed.
A problem internal to GDB has been detected,
--
Daniel Jacobowitz
CodeSourcery