x86-64 - Radare2 反汇编器如何组织可视化面板 (V!)?

标签 x86-64 reverse-engineering disassembly radare2

我想使用 Radare2 来了解 C 是如何组装成程序集的,但我在布局方面遇到了问题。我觉得是V!模式将非常方便,因为您可以在指令指针在程序中移动时观察寄存器更新,但我不了解布局。

这是我想要的布局示例:
enter image description here

似乎当我添加一个窗口(如这张照片中的 Stack 或 Registers)时,它出现在屏幕外,我必须尝试关闭不同的窗口和拆分窗口,直到布局合适为止。是否有一种简单的方法可以准确更改每个窗口中的内容?

我知道“X”关闭一个窗口,“z”将当前窗口切换到最前面,“-”/“|”分割一个窗口。

我曾尝试查看帮助,但似乎无法找出与此问题相关的任何其他命令。

最佳答案

环境

  • 雷达 2: 4.2.0-git 23712 @ linux-x86-64 git.4.1.1-97-g5a48a4017
    提交:5a48a401787c0eab31ecfb48bebf7cdfccb66e9b 构建:2020-01-09__21:44:51
  • 系统: Ubuntu 18.04.3 LTS

  • 解决方案
  • 这个问题可以通过多种方式解决,这只是一个例子。
  • 要创建您所描述的布局,请通过以下方式更改默认布局中显示的命令:
  • 单击内部/选择要更改的面板。
  • 在面板中右键单击并选择新命令或
  • 输入“e”然后键入新命令。 (例如:寄存器 = dr)
  • 下面显示的进一步文档可以在这里找到:https://radare.gitbooks.io/radare2book/visual_mode/visual_panels.html
  • |Visual Ascii Art Panels:
    | |      split the current panel vertically
    | -      split the current panel horizontally
    | :      run r2 command in prompt
    | _      start the hud input mode
    | ?      show this help
    | ??     show the user-friendly hud
    | !      run r2048 game
    | .      seek to PC or entrypoint
    | *      show pseudo code/r2dec in the current panel
    | /      highlight the keyword
    | (      toggle snow
    | &      toggle cache
    | [1-9]  follow jmp/call identified by shortcut (like ;[1])
    | ' '    (space) toggle graph / panels
    | tab    go to the next panel
    | a      toggle auto update for decompiler
    | b      browse symbols, flags, configurations, classes, ...
    | c      toggle cursor
    | C      toggle color
    | d      define in the current address. Same as Vd
    | D      show disassembly in the current panel
    | e      change title and command of current panel
    | g      go/seek to given offset
    | G      show graph in the current panel
    | i      insert hex
    | hjkl   move around (left-down-up-right)
    | J      scroll panels down by page
    | K      scroll panels up by page
    | H      scroll panels left by page
    | L      scroll panels right by page
    | m      select the menu panel
    | M      open new custom frame
    | nN     create new panel with given command
    | pP     seek to next or previous scr.nkey
    | q      quit, back to visual mode
    | r      toggle jmphints/leahints
    | sS     step in / step over
    | t      rotate related commands in a panel
    | uU     undo / redo seek
    | w      start Window mode
    | V      go to the graph mode
    | X      close current panel
    | z      swap current panel with the first one
    

    示例

    打开可视化面板

    user@host:~$ r2 /bin/ls
    [0x00005850]> aaaa
    ...
    [0x00005850]> s main
    [0x00003e90]> V!
    

    打开可视化面板后的默认 View
    default panel view

    选择右上角面板,然后右键单击并选择寄存器
    selecting registers command

    选择右下面板然后右键单击并选择堆栈
    selecting stack command

    最终 View
    enter image description here

    关于x86-64 - Radare2 反汇编器如何组织可视化面板 (V!)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54201868/

    相关文章:

    c++ - 有 C++ 反编译器吗?

    c++ - 如何从共享库中提取虚拟表信息?

    linux - ELF 可执行文件的起点?

    linux - objdump默认反汇编哪一段

    C++ 编译器函数调用

    gcc - 我的内核原型(prototype)存在问题(x86_64)

    c++ - 为两种架构构建 NetBeans

    x86-64 - 为什么 x86_64 CPU 上没有通用寄存器的乘加融合?

    android - 在我的 android 项目中使用 apktool jar 文件?

    linux - 适用于 Linux 的 AMD 兼容汇编程序