This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: HPUX function address.
- From: law at redhat dot com
- To: Daniel Grunblatt <daniel at grunblatt dot com dot ar>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 15 Oct 2003 16:25:06 -0600
- Subject: Re: HPUX function address.
- Reply-to: law at redhat dot com
In message <200310151855.54918.daniel@grunblatt.com.ar>, Daniel Grunblatt write
s:
>On Tuesday 14 October 2003 18:31, law@redhat.com 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
>
>0x40174af0
>0x207fc <__DTOR_END__+60>: 0x40049c54 0x40174af0 0x000105e8
>
>0x000206ec
>(gdb) x/8wx 0x00020818
>0x20818 <__DTOR_END__+88>: 0xea9f1fdd 0xd6801c1e 0x4000c7d8
>
>0x40026754
>0x20828 <_GLOBAL_OFFSET_TABLE_>: 0x00020704 0x40027d08
>0x00000000 0x00000000
>(gdb)
>
>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.
jeff