mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 07:00:30 +00:00
Load cpu descriptions for multiarch plugins ##asm
This commit is contained in:
parent
4a722e6a12
commit
c1624396ac
3
dist/wapm/r2/Makefile
vendored
3
dist/wapm/r2/Makefile
vendored
@ -4,4 +4,5 @@ all: r2.wasm
|
|||||||
wapm publish
|
wapm publish
|
||||||
|
|
||||||
r2.wasm:
|
r2.wasm:
|
||||||
cp -f ../../../radare2-*-wasi/radare2.wasm.o3.wasm r2.wasm
|
cp -f ../../../radare2-*-wasi/radare2.wasm r2.wasm
|
||||||
|
#cp -f ../../../radare2-*-wasi/radare2.wasm.o3.wasm r2.wasm
|
||||||
|
2
dist/wapm/r2/wapm.toml
vendored
2
dist/wapm/r2/wapm.toml
vendored
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pancake/r2"
|
name = "pancake/r2"
|
||||||
version = "5.6.2"
|
version = "5.7.9"
|
||||||
description = "Unix-Like Reverse Engineering Framework"
|
description = "Unix-Like Reverse Engineering Framework"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "LGPL3"
|
license = "LGPL3"
|
||||||
|
@ -380,6 +380,7 @@ R_API bool r_asm_use(RAsm *a, const char *name) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// resolve asm plugin by name, support multi-arch assemblers
|
||||||
char *vv = strchr (name, '.');
|
char *vv = strchr (name, '.');
|
||||||
if (vv) {
|
if (vv) {
|
||||||
if (!strcmp (vv + 1, h->name)) {
|
if (!strcmp (vv + 1, h->name)) {
|
||||||
@ -392,6 +393,7 @@ R_API bool r_asm_use(RAsm *a, const char *name) {
|
|||||||
r_asm_set_cpu (a, arch);
|
r_asm_set_cpu (a, arch);
|
||||||
#endif
|
#endif
|
||||||
a->cur = h;
|
a->cur = h;
|
||||||
|
load_asm_descriptions (a, h);
|
||||||
free (arch);
|
free (arch);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -404,6 +406,7 @@ R_API bool r_asm_use(RAsm *a, const char *name) {
|
|||||||
r_asm_set_cpu (a, NULL);
|
r_asm_set_cpu (a, NULL);
|
||||||
#endif
|
#endif
|
||||||
a->cur = h;
|
a->cur = h;
|
||||||
|
load_asm_descriptions (a, h);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,7 +416,7 @@ R_API bool r_asm_use(RAsm *a, const char *name) {
|
|||||||
if (a->analb.use (a->analb.anal, name)) {
|
if (a->analb.use (a->analb.anal, name)) {
|
||||||
load_asm_descriptions (a, NULL);
|
load_asm_descriptions (a, NULL);
|
||||||
} else {
|
} else {
|
||||||
R_LOG_ERROR ("Cannot find arch plugin with this name. See rasm2 -L and rasm2 -LL");
|
R_LOG_ERROR ("Cannot find '%s' asm/arch/anal plugin. See rasm2 -L and rasm2 -LL", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user