summaryrefslogtreecommitdiff
path: root/src/arch/operands/target-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operands/target-int.h')
-rw-r--r--src/arch/operands/target-int.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/arch/operands/target-int.h b/src/arch/operands/target-int.h
index f3ed447..ac4cdcd 100644
--- a/src/arch/operands/target-int.h
+++ b/src/arch/operands/target-int.h
@@ -30,15 +30,22 @@
+/* Informations glissées dans la structure GObject de GArchOperand */
+typedef struct _tarop_extra_data_t
+{
+ operand_extra_data_t parent; /* A laisser en premier */
+
+ MemoryDataSize size; /* Taille de l'opérande */
+
+} tarop_extra_data_t;
+
/* Définition d'un opérande ciblant idéalement un symbole connu (instance) */
struct _GTargetOperand
{
GArchOperand parent; /* Instance parente */
- MemoryDataSize size; /* Taille de l'opérande */
vmpa2t addr; /* Adresse de l'élément visé */
- bool strict; /* Résolution stricte */
/* Référence circulaire */
GBinSymbol *symbol; /* Eventuel symbole associé */
phys_t diff; /* Position dans le symbole */
@@ -54,5 +61,20 @@ struct _GTargetOperandClass
};
+/**
+ * Accès aux informations éventuellement déportées.
+ */
+
+#if __SIZEOF_INT__ == __SIZEOF_LONG__
+
+# define GET_TARGET_OP_EXTRA(op) (tarop_extra_data_t *)&op->extra
+
+#else
+
+# define GET_TARGET_OP_EXTRA(op) GET_GOBJECT_EXTRA(G_OBJECT(op), tarop_extra_data_t)
+
+#endif
+
+
#endif /* _ARCH_OPERANDS_TARGET_INT_H */