diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-01-20 13:13:03 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-01-20 13:13:03 +0000 |
| commit | d6443478b0ea48771ba7eaadb39442608ffe84ee (patch) | |
| tree | 3fed8b856b99e43071c75175fccd2cc538a394dc /Source/Core/DebuggerWX | |
| parent | 8c997e90d916b9eee06449c9ced1266bac7d7559 (diff) | |
fix a minor "misfeature" in the symbol table code.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1952 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX')
| -rw-r--r-- | Source/Core/DebuggerWX/Src/CodeView.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/Src/RegisterView.h | 41 |
2 files changed, 30 insertions, 22 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeView.cpp b/Source/Core/DebuggerWX/Src/CodeView.cpp index 42a6dd4d94..032ba2bba3 100644 --- a/Source/Core/DebuggerWX/Src/CodeView.cpp +++ b/Source/Core/DebuggerWX/Src/CodeView.cpp @@ -45,6 +45,7 @@ enum IDM_RENAMESYMBOL, IDM_PATCHALERT, IDM_COPYFUNCTION, + IDM_ADDFUNCTION, }; @@ -221,6 +222,8 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) wxTheClipboard->SetData(new wxTextDataObject(wxString::FromAscii(temp))); } break; + + case IDM_COPYFUNCTION: { Symbol *symbol = g_symbolDB.GetSymbolFromAddr(selection); @@ -289,6 +292,13 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) } break; + case IDM_ADDFUNCTION: + { + g_symbolDB.AddFunction(selection); + Host_NotifyMapLoaded(); + } + break; + case IDM_RENAMESYMBOL: { Symbol *symbol = g_symbolDB.GetSymbolFromAddr(selection); @@ -336,6 +346,7 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event) menu.Append(IDM_RENAMESYMBOL, wxString::FromAscii("Rename &symbol"))->Enable(isSymbol); menu.AppendSeparator(); menu.Append(IDM_RUNTOHERE, _T("&Run To Here")); + menu.Append(IDM_ADDFUNCTION, _T("&Add function")); menu.Append(IDM_JITRESULTS, wxString::FromAscii("PPC vs X86")); menu.Append(IDM_INSERTBLR, wxString::FromAscii("Insert &blr")); menu.Append(IDM_PATCHALERT, wxString::FromAscii("Patch alert")); diff --git a/Source/Core/DebuggerWX/Src/RegisterView.h b/Source/Core/DebuggerWX/Src/RegisterView.h index 4ed7e0db48..9b6a148b78 100644 --- a/Source/Core/DebuggerWX/Src/RegisterView.h +++ b/Source/Core/DebuggerWX/Src/RegisterView.h @@ -22,31 +22,28 @@ #include "Common.h" -class CRegTable - : public wxGridTableBase +class CRegTable : public wxGridTableBase { - public: - CRegTable(){;} - int GetNumberCols(void){return 4;} - int GetNumberRows(void){return 16;} - bool IsEmptyCell(int, int){return false;} - wxString GetValue(int, int); - void SetValue(int, int, const wxString &); - wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind); - - private: - DECLARE_NO_COPY_CLASS(CRegTable); +public: + CRegTable() {} + int GetNumberCols(void){return 4;} + int GetNumberRows(void){return 16;} + bool IsEmptyCell(int, int){return false;} + wxString GetValue(int, int); + void SetValue(int, int, const wxString &); + wxGridCellAttr *GetAttr(int, int, wxGridCellAttr::wxAttrKind); + +private: + DECLARE_NO_COPY_CLASS(CRegTable); }; -class CRegisterView - : public wxGrid +class CRegisterView : public wxGrid { - public: - CRegisterView(wxWindow* parent, wxWindowID id); - - void Update(); - - u32 m_CachedRegs[32]; - bool m_CachedRegHasChanged[32]; +public: + CRegisterView(wxWindow* parent, wxWindowID id); + void Update(); + u32 m_CachedRegs[32]; + bool m_CachedRegHasChanged[32]; }; + #endif |
