From mboxrd@z Thu Jan 1 00:00:00 1970 From: marcusd@cathcart.sysc.pdx.edu (Marcus G. Daniels) To: Ovidiu Predescu Cc: Scott Christley , egcs@cygnus.com Subject: Re: GCC/ObjC enhancements, comments requested Date: Mon, 09 Feb 1998 11:31:00 -0000 Message-id: References: <199802081830.KAA04236@net-community.com> <199802090632.WAA09654@aracnet.com> X-SW-Source: 1998-02/msg00365.html >>>>> "OP" == Ovidiu Predescu writes: MD> Hey, if worse came to worst, "gcc -g" generates this knowledge. MD> Looks to me like "objdump --debugging" reports everything that's MD> needed. Link in GNU BFD and load up them reflection data MD> structures! OP> BFD can't help us here because it gives information only on the OP> name of the functions contained in an object file, the argument OP> types are lost (at least for C and C++ functions, ObjC does encode OP> the argument and return value types of each method). Nuhhhh-uhhhhh! Lookie: mgd@wijiji[~] $ cat hello.c static void twoargs (int val, const char *msg) { printf ("%d %s\n", val, msg); } main () { twoargs (1, "Hello World"); } mgd@wijiji[~] $ gcc -g hello.c -o hello mgd@wijiji[~] $ objdump --debugging hello | less [....CHOMP....] static void twoargs (int val /* 0x44 */, char *msg /* 0x48 */) { /* 0x108e8 */ /* file /net/pele/disk12/Users/mgd/hello.c line 3 addr 0x108e8 */ /* file /net/pele/disk12/Users/mgd/hello.c line 4 addr 0x108f4 */ /* file /net/pele/disk12/Users/mgd/hello.c line 5 addr 0x1090c */ /* file /net/pele/disk12/Users/mgd/hello.c line 5 addr 0x1090c */ } /* 0x10914 */ int main () { /* 0x10914 */ /* file /net/pele/disk12/Users/mgd/hello.c line 8 addr 0x10914 */ /* file /net/pele/disk12/Users/mgd/hello.c line 9 addr 0x10918 */ /* file /net/pele/disk12/Users/mgd/hello.c line 10 addr 0x1092c */ } /* 0x10934 */ [....CHOMP....] (Now requiring and loading up debugging information is probably much to expensive a proposition, but clearly the compiler is setup to save this stuff.)