aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 76953ae..7cd1e2d 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -1053,7 +1053,7 @@ convert_ascii_to_int (char *from, unsigned char *to, int n)
}
static char *
-outreg (int regno, char *buf)
+outreg (struct regcache *regcache, int regno, char *buf)
{
if ((regno >> 12) != 0)
*buf++ = tohex ((regno >> 12) & 0xf);
@@ -1062,7 +1062,7 @@ outreg (int regno, char *buf)
*buf++ = tohex ((regno >> 4) & 0xf);
*buf++ = tohex (regno & 0xf);
*buf++ = ':';
- collect_register_as_string (regno, buf);
+ collect_register_as_string (regcache, regno, buf);
buf += 2 * register_size (regno);
*buf++ = ';';
@@ -1116,6 +1116,7 @@ prepare_resume_reply (char *buf, ptid_t ptid,
{
struct thread_info *saved_inferior;
const char **regp;
+ struct regcache *regcache;
sprintf (buf, "T%02x", status->value.sig);
buf += strlen (buf);
@@ -1126,6 +1127,8 @@ prepare_resume_reply (char *buf, ptid_t ptid,
current_inferior = find_thread_ptid (ptid);
+ regcache = get_thread_regcache (current_inferior, 1);
+
if (the_target->stopped_by_watchpoint != NULL
&& (*the_target->stopped_by_watchpoint) ())
{
@@ -1148,7 +1151,7 @@ prepare_resume_reply (char *buf, ptid_t ptid,
while (*regp)
{
- buf = outreg (find_regno (*regp), buf);
+ buf = outreg (regcache, find_regno (*regp), buf);
regp ++;
}
*buf = '\0';