diff --git a/Core/Debugger/DisassemblyManager.cpp b/Core/Debugger/DisassemblyManager.cpp index 4ec8693c0a..882239bbc8 100644 --- a/Core/Debugger/DisassemblyManager.cpp +++ b/Core/Debugger/DisassemblyManager.cpp @@ -153,7 +153,7 @@ void DisassemblyManager::analyze(u32 address, u32 size = 1024) u32 next = symbolMap.GetNextSymbolAddress(address,ST_ALL); - if (next % 4) + if ((next % 4) && next != -1) { u32 alignedNext = next & ~3; diff --git a/Core/Debugger/SymbolMap.cpp b/Core/Debugger/SymbolMap.cpp index cc4f37fd6b..39c1fe6d22 100644 --- a/Core/Debugger/SymbolMap.cpp +++ b/Core/Debugger/SymbolMap.cpp @@ -663,67 +663,4 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) const RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); } -void SymbolMap::FillSymbolComboBox(HWND comboxBox, SymbolType symType) const -{ - wchar_t temp[256]; - lock_guard guard(lock_); - - SendMessage(comboxBox, WM_SETREDRAW, FALSE, 0); - ComboBox_ResetContent(comboxBox); - - switch (symType) - { - case ST_FUNCTION: - { - SendMessage(comboxBox, CB_INITSTORAGE, (WPARAM)functions.size(), (LPARAM)functions.size() * 30); - - for (auto it = functions.begin(), end = functions.end(); it != end; ++it) - { - const FunctionEntry& entry = it->second; - const char* name = GetLabelName(it->first); - - if (name != NULL) - wsprintf(temp, L"%S", name); - else - wsprintf(temp, L"0x%08X", it->first); - - int index = ComboBox_AddString(comboxBox,temp); - ComboBox_SetItemData(comboxBox,index,it->first); - } - } - break; - - case ST_DATA: - { - int count = ARRAYSIZE(defaultSymbols)+(int)data.size(); - SendMessage(comboxBox, CB_INITSTORAGE, (WPARAM)count, (LPARAM)count * 30); - - for (int i = 0; i < ARRAYSIZE(defaultSymbols); i++) - { - wsprintf(temp, L"0x%08X (%S)", defaultSymbols[i].address, defaultSymbols[i].name); - int index = ComboBox_AddString(comboxBox,temp); - ComboBox_SetItemData(comboxBox,index,defaultSymbols[i].address); - } - - for (auto it = data.begin(), end = data.end(); it != end; ++it) - { - const DataEntry& entry = it->second; - const char* name = GetLabelName(it->first); - - if (name != NULL) - wsprintf(temp, L"%S", name); - else - wsprintf(temp, L"0x%08X", it->first); - - int index = ComboBox_AddString(comboxBox,temp); - ComboBox_SetItemData(comboxBox,index,it->first); - } - } - break; - } - - SendMessage(comboxBox, WM_SETREDRAW, TRUE, 0); - RedrawWindow(comboxBox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); -} - #endif diff --git a/Core/Debugger/SymbolMap.h b/Core/Debugger/SymbolMap.h index d81ea20f1d..3bcdbd1c23 100644 --- a/Core/Debugger/SymbolMap.h +++ b/Core/Debugger/SymbolMap.h @@ -68,7 +68,6 @@ public: #ifdef _WIN32 void FillSymbolListBox(HWND listbox, SymbolType symType) const; - void FillSymbolComboBox(HWND listbox,SymbolType symType) const; #endif void AddFunction(const char* name, u32 address, u32 size); diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 994d6adbd9..190b7f8e99 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -101,8 +101,6 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di CtrlRegisterList *rl = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); rl->setCPU(cpu); - - symbolMap.FillSymbolComboBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); leftTabs = new TabControl(GetDlgItem(m_hDlg,IDC_LEFTTABS)); leftTabs->SetIgnoreBottomMargin(true); @@ -531,7 +529,6 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) case IDC_ALLFUNCTIONS: { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); - symbolMap.FillSymbolComboBox(GetDlgItem(m_hDlg, IDC_GOTOINT),ST_FUNCTION); break; } default: @@ -780,7 +777,6 @@ void CDisasm::SetDebugMode(bool _bDebug, bool switchPC) void CDisasm::NotifyMapLoaded() { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); - symbolMap.FillSymbolComboBox(GetDlgItem(m_hDlg, IDC_GOTOINT),ST_FUNCTION); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); ptr->clearFunctions(); ptr->redraw();