mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
SymbolMap: - Fix GetModuleIndex(): it only checked the end of an active module's range (via activeModuleEnds.upper_bound), never the start, so an address sitting in the gap before a module was silently misattributed to it. Added GetModuleIndexByName() as a companion lookup. - AddModule() gains an optional crc param, stored per ModuleEntry. Reactivating a module by name now also requires the crc to agree when both sides know it, so two unrelated binaries that happen to share a name no longer get merged into one symbol table (addresses the old TODO at the top of SymbolMap.h). - AddLabel()/AddFunction() gain an updateName param (default false, preserving existing "first writer wins" behavior) so a trusted source - like a loaded symbol file - can be allowed to overwrite a name that a lower-confidence automatic pass already assigned. - New SaveModuleSymbols()/LoadModuleSymbols()/GetModuleSymbolsPath(): save or restore one module's functions/data/labels to/from a small human-editable text file, addressed relative to the module (so the file stays valid however the module ends up positioned on a later run). Keyed by PSP/SYSTEM/SYMBOLS/<moduleName>_<crc>.ppsym - deliberately by module+crc rather than by game, so it's shared by every game/homebrew that loads the exact same module. A "# game <id> <title>" comment records who last saved it, informational only. WebSocket debugger: hle.module.saveSymbols/loadSymbols expose the above. sceKernelModule.cpp: auto-load a module's saved symbols right after it's registered with the symbol map (both the real ELF-load path and the savestate-load path), and auto-save on unload (before UnloadModule(), while its symbols are still active) - gated behind the new bAutoSaveLoadSymbols config setting (default off), with a matching Developer Tools checkbox and a --auto-save-load-symbols command-line override for headless use. Includes some in-progress cleanup already staged: DescribeAddress now calls g_symbolMap->GetDescription() directly instead of through the now-removed MIPSDebugInterface::getDescription() wrapper. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
41 lines
1.7 KiB
C
41 lines
1.7 KiB
C
// Copyright (c) 2018- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#pragma once
|
|
|
|
#include "Core/Debugger/WebSocket/WebSocketUtils.h"
|
|
|
|
DebuggerSubscriber *WebSocketHLEInit(DebuggerEventHandlerMap &map);
|
|
|
|
void WebSocketHLEThreadList(DebuggerRequest &req);
|
|
void WebSocketHLEThreadWake(DebuggerRequest &req);
|
|
void WebSocketHLEThreadStop(DebuggerRequest &req);
|
|
void WebSocketHLEFuncList(DebuggerRequest &req);
|
|
void WebSocketHLEFuncAdd(DebuggerRequest &req);
|
|
void WebSocketHLEFuncRemove(DebuggerRequest &req);
|
|
void WebSocketHLEFuncRemoveRange(DebuggerRequest &req);
|
|
void WebSocketHLEFuncRename(DebuggerRequest &req);
|
|
void WebSocketHLEFuncScan(DebuggerRequest &req);
|
|
void WebSocketHLEModuleList(DebuggerRequest &req);
|
|
void WebSocketHLEModuleSaveSymbols(DebuggerRequest &req);
|
|
void WebSocketHLEModuleLoadSymbols(DebuggerRequest &req);
|
|
void WebSocketHLEBacktrace(DebuggerRequest &req);
|
|
void WebSocketHLEDataList(DebuggerRequest &req);
|
|
void WebSocketHLEDataAdd(DebuggerRequest &req);
|
|
void WebSocketHLEDataRemove(DebuggerRequest &req);
|
|
void WebSocketHLEDataRename(DebuggerRequest &req);
|