diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2011-12-27 16:49:18 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2011-12-27 16:49:18 (GMT) |
commit | ce12c2bb85d26b0f6de5ba42ff53e2ff6788f4e4 (patch) | |
tree | 216c4c4db2b92c05f29143b9c28fc9d8fb6151e2 /src/arch/dalvik/operands | |
parent | 8a12f3685fab7c975c307bbc7dc5e721616be6a3 (diff) |
Added support for more Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@220 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/operands')
-rw-r--r-- | src/arch/dalvik/operands/register.c | 26 | ||||
-rw-r--r-- | src/arch/dalvik/operands/register.h | 4 |
2 files changed, 29 insertions, 1 deletions
diff --git a/src/arch/dalvik/operands/register.c b/src/arch/dalvik/operands/register.c index 22c210e..b2b8db9 100644 --- a/src/arch/dalvik/operands/register.c +++ b/src/arch/dalvik/operands/register.c @@ -24,7 +24,6 @@ #include "register.h" -#include "../register.h" #include "../../operand-int.h" @@ -173,6 +172,31 @@ GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t /****************************************************************************** * * +* Paramètres : reg = registre déjà en place. * +* * +* Description : Crée un opérande visant un registre Dalvik. * +* * +* Retour : Opérande mis en place. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GArchOperand *g_dalvik_register_operand_new_from_existing(GDalvikRegister *reg) +{ + GDalvikRegisterOperand *result; /* Structure à retourner */ + + result = g_object_new(G_TYPE_DALVIK_REGISTER_OPERAND, NULL); + + result->reg = reg; + + return G_ARCH_OPERAND(result); + +} + + +/****************************************************************************** +* * * Paramètres : a = premier opérande à consulter. * * b = second opérande à consulter. * * * diff --git a/src/arch/dalvik/operands/register.h b/src/arch/dalvik/operands/register.h index 00b05fb..c3510b1 100644 --- a/src/arch/dalvik/operands/register.h +++ b/src/arch/dalvik/operands/register.h @@ -28,6 +28,7 @@ #include <glib-object.h> +#include "../register.h" #include "../../operand.h" #include "../../../common/endianness.h" @@ -54,6 +55,9 @@ GType g_dalvik_register_operand_get_type(void); /* Crée un opérande visant un registre Dalvik. */ GArchOperand *g_dalvik_register_operand_new(const bin_t *, off_t *, off_t, bool *, MemoryDataSize, SourceEndian); +/* Crée un opérande visant un registre Dalvik. */ +GArchOperand *g_dalvik_register_operand_new_from_existing(GDalvikRegister *); + #endif /* _ARCH_DALVIK_OPERANDS_REGISTER_H */ |