From: Andrew Cagney <ac131313@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [rfa:ppc64] Use target in convert_from_func_ptr_addr
Date: Thu, 23 Oct 2003 01:37:00 -0000 [thread overview]
Message-ID: <3F9730C3.1040308@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
Hello,
The attached rewrites the PPC64 GNU/Linux convert_from_func_ptr_addr
method so that it makes use of the explicit "struct target_ops"
parameter I recently added (previously it was indirectly using
current_target).
ok?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1116 bytes --]
2003-10-17 Andrew Cagney <cagney@redhat.com>
* ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr):
Rewrite to use target_ops when transfering memory.
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.44
diff -u -r1.44 ppc-linux-tdep.c
--- ppc-linux-tdep.c 22 Oct 2003 23:54:11 -0000 1.44
+++ ppc-linux-tdep.c 23 Oct 2003 01:32:51 -0000
@@ -936,14 +936,14 @@
CORE_ADDR addr,
struct target_ops *targ)
{
- struct obj_section *s;
-
- s = find_pc_section (addr);
-
- /* Check if ADDR points to a function descriptor. */
- if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
- return read_memory_unsigned_integer (addr, 8);
-
+ struct section_table *s = target_section_by_addr (targ, addr);
+ if (s != NULL && s->the_bfd_section != NULL
+ && strcmp (s->the_bfd_section->name, ".opd") == 0)
+ {
+ char desc[8];
+ target_read (targ, TARGET_OBJECT_MEMORY, NULL, desc, addr, 8);
+ return extract_unsigned_integer (desc, 8);
+ }
return addr;
}
next reply other threads:[~2003-10-23 1:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-23 1:37 Andrew Cagney [this message]
2003-10-23 16:00 ` Kevin Buettner
2003-10-23 16:26 ` Andrew Cagney
2003-10-23 17:12 ` Kevin Buettner
2003-10-23 21:02 ` Andrew Cagney
2003-10-23 21:23 ` Kevin Buettner
2003-10-23 22:31 ` Andrew Cagney
2003-10-24 20:27 ` [commit] Add get_target_memory ... + " 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=3F9730C3.1040308@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