Skip to content

Commit 076aa0a

Browse files
build fixes for parse_inline_sites
1 parent a1e7ec5 commit 076aa0a

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/codeview/codeview.c

+11
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,14 @@ cv_map_encoded_base_pointer(CV_Arch arch, U32 encoded_frame_reg)
165165
return r;
166166
}
167167

168+
169+
internal String8
170+
cv_string_from_inline_range_kind(CV_InlineRangeKind kind)
171+
{
172+
switch (kind) {
173+
case CV_InlineRangeKind_Expr: return str8_lit("Expr");
174+
case CV_InlineRangeKind_Stmt: return str8_lit("Stmt");
175+
}
176+
return str8_zero();
177+
}
178+

src/codeview/codeview.h

+2
Original file line numberDiff line numberDiff line change
@@ -2971,5 +2971,7 @@ internal CV_EncodedFramePtrReg cv_pick_fp_encoding(CV_SymFrameproc *frameproc, B
29712971
internal CV_Reg cv_decode_fp_reg(CV_Arch arch, CV_EncodedFramePtrReg encoded_reg);
29722972
internal U32 cv_map_encoded_base_pointer(CV_Arch arch, U32 encoded_frame_reg);
29732973

2974+
internal String8 cv_string_from_inline_range_kind(CV_InlineRangeKind kind);
2975+
29742976
#endif // CODEVIEW_H
29752977

src/scratch/parse_inline_sites.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
#include "os/os_inc.h"
55
#include "coff/coff.h"
66
#include "codeview/codeview.h"
7-
#include "codeview/codeview_stringize.h"
7+
#include "codeview/codeview_parse.h"
88
#include "msf/msf.h"
99
#include "msf/msf_parse.h"
1010
#include "pdb/pdb.h"
1111
#include "pdb/pdb_parse.h"
12+
#include "pdb/pdb_stringize.h"
1213

1314
#include "base/base_inc.c"
1415
#include "os/os_inc.c"
1516
#include "coff/coff.c"
1617
#include "codeview/codeview.c"
17-
#include "codeview/codeview_stringize.c"
18+
#include "codeview/codeview_parse.c"
1819
#include "msf/msf.c"
1920
#include "msf/msf_parse.c"
2021
#include "pdb/pdb.c"
@@ -25,23 +26,21 @@
2526

2627
#include "linker/base_ext/base_blake3.h"
2728
#include "linker/base_ext/base_blake3.c"
28-
#include "linker/third_party_ext/md5/md5.c"
29-
#include "linker/third_party_ext/md5/md5.h"
30-
#include "linker/third_party_ext/xxHash/xxhash.c"
31-
#include "linker/third_party_ext/xxHash/xxhash.h"
29+
#include "third_party/md5/md5.c"
30+
#include "third_party/md5/md5.h"
31+
#include "third_party/xxHash/xxhash.c"
32+
#include "third_party/xxHash/xxhash.h"
3233

3334
#include "linker/base_ext/base_inc.h"
3435
#include "linker/path_ext/path.h"
3536
#include "linker/hash_table.h"
3637
#include "linker/thread_pool/thread_pool.h"
37-
#include "linker/os_ext/os_inc.h"
3838
#include "linker/codeview_ext/codeview.h"
3939

4040
#include "linker/base_ext/base_inc.c"
4141
#include "linker/path_ext/path.c"
4242
#include "linker/hash_table.c"
4343
#include "linker/thread_pool/thread_pool.c"
44-
#include "linker/os_ext/os_inc.c"
4544
#include "linker/codeview_ext/codeview.c"
4645

4746
internal void
@@ -116,7 +115,7 @@ print_inline_binary_annotations(String8 binary_annots)
116115
case CV_InlineBinaryAnnotation_ChangeCodeOffsetAndLineOffset: {
117116
U32 code_offset_and_line_offset = 0;
118117
cursor += cv_decode_inline_annot_u32(binary_annots, cursor, &code_offset_and_line_offset);
119-
S32 line_delta = cv_inline_annot_convert_to_signed_operand(code_offset_and_line_offset >> 4);
118+
S32 line_delta = cv_inline_annot_signed_from_unsigned_operand(code_offset_and_line_offset >> 4);
120119
U32 code_delta = code_offset_and_line_offset & 0xF;
121120
line_offset += line_delta;
122121
code_offset += code_delta;

0 commit comments

Comments
 (0)