Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by chase
Tue, 11 Jul 1989 21:00
GDB and types
Author: chase
Date: Tue, 11 Jul 1989 21:00
Date: Tue, 11 Jul 1989 21:00
34 lines
1463 bytes
1463 bytes
(Output follows) GDB 3.0, Copyright (C) 1988 Free Software Foundation, Inc. (gdb) x 0x824c 0x824c <Object__New>: 0x4e560000 (gdb) whatis Object__New type = void () (gdb) whatis & Object__New type = void (*)() (gdb) p ( void (*)() ) 0x824c Invalid syntax in expression. (gdb) p ( void () ) 0x824c Invalid syntax in expression. If GDB can tell me that Object____New is a "void ()" at address 0x824c, then it should be able to tell me that "(void (*)()) 0x824c" is in fact Object____New. Cdecl concurs: cdecl> explain (void (*)())x cast x into pointer to function returning void In general, if I have an array of pointers to functions, I'd like to be able to saying something like p *( (PF *) array) @ length and have the names of the functions printed (even if they aren't all of the same type). That's what I was really trying to do. (Yes, I know it's illegal in C, but we all know that it works on most machines.) David
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads