HomeFreeBSD

db_pprint: Fix offset calculation for struct members

Description

db_pprint: Fix offset calculation for struct members

The struct pretty-printing code uses the ctm_offset field in
struct ctf_member_v3 to calculate the address of a struct member.
However, the code treats this as a byte offset rather than the
offset in bits, leading to wrong values being printed.
Fix this by diving with ctm_offset by NBBY.

Approved by: markj (mentor)
Fixes: c21bc6f3c242

Details

Provenance
bnovkovAuthored on Jul 21 2024, 4:45 PM
Parents
rG24388fccd551: Bump __FreeBSD_version after LinuxKPI changes.
Branches
Unknown
Tags
Unknown