From: Andrew Cagney <ac131313@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [rfa:ppc64] Eliminate call_dummy_address
Date: Wed, 27 Aug 2003 20:14:00 -0000 [thread overview]
Message-ID: <3F4D1110.1080302@redhat.com> (raw)
[-- 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);
next reply other threads:[~2003-08-27 20:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 20:14 Andrew Cagney [this message]
2003-08-27 23:58 ` Kevin Buettner
2003-08-28 1:19 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F4D1110.1080302@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox