Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
AA5555AA
OSKernel2023-LuoOS
Commits
651ff874
Commit
651ff874
authored
2 years ago
by
某某某
Browse files
Options
Download
Patches
Plain Diff
fix: print stval to help debug
parent
2571327d
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/trap.cc
+2
-1
kernel/trap.cc
with
2 additions
and
1 deletion
+2
-1
kernel/trap.cc
+
2
−
1
View file @
651ff874
...
@@ -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
)){
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets