diff --git a/pcsx2/DebugTools/DisassemblyManager.h b/pcsx2/DebugTools/DisassemblyManager.h index c2f0266a41..c4d5cf24e9 100644 --- a/pcsx2/DebugTools/DisassemblyManager.h +++ b/pcsx2/DebugTools/DisassemblyManager.h @@ -30,6 +30,8 @@ struct DisassemblyLineInfo std::string name; std::string params; u32 totalSize; + + DisassemblyLineInfo() : type(DISTYPE_OTHER), info(), name(), params(), totalSize() {} }; enum LineType { LINE_UP, LINE_DOWN }; diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp index 356917973c..31f5fdf2cd 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp @@ -383,7 +383,7 @@ int getBackgroundColor(unsigned int address) std::set CtrlDisassemblyView::getSelectedLineArguments() { std::set args; - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); for (u32 addr = selectRangeStart; addr < selectRangeEnd; addr += 4) { manager.getLine(addr, displaySymbols, line); size_t p = 0, nextp = line.params.find(','); @@ -489,7 +489,7 @@ void CtrlDisassemblyView::render(wxDC& dc) unsigned int address = windowStart; const std::set currentArguments = getSelectedLineArguments(); - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); for (int i = 0; i < visibleRows+1; i++) { manager.getLine(address,displaySymbols,line); @@ -603,7 +603,7 @@ void CtrlDisassemblyView::calculatePixelPositions() void CtrlDisassemblyView::followBranch() { - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); manager.getLine(curAddress,true,line); if (line.type == DISTYPE_OPCODE || line.type == DISTYPE_MACRO) @@ -966,7 +966,7 @@ void CtrlDisassemblyView::toggleBreakpoint(bool toggleEnabled) void CtrlDisassemblyView::updateStatusBarText() { char text[512]; - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); manager.getLine(curAddress,true,line); text[0] = 0; @@ -1175,7 +1175,7 @@ std::string CtrlDisassemblyView::disassembleRange(u32 start, u32 size) u32 disAddress = start; bool previousLabel = true; - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); while (disAddress < start+size) { char addressText[64],buffer[512]; @@ -1293,7 +1293,7 @@ void CtrlDisassemblyView::editBreakpoint() void CtrlDisassemblyView::getOpcodeText(u32 address, char* dest) { - DisassemblyLineInfo line; + DisassemblyLineInfo line = DisassemblyLineInfo(); address = manager.getStartAddress(address); manager.getLine(address,displaySymbols,line); sprintf(dest,"%s %s",line.name.c_str(),line.params.c_str());