Fix issues
This commit is contained in:
parent
f3085844f5
commit
e049c48b2b
|
@ -32,28 +32,6 @@ const CSetValueDlg::ComboItem CDebugSymbols::ModalChangeTypeItems[] = {
|
|||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
const char* CDebugSymbols::GetTypeName(int m_Type)
|
||||
{
|
||||
switch (m_Type)
|
||||
{
|
||||
case SYM_CODE: return "code";
|
||||
case SYM_DATA: return "data";
|
||||
case SYM_U8: return "uint8";
|
||||
case SYM_U16: return "uint16";
|
||||
case SYM_U32: return "uint32";
|
||||
case SYM_U64: return "uint64";
|
||||
case SYM_S8: return "int8";
|
||||
case SYM_S16: return "int16";
|
||||
case SYM_S32: return "int32";
|
||||
case SYM_S64: return "int64";
|
||||
case SYM_FLOAT: return "float";
|
||||
case SYM_DOUBLE: return "double";
|
||||
case SYM_INVALID: return "invalid";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CDebugSymbols::CDebugSymbols(CDebuggerUI * debugger) :
|
||||
CDebugDialog<CDebugSymbols>(debugger)
|
||||
{
|
||||
|
@ -158,7 +136,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
|
||||
int mouseX = mousePt.x - listRect.left;
|
||||
|
||||
for (int nCol = 0, colX = 0; nCol < m_SymbolsListView_Num_Columns; nCol++)
|
||||
for (int nCol = 0, colX = 0; nCol < SymbolsListView_Num_Columns; nCol++)
|
||||
{
|
||||
int colWidth = m_SymbolsListView.GetColumnWidth(nCol);
|
||||
if (mouseX >= colX && mouseX <= colX + colWidth)
|
||||
|
@ -181,7 +159,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
|
||||
switch (nSelectedCol)
|
||||
{
|
||||
case m_SymbolsListView_Col_Address:
|
||||
case SymbolsListView_Col_Address:
|
||||
// Open it in memory viewer/commands viewer
|
||||
if (symbol.m_Type == SYM_CODE) // code
|
||||
{
|
||||
|
@ -192,7 +170,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
m_Debugger->Debug_ShowMemoryLocation(symbol.m_Address, true);
|
||||
}
|
||||
break;
|
||||
case m_SymbolsListView_Col_Type:
|
||||
case SymbolsListView_Col_Type:
|
||||
if (m_SetValueDlg.DoModal("Change type", "New type:", symbol.m_Type, ModalChangeTypeItems))
|
||||
{
|
||||
ValueType t = (ValueType)m_SetValueDlg.GetEnteredData();
|
||||
|
@ -202,7 +180,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
m_Debugger->SymbolTable()->AddSymbol(t, symbol.m_Address, symbol.m_Name, symbol.m_Description);
|
||||
}
|
||||
break;
|
||||
case m_SymbolsListView_Col_Name:
|
||||
case SymbolsListView_Col_Name:
|
||||
if (m_SetValueDlg.DoModal("Set name", "New name:", symbol.m_Name))
|
||||
{
|
||||
char* szEnteredString = m_SetValueDlg.GetEnteredString();
|
||||
|
@ -210,7 +188,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
m_Debugger->SymbolTable()->AddSymbol(symbol.m_Type, symbol.m_Address, szEnteredString, symbol.m_Description);
|
||||
}
|
||||
break;
|
||||
case m_SymbolsListView_Col_Value:
|
||||
case SymbolsListView_Col_Value:
|
||||
char szValue[64];
|
||||
m_Debugger->SymbolTable()->GetValueString(szValue, &symbol);
|
||||
if (m_SetValueDlg.DoModal("Change value", "New value:", szValue))
|
||||
|
@ -250,7 +228,7 @@ LRESULT CDebugSymbols::OnListDblClicked(NMHDR* pNMHDR)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case m_SymbolsListView_Col_Description:
|
||||
case SymbolsListView_Col_Description:
|
||||
if (m_SetValueDlg.DoModal("Set description", "New description:", symbol.m_Description))
|
||||
{
|
||||
char* szEnteredString = m_SetValueDlg.GetEnteredString();
|
||||
|
|
|
@ -21,17 +21,14 @@ class CDebugSymbols :
|
|||
{
|
||||
private:
|
||||
enum {
|
||||
m_SymbolsListView_Col_Address,
|
||||
m_SymbolsListView_Col_Type,
|
||||
m_SymbolsListView_Col_Name,
|
||||
m_SymbolsListView_Col_Value,
|
||||
m_SymbolsListView_Col_Description,
|
||||
m_SymbolsListView_Num_Columns
|
||||
SymbolsListView_Col_Address,
|
||||
SymbolsListView_Col_Type,
|
||||
SymbolsListView_Col_Name,
|
||||
SymbolsListView_Col_Value,
|
||||
SymbolsListView_Col_Description,
|
||||
SymbolsListView_Num_Columns
|
||||
};
|
||||
|
||||
//Probably shouldn't be here?
|
||||
const char* GetTypeName(int m_Type);
|
||||
|
||||
static const CSetValueDlg::ComboItem ModalChangeTypeItems[];
|
||||
|
||||
CListViewCtrl m_SymbolsListView;
|
||||
|
|
Loading…
Reference in New Issue