r_asm
- Remove some warnings from r_asm - Redefine parameters in several functions
This commit is contained in:
parent
eaac73b314
commit
499adab6f1
6 changed files with 13 additions and 12 deletions
|
|
@ -11,7 +11,7 @@
|
|||
static struct r_asm_handle_t *asm_static_plugins[] =
|
||||
{ R_ASM_STATIC_PLUGINS };
|
||||
|
||||
static int r_asm_pseudo_string(struct r_asm_aop_t *aop, const char *input)
|
||||
static int r_asm_pseudo_string(struct r_asm_aop_t *aop, char *input)
|
||||
{
|
||||
int len = 0;
|
||||
char *arg = strchr(input, ' ');
|
||||
|
|
@ -23,7 +23,7 @@ static int r_asm_pseudo_string(struct r_asm_aop_t *aop, const char *input)
|
|||
return len;
|
||||
}
|
||||
|
||||
static int r_asm_pseudo_arch(struct r_asm_t *a, const char *input)
|
||||
static int r_asm_pseudo_arch(struct r_asm_t *a, char *input)
|
||||
{
|
||||
char *arg = strchr(input, ' '), str[R_ASM_BUFSIZE];
|
||||
if (arg) {
|
||||
|
|
@ -36,7 +36,7 @@ static int r_asm_pseudo_arch(struct r_asm_t *a, const char *input)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int r_asm_pseudo_bits(struct r_asm_t *a, const char *input)
|
||||
static int r_asm_pseudo_bits(struct r_asm_t *a, char *input)
|
||||
{
|
||||
char *arg = strchr(input, ' ');
|
||||
if (arg)
|
||||
|
|
@ -47,7 +47,7 @@ static int r_asm_pseudo_bits(struct r_asm_t *a, const char *input)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int r_asm_pseudo_org(struct r_asm_t *a, const char *input)
|
||||
static int r_asm_pseudo_org(struct r_asm_t *a, char *input)
|
||||
{
|
||||
char *arg = strchr(input, ' ');
|
||||
if (arg)
|
||||
|
|
@ -55,7 +55,7 @@ static int r_asm_pseudo_org(struct r_asm_t *a, const char *input)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int r_asm_pseudo_byte(struct r_asm_aop_t *aop, const char *input)
|
||||
static int r_asm_pseudo_byte(struct r_asm_aop_t *aop, char *input)
|
||||
{
|
||||
int len = 0;
|
||||
char *arg = strchr(input, ' ');
|
||||
|
|
@ -202,7 +202,7 @@ R_API int r_asm_disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf,
|
|||
return ret;
|
||||
}
|
||||
|
||||
R_API int r_asm_assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
||||
R_API int r_asm_assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
struct list_head *pos;
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf)
|
|||
|
||||
struct r_asm_handle_t r_asm_plugin_java = {
|
||||
.name = "asm_java",
|
||||
.desc = "java disassembly plugin",
|
||||
.arch = "java",
|
||||
.bits = (int[]){ 8, 0 },
|
||||
.desc = "java disassembly plugin",
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf)
|
|||
|
||||
struct r_asm_handle_t r_asm_plugin_psosvm = {
|
||||
.name = "asm_psosvm",
|
||||
.desc = "PSOS-VM disassembly plugin",
|
||||
.arch = "psosvm",
|
||||
.bits = (int[]){ 8, 16, 0 },
|
||||
.desc = "PSOS-VM disassembly plugin",
|
||||
.init = NULL,
|
||||
.fini = NULL,
|
||||
.disassemble = &disassemble,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf, u64
|
|||
}
|
||||
#endif
|
||||
|
||||
static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
||||
static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf)
|
||||
{
|
||||
int len = 0;
|
||||
char cmd[R_ASM_BUFSIZE];
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf, u64
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
||||
static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf)
|
||||
{
|
||||
static t_asmmodel asm_obj;
|
||||
int attempt, constsize, oattempt = 0, oconstsize = 0, ret = 0, oret = 0xCAFE;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct r_asm_handle_t {
|
|||
int (*init)(void *user);
|
||||
int (*fini)(void *user);
|
||||
int (*disassemble)(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf, u64 len);
|
||||
int (*assemble)(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf);
|
||||
int (*assemble)(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf);
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ R_API int r_asm_set_big_endian(struct r_asm_t *a, int boolean);
|
|||
R_API int r_asm_set_syntax(struct r_asm_t *a, int syntax);
|
||||
R_API int r_asm_set_pc(struct r_asm_t *a, u64 pc);
|
||||
R_API int r_asm_disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf, u64 len);
|
||||
R_API int r_asm_assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf);
|
||||
R_API int r_asm_assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf);
|
||||
R_API int r_asm_massemble(struct r_asm_t *a, struct r_asm_aop_t *aop, char *buf);
|
||||
|
||||
/* plugin pointers */
|
||||
|
|
@ -75,5 +75,6 @@ extern struct r_asm_handle_t r_asm_plugin_csr;
|
|||
extern struct r_asm_handle_t r_asm_plugin_m68k;
|
||||
extern struct r_asm_handle_t r_asm_plugin_ppc;
|
||||
extern struct r_asm_handle_t r_asm_plugin_sparc;
|
||||
extern struct r_asm_handle_t r_asm_plugin_psosvm;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue