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)
Sat, Dec 6, 10:06 PM
Unknown Object (File)
Fri, Dec 5, 5:53 AM
Unknown Object (File)
Sun, Nov 30, 9:21 AM
Unknown Object (File)
Sun, Nov 23, 5:15 PM
Unknown Object (File)
Nov 21 2025, 1:52 AM
Unknown Object (File)
Nov 10 2025, 4:29 AM
Unknown Object (File)
Nov 6 2025, 12:13 PM
Unknown Object (File)
Nov 5 2025, 11:30 PM
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.