From 00b51805b9cd37b65c8f7ca178fa10e5b564595b Mon Sep 17 00:00:00 2001 From: Sour Date: Fri, 23 Feb 2018 12:54:43 -0500 Subject: [PATCH] Debugger: Code Window - Cleanup/Improve look for labels/comments inside data sections --- Core/Disassembler.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Core/Disassembler.cpp b/Core/Disassembler.cpp index 3a1400b5..a5252841 100644 --- a/Core/Disassembler.cpp +++ b/Core/Disassembler.cpp @@ -581,11 +581,6 @@ string Disassembler::GetCode(AddressTypeInfo &addressInfo, uint32_t endAddr, uin } } else { //This byte should be interpreted as data - if((!label.empty() || !commentString.empty()) && insideDataBlock) { - //We just found a label and we're inside a data block, end the block, then start a new one - endDataBlock(); - } - bool showData = (isVerifiedData && showVerifiedData) || (!isVerifiedData && showUnidentifiedData); if(inVerifiedDataBlock != isVerifiedData && insideDataBlock && showEitherDataType) { @@ -602,15 +597,8 @@ string Disassembler::GetCode(AddressTypeInfo &addressInfo, uint32_t endAddr, uin //Output block header if(label.empty()) { GetLine(output, showEitherDataType && inVerifiedDataBlock ? "__data block__" : "__unidentified block__", "", showData ? -1 : memoryAddr, showData ? -1 : addr, dataType, memoryType); - if(!commentString.empty()) { - GetLine(output, "", commentString, -1, -1, dataType, memoryType); - } } else { GetLine(output, "__" + label + "__", "", showData ? -1 : memoryAddr, showData ? -1 : addr, dataType, memoryType); - if(!commentString.empty()) { - GetLine(output, "", commentString, -1, -1, dataType, memoryType); - } - output += commentLines; } insideDataBlock = true; emptyBlock = true; @@ -635,7 +623,7 @@ string Disassembler::GetCode(AddressTypeInfo &addressInfo, uint32_t endAddr, uin dbBuffer += " $" + HexUtilities::ToHex(source[addr&mask]); - if(!label.empty() || !commentString.empty()) { + if(!commentString.empty()) { GetLine(output, dbBuffer, commentString, dbRelativeAddr, dbAbsoluteAddr, dataType, memoryType); byteCount = 0; } else {