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)
Sun, Mar 8, 12:31 AM
Unknown Object (File)
Fri, Feb 20, 4:35 AM
Unknown Object (File)
Thu, Feb 19, 7:55 AM
Unknown Object (File)
Tue, Feb 17, 1:01 PM
Unknown Object (File)
Mon, Feb 16, 2:46 PM
Unknown Object (File)
Mon, Feb 9, 7:10 AM
Unknown Object (File)
Jan 19 2026, 2:24 AM
Unknown Object (File)
Jan 19 2026, 12:37 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.