mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
raddump constants
This commit is contained in:
@@ -1360,6 +1360,13 @@ rdi_print_thread_variable(Arena *arena, String8List *out, String8 indent, RDI_Pa
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
rdi_print_constant(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Constant *constant)
|
||||||
|
{
|
||||||
|
rd_printf("name ='%S'", str8_from_rdi_string_idx(rdi, constant->name_string_idx));
|
||||||
|
rd_printf("type_idx ='%u'", constant->type_idx);
|
||||||
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
rdi_print_procedure(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Procedure *proc, RDI_Arch arch)
|
rdi_print_procedure(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Procedure *proc, RDI_Arch arch)
|
||||||
{
|
{
|
||||||
@@ -1681,6 +1688,18 @@ rdi_print(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RD_Op
|
|||||||
rd_unindent();
|
rd_unindent();
|
||||||
rd_newline();
|
rd_newline();
|
||||||
}
|
}
|
||||||
|
if (opts & RD_Option_RdiConstants) {
|
||||||
|
U64 constants_count = 0;
|
||||||
|
RDI_Constant *constants_array = rdi_table_from_name(rdi, Constants, &constants_count);
|
||||||
|
rd_printf("# CONSTANTS");
|
||||||
|
rd_indent();
|
||||||
|
for (U64 i = 0; i < constants_count; ++i) {
|
||||||
|
rd_printf("constant[%llu]:", i);
|
||||||
|
rdi_print_constant(arena, out, indent, rdi, &constants_array[i]);
|
||||||
|
}
|
||||||
|
rd_unindent();
|
||||||
|
rd_newline();
|
||||||
|
}
|
||||||
if (opts & RD_Option_RdiProcedures) {
|
if (opts & RD_Option_RdiProcedures) {
|
||||||
U64 proc_count = 0;
|
U64 proc_count = 0;
|
||||||
RDI_Procedure *proc_array = rdi_table_from_name(rdi, Procedures, &proc_count);
|
RDI_Procedure *proc_array = rdi_table_from_name(rdi, Procedures, &proc_count);
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ typedef U64 RD_Option;
|
|||||||
#define RD_Option_RdiGlobalVars (1ull << 44ull)
|
#define RD_Option_RdiGlobalVars (1ull << 44ull)
|
||||||
#define RD_Option_RdiGlobalVarsVMap (1ull << 45ull)
|
#define RD_Option_RdiGlobalVarsVMap (1ull << 45ull)
|
||||||
#define RD_Option_RdiThreadVars (1ull << 46ull)
|
#define RD_Option_RdiThreadVars (1ull << 46ull)
|
||||||
|
#define RD_Option_RdiConstants (1ull << 47ull)
|
||||||
#define RD_Option_RdiProcedures (1ull << 48ull)
|
#define RD_Option_RdiProcedures (1ull << 48ull)
|
||||||
#define RD_Option_RdiScopes (1ull << 49ull)
|
#define RD_Option_RdiScopes (1ull << 49ull)
|
||||||
#define RD_Option_RdiScopeVMap (1ull << 50ull)
|
#define RD_Option_RdiScopeVMap (1ull << 50ull)
|
||||||
@@ -100,6 +101,7 @@ typedef U64 RD_Option;
|
|||||||
RD_Option_RdiGlobalVars | \
|
RD_Option_RdiGlobalVars | \
|
||||||
RD_Option_RdiGlobalVarsVMap | \
|
RD_Option_RdiGlobalVarsVMap | \
|
||||||
RD_Option_RdiThreadVars | \
|
RD_Option_RdiThreadVars | \
|
||||||
|
RD_Option_RdiConstants | \
|
||||||
RD_Option_RdiProcedures | \
|
RD_Option_RdiProcedures | \
|
||||||
RD_Option_RdiScopes | \
|
RD_Option_RdiScopes | \
|
||||||
RD_Option_RdiScopeVMap | \
|
RD_Option_RdiScopeVMap | \
|
||||||
@@ -211,6 +213,7 @@ internal void rdi_print_type_node (Arena *arena, String8List *out, String8
|
|||||||
internal void rdi_print_udt (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_UDT *udt);
|
internal void rdi_print_udt (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_UDT *udt);
|
||||||
internal void rdi_print_global_variable(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_GlobalVariable *gvar);
|
internal void rdi_print_global_variable(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_GlobalVariable *gvar);
|
||||||
internal void rdi_print_thread_variable(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_ThreadVariable *tvar);
|
internal void rdi_print_thread_variable(Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_ThreadVariable *tvar);
|
||||||
|
internal void rdi_print_constant (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Constant *constant);
|
||||||
internal void rdi_print_procedure (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Procedure *proc, RDI_Arch arch);
|
internal void rdi_print_procedure (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Procedure *proc, RDI_Arch arch);
|
||||||
internal void rdi_print_scope (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Scope *scope, RDI_Arch arch);
|
internal void rdi_print_scope (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, RDI_Scope *scope, RDI_Arch arch);
|
||||||
internal void rdi_print_inline_site (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, U64 idx, RDI_InlineSite *inline_site);
|
internal void rdi_print_inline_site (Arena *arena, String8List *out, String8 indent, RDI_Parsed *rdi, U64 idx, RDI_InlineSite *inline_site);
|
||||||
|
|||||||
Reference in New Issue
Block a user