diff --git a/Core/Debugger/Disassembler.cpp b/Core/Debugger/Disassembler.cpp index 98d45101c..38e44b12c 100644 --- a/Core/Debugger/Disassembler.cpp +++ b/Core/Debugger/Disassembler.cpp @@ -314,10 +314,13 @@ void Disassembler::GetLineData(DisassemblyResult& row, CpuType type, MemoryType { data.Address = row.CpuAddress; data.AbsoluteAddress = row.Address; + data.OpSize = 0; + data.Flags = row.Flags; data.EffectiveAddress = {}; data.Value = 0; - data.Flags = row.Flags; data.LineCpuType = type; + data.Text[0] = 0; + data.Comment[0] = 0; //TODO move color logic to UI and complete missing data? diff --git a/Core/Debugger/DisassemblySearch.cpp b/Core/Debugger/DisassemblySearch.cpp index 664cc9535..9a3cb2f81 100644 --- a/Core/Debugger/DisassemblySearch.cpp +++ b/Core/Debugger/DisassemblySearch.cpp @@ -77,6 +77,9 @@ uint32_t DisassemblySearch::SearchDisassembly(CpuType cpuType, const char* searc prevAddress = rows[i].CpuAddress; _disassembler->GetLineData(rows[i], cpuType, memType, lineData); + if(lineData.Flags & LineFlags::BlockStart) { + continue; + } if(TextContains(searchStr, lineData.Text, 1000, options)) { searchResults[resultCount] = lineData; diff --git a/UI/Debugger/ViewModels/FindResultListViewModel.cs b/UI/Debugger/ViewModels/FindResultListViewModel.cs index a0fe53036..6fb63d9ac 100644 --- a/UI/Debugger/ViewModels/FindResultListViewModel.cs +++ b/UI/Debugger/ViewModels/FindResultListViewModel.cs @@ -162,5 +162,13 @@ public FindResultViewModel(CodeLineData line) if(line.EffectiveAddress >= 0) { Text += " " + line.GetEffectiveAddressString(format, out _); } + + if(line.Comment.Length > 0) { + if(string.IsNullOrWhiteSpace(Text)) { + Text = line.Comment; + } else { + Text += " " + line.Comment; + } + } } }