Commit 651ff874 authored by 某某某's avatar 某某某
Browse files

fix: print stval to help debug

parent 2571327d
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
...@@ -26,7 +26,8 @@ void uecallHandler(){ ...@@ -26,7 +26,8 @@ void uecallHandler(){
extern "C" void straphandler(){ extern "C" void straphandler(){
ptr_t sepc; csrRead(sepc,sepc); ptr_t sepc; csrRead(sepc,sepc);
xlen_t scause; csrRead(scause,scause); xlen_t scause; csrRead(scause,scause);
printf("straphandler cause=[%d]%d sepc=%lx\n",csr::mcause::isInterrupt(scause),scause<<1>>1,sepc); xlen_t stval; csrRead(stval,stval);
printf("straphandler cause=[%d]%d sepc=%lx stval=%lx\n",csr::mcause::isInterrupt(scause),scause<<1>>1,sepc,stval);
kHartObjs.curtask->ctx.pc=(xlen_t)sepc; kHartObjs.curtask->ctx.pc=(xlen_t)sepc;
if(csr::mcause::isInterrupt(scause)){ if(csr::mcause::isInterrupt(scause)){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment