Page MenuHomeFreeBSD

riscv: Don't print zero offsets for register addresses
ClosedPublic

Authored by jhb on Sep 3 2023, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 19, 2:24 AM
Unknown Object (File)
Mon, Jan 19, 12:37 AM
Unknown Object (File)
Sun, Jan 18, 6:34 PM
Unknown Object (File)
Sun, Jan 18, 11:28 AM
Unknown Object (File)
Sun, Jan 18, 9:26 AM
Unknown Object (File)
Sat, Jan 17, 6:54 PM
Unknown Object (File)
Dec 6 2025, 10:06 PM
Unknown Object (File)
Dec 5 2025, 5:53 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 3 2023, 1:18 AM
mhorne added inline comments.
sys/riscv/riscv/trap.c
149–156

We can't call db_printsym() or some similar routine here?

This revision is now accepted and ready to land.Sep 3 2023, 7:44 PM
markj added inline comments.
sys/riscv/riscv/trap.c
149–156

I'd assume that DDB functions with side effects are written assuming that they'll only ever run on a single CPU. print_with_symbol() is called right before a panic and so isn't serialized, so calling db_printsym() etc. here isn't quite right.

In practice it probably wouldn't hurt anything.

sys/riscv/riscv/trap.c
149–156

You'd be interleaving calls to db_printf with calls to regular printf within a single line which I think would not be ideal and probably confusing somewhere.