Commit 8fac5803a968b77fd59a2857f99e0894cc0a5b76
1 parent
db8d7dd1
Improve handling of gdb's single-step / continue arguments.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3075 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
3 deletions
gdbstub.c
| @@ -773,7 +773,9 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | @@ -773,7 +773,9 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | ||
| 773 | #elif defined (TARGET_ARM) | 773 | #elif defined (TARGET_ARM) |
| 774 | env->regs[15] = addr; | 774 | env->regs[15] = addr; |
| 775 | #elif defined (TARGET_SH4) | 775 | #elif defined (TARGET_SH4) |
| 776 | - env->pc = addr; | 776 | + env->pc = addr; |
| 777 | +#elif defined (TARGET_MIPS) | ||
| 778 | + env->PC = addr; | ||
| 777 | #endif | 779 | #endif |
| 778 | } | 780 | } |
| 779 | #ifdef CONFIG_USER_ONLY | 781 | #ifdef CONFIG_USER_ONLY |
| @@ -784,7 +786,7 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | @@ -784,7 +786,7 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | ||
| 784 | return RS_IDLE; | 786 | return RS_IDLE; |
| 785 | case 's': | 787 | case 's': |
| 786 | if (*p != '\0') { | 788 | if (*p != '\0') { |
| 787 | - addr = strtoul(p, (char **)&p, 16); | 789 | + addr = strtoull(p, (char **)&p, 16); |
| 788 | #if defined(TARGET_I386) | 790 | #if defined(TARGET_I386) |
| 789 | env->eip = addr; | 791 | env->eip = addr; |
| 790 | #elif defined (TARGET_PPC) | 792 | #elif defined (TARGET_PPC) |
| @@ -795,7 +797,9 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | @@ -795,7 +797,9 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf) | ||
| 795 | #elif defined (TARGET_ARM) | 797 | #elif defined (TARGET_ARM) |
| 796 | env->regs[15] = addr; | 798 | env->regs[15] = addr; |
| 797 | #elif defined (TARGET_SH4) | 799 | #elif defined (TARGET_SH4) |
| 798 | - env->pc = addr; | 800 | + env->pc = addr; |
| 801 | +#elif defined (TARGET_MIPS) | ||
| 802 | + env->PC = addr; | ||
| 799 | #endif | 803 | #endif |
| 800 | } | 804 | } |
| 801 | cpu_single_step(env, 1); | 805 | cpu_single_step(env, 1); |