This is the mail archive of the gdb@sourceware.org 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]

info files' Entry point on ppc64


Hi,

checking the log from break-interp.exp testcase on ppc64, noticed that gdb is not properly setting a break at the entry point:

info files
Unix child process:
        Using the running image of child process 22491.
        While running this, GDB does not access memory from...
Local exec file:
        `/home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES', file type elf64-powerpc.
        Entry point: 0x251c11e0
        0x00000000251b0200 - 0x00000000251b0250 @ 0x00000200 is .interp
...skipping...
(gdb) PASS: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: info files
break *0x251c11e0
Breakpoint 2 at 0x251c11e0
(gdb) PASS: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: break at entry point
continue
Continuing.
Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/break-interp.so...done.
Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/break-interp.so
Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libm.so.6
Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libc.so.6

Program received signal SIGSEGV, Segmentation fault.
0x7d821008251b0a90 in ?? ()
(gdb) FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: entry point reached

In fact, the entry point address from 'info files' points to the function descriptor structure existing on ppc64 arch. If we check the first doubleword of this structure, then we have the correct entry point address. I've also noticed that ppc-linux-tdep.c implements gdbarch_convert_from_func_ptr_addr function for ppc64, so I was wondering if adding support for adjust_breakpoint_address on ppc64 wouldn't be a solution for this case. Also, for what it's worth, I checked the entry point address using readelf and it reports the same as 'info files' does.

Any suggestions are welcome.

Thanks,
--
Edjunior Barbosa Machado
IBM Linux Technology Center


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