mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-01 17:40:34 +00:00
The bit editor is now accessible via the visual browse mode
This commit is contained in:
parent
cf1ae32fb8
commit
a7e1918225
@ -2009,6 +2009,7 @@ R_API void r_core_visual_browse(RCore *core, const char *input) {
|
||||
"Browse stuff:\n"
|
||||
"-------------\n"
|
||||
" _ hud mode (V_)\n"
|
||||
" 1 bit editor (vd1)\n"
|
||||
" b blocks\n"
|
||||
" c classes\n"
|
||||
" C comments\n"
|
||||
@ -2047,6 +2048,9 @@ R_API void r_core_visual_browse(RCore *core, const char *input) {
|
||||
}
|
||||
ch = r_cons_arrow_to_hjkl (ch);
|
||||
switch (ch) {
|
||||
case '1':
|
||||
r_core_visual_bit_editor (core);
|
||||
break;
|
||||
case 'M':
|
||||
if (!r_list_empty (core->fs->roots)) {
|
||||
r_core_visual_mounts (core);
|
||||
|
@ -270,7 +270,7 @@ beach:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool edit_bits (RCore *core) {
|
||||
R_API bool r_core_visual_bit_editor(RCore *core) {
|
||||
const int nbits = sizeof (ut64) * 8;
|
||||
bool colorBits = false;
|
||||
int analopType;
|
||||
@ -1461,8 +1461,8 @@ R_API int r_core_visual_view_rop(RCore *core) {
|
||||
char *line = r_core_cmd_strf (core, "piuq@0x%08"PFMT64x, addr + delta);
|
||||
r_str_replace_char (line, '\n', ';');
|
||||
if (show_color) {
|
||||
const char *offsetColor = r_cons_singleton ()->context->pal.offset; // TODO etooslow. must cache
|
||||
// XXX parsing fails to read this ansi-offset
|
||||
// const char *offsetColor = r_cons_singleton ()->context->pal.offset; // TODO etooslow. must cache
|
||||
// r_list_push (core->ropchain, r_str_newf ("%s0x%08"PFMT64x""Color_RESET" %s", offsetColor, addr + delta, line));
|
||||
r_list_push (core->ropchain, r_str_newf ("0x%08"PFMT64x" %s", addr + delta, line));
|
||||
} else {
|
||||
@ -3418,7 +3418,7 @@ onemoretime:
|
||||
}
|
||||
break;
|
||||
case '1':
|
||||
edit_bits (core);
|
||||
r_core_visual_bit_editor (core);
|
||||
break;
|
||||
case 't':
|
||||
case 'o':
|
||||
|
@ -382,6 +382,7 @@ R_API int r_core_cmd_lines(RCore *core, const char *lines);
|
||||
R_API int r_core_cmd_command(RCore *core, const char *command);
|
||||
R_API int r_core_run_script (RCore *core, const char *file);
|
||||
R_API bool r_core_seek(RCore *core, ut64 addr, bool rb);
|
||||
R_API bool r_core_visual_bit_editor(RCore *core);
|
||||
R_API int r_core_seek_base (RCore *core, const char *hex);
|
||||
R_API void r_core_seek_previous (RCore *core, const char *type);
|
||||
R_API void r_core_seek_next (RCore *core, const char *type);
|
||||
|
Loading…
Reference in New Issue
Block a user