diff options
author | Mark Harmstone <mark@harmstone.com> | 2024-11-02 22:05:06 +0000 |
---|---|---|
committer | Mark Harmstone <mark@harmstone.com> | 2024-11-13 03:11:35 +0000 |
commit | b3aa594daaec9ec736f721c3f77bd411b3e7c964 (patch) | |
tree | 39f35b7f92854b471f24ddcd8b20a157e11bba5e /ChangeLog | |
parent | 2e7d431af880736d6a6e8144a8e3d6d1e65008f5 (diff) | |
download | gdb-master.zip gdb-master.tar.gz gdb-master.tar.bz2 |
Add .cv_ucomp and .cv_scomp pseudo-directives for object files for
Windows targets, which encode compressed CodeView integers according to
the algorithm in CVCompressData in
https://github.com/Microsoft/microsoft-pdb/blob/master/include/cvinfo.h.
This is essentially Microsoft's answer to the LEB128, though used in far
fewer places.
CodeView uses these to encode the "binary annotations" in the
S_INLINESITE symbol, which express the relationship between code offsets
and line numbers in inlined functions. This has to be done in the
assembler as GCC doesn't know how many bytes each instruction takes up.
There's no equivalent for this for MSVC or LLVM, as in both cases the
assembler and compiler are integrated.
.cv_ucomp represents an unsigned big-endian integer between 0 and 0x1fffffff,
taking up 1, 2, or 4 bytes:
Value between 0 and 0x7f:
0aaaaaaa -> 0aaaaaaa (identity-mapped)
Value between 0x80 and 0x3fff:
00aaaaaa bbbbbbbb -> 10aaaaaa bbbbbbbb
Value between 0x4000 and 0x1fffffff:
000aaaaa bbbbbbbb ccccccccc dddddddd ->
110aaaaa bbbbbbbb ccccccccc dddddddd
.cv_scomp represents a signed big-endian integer between -0xfffffff and
0xfffffff, encoded according to EncodeSignedInt32 in cvinfo.h. The
absolute value of the integer is shifted left one bit, the LSB set
for a negative value, and the result expressed as if it were a
.cv_ucomp: cv_scomp(x) = cv_ucomp((abs(x) << 1) | (x < 0 ? 1 : 0))
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions