how to view content in stl vector

Maik Beckmann maikbeckmann@gmx.de
Mon Jun 18 14:35:00 GMT 2007


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?


thanks in advance, 
Maik Beckmann




More information about the Gdb mailing list