summaryrefslogtreecommitdiff
path: root/src/format/dwarf/v4/dwarf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/dwarf/v4/dwarf.c')
-rw-r--r--src/format/dwarf/v4/dwarf.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/format/dwarf/v4/dwarf.c b/src/format/dwarf/v4/dwarf.c
index 164d321..52345e8 100644
--- a/src/format/dwarf/v4/dwarf.c
+++ b/src/format/dwarf/v4/dwarf.c
@@ -27,6 +27,9 @@
#include "../dwarf-int.h"
+#include "form.h"
+
+
/* Format de débogage DWARF v4 (instance) */
struct _GDwarfV4Format
@@ -76,12 +79,17 @@ G_DEFINE_TYPE(GDwarfV4Format, g_dwarfv4_format, G_TYPE_DWARF_FORMAT);
static void g_dwarfv4_format_class_init(GDwarfV4FormatClass *klass)
{
GObjectClass *object; /* Autre version de la classe */
+ GDwarfFormatClass *dwarf; /* Version parente de la classe*/
object = G_OBJECT_CLASS(klass);
object->dispose = (GObjectFinalizeFunc/* ! */)g_dwarfv4_format_dispose;
object->finalize = (GObjectFinalizeFunc)g_dwarfv4_format_finalize;
+ dwarf = G_DWARF_FORMAT_CLASS(klass);
+
+ dwarf->read_form = (read_form_value_fc)read_dwarf_v4_form_value;
+
}
@@ -160,11 +168,13 @@ GBinFormat *g_dwarfv4_format_new(GBinContent *content, GExeFormat *parent)
result = g_object_new(G_TYPE_DWARFV4_FORMAT, NULL);
-
-
g_binary_format_set_content(G_BIN_FORMAT(result), content);
-
+ if (!g_dwarf_format_load(G_DWARF_FORMAT(result), parent))
+ {
+ g_object_unref(G_OBJECT(result));
+ result = NULL;
+ }
return G_BIN_FORMAT(result);