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


Maik Beckmann <maikbeckmann@gmx.de> writes:

> even better.... after I read you last mail entirely
>
>
> 1. start and  run gdb:
>
> 3. let gdb say what it has to say:
>     output 'bool foo<int>'
>     {bool (int)} 0x8048b66 <bool foo<int>(int)>
>
> 4. call it like this:
>     p ({bool (int)} 0x8048b66)(i)
>     $1 = true

(gdb) p ({bool(int)}'bool foo<int>(int)')(i)
Hello from foo
$3 = true

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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