public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: [commit] ravenscar/sparc: cannot fetch registers from non-active thread
Date: Tue, 23 Nov 2010 00:53:00 -0000	[thread overview]
Message-ID: <1290473565-32249-1-git-send-email-brobecker@adacore.com> (raw)

This is one stupid mistake that snuck in, and I have no idea how.
In any case, we were passing the address of the buffer instead of
the buffer itself, leading to problem while trying to fetch registers
from the non-active thread in the ravenscar application.

gdb/ChangeLog:

        * ravenscar-sparc-thread.c (supply_register_at_address):
        Fix passing of buf in call to regcache_raw_supply.

Tested on a leon-elf qemu target. Checked in.

---
 gdb/ChangeLog                |    5 +++++
 gdb/ravenscar-sparc-thread.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 314753b..b99f302 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-22  Joel Brobecker  <brobecker@adacore.com>
+
+	* ravenscar-sparc-thread.c (supply_register_at_address):
+	Fix passing of buf in call to regcache_raw_supply.
+
 2010-11-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* dwarf2read.c (dwarf2_read_index): Ignore higher .gdb_index versions.
diff --git a/gdb/ravenscar-sparc-thread.c b/gdb/ravenscar-sparc-thread.c
index 197b745..c799e79 100644
--- a/gdb/ravenscar-sparc-thread.c
+++ b/gdb/ravenscar-sparc-thread.c
@@ -69,7 +69,7 @@ supply_register_at_address (struct regcache *regcache, int regnum,
 
   buf = (char *) alloca (buf_size);
   read_memory (register_addr, buf, buf_size);
-  regcache_raw_supply (regcache, regnum, &buf);
+  regcache_raw_supply (regcache, regnum, buf);
 }
 
 /* Return true if, for a non-running thread, REGNUM has been saved on the
-- 
1.7.1

                 reply	other threads:[~2010-11-23  0:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1290473565-32249-1-git-send-email-brobecker@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).