raddbgi_ -> rdi_

This commit is contained in:
Ryan Fleury
2024-02-13 15:52:53 -08:00
parent 30d2dea951
commit b9f010dff6
38 changed files with 3214 additions and 3201 deletions
+12 -12
View File
@@ -6,10 +6,10 @@
#include <windows.h>
#include <stdint.h>
#include "raddbgi_format/raddbgi_format.h"
#include "raddbgi_format/raddbgi_format_parse.h"
#include "raddbgi_format/raddbgi_format.c"
#include "raddbgi_format/raddbgi_format_parse.c"
#include "rdi_format/rdi_format.h"
#include "rdi_format/rdi_format_parse.h"
#include "rdi_format/rdi_format.c"
#include "rdi_format/rdi_format_parse.c"
int main(int argument_count, char **arguments)
{
@@ -22,16 +22,16 @@ int main(int argument_count, char **arguments)
uint8_t *data = (uint8_t *)MapViewOfFile(map, FILE_MAP_READ, 0, 0, data_size);
// parse raw data as raddbg
RADDBGI_Parsed rdbg = {0};
RADDBGI_ParseStatus parse_status = raddbgi_parse(data, data_size, &rdbg);
RDI_Parsed rdbg = {0};
RDI_ParseStatus parse_status = rdi_parse(data, data_size, &rdbg);
// usage example: print out all procedure symbol names
#if 1
for(uint64_t procedure_idx = 0; procedure_idx < rdbg.procedure_count; procedure_idx += 1)
{
RADDBGI_Procedure *procedure = &rdbg.procedures[procedure_idx];
RDI_Procedure *procedure = &rdbg.procedures[procedure_idx];
uint64_t name_size = 0;
uint8_t *name = raddbgi_string_from_idx(&rdbg, procedure->name_string_idx, &name_size);
uint8_t *name = rdi_string_from_idx(&rdbg, procedure->name_string_idx, &name_size);
printf("[%I64u] %.*s\n", procedure_idx, (int)name_size, name);
}
#endif
@@ -40,15 +40,15 @@ int main(int argument_count, char **arguments)
#if 0
for(uint64_t udt_idx = 0; udt_idx < rdbg.udt_count; udt_idx += 1)
{
RADDBGI_UDT *udt = &rdbg.udts[udt_idx];
RADDBGI_TypeNode *type = &rdbg.type_nodes[udt->self_type_idx];
RDI_UDT *udt = &rdbg.udts[udt_idx];
RDI_TypeNode *type = &rdbg.type_nodes[udt->self_type_idx];
uint64_t name_size = 0;
uint8_t *name = raddbgi_string_from_idx(&rdbg, type->user_defined.name_string_idx, &name_size);
uint8_t *name = rdi_string_from_idx(&rdbg, type->user_defined.name_string_idx, &name_size);
printf("[%I64u] %.*s\n", udt_idx, (int)name_size, name);
}
#endif
// for getting more info, look at the `RADDBGI_Parsed` structure. all data is
// for getting more info, look at the `RDI_Parsed` structure. all data is
// represented as a bunch of flat plain-old-data tables. data which must
// reference other data uses indices into that other data's table. for
// example, given a `type_idx`, I will index into `rdbg.type_nodes`. given a