Skip to content

Commit b8a8ec3

Browse files
committed
checkpoint on simplified / stripped down dwarf -> rdi, and dwarf parsing helpers
1 parent 17ec73d commit b8a8ec3

File tree

13 files changed

+1097
-54
lines changed

13 files changed

+1097
-54
lines changed

src/base/base_strings.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,14 +2769,14 @@ str8_serial_push_string(Arena *arena, String8List *srl, String8 str){
27692769
internal U64
27702770
str8_deserial_read(String8 string, U64 off, void *read_dst, U64 read_size, U64 granularity)
27712771
{
2772-
U64 bytes_left = string.size-Min(off, string.size);
2772+
U64 bytes_left = string.size - Min(off, string.size);
27732773
U64 actually_readable_size = Min(bytes_left, read_size);
27742774
U64 legally_readable_size = actually_readable_size - actually_readable_size%granularity;
27752775
if(legally_readable_size > 0)
27762776
{
27772777
MemoryCopy(read_dst, string.str+off, legally_readable_size);
27782778
}
2779-
return legally_readable_size;
2779+
return actually_readable_size;
27802780
}
27812781

27822782
internal U64

src/dwarf/dwarf_inc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "dwarf/dwarf.c"
55
#include "dwarf/dwarf_expr.c"
66
#include "dwarf/dwarf_parse.c"
7+
#include "dwarf/dwarf_parse_2.c"
78
#include "dwarf/dwarf_coff.c"
89
#include "dwarf/dwarf_elf.c"
910
#include "dwarf/dwarf_unwind.c"

src/dwarf/dwarf_inc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "dwarf/dwarf.h"
88
#include "dwarf/dwarf_expr.h"
99
#include "dwarf/dwarf_parse.h"
10+
#include "dwarf/dwarf_parse_2.h"
1011
#include "dwarf/dwarf_coff.h"
1112
#include "dwarf/dwarf_elf.h"
1213
#include "dwarf/dwarf_unwind.h"

src/dwarf/dwarf_parse.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,6 @@ dw_read_tag(Arena *arena,
758758
// fill out node
759759
DW_AttribNode *attrib_n = push_array(arena, DW_AttribNode, 1);
760760
attrib_n->v.info_off = tag_base + attrib_tag_cursor;
761-
attrib_n->v.abbrev_off = attrib_abbrev_off;
762-
attrib_n->v.abbrev_id = attrib_abbrev.id;
763761
attrib_n->v.attrib_kind = attrib_kind;
764762
attrib_n->v.form_kind = form_kind;
765763
attrib_n->v.form = form;

src/dwarf/dwarf_parse.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ typedef struct DW_Attrib DW_Attrib;
115115
struct DW_Attrib
116116
{
117117
U64 info_off;
118-
U64 abbrev_off;
119-
U64 abbrev_id;
120118
DW_AttribKind attrib_kind;
121119
DW_FormKind form_kind;
122120
DW_Form form;

0 commit comments

Comments
 (0)