This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Formatting of function pointer value
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 8 Jul 2005 09:58:30 -0400
- Subject: Re: Formatting of function pointer value
- References: <dalbrd$tn0$1@sea.gmane.org> <dalep8$5ek$1@sea.gmane.org>
On Fri, Jul 08, 2005 at 12:50:48PM +0400, Vladimir Prus wrote:
> Vladimir Prus wrote:
>
>
> > the value of *p3 is printed like this:
> >
> > (gdb) print *p3
> > $1 = {int (int)} 0xb7ee6e9c <__DTOR_END__+4>
>
> Even more strange is this:
>
> (gdb) print p3
> $2 = (int (*)(int)) 0xb7ee6e9c <__DTOR_END__+4>
> (gdb) print *p3
> $3 = {int (int)} 0xb7ee6e9c <__DTOR_END__+4>
>
> Why does formatting of the type different in the second case, and uses
> braces instead of parenthesis?
One is a pointer to function, the other is a function.
--
Daniel Jacobowitz
CodeSourcery, LLC