From 90c8c2185dcec2788c21845879e9a646c58040c4 Mon Sep 17 00:00:00 2001 From: "fires.gc" Date: Mon, 21 Jul 2008 15:56:14 +0000 Subject: [PATCH] added dummy dialogs for debugger git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@40 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/DebuggerWX.vcproj | 18 ++++- Source/Core/DebuggerWX/src/BreakPointDlg.cpp | 65 ++++++++++++++++ Source/Core/DebuggerWX/src/BreakPointDlg.h | 64 ++++++++++++++++ .../Core/DebuggerWX/src/BreakpointWindow.cpp | 27 +++++-- Source/Core/DebuggerWX/src/BreakpointWindow.h | 19 ++++- Source/Core/DebuggerWX/src/MemoryCheckDlg.cpp | 76 +++++++++++++++++++ Source/Core/DebuggerWX/src/MemoryCheckDlg.h | 71 +++++++++++++++++ 7 files changed, 331 insertions(+), 9 deletions(-) create mode 100644 Source/Core/DebuggerWX/src/BreakPointDlg.cpp create mode 100644 Source/Core/DebuggerWX/src/BreakPointDlg.h create mode 100644 Source/Core/DebuggerWX/src/MemoryCheckDlg.cpp create mode 100644 Source/Core/DebuggerWX/src/MemoryCheckDlg.h diff --git a/Source/Core/DebuggerWX/DebuggerWX.vcproj b/Source/Core/DebuggerWX/DebuggerWX.vcproj index 7509f8f222..f26b6c8292 100644 --- a/Source/Core/DebuggerWX/DebuggerWX.vcproj +++ b/Source/Core/DebuggerWX/DebuggerWX.vcproj @@ -1,7 +1,7 @@ + + + + @@ -470,6 +478,14 @@ RelativePath=".\src\LogWindow.h" > + + + + diff --git a/Source/Core/DebuggerWX/src/BreakPointDlg.cpp b/Source/Core/DebuggerWX/src/BreakPointDlg.cpp new file mode 100644 index 0000000000..5c89669b77 --- /dev/null +++ b/Source/Core/DebuggerWX/src/BreakPointDlg.cpp @@ -0,0 +1,65 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#include "BreakPointDlg.h" + + +BEGIN_EVENT_TABLE(BreakPointDlg,wxDialog) + EVT_CLOSE(BreakPointDlg::OnClose) +END_EVENT_TABLE() + + +BreakPointDlg::BreakPointDlg(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) +: wxDialog(parent, id, title, position, size, style) +{ + CreateGUIControls(); +} + + +BreakPointDlg::~BreakPointDlg() +{ +} + + +void BreakPointDlg::CreateGUIControls() +{ + SetIcon(wxNullIcon); + SetSize(8,8,279,121); + Center(); + + + wxStaticText* WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Address"), wxPoint(8,24), wxDefaultSize, 0, wxT("WxStaticText1")); + WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(192,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK")); + m_pButtonOK->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(112,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel")); + m_pButtonCancel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pEditAddress = new wxTextCtrl(this, ID_ADDRESS, wxT("WxEdit1"), wxPoint(56,24), wxSize(197,20), 0, wxDefaultValidator, wxT("WxEdit1")); + m_pEditAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + wxStaticBox* WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Address"), wxPoint(0,0), wxSize(265,57)); + WxStaticBox1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); +} + + +void BreakPointDlg::OnClose(wxCloseEvent& /*event*/) +{ + Destroy(); +} diff --git a/Source/Core/DebuggerWX/src/BreakPointDlg.h b/Source/Core/DebuggerWX/src/BreakPointDlg.h new file mode 100644 index 0000000000..2490e6f430 --- /dev/null +++ b/Source/Core/DebuggerWX/src/BreakPointDlg.h @@ -0,0 +1,64 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef __BREAKPOINTDLG_h__ +#define __BREAKPOINTDLG_h__ + + +#include +#include +#include +#include +#include +#include + +#undef BreakPointDlg_STYLE +#define BreakPointDlg_STYLE wxCAPTION | wxSYSTEM_MENU | wxSTAY_ON_TOP | wxDIALOG_NO_PARENT | wxCLOSE_BOX + + +class BreakPointDlg : public wxDialog +{ + private: + DECLARE_EVENT_TABLE(); + + public: + BreakPointDlg(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("BreakPoint"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = BreakPointDlg_STYLE); + virtual ~BreakPointDlg(); + + private: + + wxButton *m_pButtonOK; + wxButton *m_pButtonCancel; + wxTextCtrl *m_pEditAddress; + + private: + + enum + { + ID_WXSTATICTEXT1 = 1006, + ID_OK = 1005, + ID_CANCEL = 1004, + ID_ADDRESS = 1003, + ID_WXSTATICBOX1 = 1001, + }; + + private: + void OnClose(wxCloseEvent& event); + void CreateGUIControls(); +}; + +#endif diff --git a/Source/Core/DebuggerWX/src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/src/BreakpointWindow.cpp index 303eb96f21..37bbf62c8b 100644 --- a/Source/Core/DebuggerWX/src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/src/BreakpointWindow.cpp @@ -1,12 +1,27 @@ -//__________________________________________________________________________________________________ -// F|RES and ector 2003-2008 -// +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ #include "Debugger.h" #include "BreakpointWindow.h" #include "BreakpointView.h" #include "CodeWindow.h" #include "HW/Memmap.h" +#include "BreakPointDlg.h" +#include "MemoryCheckDlg.h" #include "wx/mstream.h" @@ -155,14 +170,16 @@ CBreakPointWindow::OnDelete(wxCommandEvent& event) void CBreakPointWindow::OnAddBreakPoint(wxCommandEvent& event) { - + BreakPointDlg bpDlg(this); + bpDlg.ShowModal(); } void CBreakPointWindow::OnAddMemoryCheck(wxCommandEvent& event) { - + MemoryCheckDlg memDlg(this); + memDlg.ShowModal(); } diff --git a/Source/Core/DebuggerWX/src/BreakpointWindow.h b/Source/Core/DebuggerWX/src/BreakpointWindow.h index 43bbe03f37..652e0c6869 100644 --- a/Source/Core/DebuggerWX/src/BreakpointWindow.h +++ b/Source/Core/DebuggerWX/src/BreakpointWindow.h @@ -1,6 +1,19 @@ -//__________________________________________________________________________________________________ -// F|RES and ector 2003-2008 -// +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ #ifndef __BREAKPOINTWINDOW_h__ #define __BREAKPOINTWINDOW_h__ diff --git a/Source/Core/DebuggerWX/src/MemoryCheckDlg.cpp b/Source/Core/DebuggerWX/src/MemoryCheckDlg.cpp new file mode 100644 index 0000000000..57c14c5b5b --- /dev/null +++ b/Source/Core/DebuggerWX/src/MemoryCheckDlg.cpp @@ -0,0 +1,76 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#include "MemoryCheckDlg.h" + + +BEGIN_EVENT_TABLE(MemoryCheckDlg,wxDialog) + EVT_CLOSE(MemoryCheckDlg::OnClose) +END_EVENT_TABLE() + + +MemoryCheckDlg::MemoryCheckDlg(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) +: wxDialog(parent, id, title, position, size, style) +{ + CreateGUIControls(); +} + +MemoryCheckDlg::~MemoryCheckDlg() +{ +} + +void MemoryCheckDlg::CreateGUIControls() +{ + SetIcon(wxNullIcon); + SetSize(8,8,415,122); + Center(); + + m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(248,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel")); + m_pButtonCancel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(328,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK")); + m_pButtonOK->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pReadFlag = new wxCheckBox(this, ID_READ_FLAG, wxT("Read"), wxPoint(336,33), wxSize(57,15), 0, wxDefaultValidator, wxT("Read")); + m_pReadFlag->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pWriteFlag = new wxCheckBox(this, ID_WRITE_FLAG, wxT("Write"), wxPoint(336,16), wxSize(57,17), 0, wxDefaultValidator, wxT("WxCheckBox1")); + m_pWriteFlag->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + wxStaticBox* WxStaticBox2 = new wxStaticBox(this, ID_WXSTATICBOX2, wxT("Break On"), wxPoint(328,0), wxSize(73,57)); + WxStaticBox2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pEditEndAddress = new wxTextCtrl(this, ID_EDIT_END_ADDRESS, wxT("EndAddr"), wxPoint(200,24), wxSize(109,20), 0, wxDefaultValidator, wxT("WxEdit2")); + m_pEditEndAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + wxStaticText* WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("End"), wxPoint(168,24), wxDefaultSize, 0, wxT("WxStaticText2")); + WxStaticText2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + wxStaticText* WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Start"), wxPoint(8,24), wxDefaultSize, 0, wxT("WxStaticText1")); + WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + m_pEditStartAddress = new wxTextCtrl(this, ID_EDIT_START_ADDR, wxT("StartAddr"), wxPoint(40,24), wxSize(109,20), 0, wxDefaultValidator, wxT("WxEdit1")); + m_pEditStartAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); + + wxStaticBox* WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Address Range"), wxPoint(0,0), wxSize(321,57)); + WxStaticBox1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); +} + +void MemoryCheckDlg::OnClose(wxCloseEvent& /*event*/) +{ + Destroy(); +} diff --git a/Source/Core/DebuggerWX/src/MemoryCheckDlg.h b/Source/Core/DebuggerWX/src/MemoryCheckDlg.h new file mode 100644 index 0000000000..173e774769 --- /dev/null +++ b/Source/Core/DebuggerWX/src/MemoryCheckDlg.h @@ -0,0 +1,71 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef __MEMORYCHECKDLG_h__ +#define __MEMORYCHECKDLG_h__ + +#include +#include +#include +#include +#include +#include +#include + +#undef MemoryCheckDlg_STYLE +#define MemoryCheckDlg_STYLE wxCAPTION | wxSYSTEM_MENU | wxSTAY_ON_TOP | wxDIALOG_NO_PARENT | wxCLOSE_BOX + +class MemoryCheckDlg : public wxDialog +{ + private: + DECLARE_EVENT_TABLE(); + + public: + MemoryCheckDlg(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Memory Check"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MemoryCheckDlg_STYLE); + virtual ~MemoryCheckDlg(); + + private: + + wxButton* m_pButtonCancel; + wxButton* m_pButtonOK; + wxCheckBox* m_pReadFlag; + wxCheckBox* m_pWriteFlag; + wxTextCtrl* m_pEditEndAddress; + wxTextCtrl* m_pEditStartAddress; + + private: + + enum + { + ID_CANCEL = 1016, + ID_OK = 1015, + ID_READ_FLAG = 1014, + ID_WRITE_FLAG = 1013, + ID_WXSTATICBOX2 = 1012, + ID_EDIT_END_ADDRESS = 1011, + ID_WXSTATICTEXT2 = 1010, + ID_WXSTATICTEXT1 = 1009, + ID_EDIT_START_ADDR = 1008, + ID_WXSTATICBOX1 = 1007, + }; + + private: + void OnClose(wxCloseEvent& event); + void CreateGUIControls(); +}; + +#endif