搜索

PythonReactSEOPDF
GitHub Skill

ghidra

Ghidra CLI tool reference

dbalatoni13☆ 91 仓库 Stars8 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Ghidra CLI

The project contains two programs:

  • NFSMWRELEASE.ELF — Original GameCube ELF (default). Types and symbols loaded from the DWARF.
  • NFS.ELF — Alpha 124 build (PS2). Virtual function calls and the return value of _Find show up correctly.

Switch between them by specifying --program <name> at the end of each command.

Use -o compact for shorter output in the CLI. Use -o json for machine-readable output when scripting.

ghidra set-default project NeedForSpeed # set default project
ghidra decompile 0x80051324 -o compact  # decompile function at address
ghidra find function "AcceptScriptMsg"  # search by name
ghidra type get "CEntity"               # struct layout
ghidra disasm 0x80051324 -n 30 -o compact  # raw disassembly

Note: Ghidra uses short demangled names (e.g. AcceptScriptMsg matches all overrides). Use the address from config/GOWE69/symbols.txt for precise lookups for the GameCube version and config/SLES-53558-A124/symbols.txt for the PS2 version.

Important: Ghidra has no concept of const. All pointers, references, and member functions appear non-const in Ghidra output. Never infer const-qualification (or lack thereof) from Ghidra decompilation — use the dwarf info from the lookup skill.

Disassembly

Ghidra's disassembly output is fine for quick reference, but it's better to reference decomp-toolkit's generated disassembly files in build/GAMEID/asm/ which contain more information (e.g. symbol names, relocation targets, data values) and are easily grepable.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!