This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] ravenscar/sparc: cannot fetch registers from non-active thread
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 22 Nov 2010 16:52:45 -0800
- Subject: [commit] ravenscar/sparc: cannot fetch registers from non-active thread
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