public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Formatting of function pointer value
@ 2005-07-08  8:02 Vladimir Prus
  2005-07-08  8:51 ` Vladimir Prus
  2005-07-08 13:58 ` Daniel Jacobowitz
  0 siblings, 2 replies; 19+ messages in thread
From: Vladimir Prus @ 2005-07-08  8:02 UTC (permalink / raw)
  To: gdb


Hello,
consider the following snippet:

    B* p2 = (B*)0x12345678;
    int (*p3)(int) = (fp)0x000000AE;

the value of p2 is printed like this:

   (gdb)info local
   ....
   p2 = (B *) 0xb8000540


the value of *p3 is printed like this:

   (gdb) print *p3 
   $1 = {int (int)} 0xb7ee6e9c <__DTOR_END__+4>

I have a couple of questions:

1. Why in both cases the type of value is printed? There's already 'whatis'
command. I've checked that code and it's printed unconditionally. As the
result, a GDB frontend must strip the type.

2. Why the type is enclosed in parenthesis in the first case, and in braces
in the second case? This entails additonal problems for GUI frontend, for
example, at the moment KDevelop thinks that the opening brace in the second
case starts a composite.

- Volodya

  



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-07-14  8:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08  8:02 Formatting of function pointer value Vladimir Prus
2005-07-08  8:51 ` Vladimir Prus
2005-07-08 13:59   ` Daniel Jacobowitz
2005-07-11  5:40     ` Vladimir Prus
2005-07-11  7:11       ` Vladimir Prus
2005-07-11  8:35       ` Andreas Schwab
2005-07-11 13:03         ` Daniel Jacobowitz
2005-07-08 13:58 ` Daniel Jacobowitz
2005-07-11  5:38   ` Vladimir Prus
2005-07-11  7:06     ` Nick Roberts
2005-07-11  7:21       ` Vladimir Prus
2005-07-11  7:42         ` Vladimir Prus
2005-07-11 13:08           ` Daniel Jacobowitz
2005-07-11 13:21             ` Vladimir Prus
2005-07-11 13:27               ` Daniel Jacobowitz
2005-07-14  8:10                 ` Vladimir Prus
2005-07-11  8:08         ` Nick Roberts
2005-07-11  9:05           ` Vladimir Prus
2005-07-11  9:53             ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).