diff options
author | np <np@FreeBSD.org> | 2009-07-17 21:15:09 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2009-07-17 21:15:09 +0000 |
commit | 1168008413cff5615c03023ba10577f626045957 (patch) | |
tree | ac3a8bf63d1f896ed13172c90fdc479c3c3b0b4f | |
parent | f11433cc96dcef65c605bfa0a2aef958a3aa4272 (diff) | |
download | FreeBSD-src-1168008413cff5615c03023ba10577f626045957.zip FreeBSD-src-1168008413cff5615c03023ba10577f626045957.tar.gz |
Store accurate offset information in CTF data. A large number of
structs had incorrect member offsets, limiting dtrace's usefulness
when working with them. An example of incorrect info (struct
rtentry) from before this fix:
<1738> STRUCT rtentry (200 bytes)
rt_nodes type=1731 off=0
rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96
rt_flags type=3 off=65344 <== wrong again, and so on..
...
Approved by: re (kib), gnn (mentor)
MFC after: 2 weeks
-rw-r--r-- | lib/libdwarf/dwarf_loc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libdwarf/dwarf_loc.c b/lib/libdwarf/dwarf_loc.c index 6012142..6449706 100644 --- a/lib/libdwarf/dwarf_loc.c +++ b/lib/libdwarf/dwarf_loc.c @@ -236,7 +236,7 @@ dwarf_op_num(uint8_t pointer_size, uint8_t *p, int len) case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - uval = dwarf_decode_sleb128(&p); + uval = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */ @@ -458,7 +458,7 @@ dwarf_loc_fill(Dwarf_Locdesc *lbuf, uint8_t pointer_size, uint8_t *p, int len) case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - operand1 = dwarf_decode_sleb128(&p); + operand1 = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */ |