From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6718 invoked by alias); 8 Jul 2005 13:59:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6306 invoked by uid 22791); 8 Jul 2005 13:58:45 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 08 Jul 2005 13:58:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.51) id 1DqtN8-0004Ug-Jx; Fri, 08 Jul 2005 09:58:30 -0400 Date: Fri, 08 Jul 2005 13:59:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Formatting of function pointer value Message-ID: <20050708135830.GC17089@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00081.txt.bz2 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