mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-27 16:22:18 -08:00
add API to DWARF writer that defines forward references and fix method
conversion in the converter
This commit is contained in:
1 parent
b49c902947
commit
8007c158fa
5 files changed
+65
-26
No files matched your search
@@ -327,9 +327,30 @@ dw_make_abbrev_entry(Arena *arena, DW_WriterTag *tag)
|
||||
|
||||
internal DW_WriterTag *
|
||||
dw_writer_tag_begin(DW_Writer *writer, DW_TagKind kind)
|
||||
{
|
||||
DW_WriterTag *tag = dw_writer_tag_reserve(writer, kind);
|
||||
dw_writer_tag_begin_reserved(writer, tag);
|
||||
return tag;
|
||||
}
|
||||
|
||||
internal void
|
||||
dw_writer_tag_end(DW_Writer *writer)
|
||||
{
|
||||
// pop to parent
|
||||
writer->current = writer->current->parent;
|
||||
}
|
||||
|
||||
internal DW_WriterTag *
|
||||
dw_writer_tag_reserve(DW_Writer *writer, DW_TagKind kind)
|
||||
{
|
||||
DW_WriterTag *tag = dw_writer_tag_chunk_list_push(writer->arena, &writer->tag_chunk_list, 512);
|
||||
tag->kind = kind;
|
||||
return tag;
|
||||
}
|
||||
|
||||
internal void
|
||||
dw_writer_tag_begin_reserved(DW_Writer *writer, DW_WriterTag *tag)
|
||||
{
|
||||
tag->parent = writer->current;
|
||||
|
||||
// add tag to the tree
|
||||
@@ -339,15 +360,6 @@ dw_writer_tag_begin(DW_Writer *writer, DW_TagKind kind)
|
||||
writer->root = tag;
|
||||
}
|
||||
writer->current = tag;
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
internal void
|
||||
dw_writer_tag_end(DW_Writer *writer)
|
||||
{
|
||||
// pop to parent
|
||||
writer->current = writer->current->parent;
|
||||
}
|
||||
|
||||
internal DW_WriterAttrib *
|
||||
|
||||
@@ -259,8 +259,10 @@ internal U64 dw_serial_push_form(Arena *arena, String8List *srl, DW_Version vers
|
||||
////////////////////////////////
|
||||
// Info
|
||||
|
||||
internal DW_WriterTag * dw_writer_tag_begin(DW_Writer *writer, DW_TagKind kind);
|
||||
internal void dw_writer_tag_end (DW_Writer *writer);
|
||||
internal DW_WriterTag * dw_writer_tag_reserve (DW_Writer *writer, DW_TagKind kind);
|
||||
internal DW_WriterTag * dw_writer_tag_begin (DW_Writer *writer, DW_TagKind kind);
|
||||
internal void dw_writer_tag_begin_reserved(DW_Writer *writer, DW_WriterTag *tag);
|
||||
internal void dw_writer_tag_end (DW_Writer *writer);
|
||||
|
||||
internal DW_WriterAttrib * dw_writer_push_attrib (DW_Writer *writer, DW_AttribKind kind, DW_WriterForm form );
|
||||
internal DW_WriterAttrib * dw_writer_push_attrib_address (DW_Writer *writer, DW_AttribKind kind, U64 address );
|
||||
|
||||
Reference in new issue
Block a user