Permalink
Browse files

Debugger: Add func name and data symbol to disasm.

  • Loading branch information...
unknownbrackets committed May 13, 2018
1 parent b114656 commit 25085fa39477c3b1ea2fb2648bf926fe8bb2e156
Showing with 24 additions and 0 deletions.
  1. +24 −0 Core/Debugger/WebSocket/DisasmSubscriber.cpp
@@ -112,6 +112,30 @@ void WebSocketDisasmState::WriteDisasmLine(JsonWriter &json, const DisassemblyLi
else
json.writeString("symbol", addressSymbol);
const u32 funcAddress = g_symbolMap->GetFunctionStart(addr);
const std::string funcName = g_symbolMap->GetLabelString(funcAddress);
if (funcName.empty())
json.writeNull("function");
else
json.writeString("function", funcName);
if (l.type == DISTYPE_DATA) {
u32 dataStart = g_symbolMap->GetDataStart(addr);
if (dataStart == -1)
dataStart = addr;
const std::string dataLabel = g_symbolMap->GetLabelString(dataStart);
json.pushDict("dataSymbol");
json.writeUint("start", dataStart);
if (dataLabel.empty())
json.writeNull("label");
else
json.writeString("label", dataLabel);
json.pop();
} else {
json.writeNull("dataSymbol");
}
bool enabled;
// TODO: Account for bp inside macro?
if (CBreakPoints::IsAddressBreakPoint(addr, &enabled)) {

0 comments on commit 25085fa

Please sign in to comment.