Commit 2052caa7af288e1ea9739d321c4c9c89e9395666

Authored by ths
1 parent 637947f1

GDB stub for MIPS64, by Jason Wessel.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2909 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 40 additions and 40 deletions
gdbstub.c
... ... @@ -549,41 +549,41 @@ static int cpu_gdb_read_registers(CPUState *env, uint8_t *mem_buf)
549 549 ptr = mem_buf;
550 550 for (i = 0; i < 32; i++)
551 551 {
552   - *(uint32_t *)ptr = tswapl(env->gpr[i]);
553   - ptr += 4;
  552 + *(target_ulong *)ptr = tswapl(env->gpr[i]);
  553 + ptr += sizeof(target_ulong);
554 554 }
555 555  
556   - *(uint32_t *)ptr = tswapl(env->CP0_Status);
557   - ptr += 4;
  556 + *(target_ulong *)ptr = tswapl(env->CP0_Status);
  557 + ptr += sizeof(target_ulong);
558 558  
559   - *(uint32_t *)ptr = tswapl(env->LO);
560   - ptr += 4;
  559 + *(target_ulong *)ptr = tswapl(env->LO);
  560 + ptr += sizeof(target_ulong);
561 561  
562   - *(uint32_t *)ptr = tswapl(env->HI);
563   - ptr += 4;
  562 + *(target_ulong *)ptr = tswapl(env->HI);
  563 + ptr += sizeof(target_ulong);
564 564  
565   - *(uint32_t *)ptr = tswapl(env->CP0_BadVAddr);
566   - ptr += 4;
  565 + *(target_ulong *)ptr = tswapl(env->CP0_BadVAddr);
  566 + ptr += sizeof(target_ulong);
567 567  
568   - *(uint32_t *)ptr = tswapl(env->CP0_Cause);
569   - ptr += 4;
  568 + *(target_ulong *)ptr = tswapl(env->CP0_Cause);
  569 + ptr += sizeof(target_ulong);
570 570  
571   - *(uint32_t *)ptr = tswapl(env->PC);
572   - ptr += 4;
  571 + *(target_ulong *)ptr = tswapl(env->PC);
  572 + ptr += sizeof(target_ulong);
573 573  
574 574 if (env->CP0_Config1 & (1 << CP0C1_FP))
575 575 {
576 576 for (i = 0; i < 32; i++)
577 577 {
578   - *(uint32_t *)ptr = tswapl(env->fpr[i].fs[FP_ENDIAN_IDX]);
579   - ptr += 4;
  578 + *(target_ulong *)ptr = tswapl(env->fpr[i].fs[FP_ENDIAN_IDX]);
  579 + ptr += sizeof(target_ulong);
580 580 }
581 581  
582   - *(uint32_t *)ptr = tswapl(env->fcr31);
583   - ptr += 4;
  582 + *(target_ulong *)ptr = tswapl(env->fcr31);
  583 + ptr += sizeof(target_ulong);
584 584  
585   - *(uint32_t *)ptr = tswapl(env->fcr0);
586   - ptr += 4;
  585 + *(target_ulong *)ptr = tswapl(env->fcr0);
  586 + ptr += sizeof(target_ulong);
587 587 }
588 588  
589 589 /* 32 FP registers, fsr, fir, fp. Not yet implemented. */
... ... @@ -611,41 +611,41 @@ static void cpu_gdb_write_registers(CPUState *env, uint8_t *mem_buf, int size)
611 611 ptr = mem_buf;
612 612 for (i = 0; i < 32; i++)
613 613 {
614   - env->gpr[i] = tswapl(*(uint32_t *)ptr);
615   - ptr += 4;
  614 + env->gpr[i] = tswapl(*(target_ulong *)ptr);
  615 + ptr += sizeof(target_ulong);
616 616 }
617 617  
618   - env->CP0_Status = tswapl(*(uint32_t *)ptr);
619   - ptr += 4;
  618 + env->CP0_Status = tswapl(*(target_ulong *)ptr);
  619 + ptr += sizeof(target_ulong);
620 620  
621   - env->LO = tswapl(*(uint32_t *)ptr);
622   - ptr += 4;
  621 + env->LO = tswapl(*(target_ulong *)ptr);
  622 + ptr += sizeof(target_ulong);
623 623  
624   - env->HI = tswapl(*(uint32_t *)ptr);
625   - ptr += 4;
  624 + env->HI = tswapl(*(target_ulong *)ptr);
  625 + ptr += sizeof(target_ulong);
626 626  
627   - env->CP0_BadVAddr = tswapl(*(uint32_t *)ptr);
628   - ptr += 4;
  627 + env->CP0_BadVAddr = tswapl(*(target_ulong *)ptr);
  628 + ptr += sizeof(target_ulong);
629 629  
630   - env->CP0_Cause = tswapl(*(uint32_t *)ptr);
631   - ptr += 4;
  630 + env->CP0_Cause = tswapl(*(target_ulong *)ptr);
  631 + ptr += sizeof(target_ulong);
632 632  
633   - env->PC = tswapl(*(uint32_t *)ptr);
634   - ptr += 4;
  633 + env->PC = tswapl(*(target_ulong *)ptr);
  634 + ptr += sizeof(target_ulong);
635 635  
636 636 if (env->CP0_Config1 & (1 << CP0C1_FP))
637 637 {
638 638 for (i = 0; i < 32; i++)
639 639 {
640   - env->fpr[i].fs[FP_ENDIAN_IDX] = tswapl(*(uint32_t *)ptr);
641   - ptr += 4;
  640 + env->fpr[i].fs[FP_ENDIAN_IDX] = tswapl(*(target_ulong *)ptr);
  641 + ptr += sizeof(target_ulong);
642 642 }
643 643  
644   - env->fcr31 = tswapl(*(uint32_t *)ptr) & 0x0183FFFF;
645   - ptr += 4;
  644 + env->fcr31 = tswapl(*(target_ulong *)ptr) & 0x0183FFFF;
  645 + ptr += sizeof(target_ulong);
646 646  
647   - env->fcr0 = tswapl(*(uint32_t *)ptr);
648   - ptr += 4;
  647 + env->fcr0 = tswapl(*(target_ulong *)ptr);
  648 + ptr += sizeof(target_ulong);
649 649  
650 650 /* set rounding mode */
651 651 RESTORE_ROUNDING_MODE;
... ...