set architecture riscv:rv64 -- fix gdb trampoline disassembly, thanks jonathan

This commit is contained in:
Robert Morris 2019-09-12 10:48:48 -04:00
parent 35010f0d0f
commit 036b5edf12
2 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,5 @@
set confirm off set confirm off
set architecture riscv set architecture riscv:rv64
target remote 127.0.0.1:1234 target remote 127.0.0.1:1234
symbol-file kernel/kernel symbol-file kernel/kernel
set disassemble-next-line auto set disassemble-next-line auto

View file

@ -70,7 +70,7 @@ uservec:
# make tp hold the current hartid, from p->tf->kernel_hartid # make tp hold the current hartid, from p->tf->kernel_hartid
ld tp, 32(a0) ld tp, 32(a0)
# remember the address of usertrap(), p->tf->kernel_trap # load the address of usertrap(), p->tf->kernel_trap
ld t0, 16(a0) ld t0, 16(a0)
# restore kernel page table from p->tf->kernel_satp # restore kernel page table from p->tf->kernel_satp
@ -79,7 +79,7 @@ uservec:
sfence.vma zero, zero sfence.vma zero, zero
# a0 is no longer valid, since the kernel page # a0 is no longer valid, since the kernel page
# table does not specially map p->td. # table does not specially map p->tf.
# jump to usertrap(), which does not return # jump to usertrap(), which does not return
jr t0 jr t0
@ -89,8 +89,8 @@ userret:
# userret(TRAPFRAME, pagetable) # userret(TRAPFRAME, pagetable)
# switch from kernel to user. # switch from kernel to user.
# usertrapret() calls here. # usertrapret() calls here.
# a0: TRAPFRAME, in user page table # a0: TRAPFRAME, in user page table.
# a1: user page table, for satp # a1: user page table, for satp.
# switch to the user page table. # switch to the user page table.
csrw satp, a1 csrw satp, a1