Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* info files' Entry point on ppc64
@ 2010-09-08 16:37 Edjunior Barbosa Machado
  2010-09-09 14:05 ` [patch] [ppc64] testsuite: break-interp.exp [Re: info files' Entry point on ppc64] Jan Kratochvil
       [not found] ` <20100909140513.GA20677__33509.653612464$1284041144$gmane$org@host1.dyn.jankratochvil.net>
  0 siblings, 2 replies; 6+ messages in thread
From: Edjunior Barbosa Machado @ 2010-09-08 16:37 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-10 15:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 16:37 info files' Entry point on ppc64 Edjunior Barbosa Machado
2010-09-09 14:05 ` [patch] [ppc64] testsuite: break-interp.exp [Re: info files' Entry point on ppc64] Jan Kratochvil
2010-09-10 14:55   ` Edjunior Barbosa Machado
2010-09-10 15:51     ` Jan Kratochvil
     [not found] ` <20100909140513.GA20677__33509.653612464$1284041144$gmane$org@host1.dyn.jankratochvil.net>
2010-09-09 19:56   ` Tom Tromey
2010-09-09 20:01     ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox