mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-23 14:28:07 +00:00
Fix asm.arch=?asf issue, implement asm.syntax=?
This commit is contained in:
parent
77b2e5fcc2
commit
774ccc71a0
@ -156,7 +156,7 @@ static int cb_asmarch(void *user, void *data) {
|
||||
RConfigNode *node = (RConfigNode *) data;
|
||||
const char *asmos = core->config? r_config_get (core->config, "asm.os"): NULL;
|
||||
|
||||
if (!strcmp (node->value, "?")) {
|
||||
if (*node->value=='?') {
|
||||
rasm2_list (core->assembler, NULL);
|
||||
return 0;
|
||||
}
|
||||
@ -223,7 +223,7 @@ static int cb_asmbits(void *user, void *data) {
|
||||
static int cb_asmcpu(void *user, void *data) {
|
||||
RCore *core = (RCore *) user;
|
||||
RConfigNode *node = (RConfigNode *) data;
|
||||
if (!strcmp (node->value, "?")) {
|
||||
if (*node->value=='?') {
|
||||
rasm2_list (core->assembler,
|
||||
r_config_get (core->config, "asm.arch"));
|
||||
return 0;
|
||||
@ -271,11 +271,14 @@ static int cb_asmprofile(void *user, void *data) {
|
||||
static int cb_asmsyntax(void *user, void *data) {
|
||||
RCore *core = (RCore*) user;
|
||||
RConfigNode *node = (RConfigNode*) data;
|
||||
if (!strcmp (node->value, "intel"))
|
||||
if (*node->value == '?') {
|
||||
r_cons_printf ("att\nintel\n");
|
||||
return R_FALSE;
|
||||
} else if (!strcmp (node->value, "intel")) {
|
||||
r_asm_set_syntax (core->assembler, R_ASM_SYNTAX_INTEL);
|
||||
else if (!strcmp (node->value, "att"))
|
||||
} else if (!strcmp (node->value, "att")) {
|
||||
r_asm_set_syntax (core->assembler, R_ASM_SYNTAX_ATT);
|
||||
else return R_FALSE;
|
||||
} else return R_FALSE;
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
@ -386,7 +389,7 @@ static int cb_fsview(void *user, void *data) {
|
||||
int type = R_FS_VIEW_NORMAL;
|
||||
RCore *core = (RCore *) user;
|
||||
RConfigNode *node = (RConfigNode *) data;
|
||||
if (!strcmp (node->value, "?")) {
|
||||
if (*node->value == '?') {
|
||||
eprintf ("Values: all|deleted|special\n");
|
||||
return R_FALSE;
|
||||
}
|
||||
|
@ -10,7 +10,8 @@
|
||||
static RSocket *s = NULL;
|
||||
static const char *listenport = NULL;
|
||||
|
||||
static void http_break (void *u) {
|
||||
#define http_break r_core_rtr_http_stop
|
||||
R_API int r_core_rtr_http_stop(RCore *u) {
|
||||
RSocket* sock;
|
||||
const char *port;
|
||||
const int timeout = 1; // 1 second
|
||||
@ -23,6 +24,7 @@ static void http_break (void *u) {
|
||||
}
|
||||
r_socket_free (s);
|
||||
s = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -358,6 +358,7 @@ R_API void r_core_rtr_remove(RCore *core, const char *input);
|
||||
R_API void r_core_rtr_session(RCore *core, const char *input);
|
||||
R_API void r_core_rtr_cmd(RCore *core, const char *input);
|
||||
R_API int r_core_rtr_http(RCore *core, int launch, const char *path);
|
||||
R_API int r_core_rtr_http_stop(RCore *u);
|
||||
|
||||
R_API void r_core_visual_define (RCore *core);
|
||||
R_API void r_core_visual_config (RCore *core);
|
||||
|
Loading…
x
Reference in New Issue
Block a user