Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [ppc64-linux]: Find call dummy breakpoint address correctly
@ 2003-06-07  0:17 Jim Blandy
  2003-06-11  0:03 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2003-06-07  0:17 UTC (permalink / raw)
  To: gdb-patches


2003-06-06  Jim Blandy  <jimb@redhat.com>

	* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
	(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
	method.

Index: gdb/ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.28.8.5
diff -c -r1.28.8.5 ppc-linux-tdep.c
*** gdb/ppc-linux-tdep.c	7 Jun 2003 00:06:05 -0000	1.28.8.5
--- gdb/ppc-linux-tdep.c	7 Jun 2003 00:15:33 -0000
***************
*** 893,898 ****
--- 893,910 ----
  }
  
  
+ /* On 64-bit PowerPC Linux, the ELF header's e_entry field is the
+    address of a function descriptor for the entry point function, not
+    the actual entry point itself.  So to find the actual address at
+    which execution should begin, we need to fetch the function's entry
+    point from that descriptor.  */
+ static CORE_ADDR
+ ppc64_call_dummy_address (void)
+ {
+   return ppc64_desc_entry_point (entry_point_address ());
+ }
+ 
+ 
  enum {
    ELF_NGREG = 48,
    ELF_NFPREG = 33,
***************
*** 1014,1019 ****
--- 1026,1033 ----
    
    if (tdep->wordsize == 8)
      {
+       set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
+ 
        set_gdbarch_in_solib_call_trampoline
          (gdbarch, ppc64_in_solib_call_trampoline);
        set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);


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

* Re: [ppc64-linux]: Find call dummy breakpoint address correctly
  2003-06-07  0:17 [ppc64-linux]: Find call dummy breakpoint address correctly Jim Blandy
@ 2003-06-11  0:03 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2003-06-11  0:03 UTC (permalink / raw)
  To: Jim Blandy, gdb-patches

On Jun 6,  7:18pm, Jim Blandy wrote:

> 2003-06-06  Jim Blandy  <jimb@redhat.com>
> 
> 	* ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
> 	(ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
> 	method.

Okay.

Kevin


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

end of thread, other threads:[~2003-06-11  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-07  0:17 [ppc64-linux]: Find call dummy breakpoint address correctly Jim Blandy
2003-06-11  0:03 ` Kevin Buettner

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