mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-08 00:45:41 +00:00
dumper for SHT_NOTE
This commit is contained in:
committed by
Ryan Fleury
parent
8bc1e4b21c
commit
b596a6ed8a
+19
-11
@@ -1039,8 +1039,9 @@ rb_thread_entry_point(void *p)
|
||||
|
||||
//- rjf: unpack dump subset flags
|
||||
RDI_DumpSubsetFlags rdi_dump_subset_flags = RDI_DumpSubsetFlag_All;
|
||||
DW_DumpSubsetFlags dw_dump_subset_flags = DW_DumpSubsetFlag_All;
|
||||
EH_DumpSubsetFlags eh_dump_subset_flags = EH_DumpSubsetFlag_All;
|
||||
DW_DumpSubsetFlags dw_dump_subset_flags = DW_DumpSubsetFlag_All;
|
||||
EH_DumpSubsetFlags eh_dump_subset_flags = EH_DumpSubsetFlag_All;
|
||||
ELF_DumpSubsetFlags elf_dump_subset_flags = ELF_DumpSubsetFlag_All;
|
||||
{
|
||||
String8List only_names = cmd_line_strings(cmdline, str8_lit("only"));
|
||||
if(only_names.node_count != 0)
|
||||
@@ -1060,6 +1061,9 @@ rb_thread_entry_point(void *p)
|
||||
#undef X
|
||||
#define X(name, name_lower, title) else if(str8_match(n->string, str8_lit(#name_lower), 0)) { eh_dump_subset_flags |= EH_DumpSubsetFlag_##name; }
|
||||
EH_DumpSubset_XList
|
||||
#undef X
|
||||
#define X(name, name_lower, title) else if(str8_match(n->string, str8_lit(#name_lower), 0)) { elf_dump_subset_flags |= ELF_DumpSubsetFlag_##name; }
|
||||
ELF_DumpSubset_XList
|
||||
#undef X
|
||||
}
|
||||
String8List omit_names = cmd_line_strings(cmdline, str8_lit("omit"));
|
||||
@@ -1074,6 +1078,9 @@ rb_thread_entry_point(void *p)
|
||||
#undef X
|
||||
#define X(name, name_lower, title) else if(str8_match(n->string, str8_lit(#name_lower), 0)) { eh_dump_subset_flags &= ~EH_DumpSubsetFlag_##name; }
|
||||
EH_DumpSubset_XList
|
||||
#undef X
|
||||
#define X(name, name_lower, title) else if(str8_match(n->string, str8_lit(#name_lower), 0)) { elf_dump_subset_flags &= ~ELF_DumpSubsetFlag_##name; }
|
||||
ELF_DumpSubset_XList
|
||||
#undef X
|
||||
}
|
||||
}
|
||||
@@ -1089,14 +1096,14 @@ rb_thread_entry_point(void *p)
|
||||
lane_sync();
|
||||
|
||||
//- rjf: unpack file parses
|
||||
Arch arch = Arch_Null;
|
||||
PE_BinInfo pe = {0};
|
||||
ELF_Bin elf = {0};
|
||||
DW_Input dw = {0};
|
||||
U64 eh_frame_hdr_vaddr = 0;
|
||||
U64 eh_frame_vaddr = 0;
|
||||
String8 eh_frame_hdr = {0};
|
||||
String8 eh_frame = {0};
|
||||
Arch arch = Arch_Null;
|
||||
PE_BinInfo pe = {0};
|
||||
ELF_Bin elf = {0};
|
||||
DW_Input dw = {0};
|
||||
U64 eh_frame_hdr_vaddr = 0;
|
||||
U64 eh_frame_vaddr = 0;
|
||||
String8 eh_frame_hdr = {0};
|
||||
String8 eh_frame = {0};
|
||||
{
|
||||
if(f->format == RB_FileFormat_PE)
|
||||
{
|
||||
@@ -1184,7 +1191,8 @@ rb_thread_entry_point(void *p)
|
||||
case RB_FileFormat_ELF32:
|
||||
case RB_FileFormat_ELF64:
|
||||
{
|
||||
// TODO(rjf)
|
||||
String8List elf_strings = elf_dump(arena, f->data, elf_dump_subset_flags);
|
||||
str8_list_concat_in_place(&output_blobs, &elf_strings);
|
||||
}break;
|
||||
|
||||
//- rjf: RDI file
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include "coff/coff_inc.h"
|
||||
#include "pe/pe.h"
|
||||
#include "elf/elf.h"
|
||||
#include "gnu/gnu.h"
|
||||
#include "elf/elf_parse.h"
|
||||
#include "elf/elf_dump.h"
|
||||
#include "codeview/codeview.h"
|
||||
#include "codeview/codeview_parse.h"
|
||||
#include "dwarf/dwarf_inc.h"
|
||||
@@ -43,7 +45,9 @@
|
||||
#include "coff/coff_inc.c"
|
||||
#include "pe/pe.c"
|
||||
#include "elf/elf.c"
|
||||
#include "gnu/gnu.c"
|
||||
#include "elf/elf_parse.c"
|
||||
#include "elf/elf_dump.c"
|
||||
#include "codeview/codeview.c"
|
||||
#include "codeview/codeview_parse.c"
|
||||
#include "dwarf/dwarf_inc.c"
|
||||
|
||||
Reference in New Issue
Block a user