HomeFreeBSD

arm64: print '0x' before hex values

Description

arm64: print '0x' before hex values

Not making it explicit that we're printing values in hex can be
misleading when the number doesn't contain hex-only symbols (a-f). A
good example of this is print_gp_register(), where we print "(func +
offset)"; if the offset doesn't contain a-f symbols, it's not
immediately clear if that value is in decimal or hex. Using '%#' instead
of '0x%' also isn't a better option, it doesn't print '0x' if the value
is 0, and it also messes up column alignment.

Reviewed by: imp, markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40583

Details

Provenance
christosAuthored on Jun 21 2023, 3:47 PM
Reviewer
imp
Differential Revision
D40583: arm64: print '0x' before hex values
Parents
rG1723e7f33ae3: cap_net.3: fix typo
Branches
Unknown
Tags
Unknown