(gdb) p/x $satp
$6 = 0x8000000000010601
(gdb) p/x $mstatus
$7 = 0xaa
(gdb) x /4wx 0x18000ae0 // See the expected instructions in Physical. addr
0x18000ae0: 0x3aa7b023 0x104027b7 0x4c078793 0x17b7e51c
(gdb) x /4wx 0x10200ae0 // Don't see any instructions in Virtual addr
0x10200ae0: 0x00000000 0x00000000 0x00000000 0x00000000
(gdb) si // Able to execute code, but don't see the instructions ??
0x0000000010200ae0
(gdb) si
0x0000000010200ae4
(gdb) si // How to do source debug of an application using Virtual mem ?
0x0000000010200ae8
(gdb) si
0x0000000010200aec
Note :Hi All,I am trying to run an application in SV39 virtual addressing mode. I have setup the Page Table entries and SATP accordingly. After switching into executing the Virtual Text Address I can see that code executes as expected, but DO NOT see instructions via GDB.
+1. I think OS need to be invoked for virtual address debug.
From: Jim Wilson <ji...@sifive.com>
Sent: 2020年11月26日 2:31
To: james qest <questj...@gmail.com>
Cc: RISC-V SW Dev <sw-...@groups.riscv.org>
Subject: Re: [sw-dev] GDB address translation issue when running in RISCV SV39 on QEMU
|
External email: Use caution opening links or attachments |
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
sw-dev+un...@groups.riscv.org.
To view this discussion on the web visit
https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAFyWVab9Gg%3DdRN5OVmrhG%2BZqf4iTR6ZOFQXU7zNEp7_aRj1CVQ%40mail.gmail.com.