Added the address size to architecture descriptions
This commit is contained in:
parent
825007b4fa
commit
e411b708b0
@ -29,15 +29,16 @@ typedef struct _Arch Arch;
|
||||
|
||||
typedef enum _ArchEndian
|
||||
{
|
||||
ARCH_ENDIAN_BIG = 0,
|
||||
ARCH_ENDIAN_LITTLE,
|
||||
ARCH_ENDIAN_BOTH
|
||||
ARCH_ENDIAN_BIG = 0x1,
|
||||
ARCH_ENDIAN_LITTLE = 0x2,
|
||||
ARCH_ENDIAN_BOTH = 0x3
|
||||
} ArchEndian;
|
||||
|
||||
typedef struct _ArchDescription
|
||||
{
|
||||
char const * format; /* default format */
|
||||
char const * format; /* default format plug-in */
|
||||
ArchEndian endian;
|
||||
uint32_t address_size;
|
||||
uint32_t alignment;
|
||||
uint32_t instruction_size; /* 0 if not constant */
|
||||
} ArchDescription;
|
||||
|
@ -46,6 +46,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _amd64_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 64, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _amd64_registers[] =
|
||||
{
|
||||
@ -78,7 +83,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"amd64",
|
||||
NULL,
|
||||
&_amd64_description,
|
||||
_amd64_registers,
|
||||
_amd64_instructions,
|
||||
NULL,
|
||||
|
@ -33,7 +33,10 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _arm_description = { "elf", ARCH_ENDIAN_BIG, 32, 32 };
|
||||
static ArchDescription _arm_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_BOTH, 32, 32, 32
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _arm_registers[] =
|
||||
|
@ -56,7 +56,9 @@ enum
|
||||
/* variables */
|
||||
/* plug-in */
|
||||
static ArchDescription _dalvik_description =
|
||||
{ "dex", ARCH_ENDIAN_LITTLE, 2, 0 };
|
||||
{
|
||||
"dex", ARCH_ENDIAN_LITTLE, 32, 16, 0
|
||||
};
|
||||
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
|
@ -43,6 +43,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _i386_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 32, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _i386_registers[] =
|
||||
{
|
||||
@ -70,7 +75,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"i386",
|
||||
NULL,
|
||||
&_i386_description,
|
||||
_i386_registers,
|
||||
_i386_instructions,
|
||||
NULL,
|
||||
|
@ -44,6 +44,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _i386_real_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 20, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _i386_real_registers[] =
|
||||
{
|
||||
@ -71,7 +76,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"i386_real",
|
||||
NULL,
|
||||
&_i386_real_description,
|
||||
_i386_real_registers,
|
||||
_i386_real_instructions,
|
||||
NULL,
|
||||
|
@ -43,6 +43,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _i486_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 32, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _i486_registers[] =
|
||||
{
|
||||
@ -71,7 +76,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"i486",
|
||||
NULL,
|
||||
&_i486_description,
|
||||
_i486_registers,
|
||||
_i486_instructions,
|
||||
NULL,
|
||||
|
@ -43,6 +43,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _i586_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 32, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _i586_registers[] =
|
||||
{
|
||||
@ -72,7 +77,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"i586",
|
||||
NULL,
|
||||
&_i586_description,
|
||||
_i586_registers,
|
||||
_i586_instructions,
|
||||
NULL,
|
||||
|
@ -44,6 +44,11 @@ enum
|
||||
|
||||
|
||||
/* variables */
|
||||
static ArchDescription _i686_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_LITTLE, 32, 8, 0
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _i686_registers[] =
|
||||
{
|
||||
@ -74,7 +79,7 @@ ArchPlugin arch_plugin =
|
||||
{
|
||||
NULL,
|
||||
"i686",
|
||||
NULL,
|
||||
&_i686_description,
|
||||
_i686_registers,
|
||||
_i686_instructions,
|
||||
NULL,
|
||||
|
@ -25,7 +25,10 @@
|
||||
/* Java */
|
||||
/* private */
|
||||
/* variables */
|
||||
static ArchDescription _java_description = { "java", ARCH_ENDIAN_BIG, 1, 0 };
|
||||
static ArchDescription _java_description =
|
||||
{
|
||||
"java", ARCH_ENDIAN_BIG, 32, 8, 0
|
||||
};
|
||||
|
||||
static ArchRegister _java_registers[] =
|
||||
{
|
||||
|
@ -22,7 +22,10 @@
|
||||
/* mips */
|
||||
/* private */
|
||||
/* variables */
|
||||
static ArchDescription _mips_description = { "elf", ARCH_ENDIAN_BIG, 32, 32 };
|
||||
static ArchDescription _mips_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_BOTH, 32, 32, 32
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _mips_registers[] =
|
||||
|
@ -22,7 +22,10 @@
|
||||
/* sparc */
|
||||
/* private */
|
||||
/* variables */
|
||||
static ArchDescription _sparc_description = { "elf", ARCH_ENDIAN_BIG, 32, 32 };
|
||||
static ArchDescription _sparc_description =
|
||||
{
|
||||
"elf", ARCH_ENDIAN_BIG, 32, 32, 32
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _sparc_registers[] =
|
||||
|
@ -23,7 +23,9 @@
|
||||
/* private */
|
||||
/* variables */
|
||||
static ArchDescription _sparc64_description =
|
||||
{ "elf", ARCH_ENDIAN_BIG, 32, 32 };
|
||||
{
|
||||
"elf", ARCH_ENDIAN_BIG, 64, 32, 32
|
||||
};
|
||||
|
||||
#define REG(name, size, id) { "" # name, size, id },
|
||||
static ArchRegister _sparc64_registers[] =
|
||||
|
Loading…
Reference in New Issue
Block a user