mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
remove T_EndTest
This commit is contained in:
@@ -79,8 +79,11 @@ t_make_file_path(Arena *arena, String8 name)
|
|||||||
internal void
|
internal void
|
||||||
t_run_caller(void *raw_ctx)
|
t_run_caller(void *raw_ctx)
|
||||||
{
|
{
|
||||||
|
Temp scratch = scratch_begin(0,0);
|
||||||
T_RunCtx *ctx = raw_ctx;
|
T_RunCtx *ctx = raw_ctx;
|
||||||
ctx->result = ctx->run();
|
ctx->result.status = T_RunStatus_Pass;
|
||||||
|
ctx->run(scratch.arena, &ctx->result);
|
||||||
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
|
|||||||
+6
-13
@@ -20,7 +20,8 @@ typedef struct
|
|||||||
char *fail_cond;
|
char *fail_cond;
|
||||||
} T_RunResult;
|
} T_RunResult;
|
||||||
|
|
||||||
typedef T_RunResult (*T_Run)(void);
|
#define T_RunSig(name) void t_##name(Arena *arena, T_RunResult *result_out)
|
||||||
|
typedef void (*T_Run)(Arena *arena, T_RunResult *result_out);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -40,7 +41,7 @@ extern U64 g_torture_test_count;
|
|||||||
extern T_Test g_torture_tests[0xffffff];
|
extern T_Test g_torture_tests[0xffffff];
|
||||||
|
|
||||||
#define T_AddTest(name, l, ...) \
|
#define T_AddTest(name, l, ...) \
|
||||||
T_RunResult t_##name(void); \
|
T_RunSig(name); \
|
||||||
__VA_ARGS__ void t_add_test_##name(void) \
|
__VA_ARGS__ void t_add_test_##name(void) \
|
||||||
{ \
|
{ \
|
||||||
g_torture_tests[g_torture_test_count].group = T_Group; \
|
g_torture_tests[g_torture_test_count].group = T_Group; \
|
||||||
@@ -63,18 +64,10 @@ T_AddTest(name, __LINE__, __attribute__((constructor)))
|
|||||||
|
|
||||||
#define T_BeginTest(name) \
|
#define T_BeginTest(name) \
|
||||||
T_BeginTest_(name) \
|
T_BeginTest_(name) \
|
||||||
T_RunResult t_##name(void) { \
|
T_RunSig(name)
|
||||||
Temp scratch = scratch_begin(0,0); \
|
|
||||||
T_RunResult result_ = { .status = T_RunStatus_Fail };
|
|
||||||
|
|
||||||
#define T_EndTest \
|
#define T_Ok(c) do { if (!(c)) { result_out->fail_file = __FILE__; result_out->fail_line = __LINE__; result_out->fail_cond = Stringify(c); result_out->status = T_RunStatus_Fail; return; } } while(0)
|
||||||
result_.status = T_RunStatus_Pass; \
|
#define T_Fail() T_Ok(!(c))
|
||||||
exit__:; \
|
|
||||||
scratch_end(scratch); \
|
|
||||||
return result_; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define T_Ok(c) do { if (!(c)) { result_.fail_file = __FILE__; result_.fail_line = __LINE__; result_.fail_cond = Stringify(c); goto exit__; } } while(0)
|
|
||||||
#define T_MatchLinef(out, ...) T_Ok(t_match_linef(out, __VA_ARGS__))
|
#define T_MatchLinef(out, ...) T_Ok(t_match_linef(out, __VA_ARGS__))
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
+26
-27
@@ -9,65 +9,64 @@ T_BeginTest(str8_list_substr)
|
|||||||
|
|
||||||
{
|
{
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "a");
|
str8_list_pushf(arena, &list, "a");
|
||||||
str8_list_pushf(scratch.arena, &list, "b");
|
str8_list_pushf(arena, &list, "b");
|
||||||
str8_list_pushf(scratch.arena, &list, "c");
|
str8_list_pushf(arena, &list, "c");
|
||||||
String8List sub = str8_list_substr(scratch.arena, list, r1u64(0, 3));
|
String8List sub = str8_list_substr(arena, list, r1u64(0, 3));
|
||||||
String8 result = str8_list_join(scratch.arena, &list, 0);
|
String8 result = str8_list_join(arena, &list, 0);
|
||||||
T_Ok(str8_match(result, str8_lit("abc"), 0));
|
T_Ok(str8_match(result, str8_lit("abc"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "a");
|
str8_list_pushf(arena, &list, "a");
|
||||||
str8_list_pushf(scratch.arena, &list, "b");
|
str8_list_pushf(arena, &list, "b");
|
||||||
str8_list_pushf(scratch.arena, &list, "c");
|
str8_list_pushf(arena, &list, "c");
|
||||||
String8List sub = str8_list_substr(scratch.arena, list, r1u64(0, max_U64));
|
String8List sub = str8_list_substr(arena, list, r1u64(0, max_U64));
|
||||||
String8 result = str8_list_join(scratch.arena, &list, 0);
|
String8 result = str8_list_join(arena, &list, 0);
|
||||||
T_Ok(str8_match(result, str8_lit("abc"), 0));
|
T_Ok(str8_match(result, str8_lit("abc"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "a");
|
str8_list_pushf(arena, &list, "a");
|
||||||
str8_list_pushf(scratch.arena, &list, "bcd");
|
str8_list_pushf(arena, &list, "bcd");
|
||||||
String8List sub = str8_list_substr(scratch.arena, list, r1u64(2, 3));
|
String8List sub = str8_list_substr(arena, list, r1u64(2, 3));
|
||||||
String8 result = str8_list_join(scratch.arena, &sub, 0);
|
String8 result = str8_list_join(arena, &sub, 0);
|
||||||
T_Ok(str8_match(result, str8_lit("c"), 0));
|
T_Ok(str8_match(result, str8_lit("c"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "a");
|
str8_list_pushf(arena, &list, "a");
|
||||||
str8_list_pushf(scratch.arena, &list, "bcd");
|
str8_list_pushf(arena, &list, "bcd");
|
||||||
String8List sub = str8_list_substr(scratch.arena, list, r1u64(1, 2));
|
String8List sub = str8_list_substr(arena, list, r1u64(1, 2));
|
||||||
String8 result = str8_list_join(scratch.arena, &sub, 0);
|
String8 result = str8_list_join(arena, &sub, 0);
|
||||||
T_Ok(str8_match(result, str8_lit("b"), 0));
|
T_Ok(str8_match(result, str8_lit("b"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "ab");
|
str8_list_pushf(arena, &list, "ab");
|
||||||
str8_list_pushf(scratch.arena, &list, "cd");
|
str8_list_pushf(arena, &list, "cd");
|
||||||
str8_list_pushf(scratch.arena, &list, "ef");
|
str8_list_pushf(arena, &list, "ef");
|
||||||
String8List sub = str8_list_substr(scratch.arena, list, r1u64(1, 5));
|
String8List sub = str8_list_substr(arena, list, r1u64(1, 5));
|
||||||
String8 result = str8_list_join(scratch.arena, &sub, 0);
|
String8 result = str8_list_join(arena, &sub, 0);
|
||||||
T_Ok(str8_match(result, str8_lit("bcde"), 0));
|
T_Ok(str8_match(result, str8_lit("bcde"), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
String8List list = {0};
|
String8List list = {0};
|
||||||
str8_list_pushf(scratch.arena, &list, "abc");
|
str8_list_pushf(arena, &list, "abc");
|
||||||
|
|
||||||
String8List zero = str8_list_substr(scratch.arena, list, r1u64(0, 0));
|
String8List zero = str8_list_substr(arena, list, r1u64(0, 0));
|
||||||
T_Ok(MemoryMatchStruct(&zero, &zero_list));
|
T_Ok(MemoryMatchStruct(&zero, &zero_list));
|
||||||
|
|
||||||
String8List out_of_bounds_range = str8_list_substr(scratch.arena, list, r1u64(max_U64/2, max_U64));
|
String8List out_of_bounds_range = str8_list_substr(arena, list, r1u64(max_U64/2, max_U64));
|
||||||
T_Ok(MemoryMatchStruct(&out_of_bounds_range, &zero_list));
|
T_Ok(MemoryMatchStruct(&out_of_bounds_range, &zero_list));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
#undef T_Group
|
#undef T_Group
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ dw_writer_tag_end(writer); \
|
|||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(scratch.arena, writer);
|
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(arena, writer);
|
||||||
RDI_NameMap *types_nm = rdi_element_from_name_idx(rdi, NameMaps, RDI_NameMapKind_Types);
|
RDI_NameMap *types_nm = rdi_element_from_name_idx(rdi, NameMaps, RDI_NameMapKind_Types);
|
||||||
T_Ok(types_nm);
|
T_Ok(types_nm);
|
||||||
|
|
||||||
@@ -220,7 +220,6 @@ T_Ok(str8_match(str8_from_rdi_string_idx(rdi, type->built_in.name_string_idx), s
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(d2r_line_table)
|
T_BeginTest(d2r_line_table)
|
||||||
{
|
{
|
||||||
@@ -229,7 +228,7 @@ T_BeginTest(d2r_line_table)
|
|||||||
String8 comp_name = str8_lit("test.c");
|
String8 comp_name = str8_lit("test.c");
|
||||||
|
|
||||||
DW_WriterFile *foo_file = dw_writer_new_file(writer, str8_lit("/mnt/C/Devel/foo.c"));
|
DW_WriterFile *foo_file = dw_writer_new_file(writer, str8_lit("/mnt/C/Devel/foo.c"));
|
||||||
DW_WriterFile *comp_file = dw_writer_new_file(writer, str8f(scratch.arena, "%S%S", comp_dir, comp_name));
|
DW_WriterFile *comp_file = dw_writer_new_file(writer, str8f(arena, "%S%S", comp_dir, comp_name));
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
DW_WriterFile *file; U64 ln; U64 line_size; U64 voff;
|
DW_WriterFile *file; U64 ln; U64 line_size; U64 voff;
|
||||||
@@ -268,13 +267,13 @@ T_BeginTest(d2r_line_table)
|
|||||||
dw_writer_push_attrib_line_ptr(writer, DW_AttribKind_StmtList, 0);
|
dw_writer_push_attrib_line_ptr(writer, DW_AttribKind_StmtList, 0);
|
||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
|
|
||||||
d2r_rdi_from_dwarf_writer(scratch.arena, writer);
|
d2r_rdi_from_dwarf_writer(arena, writer);
|
||||||
|
|
||||||
for EachElement(i, test_table) {
|
for EachElement(i, test_table) {
|
||||||
for EachIndex(k, test_table[i].line_size) {
|
for EachIndex(k, test_table[i].line_size) {
|
||||||
String8 cmd_line = str8f(scratch.arena, "-voff2line -voff:0x%llx a.rdi", test_table[i].voff + k);
|
String8 cmd_line = str8f(arena, "-voff2line -voff:0x%llx a.rdi", test_table[i].voff + k);
|
||||||
String8 output = {0};
|
String8 output = {0};
|
||||||
t_invoke_(t_radbin_path(), cmd_line, max_U64, scratch.arena, &output);
|
t_invoke_(t_radbin_path(), cmd_line, max_U64, arena, &output);
|
||||||
T_Ok(g_last_exit_code == 0);
|
T_Ok(g_last_exit_code == 0);
|
||||||
T_MatchLinef(&output, "%S:%llu", test_table[i].file->path, test_table[i].ln);
|
T_MatchLinef(&output, "%S:%llu", test_table[i].file->path, test_table[i].ln);
|
||||||
}
|
}
|
||||||
@@ -282,7 +281,6 @@ T_BeginTest(d2r_line_table)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(d2r_checksums)
|
T_BeginTest(d2r_checksums)
|
||||||
{
|
{
|
||||||
@@ -301,7 +299,7 @@ T_BeginTest(d2r_checksums)
|
|||||||
dw_writer_push_attrib_line_ptr(writer, DW_AttribKind_StmtList, 0);
|
dw_writer_push_attrib_line_ptr(writer, DW_AttribKind_StmtList, 0);
|
||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
|
|
||||||
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(scratch.arena, writer);
|
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(arena, writer);
|
||||||
U64 checksum_count = 0;
|
U64 checksum_count = 0;
|
||||||
RDI_MD5 *checksums = rdi_table_from_name(rdi, MD5Checksums, &checksum_count);
|
RDI_MD5 *checksums = rdi_table_from_name(rdi, MD5Checksums, &checksum_count);
|
||||||
T_Ok(checksum_count == writer->line.file_count + 1);
|
T_Ok(checksum_count == writer->line.file_count + 1);
|
||||||
@@ -318,7 +316,6 @@ T_BeginTest(d2r_checksums)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
#if SUBPROGRAM_CONVERSION_TEST
|
#if SUBPROGRAM_CONVERSION_TEST
|
||||||
T_BeginTest(d2r_subprogram)
|
T_BeginTest(d2r_subprogram)
|
||||||
@@ -432,14 +429,13 @@ T_BeginTest(d2r_subprogram)
|
|||||||
|
|
||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
|
|
||||||
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(scratch.arena, writer);
|
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(arena, writer);
|
||||||
RDI_Procedure *proc = rdi_procedure_from_name_cstr(rdi, (char *)subprogram_name.str);
|
RDI_Procedure *proc = rdi_procedure_from_name_cstr(rdi, (char *)subprogram_name.str);
|
||||||
RDI_TypeNode *proc_type = rdi_element_from_name_idx(rdi, TypeNodes, proc->type_idx);
|
RDI_TypeNode *proc_type = rdi_element_from_name_idx(rdi, TypeNodes, proc->type_idx);
|
||||||
String8 proc_string = rdi_string_from_type(scratch.arena, rdi, proc, proc_type);
|
String8 proc_string = rdi_string_from_type(arena, rdi, proc, proc_type);
|
||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
T_BeginTest(d2r_general)
|
T_BeginTest(d2r_general)
|
||||||
@@ -470,7 +466,7 @@ T_BeginTest(d2r_general)
|
|||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(scratch.arena, writer);
|
RDI_Parsed *rdi = d2r_rdi_from_dwarf_writer(arena, writer);
|
||||||
|
|
||||||
RDI_Procedure *proc = rdi_procedure_from_name_cstr(rdi, "FooBar");
|
RDI_Procedure *proc = rdi_procedure_from_name_cstr(rdi, "FooBar");
|
||||||
T_Ok(proc);
|
T_Ok(proc);
|
||||||
@@ -505,6 +501,5 @@ T_BeginTest(d2r_general)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
#undef T_Group
|
#undef T_Group
|
||||||
|
|||||||
+40
-54
@@ -64,7 +64,6 @@ T_BeginTest(test_leb128)
|
|||||||
T_Ok(t_dw_test_sleb128((1ull << i), 1 + (i + 1) / 7));
|
T_Ok(t_dw_test_sleb128((1ull << i), 1 + (i + 1) / 7));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
internal B32
|
internal B32
|
||||||
dwt_tags_must_match(DW_WriterTag *writer_tag, DW_TagNode *reader_tag)
|
dwt_tags_must_match(DW_WriterTag *writer_tag, DW_TagNode *reader_tag)
|
||||||
@@ -142,11 +141,11 @@ T_BeginTest(dwarf_32bit)
|
|||||||
dw_writer_push_attrib_string(writer, DW_AttribKind_Producer, str8_lit("RAD DWARF WRITER"));
|
dw_writer_push_attrib_string(writer, DW_AttribKind_Producer, str8_lit("RAD DWARF WRITER"));
|
||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
|
|
||||||
DW_Input input = dw_input_from_writer(scratch.arena, writer);
|
DW_Input input = dw_input_from_writer(arena, writer);
|
||||||
|
|
||||||
for EachElement(sec_idx, input.sec) {
|
for EachElement(sec_idx, input.sec) {
|
||||||
if (sec_idx == DW_Section_Abbrev) continue;
|
if (sec_idx == DW_Section_Abbrev) continue;
|
||||||
Rng1U64Array unit_ranges = dw_unit_ranges_from_data_arr(scratch.arena, input.sec[sec_idx].data);
|
Rng1U64Array unit_ranges = dw_unit_ranges_from_data_arr(arena, input.sec[sec_idx].data);
|
||||||
for EachIndex(range_idx, unit_ranges.count) {
|
for EachIndex(range_idx, unit_ranges.count) {
|
||||||
Rng1U64 range = unit_ranges.v[range_idx];
|
Rng1U64 range = unit_ranges.v[range_idx];
|
||||||
|
|
||||||
@@ -162,7 +161,6 @@ T_BeginTest(dwarf_32bit)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(dwarf_64bit)
|
T_BeginTest(dwarf_64bit)
|
||||||
{
|
{
|
||||||
@@ -171,11 +169,11 @@ T_BeginTest(dwarf_64bit)
|
|||||||
dw_writer_push_attrib_string(writer, DW_AttribKind_Producer, str8_lit("RAD DWARF WRITER"));
|
dw_writer_push_attrib_string(writer, DW_AttribKind_Producer, str8_lit("RAD DWARF WRITER"));
|
||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
|
|
||||||
DW_Input input = dw_input_from_writer(scratch.arena, writer);
|
DW_Input input = dw_input_from_writer(arena, writer);
|
||||||
|
|
||||||
for EachElement(sec_idx, input.sec) {
|
for EachElement(sec_idx, input.sec) {
|
||||||
if (sec_idx == DW_Section_Abbrev) continue;
|
if (sec_idx == DW_Section_Abbrev) continue;
|
||||||
Rng1U64Array unit_ranges = dw_unit_ranges_from_data_arr(scratch.arena, input.sec[sec_idx].data);
|
Rng1U64Array unit_ranges = dw_unit_ranges_from_data_arr(arena, input.sec[sec_idx].data);
|
||||||
for EachIndex(range_idx, unit_ranges.count) {
|
for EachIndex(range_idx, unit_ranges.count) {
|
||||||
Rng1U64 range = unit_ranges.v[range_idx];
|
Rng1U64 range = unit_ranges.v[range_idx];
|
||||||
|
|
||||||
@@ -191,7 +189,6 @@ T_BeginTest(dwarf_64bit)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(dwarf_line_opcodes)
|
T_BeginTest(dwarf_line_opcodes)
|
||||||
{
|
{
|
||||||
@@ -238,9 +235,9 @@ T_BeginTest(dwarf_line_opcodes)
|
|||||||
dw_line_inst_list_push(writer->arena, &writer->line.line_insts, DW_LNE_set_discriminator(2));
|
dw_line_inst_list_push(writer->arena, &writer->line.line_insts, DW_LNE_set_discriminator(2));
|
||||||
dw_line_inst_list_push(writer->arena, &writer->line.line_insts, DW_LNE_end_sequence());
|
dw_line_inst_list_push(writer->arena, &writer->line.line_insts, DW_LNE_end_sequence());
|
||||||
|
|
||||||
DW_Input input = dw_input_from_writer(scratch.arena, writer);
|
DW_Input input = dw_input_from_writer(arena, writer);
|
||||||
Rng1U64Array cu_ranges = dw_unit_ranges_from_data_arr(scratch.arena, input.sec[DW_Section_Info].data);
|
Rng1U64Array cu_ranges = dw_unit_ranges_from_data_arr(arena, input.sec[DW_Section_Info].data);
|
||||||
DW_CompUnit cu = dw_cu_from_info_off(scratch.arena, &input, (DW_ListUnitInput){0}, cu_ranges.v[0].min, 0);
|
DW_CompUnit cu = dw_cu_from_info_off(arena, &input, (DW_ListUnitInput){0}, cu_ranges.v[0].min, 0);
|
||||||
DW_LineVM *line_vm = dw_line_vm_init(&input, &cu);
|
DW_LineVM *line_vm = dw_line_vm_init(&input, &cu);
|
||||||
|
|
||||||
T_Ok(line_vm->header.dir_table.count == 2);
|
T_Ok(line_vm->header.dir_table.count == 2);
|
||||||
@@ -361,7 +358,6 @@ T_BeginTest(dwarf_line_opcodes)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(dwarf_line_emit)
|
T_BeginTest(dwarf_line_emit)
|
||||||
{
|
{
|
||||||
@@ -415,9 +411,9 @@ T_BeginTest(dwarf_line_emit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DW_Input input = dw_input_from_writer(scratch.arena, writer);
|
DW_Input input = dw_input_from_writer(arena, writer);
|
||||||
Rng1U64Array cu_ranges = dw_unit_ranges_from_data_arr(scratch.arena, input.sec[DW_Section_Info].data);
|
Rng1U64Array cu_ranges = dw_unit_ranges_from_data_arr(arena, input.sec[DW_Section_Info].data);
|
||||||
DW_CompUnit cu = dw_cu_from_info_off(scratch.arena, &input, (DW_ListUnitInput){0}, cu_ranges.v[0].min, 0);
|
DW_CompUnit cu = dw_cu_from_info_off(arena, &input, (DW_ListUnitInput){0}, cu_ranges.v[0].min, 0);
|
||||||
DW_LineVM *line_vm = dw_line_vm_init(&input, &cu);
|
DW_LineVM *line_vm = dw_line_vm_init(&input, &cu);
|
||||||
|
|
||||||
// check init sequence
|
// check init sequence
|
||||||
@@ -562,7 +558,6 @@ T_BeginTest(dwarf_line_emit)
|
|||||||
T_Ok(line_vm->new_line);
|
T_Ok(line_vm->new_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(dwarf_writer)
|
T_BeginTest(dwarf_writer)
|
||||||
{
|
{
|
||||||
@@ -626,10 +621,10 @@ T_BeginTest(dwarf_writer)
|
|||||||
dw_writer_tag_end(writer);
|
dw_writer_tag_end(writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
DW_Input input = dw_input_from_writer(scratch.arena, writer);
|
DW_Input input = dw_input_from_writer(arena, writer);
|
||||||
DW_ListUnitInput lu_input = dw_list_unit_input_from_input(scratch.arena, &input);
|
DW_ListUnitInput lu_input = dw_list_unit_input_from_input(arena, &input);
|
||||||
DW_CompUnit cu = dw_cu_from_info_off(scratch.arena, &input, lu_input, 0, 1);
|
DW_CompUnit cu = dw_cu_from_info_off(arena, &input, lu_input, 0, 1);
|
||||||
DW_TagTree tag_tree = dw_tag_tree_from_cu(scratch.arena, &input, &cu);
|
DW_TagTree tag_tree = dw_tag_tree_from_cu(arena, &input, &cu);
|
||||||
AssertAlways(dwt_tags_must_match(writer->root, tag_tree.root));
|
AssertAlways(dwt_tags_must_match(writer->root, tag_tree.root));
|
||||||
|
|
||||||
// validate the writer
|
// validate the writer
|
||||||
@@ -852,7 +847,7 @@ T_BeginTest(dwarf_writer)
|
|||||||
DW_WriterAttrib *frame_base = type->next;
|
DW_WriterAttrib *frame_base = type->next;
|
||||||
T_Ok(frame_base->kind == DW_AttribKind_FrameBase);
|
T_Ok(frame_base->kind == DW_AttribKind_FrameBase);
|
||||||
T_Ok(frame_base->form.reader.kind == DW_Form_ExprLoc);
|
T_Ok(frame_base->form.reader.kind == DW_Form_ExprLoc);
|
||||||
DW_Expr frame_base_expr = dw_expr_from_data(scratch.arena, writer->format, writer->address_size, frame_base->form.reader.exprloc);
|
DW_Expr frame_base_expr = dw_expr_from_data(arena, writer->format, writer->address_size, frame_base->form.reader.exprloc);
|
||||||
T_Ok(frame_base_expr.count == 1);
|
T_Ok(frame_base_expr.count == 1);
|
||||||
T_Ok(frame_base_expr.first->opcode == DW_ExprOp_Reg7);
|
T_Ok(frame_base_expr.first->opcode == DW_ExprOp_Reg7);
|
||||||
T_Ok(frame_base_expr.first->operands == 0);
|
T_Ok(frame_base_expr.first->operands == 0);
|
||||||
@@ -863,7 +858,6 @@ T_BeginTest(dwarf_writer)
|
|||||||
|
|
||||||
dw_writer_end(&writer);
|
dw_writer_end(&writer);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(value_in_register)
|
T_BeginTest(value_in_register)
|
||||||
{
|
{
|
||||||
@@ -876,19 +870,18 @@ T_BeginTest(value_in_register)
|
|||||||
|
|
||||||
// compile a simple program which reads the value from register 3
|
// compile a simple program which reads the value from register 3
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Reg3) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Reg3) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
// evaluate the program
|
// evaluate the program
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
||||||
|
|
||||||
// validate eval result
|
// validate eval result
|
||||||
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_U64);
|
T_Ok(expr_value.type == DW_ExprValueType_U64);
|
||||||
T_Ok(expr_value.u64 == value);
|
T_Ok(expr_value.u64 == value);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(value_in_x_register)
|
T_BeginTest(value_in_x_register)
|
||||||
{
|
{
|
||||||
@@ -901,38 +894,36 @@ T_BeginTest(value_in_x_register)
|
|||||||
|
|
||||||
// compile a simple program which reads the value from register 3
|
// compile a simple program which reads the value from register 3
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(RegX), DW_ExprEnc_ULEB128(DW_RegX64_FsBase) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(RegX), DW_ExprEnc_ULEB128(DW_RegX64_FsBase) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
// evaluate the program
|
// evaluate the program
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
||||||
|
|
||||||
// validate eval result
|
// validate eval result
|
||||||
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_U64);
|
T_Ok(expr_value.type == DW_ExprValueType_U64);
|
||||||
T_Ok(expr_value.u64 == value);
|
T_Ok(expr_value.u64 == value);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(address_of_value)
|
T_BeginTest(address_of_value)
|
||||||
{
|
{
|
||||||
// compile a simple program which reads address
|
// compile a simple program which reads address
|
||||||
U64 addr = 0xdeadbeef;
|
U64 addr = 0xdeadbeef;
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Addr), DW_ExprEnc_U64(addr) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Addr), DW_ExprEnc_U64(addr) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
// evaluate the program
|
// evaluate the program
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, 0, 0, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, 0, 0, 0, 0, &expr_value);
|
||||||
|
|
||||||
// validate eval result
|
// validate eval result
|
||||||
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
||||||
T_Ok(expr_value.addr == addr);
|
T_Ok(expr_value.addr == addr);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(register_relative_variable)
|
T_BeginTest(register_relative_variable)
|
||||||
{
|
{
|
||||||
@@ -944,34 +935,32 @@ T_BeginTest(register_relative_variable)
|
|||||||
MemoryCopy((U8 *)®s + reg_range.min, &value, sizeof(value));
|
MemoryCopy((U8 *)®s + reg_range.min, &value, sizeof(value));
|
||||||
|
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(BReg11), DW_ExprEnc_SLEB128(44) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(BReg11), DW_ExprEnc_SLEB128(44) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
||||||
|
|
||||||
// validate eval result
|
// validate eval result
|
||||||
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
||||||
T_Ok(expr_value.addr == (1 + 44));
|
T_Ok(expr_value.addr == (1 + 44));
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(frame_relative_variable)
|
T_BeginTest(frame_relative_variable)
|
||||||
{
|
{
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(FBReg), DW_ExprEnc_SLEB128(-50) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(FBReg), DW_ExprEnc_SLEB128(-50) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
U64 frame_base = 123;
|
U64 frame_base = 123;
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, frame_base, 0, 0, max_U64, expr, 0, 0, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, frame_base, 0, 0, max_U64, expr, 0, 0, 0, 0, &expr_value);
|
||||||
|
|
||||||
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
T_Ok(expr_eval == DW_ExprEvalResult_Ok);
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
||||||
T_Ok(expr_value.addr == frame_base -50);
|
T_Ok(expr_value.addr == frame_base -50);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
internal
|
internal
|
||||||
MACHINE_OP_MEM_READ(t_machine_op_mem_read)
|
MACHINE_OP_MEM_READ(t_machine_op_mem_read)
|
||||||
@@ -982,7 +971,7 @@ MACHINE_OP_MEM_READ(t_machine_op_mem_read)
|
|||||||
|
|
||||||
T_BeginTest(call_by_reference)
|
T_BeginTest(call_by_reference)
|
||||||
{
|
{
|
||||||
U8 *memory = push_array(scratch.arena, U8, 128);
|
U8 *memory = push_array(arena, U8, 128);
|
||||||
U64 value = 0xc0ffee;
|
U64 value = 0xc0ffee;
|
||||||
MemoryCopy(memory + 32, &value, sizeof(value));
|
MemoryCopy(memory + 32, &value, sizeof(value));
|
||||||
|
|
||||||
@@ -993,32 +982,30 @@ T_BeginTest(call_by_reference)
|
|||||||
MemoryCopy((U8 *)®s + reg_range.min, &memory_ptr, sizeof(memory_ptr));
|
MemoryCopy((U8 *)®s + reg_range.min, &memory_ptr, sizeof(memory_ptr));
|
||||||
|
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(BRegX), DW_ExprEnc_ULEB128(58), DW_ExprEnc_SLEB128(32), DW_ExprEnc_Op(Deref) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(BRegX), DW_ExprEnc_ULEB128(58), DW_ExprEnc_SLEB128(32), DW_ExprEnc_Op(Deref) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
DW_ExprValue expr_value = { 0 };
|
DW_ExprValue expr_value = { 0 };
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, t_machine_op_mem_read, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, t_machine_op_mem_read, 0, &expr_value);
|
||||||
|
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_Generic);
|
T_Ok(expr_value.type == DW_ExprValueType_Generic);
|
||||||
T_Ok(expr_value.generic.size == sizeof(U64));
|
T_Ok(expr_value.generic.size == sizeof(U64));
|
||||||
T_Ok(*(U64 *)expr_value.generic.str == value);
|
T_Ok(*(U64 *)expr_value.generic.str == value);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
T_BeginTest(plus_uconst)
|
T_BeginTest(plus_uconst)
|
||||||
{
|
{
|
||||||
U64 struct_addr = 0x123;
|
U64 struct_addr = 0x123;
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Addr), DW_ExprEnc_Addr(struct_addr), DW_ExprEnc_Op(PlusUConst), DW_ExprEnc_ULEB128(4) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Addr), DW_ExprEnc_Addr(struct_addr), DW_ExprEnc_Op(PlusUConst), DW_ExprEnc_ULEB128(4) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, 0, 0, t_machine_op_mem_read, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, 0, 0, t_machine_op_mem_read, 0, &expr_value);
|
||||||
|
|
||||||
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
T_Ok(expr_value.type == DW_ExprValueType_Addr);
|
||||||
T_Ok(expr_value.addr == 0x123 + 4);
|
T_Ok(expr_value.addr == 0x123 + 4);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
T_BeginTest(reg_split_spill)
|
T_BeginTest(reg_split_spill)
|
||||||
@@ -1039,13 +1026,12 @@ T_BeginTest(reg_split_spill)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Reg3), DW_ExprEnc_Op(Piece), DW_ExprEnc_ULEB128(4), DW_ExprEnc_Op(Reg10), DW_ExprEnc_Op(Piece), DW_ExprEnc_ULEB128(2) };
|
DW_ExprEnc expr_encs[] = { DW_ExprEnc_Op(Reg3), DW_ExprEnc_Op(Piece), DW_ExprEnc_ULEB128(4), DW_ExprEnc_Op(Reg10), DW_ExprEnc_Op(Piece), DW_ExprEnc_ULEB128(2) };
|
||||||
String8 expr_data = dw_encode_expr(scratch.arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
String8 expr_data = dw_encode_expr(arena, Arch_x64, DW_Format_64Bit, expr_encs, ArrayCount(expr_encs));
|
||||||
DW_Expr expr = dw_expr_from_data(scratch.arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
DW_Expr expr = dw_expr_from_data(arena, DW_Format_64Bit, byte_size_from_arch(Arch_x64), expr_data);
|
||||||
|
|
||||||
DW_ExprValue expr_value;
|
DW_ExprValue expr_value;
|
||||||
DW_ExprEvalResult expr_eval = dw_eval_expr(scratch.arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
DW_ExprEvalResult expr_eval = dw_eval_expr(arena, Arch_x64, DW_Format_64Bit, 0, 0, 0, max_U64, expr, regs_read_dwarf_x64, ®s, 0, 0, &expr_value);
|
||||||
}
|
}
|
||||||
T_EndTest;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef T_Group
|
#undef T_Group
|
||||||
|
|||||||
+557
-635
File diff suppressed because it is too large
Load Diff
@@ -23,9 +23,9 @@ typedef enum
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|
||||||
#define t_invoke_linker_timeout(c, t) T_Ok(t_invoke(g_linker, c, t))
|
#define t_invoke_linker_timeout(c, t) T_Ok(t_invoke(g_linker, c, t))
|
||||||
#define t_invoke_linker_timeoutf(t, f, ...) t_invoke_linker_timeout(push_str8f(scratch.arena, f, ##__VA_ARGS__), t)
|
#define t_invoke_linker_timeoutf(t, f, ...) t_invoke_linker_timeout(push_str8f(arena, f, ##__VA_ARGS__), t)
|
||||||
#define t_invoke_linker(c) t_invoke_linker_timeout(c, max_U64)
|
#define t_invoke_linker(c) t_invoke_linker_timeout(c, max_U64)
|
||||||
#define t_invoke_linkerf(f, ...) t_invoke_linker(push_str8f(scratch.arena, f, ##__VA_ARGS__))
|
#define t_invoke_linkerf(f, ...) t_invoke_linker(push_str8f(arena, f, ##__VA_ARGS__))
|
||||||
|
|
||||||
internal T_Linker t_id_linker(void);
|
internal T_Linker t_id_linker(void);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user