This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HPUX function address.

In message <>, Daniel Grunblatt write
 >On Tuesday 14 October 2003 18:31, wrote:
 >> Nope.  0x207ee is the address of the procedure descriptor.
 >> 0x207ec will contain the function's actual address
 >> 0x207f0 will contain the function's DP value
 >(gdb) b 12
 >Breakpoint 1 at 0x10524: file func.c, line 12.
 >(gdb) r
 >Starting program: /house/grunblat/hp-ux/c/func 
 >Breakpoint 1, main () at func.c:12
 >12              printf("0x%x\n", (long)func);
 >(gdb) p func
 >$1 = {int ()} 0x104fc <func>
 >(gdb) x/8wx 0x207ec
 >0x207ec <__DTOR_END__+44>:      0x00020818      0x0000003c      0x40139e88   
 >0x207fc <__DTOR_END__+60>:      0x40049c54      0x40174af0      0x000105e8   
 >(gdb) x/8wx 0x00020818
 >0x20818 <__DTOR_END__+88>:      0xea9f1fdd      0xd6801c1e      0x4000c7d8   
 >0x20828 <_GLOBAL_OFFSET_TABLE_>:        0x00020704      0x40027d08      
 >0x00000000      0x00000000
 >0x207ec doesn't contain it, I was wrong to say HP-UX, it's a linux running on
 >hppa, is that the problem? or can I just call  0x00020818 and expect 'func' 
 >to be reached?
Linux has a different way of representing function addresses than HP-UX.

Unfortunately, I'm not that familiar with the Linux model, so I don't
know precisely how it works.  John or Alan might be able to help.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]