This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

XCOFF 64 function address wrong?


Dear all,

I have a 64-bit AIX 5.2 XLC 7 compiled hello world binary.  I've built
up gdb and binutils with --enable-64-bit-bfd - from latest CVS.

In GDB, it miscalculates the main(), as 0x428 (instead of 0x10000428).
I think the trouble could be within the binutils bfd package, used by
GDB.

So, in using a fresh binutils's "objdump -t":

[snip]
AUX val   104 prmhsh 0 snhsh 0 typ 1 algn 3 clss 0 stb 0 snstb 0
[ 89](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 2) 0x00000428 .main
AUX tagndx 0 ttlsiz 0x68 lnnos 2806 next 100
AUX indx   87 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
.main :
   1 : 0x43c
   2 : 0x44c
[snip]

Note the 0x0000428 .main, and the line number info following it, all
have the wrong address..  Assuming that this is what ought to be being
displayed.

Curiously, if I then ask objdump to "objdump -S" it gets things right:
[snip]
0000000100000428 <.main>:
   100000428:   7c 08 02 a6     mflr    r0
   10000042c:   fb e1 ff f8     std     r31,-8(r1)
   100000430:   f8 01 00 10     std     r0,16(r1)
   100000434:   f8 21 ff 81     stdu    r1,-128(r1)
   100000438:   eb e2 00 80     ld      r31,128(r2)
[snip]

For comparison, with a GCC compiled executable, those numbers are the
real addresses of the functions, and GDB gets breakpoints correct.

I'm willing to put some time in to getting this sorted out, but at
present don't know what I'm looking for -- so any help greatly
appreciated.  

Regards
David
-- 
David Lecomber <david@lecomber.net>


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