public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [commit] ravenscar/sparc: cannot fetch registers from non-active thread
@ 2010-11-23  0:53 Joel Brobecker
  0 siblings, 0 replies; only message in thread
From: Joel Brobecker @ 2010-11-23  0:53 UTC (permalink / raw)
  To: gdb-patches; +Cc: Joel Brobecker

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-23  0:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23  0:53 [commit] ravenscar/sparc: cannot fetch registers from non-active thread Joel Brobecker

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).