summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-07-11 19:18:02 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-07-11 19:18:02 (GMT)
commit7b2a41d975056cec78f89a6892619cccbfe389d7 (patch)
tree31913765184b31b4d3465c2bb858c7511cd67e4f /src/arch
parentf38beea1951f9c323af3d05a3c4d2cf35f407245 (diff)
Typo.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@172 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/dalvik/operand.c7
-rw-r--r--src/arch/dalvik/register.c4
-rw-r--r--src/arch/x86/registers.c96
3 files changed, 54 insertions, 53 deletions
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c
index 2b64a10..f6f654e 100644
--- a/src/arch/dalvik/operand.c
+++ b/src/arch/dalvik/operand.c
@@ -66,9 +66,9 @@ static void g_dalvik_operand_init(GDalvikOperand *);
/* Définition d'un opérande visant un registre Dalvik (instance) */
struct _GDalvikRegisterOperand
{
- GDalvikOperand parent; /* Instance parente */
+ GDalvikOperand parent; /* Instance parente */
- GDalvikRegister *reg; /* Registre représenté */
+ GDalvikRegister *reg; /* Registre représenté */
};
@@ -76,7 +76,7 @@ struct _GDalvikRegisterOperand
/* Définition d'un opérande visant un registre Dalvik (classe) */
struct _GDalvikRegisterOperandClass
{
- GDalvikOperandClass parent; /* Classe parente */
+ GDalvikOperandClass parent; /* Classe parente */
};
@@ -1404,6 +1404,7 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, const bin_t *dat
* len = taille totale des données à analyser. *
* endian = boutisme lié au binaire accompagnant. *
* model = type d'opérandes attendues. *
+* ... = éventuelles données complémentaires. *
* *
* Description : Procède à la lecture d'opérandes pour une instruction. *
* *
diff --git a/src/arch/dalvik/register.c b/src/arch/dalvik/register.c
index 78b5166..fc7757d 100644
--- a/src/arch/dalvik/register.c
+++ b/src/arch/dalvik/register.c
@@ -31,7 +31,7 @@
-//* Représentation d'un registre Dalvik (instance) */
+/* Représentation d'un registre Dalvik (instance) */
struct _GDalvikRegister
{
GArchOperand parent; /* Instance parente */
@@ -123,7 +123,7 @@ static void g_dalvik_register_init(GDalvikRegister *reg)
GDalvikRegister *g_dalvik_register_new(uint16_t index)
{
- GDalvikRegister *result; /* Structure à retourner */
+ GDalvikRegister *result; /* Structure à retourner */
result = g_object_new(G_TYPE_DALVIK_REGISTER, NULL);
diff --git a/src/arch/x86/registers.c b/src/arch/x86/registers.c
index 18756b3..f3209bb 100644
--- a/src/arch/x86/registers.c
+++ b/src/arch/x86/registers.c
@@ -272,28 +272,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg8)
{
case X86_REG8_AL:
- snprintf(key, 5, "al");
+ snprintf(key, MAX_REGNAME_LEN, "al");
break;
case X86_REG8_CL:
- snprintf(key, 5, "cl");
+ snprintf(key, MAX_REGNAME_LEN, "cl");
break;
case X86_REG8_DL:
- snprintf(key, 5, "dl");
+ snprintf(key, MAX_REGNAME_LEN, "dl");
break;
case X86_REG8_BL:
- snprintf(key, 5, "bl");
+ snprintf(key, MAX_REGNAME_LEN, "bl");
break;
case X86_REG8_AH:
- snprintf(key, 5, "ah");
+ snprintf(key, MAX_REGNAME_LEN, "ah");
break;
case X86_REG8_CH:
- snprintf(key, 5, "ch");
+ snprintf(key, MAX_REGNAME_LEN, "ch");
break;
case X86_REG8_DH:
- snprintf(key, 5, "dh");
+ snprintf(key, MAX_REGNAME_LEN, "dh");
break;
case X86_REG8_BH:
- snprintf(key, 5, "bh");
+ snprintf(key, MAX_REGNAME_LEN, "bh");
break;
case X86_REG8_NONE:
/* Ne devrait jamais arriver */
@@ -306,28 +306,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg16)
{
case X86_REG16_AX:
- snprintf(key, 5, "ax");
+ snprintf(key, MAX_REGNAME_LEN, "ax");
break;
case X86_REG16_CX:
- snprintf(key, 5, "cx");
+ snprintf(key, MAX_REGNAME_LEN, "cx");
break;
case X86_REG16_DX:
- snprintf(key, 5, "dx");
+ snprintf(key, MAX_REGNAME_LEN, "dx");
break;
case X86_REG16_BX:
- snprintf(key, 5, "bx");
+ snprintf(key, MAX_REGNAME_LEN, "bx");
break;
case X86_REG16_SP:
- snprintf(key, 5, "sp");
+ snprintf(key, MAX_REGNAME_LEN, "sp");
break;
case X86_REG16_BP:
- snprintf(key, 5, "bp");
+ snprintf(key, MAX_REGNAME_LEN, "bp");
break;
case X86_REG16_SI:
- snprintf(key, 5, "si");
+ snprintf(key, MAX_REGNAME_LEN, "si");
break;
case X86_REG16_DI:
- snprintf(key, 5, "di");
+ snprintf(key, MAX_REGNAME_LEN, "di");
break;
case X86_REG16_NONE:
/* Ne devrait jamais arriver */
@@ -340,28 +340,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg32)
{
case X86_REG32_EAX:
- snprintf(key, 5, "eax");
+ snprintf(key, MAX_REGNAME_LEN, "eax");
break;
case X86_REG32_ECX:
- snprintf(key, 5, "ecx");
+ snprintf(key, MAX_REGNAME_LEN, "ecx");
break;
case X86_REG32_EDX:
- snprintf(key, 5, "edx");
+ snprintf(key, MAX_REGNAME_LEN, "edx");
break;
case X86_REG32_EBX:
- snprintf(key, 5, "ebx");
+ snprintf(key, MAX_REGNAME_LEN, "ebx");
break;
case X86_REG32_ESP:
- snprintf(key, 5, "esp");
+ snprintf(key, MAX_REGNAME_LEN, "esp");
break;
case X86_REG32_EBP:
- snprintf(key, 5, "ebp");
+ snprintf(key, MAX_REGNAME_LEN, "ebp");
break;
case X86_REG32_ESI:
- snprintf(key, 5, "esi");
+ snprintf(key, MAX_REGNAME_LEN, "esi");
break;
case X86_REG32_EDI:
- snprintf(key, 5, "edi");
+ snprintf(key, MAX_REGNAME_LEN, "edi");
break;
case X86_REG32_NONE:
printf("null reg\n");
@@ -384,28 +384,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg8)
{
case X86_REG8_AL:
- snprintf(key, 5, "%%al");
+ snprintf(key, MAX_REGNAME_LEN, "%%al");
break;
case X86_REG8_CL:
- snprintf(key, 5, "%%cl");
+ snprintf(key, MAX_REGNAME_LEN, "%%cl");
break;
case X86_REG8_DL:
- snprintf(key, 5, "%%dl");
+ snprintf(key, MAX_REGNAME_LEN, "%%dl");
break;
case X86_REG8_BL:
- snprintf(key, 5, "%%bl");
+ snprintf(key, MAX_REGNAME_LEN, "%%bl");
break;
case X86_REG8_AH:
- snprintf(key, 5, "%%ah");
+ snprintf(key, MAX_REGNAME_LEN, "%%ah");
break;
case X86_REG8_CH:
- snprintf(key, 5, "%%ch");
+ snprintf(key, MAX_REGNAME_LEN, "%%ch");
break;
case X86_REG8_DH:
- snprintf(key, 5, "%%dh");
+ snprintf(key, MAX_REGNAME_LEN, "%%dh");
break;
case X86_REG8_BH:
- snprintf(key, 5, "%%bh");
+ snprintf(key, MAX_REGNAME_LEN, "%%bh");
break;
case X86_REG8_NONE:
/* Ne devrait jamais arriver */
@@ -418,28 +418,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg16)
{
case X86_REG16_AX:
- snprintf(key, 5, "%%ax");
+ snprintf(key, MAX_REGNAME_LEN, "%%ax");
break;
case X86_REG16_CX:
- snprintf(key, 5, "%%cx");
+ snprintf(key, MAX_REGNAME_LEN, "%%cx");
break;
case X86_REG16_DX:
- snprintf(key, 5, "%%dx");
+ snprintf(key, MAX_REGNAME_LEN, "%%dx");
break;
case X86_REG16_BX:
- snprintf(key, 5, "%%bx");
+ snprintf(key, MAX_REGNAME_LEN, "%%bx");
break;
case X86_REG16_SP:
- snprintf(key, 5, "%%sp");
+ snprintf(key, MAX_REGNAME_LEN, "%%sp");
break;
case X86_REG16_BP:
- snprintf(key, 5, "%%bp");
+ snprintf(key, MAX_REGNAME_LEN, "%%bp");
break;
case X86_REG16_SI:
- snprintf(key, 5, "%%si");
+ snprintf(key, MAX_REGNAME_LEN, "%%si");
break;
case X86_REG16_DI:
- snprintf(key, 5, "%%di");
+ snprintf(key, MAX_REGNAME_LEN, "%%di");
break;
case X86_REG16_NONE:
/* Ne devrait jamais arriver */
@@ -452,28 +452,28 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->reg.reg32)
{
case X86_REG32_EAX:
- snprintf(key, 5, "%%eax");
+ snprintf(key, MAX_REGNAME_LEN, "%%eax");
break;
case X86_REG32_ECX:
- snprintf(key, 5, "%%ecx");
+ snprintf(key, MAX_REGNAME_LEN, "%%ecx");
break;
case X86_REG32_EDX:
- snprintf(key, 5, "%%edx");
+ snprintf(key, MAX_REGNAME_LEN, "%%edx");
break;
case X86_REG32_EBX:
- snprintf(key, 5, "%%ebx");
+ snprintf(key, MAX_REGNAME_LEN, "%%ebx");
break;
case X86_REG32_ESP:
- snprintf(key, 5, "%%esp");
+ snprintf(key, MAX_REGNAME_LEN, "%%esp");
break;
case X86_REG32_EBP:
- snprintf(key, 5, "%%ebp");
+ snprintf(key, MAX_REGNAME_LEN, "%%ebp");
break;
case X86_REG32_ESI:
- snprintf(key, 5, "%%esi");
+ snprintf(key, MAX_REGNAME_LEN, "%%esi");
break;
case X86_REG32_EDI:
- snprintf(key, 5, "%%edi");
+ snprintf(key, MAX_REGNAME_LEN, "%%edi");
break;
case X86_REG32_NONE:
/* Ne devrait jamais arriver */