* [rfa:ppc64] Eliminate call_dummy_address
@ 2003-08-27 20:14 Andrew Cagney
2003-08-27 23:58 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2003-08-27 20:14 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
Hello,
This patch does two things:
- It modifies "infcall.c" so that it converts the entry-point address
into a code address (it might be a descriptor).
- since it's now redundant, for ppc64 GNU/Linux, it stops setting
entry_point_address
Kevin, ppc64 part ok? It doesn't immediatly affect test results as this
GDB still requires a mod to relocate the entry point.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2548 bytes --]
2003-08-27 Andrew Cagney <cagney@redhat.com>
* ppc-linux-tdep.c (ppc64_call_dummy_address): Delete function.
(ppc_linux_init_abi): For PPC64, do not set call_dummy_address.
* infcall.c (call_function_by_hand): Convert the entry point
address into a code address.
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.23
diff -u -r1.23 infcall.c
--- infcall.c 18 Aug 2003 20:04:55 -0000 1.23
+++ infcall.c 27 Aug 2003 20:03:46 -0000
@@ -558,6 +558,9 @@
}
real_pc = funaddr;
dummy_addr = CALL_DUMMY_ADDRESS ();
+ /* Make certain that the address points at real code, and not a
+ function descriptor. */
+ dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
/* A call dummy always consists of just a single breakpoint, so
it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
@@ -576,6 +579,11 @@
dummy_addr = SYMBOL_VALUE_ADDRESS (sym);
else
dummy_addr = entry_point_address ();
+ /* Make certain that the address points at real code, and not
+ a function descriptor. */
+ dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
+ /* A call dummy always consists of just a single breakpoint,
+ so it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
break;
}
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.37
diff -u -r1.37 ppc-linux-tdep.c
--- ppc-linux-tdep.c 24 Jun 2003 23:09:22 -0000 1.37
+++ ppc-linux-tdep.c 27 Aug 2003 20:03:51 -0000
@@ -929,18 +929,6 @@
}
-/* On 64-bit PowerPC GNU/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,
@@ -1066,8 +1054,6 @@
function descriptors). */
set_gdbarch_convert_from_func_ptr_addr
(gdbarch, ppc64_linux_convert_from_func_ptr_addr);
-
- set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
set_gdbarch_in_solib_call_trampoline
(gdbarch, ppc64_in_solib_call_trampoline);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [rfa:ppc64] Eliminate call_dummy_address
2003-08-27 20:14 [rfa:ppc64] Eliminate call_dummy_address Andrew Cagney
@ 2003-08-27 23:58 ` Kevin Buettner
2003-08-28 1:19 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2003-08-27 23:58 UTC (permalink / raw)
To: Andrew Cagney, gdb-patches
On Aug 27, 4:14pm, Andrew Cagney wrote:
> This patch does two things:
>
> - It modifies "infcall.c" so that it converts the entry-point address
> into a code address (it might be a descriptor).
>
> - since it's now redundant, for ppc64 GNU/Linux, it stops setting
> entry_point_address
>
> Kevin, ppc64 part ok? It doesn't immediatly affect test results as this
> GDB still requires a mod to relocate the entry point.
Sounds reasonable. Okay.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa:ppc64] Eliminate call_dummy_address
2003-08-27 23:58 ` Kevin Buettner
@ 2003-08-28 1:19 ` Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2003-08-28 1:19 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> On Aug 27, 4:14pm, Andrew Cagney wrote:
>
>
>> This patch does two things:
>>
>> - It modifies "infcall.c" so that it converts the entry-point address
>> into a code address (it might be a descriptor).
>>
>> - since it's now redundant, for ppc64 GNU/Linux, it stops setting
>> entry_point_address
>>
>> Kevin, ppc64 part ok? It doesn't immediatly affect test results as this
>> GDB still requires a mod to relocate the entry point.
>
>
> Sounds reasonable. Okay.
TKS, its in. Now for the next one.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-28 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27 20:14 [rfa:ppc64] Eliminate call_dummy_address Andrew Cagney
2003-08-27 23:58 ` Kevin Buettner
2003-08-28 1:19 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox