bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shouldn't gdb print the components of the function descriptor when you p


From: Piet/Pete Delaney
Subject: Shouldn't gdb print the components of the function descriptor when you print a pointer to a function?
Date: Thu, 3 Jan 2002 14:30:56 -0800
User-agent: Mutt/1.3.23i

On Thu, Jan 03, 2002 at 10:11:20AM -0700, address@hidden wrote:
>   > Not just ia64, powerpc 64 as well.  You are assuming that all pointers
>   > are the same format when that is not guaranteed by the C standard.  On
>   > most architectures they are the same, you can convert a function
>   > pointer to a void pointer and back again but it is not defined
>   > behaviour.
>   > 
>   > On IA64 and PPC64 the function pointer does not reference the function
>   > itself, instead it points to a function descriptor.  The function
>   > descriptor contains a pointer to the function code plus additional data
>   > such as a pointer to the global data to be used when the function is
>   > called.  This is mandated by the architecture software ABI.

Yea, I found the ABI at:

        http://developer.intel.com/design/itanium/downloads/24537003.pdf

It seems to be newer than the IA-64 Architecture Software Developer's Manual 
Volumes.


> Also true for HPPA targets.

I recall some of the NUMA kgdb developers going to work on the ia64 project.
A number of concepts of pa-64, like stack unwinding, come from the HP precision
architecture. I was wondering if their gdb work was used on the ia64 simulator.
Sun's Eagle simulator is running in a modified version of gdb.

So my problem was caused by the function descriptor not being visible
when I printed the pointer to the function with gdb. Why isn't gdb being
fixed so that the function descriptor is visible?

I suppose for now I'll create a function descriptor structure and cast
the function pointer to it. It seems like something that gdb should do
automatically for ia64 applications.

-piet



reply via email to

[Prev in Thread] Current Thread [Next in Thread]