Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204955
b: refs/heads/master
c: 6d855b1
h: refs/heads/master
i:
  204953: 1f74796
  204951: 4bc726d
v: v3
  • Loading branch information
Jason Wessel committed Aug 5, 2010
1 parent 5965e8d commit 4eb3a43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55751145dc1e08e16df418cdd101661f5c6ac991
refs/heads/master: 6d855b1d83c980c1283d98d2d63a2bd3a87e21b7
10 changes: 9 additions & 1 deletion trunk/kernel/debug/gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ static void gdb_cmd_reg_set(struct kgdb_state *ks)
{
unsigned long regnum;
char *ptr = &remcom_in_buffer[1];
int i = 0;

kgdb_hex2long(&ptr, &regnum);
if (*ptr++ != '=' ||
Expand All @@ -612,7 +613,14 @@ static void gdb_cmd_reg_set(struct kgdb_state *ks)
error_packet(remcom_out_buffer, -EINVAL);
return;
}
kgdb_hex2mem(ptr, (char *)gdb_regs, dbg_reg_def[regnum].size);
memset(gdb_regs, 0, sizeof(gdb_regs));
while (i < sizeof(gdb_regs) * 2)
if (hex_to_bin(ptr[i]) >= 0)
i++;
else
break;
i = i / 2;
kgdb_hex2mem(ptr, (char *)gdb_regs, i);
dbg_set_reg(regnum, gdb_regs, ks->linux_regs);
strcpy(remcom_out_buffer, "OK");
}
Expand Down

0 comments on commit 4eb3a43

Please sign in to comment.