mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
fix eh_frame dumping
This commit is contained in:
committed by
Ryan Fleury
parent
f0bd30c89b
commit
942c354bd9
+16
-15
@@ -1108,21 +1108,7 @@ rb_thread_entry_point(void *p)
|
||||
{
|
||||
elf = elf_bin_from_data(arena, f->data);
|
||||
arch = arch_from_elf_machine(elf.hdr.e_machine);
|
||||
}
|
||||
if(f->format_flags & RB_FileFormatFlag_HasDWARF)
|
||||
{
|
||||
if(f->format == RB_FileFormat_PE)
|
||||
{
|
||||
String8 raw_sections = str8_substr(f->data, pe.section_table_range);
|
||||
U64 section_count = raw_sections.size / sizeof(COFF_SectionHeader);
|
||||
COFF_SectionHeader *section_table = (COFF_SectionHeader *)raw_sections.str;
|
||||
String8 string_table = str8_substr(f->data, pe.string_table_range);
|
||||
dw = dw_input_from_coff_section_table(arena, f->data, string_table, section_count, section_table);
|
||||
}
|
||||
else if(f->format == RB_FileFormat_ELF32 ||
|
||||
f->format == RB_FileFormat_ELF64)
|
||||
{
|
||||
dw = dw_input_from_elf_bin(arena, f->data, &elf);
|
||||
|
||||
for EachIndex(sect_idx, elf.hdr.e_shnum)
|
||||
{
|
||||
ELF_Shdr64 *shdr = &elf.shdrs.v[sect_idx];
|
||||
@@ -1140,6 +1126,21 @@ rb_thread_entry_point(void *p)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(f->format_flags & RB_FileFormatFlag_HasDWARF)
|
||||
{
|
||||
if(f->format == RB_FileFormat_PE)
|
||||
{
|
||||
String8 raw_sections = str8_substr(f->data, pe.section_table_range);
|
||||
U64 section_count = raw_sections.size / sizeof(COFF_SectionHeader);
|
||||
COFF_SectionHeader *section_table = (COFF_SectionHeader *)raw_sections.str;
|
||||
String8 string_table = str8_substr(f->data, pe.string_table_range);
|
||||
dw = dw_input_from_coff_section_table(arena, f->data, string_table, section_count, section_table);
|
||||
}
|
||||
else if(f->format == RB_FileFormat_ELF32 ||
|
||||
f->format == RB_FileFormat_ELF64)
|
||||
{
|
||||
dw = dw_input_from_elf_bin(arena, f->data, &elf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user