Ghidra Emulation error on RISC-V (RV32-IMC) to write in memory display "Check out your emulation options, something wrong!"
See original GitHub issueGhidra Emulation error on RISC-V (RV32-IMC) to write in memory display “Check out your emulation options, something wrong!”
How to reproduce the issue:
- With Ghidra 10.2.2 Load the elf from the archive RISC-V-SecureDuo_Client_Top_Board.zip
- At addr 0x00000000 decompile the first instruction (it is the entry it is mandatory to discover other function…)
- Analysis->Auto Analyze … => set “Aggressive Instruction Finder” and do the auto analysis
- Navigation -> Goto => 0x2488
- GhidraEMU Plugin set start to 0x2488
- Step with GhidraEMU until 0x24ac where the issue appears with message box “Check out your emulation options, something wrong!”
Note: even if we fix gp for all the code with gp=20000c00 where the store in a3 will be at addr 20000514 (which is mapped) we have the same error
The fault appear on following asm line (even if a3 = 0x20000514)
000024ac 98 c2 c.sw a4,0x0(a3)
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
PPC Big-endian VLE instruction emulation error #4392
Describe the bug Error during emulation of code PPC Big-endian VLE, Ghidra can't emulate the instruction after branch "se_mflr r0" ...
Read more >Errors: Debug rv32 elf program in riscv-ovpsim emulator
Hi, all. After run DEBUG_GDB_dhrystone.bat in riscv-ovpsim/examples/dhrystone directory on cygwin enviroment, I want to test the gdb. So errors coming.
Read more >RISC-V GNU Compiler Toolchain: Build Error
I am trying to build the "RISC-V GNU Compiler Toolchain" as a step for building the SDK for PULPissimio platform. When I try...
Read more >Lab2: RISC-V RV32I[MA] emulator with ELF support
Disassemble the ELF files generated by C compiler and compare the assembly listing between handwritten and compiler optimized one. You can modify the...
Read more >Ghidra support : r/RISCV
I've been looking at adding RISC-V support for Ghidra (recently released/open sourced disassembler/decompiler/reverse engineering suite).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I made some fixes for more clear emulation process, now the plugin will find the existing stack space and use it as the main one. I’ve set values of gp=20000c00 and a3=0x20000514 and got the error that referenced to uninitialized memory, which is a nice sign I guess:
I think I still need to debug this case
I confirm if I change the memory map of Stack to Initialized data (set to 0x0 by default) that “fix” the issue (Freeze of Ghidra) for the Stack when reading from it What is remaining is the first issue in the 1st comment which cannot be fixed like that