summaryrefslogtreecommitdiff
path: root/src/format/dwarf/dwarf-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-03-14 22:18:27 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-03-14 22:18:27 (GMT)
commitfab9d7cd46922abea7d94f36dcd4630cdf3f4719 (patch)
treead41bb921db17631104a069e4df64fb4fc5ccfc1 /src/format/dwarf/dwarf-int.h
parent8d8e5c02096f59a7227308a591fc5050ea5d92ff (diff)
Improved the basic support of Dwarf information.
Diffstat (limited to 'src/format/dwarf/dwarf-int.h')
-rw-r--r--src/format/dwarf/dwarf-int.h56
1 files changed, 32 insertions, 24 deletions
diff --git a/src/format/dwarf/dwarf-int.h b/src/format/dwarf/dwarf-int.h
index d3bf14a..c91609e 100644
--- a/src/format/dwarf/dwarf-int.h
+++ b/src/format/dwarf/dwarf-int.h
@@ -35,12 +35,21 @@
#include "../debuggable-int.h"
+#include "abbrev.h"
+#include "die.h"
#include "dwarf_def.h"
+/* Procède à la lecture d'un attribut d'abréviation DWARF. */
+bool read_dwarf_abbrev_attr(const GDwarfFormat *, vmpa2t *, dw_abbrev_raw_attr *);
+
+/* Procède à la lecture d'une déclaration d'abréviation DWARF. */
+bool read_dwarf_abbrev_decl(const GDwarfFormat *, vmpa2t *, dw_abbrev_decl *);
+
+
/* En-tête présente dans certaines sections */
@@ -65,19 +74,38 @@ bool read_dwarf_section_header(GBinContent *, vmpa2t *, SourceEndian, dw_section
+/* Procède à la lecture de l'en-tête d'une unité de compilation. */
+bool read_dwarf_compil_unit_header(GBinContent *, vmpa2t *, SourceEndian, dw_compil_unit_header *);
+
+
+
+///---------------------
+
+//-------------------------------
+/* Lit la valeur correspondant à un type donné. */
+typedef bool (* read_form_value_fc) (const GDwarfFormat *, const dw_compil_unit_header *, DwarfForm, vmpa2t *, dw_form_value *);
+
+
/* Format de débogage DWARF (instance) */
struct _GDwarfFormat
{
GDbgFormat parent; /* A laisser en premier */
+ dw_abbrev *abbreviations; /* Racine des abbréviations */
+
+
+ dw_die *info_die;
+
+
+
};
/* Format de débogage DWARF (classe) */
@@ -85,13 +113,16 @@ struct _GDwarfFormatClass
{
GDbgFormatClass parent; /* A laisser en premier */
-};
+ read_form_value_fc read_form; /* lecture de valeurs formatées*/
+};
+/* Charge de façon générique toutes les informations DWARF. */
+bool g_dwarf_format_load(GDwarfFormat *, GExeFormat *);
@@ -119,29 +150,6 @@ typedef enum _DwarfFormat
-/* Description d'un attribut d'une abréviation */
-typedef struct _dw_abbrev_attr
-{
- DwarfAttrib attrib; /* Sujet de l'élément */
- DwarfForm form; /* Représentation */
-
-} dw_abbrev_attr;
-
-
-/* Description d'une abréviation */
-typedef struct _dw_abbrev
-{
- off_t offset; /* Position dans le corps */
- DwarfTag tag; /* Sujet de l'élément */
-
- dw_abbrev_attr *attribs; /* Liste des attributs */
- size_t attribs_count; /* Nombre de ces attributs */
-
- struct _dw_abbrev **children; /* Liste des sous-éléments */
- size_t children_count; /* Nombre de ces enfants */
-
-} dw_abbrev;
-
/* Eléments récupérés sur une fonction */
typedef struct _dw_dbg_function