major clean-up pass over unwinding/module-info abstraction, + usage in the debug engine. simplified / cleaned up DWARF helpers for unwind info & expressions. decoupling unwinding / DWARF evaluation from memory read callbacks. light module info now prepared by demon layer - debug engine no longer duplicates per-backend parsing. unwind abstraction layer now does thin abstraction over unwinding backends, debug engine only calls abstraction. clean up demon to have fewer ad-hoc 'queries' on handles, and prefer sending info over debug events when possible / when it fits the usage pattern. move DWARF enum specifications to metacode, generate enums/xlists/tables/etc. decouple raddbg/radbin completely from old parsing helpers. replace portion of DWARF dumping; pull out some new parsing helpers from converter / dumper.

This commit is contained in:
Ryan Fleury
2026-06-02 12:11:13 -07:00
parent 541d3afefa
commit d73ce364b9
88 changed files with 9899 additions and 4723 deletions
+7 -4
View File
@@ -824,7 +824,7 @@ rb_thread_entry_point(void *p)
ELF_Bin bin = elf_bin_from_data(scratch.arena, dbg_data);
convert_params.arch = arch_from_elf_machine(bin.hdr.e_machine);
convert_params.base_vaddr = elf_base_addr_from_bin(&bin);
convert_params.raw = dw_input_from_elf_bin(scratch.arena, dbg_data, &bin);
convert_params.raw = dw_raw_from_elf_bin(scratch.arena, dbg_data, &bin);
convert_params.path_style = PathStyle_UnixAbsolute;
convert_params.binary_sections = e2r_rdi_binary_sections_from_elf_section_table(arena, dbg_data, &bin, &bin.shdrs);
scratch_end(scratch);
@@ -1442,7 +1442,7 @@ rb_thread_entry_point(void *p)
else if(f->format == RB_FileFormat_ELF32 ||
f->format == RB_FileFormat_ELF64)
{
dw = dw_input_from_elf_bin(arena, f->data, &elf);
dw = dw_raw_from_elf_bin(arena, f->data, &elf);
}
}
}
@@ -1526,8 +1526,11 @@ rb_thread_entry_point(void *p)
{
if(lane_idx() == 0)
{
str8_list_pushf(arena, &output_blobs, "// %S (%S) (DWARF)\n\n", deterministic ? str8_skip_last_slash(f->path) : f->path, f->format ? rb_file_format_display_name_table[f->format] : str8_lit("Unsupported format"));
String8List dump = dw_dump_list_from_sections(arena, &dw, arch, dw_dump_subset_flags, verbose);
str8_list_pushf(arena, &output_blobs, "\n// %S (%S) (DWARF)\n\n", deterministic ? str8_skip_last_slash(f->path) : f->path, f->format ? rb_file_format_display_name_table[f->format] : str8_lit("Unsupported format"));
}
String8List dump = dw_dump_list_from_raw(arena, &dw, arch, dw_dump_subset_flags);
if(lane_idx() == 0)
{
str8_list_concat_in_place(&output_blobs, &dump);
}
lane_sync();
+14 -2
View File
@@ -25,7 +25,13 @@
#include "elf/elf_dump.h"
#include "codeview/codeview.h"
#include "codeview/codeview_parse.h"
#include "dwarf/dwarf_inc.h"
#include "dwarf/dwarf.h"
#include "dwarf/dwarf_parse_2.h"
#include "dwarf/dwarf_parse_coff.h"
#include "dwarf/dwarf_parse_elf.h"
#include "dwarf/dwarf_dump_2.h"
#include "eh_frame/eh_frame.h"
#include "eh_frame/eh_frame_dump.h"
#include "msf/msf.h"
#include "msf/msf_parse.h"
#include "pdb/pdb.h"
@@ -53,7 +59,13 @@
#include "elf/elf_dump.c"
#include "codeview/codeview.c"
#include "codeview/codeview_parse.c"
#include "dwarf/dwarf_inc.c"
#include "dwarf/dwarf.c"
#include "dwarf/dwarf_parse_2.c"
#include "dwarf/dwarf_parse_coff.c"
#include "dwarf/dwarf_parse_elf.c"
#include "dwarf/dwarf_dump_2.c"
#include "eh_frame/eh_frame.c"
#include "eh_frame/eh_frame_dump.c"
#include "msf/msf.c"
#include "msf/msf_parse.c"
#include "pdb/pdb.c"