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, May 16, 3:47 AM
Unknown Object (File)
Sat, May 16, 3:46 AM
Unknown Object (File)
Sat, May 16, 3:44 AM
Unknown Object (File)
Fri, May 15, 6:10 AM
Unknown Object (File)
May 10 2026, 6:12 AM
Unknown Object (File)
Apr 30 2026, 10:47 PM
Unknown Object (File)
Apr 28 2026, 5:26 PM
Unknown Object (File)
Apr 28 2026, 5:21 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.