Add ability to copy function hash from the disassembly view

See #4179
This commit is contained in:
Henrik Rydgård committed 2026-02-09 19:26:43 +01:00
1 parent d06e5733a5
commit 330a638281
10 files changed
+56 -17

No files matched your search

+11
View File
@@ -12,6 +12,7 @@
#include "Core/Debugger/Breakpoints.h"
#include "Core/MIPS/MIPSDebugInterface.h"
#include "Core/MIPS/MIPSTables.h"
#include "Core/MIPS/MIPSAnalyst.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/MemMap.h"
#include "Common/System/Request.h"
@@ -751,6 +752,16 @@ void ImDisasmView::PopupMenu(ImControl &control) {
if (ImGui::MenuItem("Copy instruction (hex)")) {
CopyInstructions(selectRangeStart_, selectRangeEnd_, CopyInstructionsMode::OPCODES);
}
if (ImGui::MenuItem("Copy function hash")) {
MIPSAnalyst::AnalyzedFunction func;
if (MIPSAnalyst::GetAnalyzedFunctionAt(curAddress_, &func)) {
if (func.hasHash) {
char temp[256];
snprintf(temp, sizeof(temp), "%016llx:%d = %s\n", func.hash, func.size, func.name);
System_CopyStringToClipboard(temp);
}
}
}
ImGui::Separator();
if (ImGui::MenuItem("Set PC to here")) {