Rename r2 to {rz|rizin} (#14)
This commit is contained in:
parent
df8d0308bb
commit
3fb31afa16
31 changed files with 76 additions and 76 deletions
|
|
@ -110,7 +110,7 @@ rules to make the git history more readable and consistent:
|
|||
* ##print - printing data, structures, strings, tables, types ..
|
||||
* ##projects - saving/loading state
|
||||
* ##refactor - improve code quality
|
||||
* ##remote - r2 over tcp, http, rap, serial .. including collaboration
|
||||
* ##remote - rizin over tcp, http, rap, serial .. including collaboration
|
||||
* ##search - rz_find, / command, ..
|
||||
* ##shell - commandline, newshell, ..
|
||||
* ##signatures-searching/generating them
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ static void op_fillval(RzAnal *anal, RzAnalOp *op, csh *handle, cs_insn *insn) {
|
|||
#if 0
|
||||
capstone bug
|
||||
------------
|
||||
$ r2 -a riscv -e cfg.bigendian=1 -c "wx 0083001b" -
|
||||
$ rizin -a riscv -e cfg.bigendian=1 -c "wx 0083001b" -
|
||||
// should be 3 regs, right?
|
||||
[0x00000000]> aoj~{}
|
||||
[
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ struct lh5801_insn_class_desc {
|
|||
char mnem[4]; /* Assembler mnemonic */
|
||||
const char *desc; /* Textual description (for ?d) */
|
||||
|
||||
/* TODO: r2 insn type? */
|
||||
/* TODO: rizin insn type? */
|
||||
};
|
||||
|
||||
const struct lh5801_insn_class_desc
|
||||
|
|
|
|||
|
|
@ -327,15 +327,15 @@ RZ_API bool rz_asm_use(RzAsm *a, const char *name) {
|
|||
rz_list_foreach (a->plugins, iter, h) {
|
||||
if (!strcmp (h->name, name) && h->arch) {
|
||||
if (!a->cur || (a->cur && strcmp (a->cur->arch, h->arch))) {
|
||||
char *r2prefix = rz_str_rz_prefix (RZ_SDB_OPCODES);
|
||||
char *file = rz_str_newf ("%s/%s.sdb", rz_str_get (r2prefix), h->arch);
|
||||
char *rzprefix = rz_str_rz_prefix (RZ_SDB_OPCODES);
|
||||
char *file = rz_str_newf ("%s/%s.sdb", rz_str_get (rzprefix), h->arch);
|
||||
if (file) {
|
||||
rz_asm_set_cpu (a, NULL);
|
||||
sdb_free (a->pair);
|
||||
a->pair = sdb_new (NULL, file, 0);
|
||||
free (file);
|
||||
}
|
||||
free (r2prefix);
|
||||
free (rzprefix);
|
||||
}
|
||||
a->cur = h;
|
||||
return true;
|
||||
|
|
@ -963,7 +963,7 @@ RZ_API RzAsmCode *rz_asm_massemble(RzAsm *a, const char *assembly) {
|
|||
ret = rz_asm_pseudo_org (a, ptr + 5);
|
||||
off = a->pc;
|
||||
} else if (rz_str_startswith (ptr, ".offset ")) {
|
||||
eprintf ("Invalid use of the .offset directory. This directive is only supported in r2 -c 'waf'.\n");
|
||||
eprintf ("Invalid use of the .offset directory. This directive is only supported in rizin -c 'waf'.\n");
|
||||
} else if (!strncmp (ptr, ".text", 5)) {
|
||||
acode->code_offset = a->pc;
|
||||
} else if (!strncmp (ptr, ".data", 5)) {
|
||||
|
|
@ -1061,7 +1061,7 @@ RZ_API bool rz_asm_set_arch(RzAsm *a, const char *name, int bits) {
|
|||
return rz_asm_use (a, name)? rz_asm_set_bits (a, bits): false;
|
||||
}
|
||||
|
||||
/* to ease the use of the native bindings (not used in r2) */
|
||||
/* to ease the use of the native bindings (not used in rizin) */
|
||||
RZ_API char *rz_asm_to_string(RzAsm *a, ut64 addr, const ut8 *b, int l) {
|
||||
rz_return_val_if_fail (a && b && l >= 0, NULL);
|
||||
rz_asm_set_pc (a, addr);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len) {
|
|||
cs_option (cd, CS_OPT_DETAIL, CS_OPT_OFF);
|
||||
}
|
||||
// always unsigned immediates (kernel addresses)
|
||||
// maybe r2 should have an option for this too?
|
||||
// maybe rizin should have an option for this too?
|
||||
#if CS_API_MAJOR >= 4
|
||||
cs_option (cd, CS_OPT_UNSIGNED, CS_OPT_ON);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ static void get_strings_range(RBinFile *bf, RzList *list, int min, int raw, ut64
|
|||
// in case of dump ignore here
|
||||
if (bf->rbin->maxstrbuf && size && size > bf->rbin->maxstrbuf) {
|
||||
if (bf->rbin->verbose) {
|
||||
eprintf ("WARNING: bin_strings buffer is too big (0x%08" PFMT64x "). Use -zzz or set bin.maxstrbuf (RZ_BIN_MAXSTRBUF) in r2 (rz_bin)\n",
|
||||
eprintf ("WARNING: bin_strings buffer is too big (0x%08" PFMT64x "). Use -zzz or set bin.maxstrbuf (RZ_BIN_MAXSTRBUF) in rizin (rz_bin)\n",
|
||||
size);
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static ut64 pa2va(RBinFile *bf, ut64 offset) {
|
|||
|
||||
static void init_sdb_formats(struct MACH0_(obj_t) *bin) {
|
||||
/*
|
||||
* These definitions are used by r2 -nn
|
||||
* These definitions are used by rz -nn
|
||||
* must be kept in sync with librz/bin/d/macho
|
||||
*/
|
||||
sdb_set (bin->kv, "mach0_build_platform.cparse",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "marshal.h"
|
||||
#include "pyc_magic.h"
|
||||
|
||||
// avoiding using r2 internals asserts
|
||||
// avoiding using rizin internals asserts
|
||||
#define if_true_return(cond,ret) if(cond){return(ret);}
|
||||
|
||||
static ut32 magic_int;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
"""
|
||||
Example usage to regenerate traps.json:
|
||||
- open the dyld cache in r2 like this:
|
||||
RZ_DYLDCACHE_FILTER=libsystem_kernel r2 -e bin.usextr=false ~/Library/Developer/Xcode/iOS\ DeviceSupport/12.1.2\ \(16C101\)\ arm64e/Symbols/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
|
||||
- open the dyld cache in rizin like this:
|
||||
RZ_DYLDCACHE_FILTER=libsystem_kernel rizin -e bin.usextr=false ~/Library/Developer/Xcode/iOS\ DeviceSupport/12.1.2\ \(16C101\)\ arm64e/Symbols/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
|
||||
|
||||
- run the script with this command:
|
||||
#!pipe python2 /path/to/this/script.py > traps.json
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static RzList *patch_relocs(RBin *b) {
|
|||
}
|
||||
if (!(b->iob.io->cached & RZ_PERM_W)) {
|
||||
eprintf (
|
||||
"Warning: please run r2 with -e io.cache=true to patch "
|
||||
"Warning: please run rizin with -e io.cache=true to patch "
|
||||
"relocations\n");
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ static RzList *patch_relocs(RBin *b) {
|
|||
}
|
||||
if (!(io->cached & RZ_PERM_W)) {
|
||||
eprintf (
|
||||
"Warning: please run r2 with -e io.cache=true to patch "
|
||||
"Warning: please run rizin with -e io.cache=true to patch "
|
||||
"relocations\n");
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -442,7 +442,7 @@ static RzList *patch_relocs(RBin *b) {
|
|||
if (!map) {
|
||||
return NULL;
|
||||
}
|
||||
map->name = strdup (".imports.r2");
|
||||
map->name = strdup (".imports.rz");
|
||||
}
|
||||
|
||||
return _relocs_list (b, bin, true, m_vaddr);
|
||||
|
|
|
|||
|
|
@ -1842,7 +1842,7 @@ static RzList *entries(RBinFile *bf) {
|
|||
}
|
||||
}
|
||||
#if 0
|
||||
// this is now done by r2 in a generic way
|
||||
// this is now done by rizin in a generic way
|
||||
// STEP 3. NOTHING FOUND POINT TO CODE_INIT
|
||||
if (rz_list_empty (ret)) {
|
||||
if (!already_entry (ret, bin->code_from)) {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static RBuffer* create(RBin* bin, const ut8 *code, int codelen, const ut8 *data,
|
|||
|
||||
RBinPlugin rz_bin_plugin_elf = {
|
||||
.name = "elf",
|
||||
.desc = "ELF format r2 plugin",
|
||||
.desc = "ELF format plugin",
|
||||
.license = "LGPL3",
|
||||
.get_sdb = &get_sdb,
|
||||
.load_buffer = &load_buffer,
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ static RzList* relocs(RBinFile *bf) {
|
|||
}
|
||||
}
|
||||
if (got_addr < 1 && bin->ehdr.e_type == ET_REL) {
|
||||
got_addr = Elf_(rz_bin_elf_get_section_addr) (bin, ".got.r2");
|
||||
got_addr = Elf_(rz_bin_elf_get_section_addr) (bin, ".got.rz");
|
||||
if (got_addr == -1) {
|
||||
got_addr = 0;
|
||||
}
|
||||
|
|
@ -932,25 +932,25 @@ static RzList* patch_relocs(RBin *b) {
|
|||
return NULL;
|
||||
}
|
||||
if (!io->cached) {
|
||||
eprintf ("Warning: run r2 with -e io.cache=true to fix relocations in disassembly\n");
|
||||
eprintf ("Warning: run rz with -e io.cache=true to fix relocations in disassembly\n");
|
||||
return NULL;
|
||||
}
|
||||
ut64 n_vaddr = g->itv.addr + g->itv.size;
|
||||
// reserve at least that space
|
||||
size = bin->g_reloc_num * cdsz;
|
||||
char *muri = rz_str_newf ("malloc://%" PFMT64u, size);
|
||||
RzIODesc *gotr2desc = b->iob.open_at (io, muri, RZ_PERM_R, 0664, n_vaddr);
|
||||
RzIODesc *gotrzdesc = b->iob.open_at (io, muri, RZ_PERM_R, 0664, n_vaddr);
|
||||
free (muri);
|
||||
if (!gotr2desc) {
|
||||
if (!gotrzdesc) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
RzIOMap *gotr2map = b->iob.map_get (io, n_vaddr);
|
||||
if (!gotr2map) {
|
||||
RzIOMap *gotrzmap = b->iob.map_get (io, n_vaddr);
|
||||
if (!gotrzmap) {
|
||||
return NULL;
|
||||
}
|
||||
gotr2map->name = strdup (".got.r2");
|
||||
gotrzmap->name = strdup (".got.rz");
|
||||
|
||||
if (!(relcs = Elf_(rz_bin_elf_get_relocs) (bin))) {
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static RBinInfo *info(RBinFile *bf) {
|
|||
|
||||
RBinPlugin rz_bin_plugin_le = {
|
||||
.name = "le",
|
||||
.desc = "LE/LX format r2 plugin",
|
||||
.desc = "LE/LX format plugin",
|
||||
.author = "GustavoLCR",
|
||||
.license = "LGPL3",
|
||||
.check_buffer = &check_buffer,
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ static RzList* patch_relocs(RBin *b) {
|
|||
struct MACH0_(obj_t) *bin = NULL;
|
||||
RzIOMap *g = NULL;
|
||||
HtUU *relocs_by_sym = NULL;
|
||||
RzIODesc *gotr2desc = NULL;
|
||||
RzIODesc *gotrzdesc = NULL;
|
||||
|
||||
rz_return_val_if_fail (b, NULL);
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ static RzList* patch_relocs(RBin *b) {
|
|||
}
|
||||
|
||||
if (!io->cached) {
|
||||
eprintf ("Warning: run r2 with -e io.cache=true to fix relocations in disassembly\n");
|
||||
eprintf ("Warning: run rizin with -e io.cache=true to fix relocations in disassembly\n");
|
||||
goto beach;
|
||||
}
|
||||
|
||||
|
|
@ -626,17 +626,17 @@ static RzList* patch_relocs(RBin *b) {
|
|||
ut64 n_vaddr = g->itv.addr + g->itv.size;
|
||||
ut64 size = num_ext_relocs * cdsz;
|
||||
char *muri = rz_str_newf ("malloc://%" PFMT64u, size);
|
||||
gotr2desc = b->iob.open_at (io, muri, RZ_PERM_R, 0664, n_vaddr);
|
||||
gotrzdesc = b->iob.open_at (io, muri, RZ_PERM_R, 0664, n_vaddr);
|
||||
free (muri);
|
||||
if (!gotr2desc) {
|
||||
if (!gotrzdesc) {
|
||||
goto beach;
|
||||
}
|
||||
|
||||
RzIOMap *gotr2map = b->iob.map_get (io, n_vaddr);
|
||||
if (!gotr2map) {
|
||||
RzIOMap *gotrzmap = b->iob.map_get (io, n_vaddr);
|
||||
if (!gotrzmap) {
|
||||
goto beach;
|
||||
}
|
||||
gotr2map->name = strdup (".got.r2");
|
||||
gotrzmap->name = strdup (".got.rz");
|
||||
|
||||
if (!(ret = rz_list_newf ((RzListFree)free))) {
|
||||
goto beach;
|
||||
|
|
@ -683,7 +683,7 @@ static RzList* patch_relocs(RBin *b) {
|
|||
beach:
|
||||
rz_list_free (ext_relocs);
|
||||
rz_skiplist_free (all_relocs);
|
||||
rz_io_desc_free (gotr2desc);
|
||||
rz_io_desc_free (gotrzdesc);
|
||||
rz_list_free (ret);
|
||||
ht_uu_free (relocs_by_sym);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ RzList *relocs(RBinFile *bf) {
|
|||
|
||||
RBinPlugin rz_bin_plugin_ne = {
|
||||
.name = "ne",
|
||||
.desc = "NE format r2 plugin",
|
||||
.desc = "NE format plugin",
|
||||
.author = "GustavoLCR",
|
||||
.license = "LGPL3",
|
||||
.check_buffer = &check_buffer,
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ static RzList* entries(RBinFile *bf) { //Should be 3 offsets pointed by NMI, RES
|
|||
}
|
||||
|
||||
static ut64 baddr(RBinFile *bf) {
|
||||
// having this we make r2 -B work, otherwise it doesnt works :??
|
||||
// having this we make rz -B work, otherwise it doesnt works :??
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static bool load_bytes(RBinFile *bf, void **bin_obj, const ut8 *buf, ut64 sz, ut
|
|||
ut8 *tmp = NULL;
|
||||
|
||||
if (rbin->iob.io && !(rbin->iob.io->cached & RZ_PERM_W)) {
|
||||
eprintf ("Please add \'-e io.cache=true\' option to r2 command. This is required to decompress the code.\n");
|
||||
eprintf ("Please add \'-e io.cache=true\' option to rz command. This is required to decompress the code.\n");
|
||||
goto fail;
|
||||
}
|
||||
/* Decompress each sections */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ int parse_tpi_stream(void *parsed_pdb_stream, RZ_STREAM_FILE *stream);
|
|||
// TODO: Remove to separate file
|
||||
int parse_sctring(SCString *sctr, unsigned char *leaf_data, unsigned int *read_bytes, unsigned int len);
|
||||
|
||||
// use r2 types here (ut16 instead of unsigned short, ut32 for unsigned int ..)
|
||||
// use rizin types here (ut16 instead of unsigned short, ut32 for unsigned int ..)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void init_scstring(SCString *cstr, unsigned int size, char *name);
|
||||
#endif // TPI_H
|
||||
|
|
|
|||
|
|
@ -1195,13 +1195,13 @@ typedef struct rz_anal_esil_t {
|
|||
RzAnalReil *Reil;
|
||||
// this is so cursed, can we please remove external commands from esil internals.
|
||||
// Function pointers are fine, but not commands
|
||||
char *cmd_step; // r2 (external) command to run before a step is performed
|
||||
char *cmd_step_out; // r2 (external) command to run after a step is performed
|
||||
char *cmd_intr; // r2 (external) command to run when an interrupt occurs
|
||||
char *cmd_trap; // r2 (external) command to run when a trap occurs
|
||||
char *cmd_mdev; // r2 (external) command to run when an memory mapped device address is used
|
||||
char *cmd_todo; // r2 (external) command to run when esil expr contains TODO
|
||||
char *cmd_ioer; // r2 (external) command to run when esil fails to IO
|
||||
char *cmd_step; // rizin (external) command to run before a step is performed
|
||||
char *cmd_step_out; // rizin (external) command to run after a step is performed
|
||||
char *cmd_intr; // rizin (external) command to run when an interrupt occurs
|
||||
char *cmd_trap; // rizin (external) command to run when a trap occurs
|
||||
char *cmd_mdev; // rizin (external) command to run when an memory mapped device address is used
|
||||
char *cmd_todo; // rizin (external) command to run when esil expr contains TODO
|
||||
char *cmd_ioer; // rizin (external) command to run when esil fails to IO
|
||||
char *mdev_range; // string containing the rz_str_range to match for read/write accesses
|
||||
bool (*cmd)(ESIL *esil, const char *name, ut64 a0, ut64 a1);
|
||||
void *user;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ typedef struct rz_flags_at_offset_t {
|
|||
} RzFlagsAtOffset;
|
||||
|
||||
typedef struct rz_flag_item_t {
|
||||
char *name; /* unique name, escaped to avoid issues with r2 shell */
|
||||
char *name; /* unique name, escaped to avoid issues with rizin shell */
|
||||
char *realname; /* real name, without any escaping */
|
||||
bool demangled; /* real name from demangling? */
|
||||
ut64 offset; /* offset flagged by this item */
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ typedef struct rz_lib_handler_t {
|
|||
typedef struct rz_lib_struct_t {
|
||||
int type;
|
||||
void *data; /* pointer to data handled by plugin handler */
|
||||
const char *version; /* r2 version */
|
||||
const char *version; /* rizin version */
|
||||
void (*free)(void *data);
|
||||
const char *pkgname; /* pkgname associated to this plugin */
|
||||
} RzLibStruct;
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ static int lang_rust_run(RzLang *lang, const char *code, int len) {
|
|||
" pub fn free (ptr: *const u8);\n" \
|
||||
"}\n" \
|
||||
"\n" \
|
||||
"pub struct R2;\n" \
|
||||
"pub struct Rz;\n" \
|
||||
"\n" \
|
||||
"#[allow(dead_code)]\n" \
|
||||
"impl R2 {\n" \
|
||||
"impl Rz {\n" \
|
||||
" fn cmdstr(&self, c: *const u8, str: &str) -> String {\n" \
|
||||
" unsafe {\n" \
|
||||
" let ptr = rz_core_cmd_str(c, str.as_ptr()) as *const i8;\n" \
|
||||
|
|
@ -98,7 +98,7 @@ static int lang_rust_run(RzLang *lang, const char *code, int len) {
|
|||
"#[allow(unused_variables)]\n" \
|
||||
"#[allow(unused_unsafe)]\n" \
|
||||
"pub extern fn entry(core: *const u8) {\n" \
|
||||
" let r2 = R2;\n" \
|
||||
" let rz = Rz;\n" \
|
||||
" unsafe { /* because core is external */\n";
|
||||
const char *rust_footer = \
|
||||
" }\n" \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* SPP-R2, a template programming language with r2 integration */
|
||||
/* SPP-RZ, a template programming language with rizin integration */
|
||||
|
||||
#include <rz_util.h>
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ static SppTag spp_rz_tags[] = {
|
|||
{ "endpipe", spp_rz_endpipe },
|
||||
{ "include", spp_rz_include },
|
||||
{ "system", spp_rz_system },
|
||||
{ "r2", spp_rz_rz },
|
||||
{ "rz", spp_rz_rz },
|
||||
{ NULL, spp_rz_default },
|
||||
{ NULL }
|
||||
};
|
||||
|
|
@ -431,7 +431,7 @@ static struct Arg spp_rz_args[] = {
|
|||
};
|
||||
|
||||
DLL_LOCAL SppProc spp_rz_proc = {
|
||||
.name = "sppr2",
|
||||
.name = "spprz",
|
||||
.tags = (struct Tag **)spp_rz_tags,
|
||||
.args = (struct Arg **)spp_rz_args,
|
||||
.token = " ",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
This implementation of file(1) has been taken from OpenBSD,
|
||||
I have removed the elf part which reduces more than 1KLOC.
|
||||
I have also cleaned up the code in order to fix some warnings
|
||||
and integrate with r2 syntax. magic_ api is now r_magic_
|
||||
and integrate with rizin syntax. magic_ api is now rz_magic_
|
||||
|
||||
--pancake
|
||||
|
||||
|
|
|
|||
|
|
@ -156,10 +156,10 @@ static int main_help(int line) {
|
|||
" RZ_DEBUG if defined, show error messages and crash signal\n"
|
||||
" RZ_DEBUG_ASSERT=1 set a breakpoint when hitting an assert\n"
|
||||
" RZ_MAGICPATH " RZ_JOIN_2_PATHS ("%s", RZ_SDB_MAGIC) "\n"
|
||||
" RZ_NOPLUGINS do not load r2 shared plugins\n"
|
||||
" RZ_NOPLUGINS do not load rizin shared plugins\n"
|
||||
" RZ_RCFILE ~/.rizinrc (user preferences, batch script)\n" // TOO GENERIC
|
||||
" RZ_RDATAHOME %s\n" // TODO: rename to RHOME R2HOME?
|
||||
" RZ_VERSION contains the current version of r2\n"
|
||||
" RZ_RDATAHOME %s\n" // TODO: rename to RHOME RZHOME?
|
||||
" RZ_VERSION contains the current version of rizin\n"
|
||||
"Paths:\n"
|
||||
" RZ_PREFIX "RZ_PREFIX"\n"
|
||||
" RZ_INCDIR "RZ_INCDIR"\n"
|
||||
|
|
@ -190,7 +190,7 @@ static int main_print_var(const char *var_name) {
|
|||
struct rizin_var_t {
|
||||
const char *name;
|
||||
const char *value;
|
||||
} r2_vars[] = {
|
||||
} rz_vars[] = {
|
||||
{ "RZ_VERSION", RZ_VERSION },
|
||||
{ "RZ_PREFIX", RZ_PREFIX },
|
||||
{ "RZ_MAGICPATH", magicpath },
|
||||
|
|
@ -210,16 +210,16 @@ static int main_print_var(const char *var_name) {
|
|||
delta = 3;
|
||||
}
|
||||
if (var_name) {
|
||||
while (r2_vars[i].name) {
|
||||
if (!strcmp (r2_vars[i].name + delta, var_name)) {
|
||||
printf ("%s\n", r2_vars[i].value);
|
||||
while (rz_vars[i].name) {
|
||||
if (!strcmp (rz_vars[i].name + delta, var_name)) {
|
||||
printf ("%s\n", rz_vars[i].value);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
while (r2_vars[i].name) {
|
||||
printf ("%s=%s\n", r2_vars[i].name, r2_vars[i].value);
|
||||
while (rz_vars[i].name) {
|
||||
printf ("%s=%s\n", rz_vars[i].name, rz_vars[i].value);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
|
|||
LISTS_FREE ();
|
||||
return 0;
|
||||
}
|
||||
// HACK TO PERMIT '#!/usr/bin/r2 - -i' hashbangs
|
||||
// HACK TO PERMIT '#!/usr/bin/rz - -i' hashbangs
|
||||
if (argc > 2 && !strcmp (argv[1], "-") && !strcmp (argv[2], "-i")) {
|
||||
argv[1] = argv[0];
|
||||
argc--;
|
||||
|
|
@ -1100,7 +1100,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
|
|||
if (r->file && iod && (iod->fd == r->file->fd) && iod->name) {
|
||||
filepath = iod->name;
|
||||
}
|
||||
/* Load rbin info from r2 dbg:// or r2 /bin/ls */
|
||||
/* Load rbin info from rz dbg:// or rz /bin/ls */
|
||||
/* the baddr should be set manually here */
|
||||
(void)rz_core_bin_load (r, filepath, baddr);
|
||||
// check if bin info is loaded and complain if -B was used
|
||||
|
|
@ -1143,7 +1143,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
|
|||
if (mapaddr) {
|
||||
if (rz_config_get_i (r->config, "file.info")) {
|
||||
eprintf ("Warning: using oba to load the syminfo from different mapaddress.\n");
|
||||
// load symbols when using r2 -m 0x1000 /bin/ls
|
||||
// load symbols when using rz -m 0x1000 /bin/ls
|
||||
rz_core_cmdf (r, "oba 0 0x%"PFMT64x, mapaddr);
|
||||
rz_core_cmd0 (r, ".ies*");
|
||||
}
|
||||
|
|
@ -1156,7 +1156,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
|
|||
if (fh) {
|
||||
rz_debug_use (r->dbg, is_gdb ? "gdb" : debugbackend);
|
||||
}
|
||||
/* load symbols when doing r2 -d ls */
|
||||
/* load symbols when doing rz -d ls */
|
||||
// NOTE: the baddr is redefined to support PIE/ASLR
|
||||
baddr = rz_debug_get_baddr (r->dbg, pfile);
|
||||
|
||||
|
|
@ -1299,7 +1299,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) {
|
|||
|
||||
// no flagspace selected by default the beginning
|
||||
rz_flag_space_set (r->flags, NULL);
|
||||
/* load <file>.r2 */
|
||||
/* load <file>.rz */
|
||||
{
|
||||
char* f = rz_str_newf ("%s.rz", pfile);
|
||||
const char *uri_splitter = strstr (f, "://");
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ static int help(void) {
|
|||
" -K randomart ; rz_ax -K 0x34 1020304050\n"
|
||||
" -L bin -> hex(bignum) ; rz_ax -L 111111111 # 0x1ff\n"
|
||||
" -n binary number ; rz_ax -n 0x1234 # 34120000\n"
|
||||
" -o octalstr -> raw ; rz_ax -o \\162 \\62 # r2\n"
|
||||
" -o octalstr -> raw ; rz_ax -o \\162 \\172 # rz\n"
|
||||
" -N binary number ; rz_ax -N 0x1234 # \\x34\\x12\\x00\\x00\n"
|
||||
" -r r2 style output ; rz_ax -r 0x1234\n"
|
||||
" -r rz style output ; rz_ax -r 0x1234\n"
|
||||
" -s hexstr -> raw ; rz_ax -s 43 4a 50\n"
|
||||
" -S raw -> hexstr ; rz_ax -S < /bin/ls > ls.hex\n"
|
||||
" -t tstamp -> str ; rz_ax -t 1234567890\n"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ static int rabin_show_help(int v) {
|
|||
" RZ_BIN_NOPLUGINS: # do not load shared plugins (speedup loading)\n"
|
||||
" RZ_BIN_DEMANGLE=0:e bin.demangle # do not demangle symbols\n"
|
||||
" RZ_BIN_MAXSTRBUF: e bin.maxstrbuf # specify maximum buffer size\n"
|
||||
" RZ_BIN_STRFILTER: e bin.str.filter # r2 -qc 'e bin.str.filter=?" "?' -\n"
|
||||
" RZ_BIN_STRFILTER: e bin.str.filter # rizin -qc 'e bin.str.filter=?" "?' -\n"
|
||||
" RZ_BIN_STRPURGE: e bin.str.purge # try to purge false positives\n"
|
||||
" RZ_BIN_DEBASE64: e bin.debase64 # try to debase64 all strings\n"
|
||||
" RZ_BIN_DMNGLRCMD: e bin.demanglercmd # try to purge false positives\n"
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ static int cb(RzDiff *d, void *user, RzDiffOp *op) {
|
|||
break;
|
||||
case 'r':
|
||||
if (disasm) {
|
||||
eprintf ("r2cmds (-r) + disasm (-D) not yet implemented\n");
|
||||
eprintf ("rzcmds (-r) + disasm (-D) not yet implemented\n");
|
||||
}
|
||||
if (op->a_len == op->b_len) {
|
||||
printf ("wx ");
|
||||
|
|
@ -439,7 +439,7 @@ static int show_help(int v) {
|
|||
" -D show disasm instead of hexpairs\n"
|
||||
" -e [k=v] set eval config var value for all RzCore instances\n"
|
||||
" -g [sym|off1,off2] graph diff of given symbol, or between two offsets\n"
|
||||
" -G [cmd] run an r2 command on every RzCore instance created\n"
|
||||
" -G [cmd] run an rz command on every RzCore instance created\n"
|
||||
" -i diff imports of target files (see -u, -U and -z)\n"
|
||||
" -j output in json format\n"
|
||||
" -n print bare addresses only (diff.bare=1)\n"
|
||||
|
|
@ -462,7 +462,7 @@ static int show_help(int v) {
|
|||
" -Z diff code comparing zignatures\n\n"
|
||||
"Graph Output formats: (-m [mode])\n"
|
||||
" <blank/a> Ascii art\n"
|
||||
" s r2 commands\n"
|
||||
" s rz commands\n"
|
||||
" d Graphviz dot\n"
|
||||
" g Graph Modelling Language (gml)\n"
|
||||
" j json\n"
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ static char *gdb_to_rz_profile(const char *gdb) {
|
|||
ptr = ptr1 + 1;
|
||||
continue;
|
||||
}
|
||||
// TODO: More mappings between gdb and r2 reg groups. For now, either fpu or gpr
|
||||
// TODO: More mappings between gdb and rizin reg groups. For now, either fpu or gpr
|
||||
if (!(type_bits & sse) && !(type_bits & float_)) {
|
||||
type_bits |= gpr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue