* calling cast operator
@ 2011-05-02 15:50 Klaus Rudolph
2011-05-02 16:10 ` André Pönitz
2011-05-02 20:31 ` Tom Tromey
0 siblings, 2 replies; 3+ messages in thread
From: Klaus Rudolph @ 2011-05-02 15:50 UTC (permalink / raw)
To: gdb
Hi all,
can I use a cast operator from an object on gdb?
class B
{
...
};
class A
{
operator B()
};
anyFunc()
{
A a;
-> breakpoint
}
how can I get the value of the operation "a.operator B();" on the command line?
print a.operator B()
is not working...?
Thanks
Klaus
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: calling cast operator
2011-05-02 15:50 calling cast operator Klaus Rudolph
@ 2011-05-02 16:10 ` André Pönitz
2011-05-02 20:31 ` Tom Tromey
1 sibling, 0 replies; 3+ messages in thread
From: André Pönitz @ 2011-05-02 16:10 UTC (permalink / raw)
To: gdb
On Monday 02 May 2011 17:50:27 ext Klaus Rudolph wrote:
> Hi all,
>
> can I use a cast operator from an object on gdb?
>
> class B
> {
> ...
> };
>
> class A
> {
> operator B()
> };
>
> anyFunc()
> {
> A a;
>
> -> breakpoint
> }
>
> how can I get the value of the operation "a.operator B();" on the command line?
>
> print a.operator B()
"print a.'operator B'()" might work, and possibly "print (B)a", too.
Andre'
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: calling cast operator
2011-05-02 15:50 calling cast operator Klaus Rudolph
2011-05-02 16:10 ` André Pönitz
@ 2011-05-02 20:31 ` Tom Tromey
1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2011-05-02 20:31 UTC (permalink / raw)
To: Klaus Rudolph; +Cc: gdb
>>>>> "Klaus" == Klaus Rudolph <lts-rudolph@gmx.de> writes:
Klaus> can I use a cast operator from an object on gdb?
What version of gdb?
Klaus> how can I get the value of the operation "a.operator B();" on the
Klaus> command line?
Klaus> print a.operator B()
Klaus> is not working...?
Please file a bug for this.
Also, note that `(B) a' may appear to work, but it is not actually
calling `operator B'.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-02 20:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 15:50 calling cast operator Klaus Rudolph
2011-05-02 16:10 ` André Pönitz
2011-05-02 20:31 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox