This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

GDB and GCC and dynamic linking


Hello all,

PerHAPs this is not the right list to mail this to - if so, please
assist me in knowing which is the RIGHT list.

I am building what boils down to libdl (dynamic loading of separately
linked libraries) for our PowerPC EABI based target.  The easy part is
getting the DLL stuff to work.  The HARD part is determining what is
going on in GDB's mind when I try to debug them!

The problem I am presently wrestling with is probably related by runtime
fixups.  GDB thinks the &f for any function "f" is the same for all
functions in a given compilation unit (i.e., *.c file).  So if a file
contains definitions for functions x(), y() and z(), I can do (in GDB)
"print &x" or "print &y" or "print &z" and get the SAME number.  The
value displayed happens to be the address of the first ".text" in the
image from that particular source file.  If I disassemble the code for
each of the functions (by poking around to find their true address), the
disassembler knows the right symbol names for the right addresses.

I am willing to debug this myself, but I would prefer to skip this if
someone has a quick answer for me.

Help, please!

Thanks,
A


Alan Mimms
Packet Engines, Inc.
Spokane, Washington [99214-0497], USA, Earth, Sol, Milky Way, The Local
Group, Virgo Supercluster, U1

A copy of the universe is not what is required of art; one of the damned
things is ample.
- Rebecca West, The Creators, by Daniel J. Boorstin


________________________________________________
To get help for the crossgcc list, send mail to
crossgcc-request@cygnus.com with the text 'help'
(without the quotes) in the body of the message.