[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] mips64 gdb_stub
From: |
Jason Wessel |
Subject: |
[Qemu-devel] [PATCH] mips64 gdb_stub |
Date: |
Mon, 21 May 2007 09:25:34 -0500 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070302) |
This patch allows gdb to debug a 64 bit kernel running on the mips64 target.
signed-off-by: Jason Wessel <address@hidden>
Jason.
---
gdbstub.c | 80 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 40 insertions(+), 40 deletions(-)
Index: qemu/gdbstub.c
===================================================================
--- qemu.orig/gdbstub.c
+++ qemu/gdbstub.c
@@ -549,41 +549,41 @@ static int cpu_gdb_read_registers(CPUSta
ptr = mem_buf;
for (i = 0; i < 32; i++)
{
- *(uint32_t *)ptr = tswapl(env->gpr[i]);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->gpr[i]);
+ ptr += sizeof(target_ulong);
}
- *(uint32_t *)ptr = tswapl(env->CP0_Status);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->CP0_Status);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->LO);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->LO);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->HI);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->HI);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->CP0_BadVAddr);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->CP0_BadVAddr);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->CP0_Cause);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->CP0_Cause);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->PC);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->PC);
+ ptr += sizeof(target_ulong);
if (env->CP0_Config1 & (1 << CP0C1_FP))
{
for (i = 0; i < 32; i++)
{
- *(uint32_t *)ptr = tswapl(env->fpr[i].fs[FP_ENDIAN_IDX]);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->fpr[i].fs[FP_ENDIAN_IDX]);
+ ptr += sizeof(target_ulong);
}
- *(uint32_t *)ptr = tswapl(env->fcr31);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->fcr31);
+ ptr += sizeof(target_ulong);
- *(uint32_t *)ptr = tswapl(env->fcr0);
- ptr += 4;
+ *(target_ulong *)ptr = tswapl(env->fcr0);
+ ptr += sizeof(target_ulong);
}
/* 32 FP registers, fsr, fir, fp. Not yet implemented. */
@@ -611,41 +611,41 @@ static void cpu_gdb_write_registers(CPUS
ptr = mem_buf;
for (i = 0; i < 32; i++)
{
- env->gpr[i] = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->gpr[i] = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
}
- env->CP0_Status = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->CP0_Status = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
- env->LO = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->LO = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
- env->HI = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->HI = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
- env->CP0_BadVAddr = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->CP0_BadVAddr = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
- env->CP0_Cause = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->CP0_Cause = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
- env->PC = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->PC = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
if (env->CP0_Config1 & (1 << CP0C1_FP))
{
for (i = 0; i < 32; i++)
{
- env->fpr[i].fs[FP_ENDIAN_IDX] = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->fpr[i].fs[FP_ENDIAN_IDX] = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
}
- env->fcr31 = tswapl(*(uint32_t *)ptr) & 0x0183FFFF;
- ptr += 4;
+ env->fcr31 = tswapl(*(target_ulong *)ptr) & 0x0183FFFF;
+ ptr += sizeof(target_ulong);
- env->fcr0 = tswapl(*(uint32_t *)ptr);
- ptr += 4;
+ env->fcr0 = tswapl(*(target_ulong *)ptr);
+ ptr += sizeof(target_ulong);
/* set rounding mode */
RESTORE_ROUNDING_MODE;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] mips64 gdb_stub,
Jason Wessel <=