This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to view content in stl vector


Am Montag, 18. Juni 2007 16:44:38 schrieb Daniel Jacobowitz:
> 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,

This works:
1. start and  run gdb:
 
2.look for the matching disassembly line
    0x08048972 <main+30>: call  0x8048b66 <_Z3fooIiEbT_>

3. let gdb say what it has to say: 
    output _Z3fooIiEbT_
    {bool (int)} 0x8048b66 <bool foo<int>(int)>

4. call it like this:
    p ({bool (int)} 0x8048b66)(i)
    $1 = true

The gdb-bug causes one extra step. 
However, as far as I understand  it should be possible to wrap this and the 
typename-storing stuff into convenience functions,  if your plan to get 
python into gdb-business succeeds.

many thanks to you Daniel,
Maik Beckmann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]