GTK :
Removed debugger support. The SDL and MFC versions have much better debug features. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@713 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
7d488f231f
commit
3852562980
|
@ -1362,56 +1362,6 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="ToolsMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Tools</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="ToolsMenu_menu">
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="GdbMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_GDB</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="GdbMenu_menu">
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="GdbWait">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Wait connection...</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="GdbLoadAndWait">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Load and wait...</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="GdbBreak">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Break</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="GdbDisconnect">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Disconnect</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="HelpMenu">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -44,15 +44,8 @@
|
|||
|
||||
extern int systemRenderedFrames;
|
||||
extern int systemFPS;
|
||||
extern bool debugger;
|
||||
extern int RGB_LOW_BITS_MASK;
|
||||
extern void remoteInit();
|
||||
extern void remoteCleanUp();
|
||||
extern void remoteStubMain();
|
||||
extern void remoteStubSignal(int, int);
|
||||
extern void remoteOutput(const char *, u32);
|
||||
extern void remoteSetProtocol(int);
|
||||
extern void remoteSetPort(int);
|
||||
|
||||
|
||||
namespace VBA
|
||||
{
|
||||
|
@ -760,26 +753,6 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) :
|
|||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("VideoFullscreen"));
|
||||
poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnVideoFullscreen));
|
||||
|
||||
// GDB menu
|
||||
//
|
||||
#ifndef NO_DEBUGGER
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("GdbWait"));
|
||||
poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBWait));
|
||||
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("GdbLoadAndWait"));
|
||||
poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBLoadAndWait));
|
||||
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("GdbBreak"));
|
||||
poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBBreak));
|
||||
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("GdbDisconnect"));
|
||||
poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBDisconnect));
|
||||
#else
|
||||
// Hide the whole Tools menu as it only contains the debugger stuff as of now
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("ToolsMenu"));
|
||||
poMI->hide();
|
||||
#endif //NO_DEBUGGER
|
||||
|
||||
// Help menu
|
||||
//
|
||||
poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("HelpAbout"));
|
||||
|
@ -879,7 +852,6 @@ void Window::vInitSystem()
|
|||
systemFPS = 0;
|
||||
|
||||
emulating = 0;
|
||||
debugger = false;
|
||||
|
||||
for (int i = 0; i < 0x10000; i++)
|
||||
{
|
||||
|
@ -1344,7 +1316,6 @@ bool Window::bLoadROM(const std::string & _rsFile)
|
|||
vLoadBattery();
|
||||
vUpdateScreen();
|
||||
|
||||
debugger = false; // May cause conflicts
|
||||
emulating = 1;
|
||||
m_bWasEmulating = false;
|
||||
m_uiThrottleDelay = Glib::TimeVal(0, 0);
|
||||
|
|
|
@ -167,12 +167,6 @@ protected:
|
|||
virtual void vOnJoypadConfigure(EPad _eJoypad);
|
||||
virtual void vOnJoypadToggled(Gtk::CheckMenuItem * _poCMI, EPad _eJoypad);
|
||||
virtual void vOnAutofireToggled(Gtk::CheckMenuItem * _poCMI, EKey _eKey);
|
||||
#ifndef NO_DEBUGGER
|
||||
virtual void vOnGDBWait();
|
||||
virtual void vOnGDBLoadAndWait();
|
||||
virtual void vOnGDBBreak();
|
||||
virtual void vOnGDBDisconnect();
|
||||
#endif //NO_DEBUGGER
|
||||
virtual void vOnHelpAbout();
|
||||
virtual bool bOnEmuIdle();
|
||||
|
||||
|
|
|
@ -38,20 +38,6 @@
|
|||
#include "intl.h"
|
||||
#include "joypadconfig.h"
|
||||
|
||||
extern int systemRenderedFrames;
|
||||
extern int systemFPS;
|
||||
extern bool debugger;
|
||||
extern int RGB_LOW_BITS_MASK;
|
||||
extern void (*dbgMain)();
|
||||
extern void (*dbgSignal)(int, int);
|
||||
extern void remoteInit();
|
||||
extern void remoteCleanUp();
|
||||
extern void remoteStubMain();
|
||||
extern void remoteStubSignal(int, int);
|
||||
extern void remoteOutput(const char *, u32);
|
||||
extern void remoteSetProtocol(int);
|
||||
extern void remoteSetPort(int);
|
||||
|
||||
namespace VBA
|
||||
{
|
||||
|
||||
|
@ -914,160 +900,6 @@ void Window::vOnAutofireToggled(Gtk::CheckMenuItem * _poCMI, EKey _eKey)
|
|||
m_poInputConfig->vSetKey(sKey, _poCMI->get_active());
|
||||
}
|
||||
|
||||
#ifndef NO_DEBUGGER
|
||||
void Window::vOnGDBWait()
|
||||
{
|
||||
Glib::RefPtr<Xml> poXml;
|
||||
poXml = Xml::create(PKGDATADIR "/vba.glade", "TcpPortDialog");
|
||||
|
||||
Gtk::Dialog * poDialog = dynamic_cast<Gtk::Dialog *>(poXml->get_widget("TcpPortDialog"));
|
||||
Gtk::SpinButton * poSpin = dynamic_cast<Gtk::SpinButton *>(poXml->get_widget("TcpPortSpin"));
|
||||
|
||||
poDialog->set_transient_for(*this);
|
||||
|
||||
int iPort = 55555;
|
||||
poSpin->set_value(iPort);
|
||||
|
||||
bool bOk = false;
|
||||
if (poDialog->run() == Gtk::RESPONSE_OK)
|
||||
{
|
||||
bOk = true;
|
||||
iPort = poSpin->get_value_as_int();
|
||||
}
|
||||
delete poDialog;
|
||||
|
||||
if (! bOk)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_eCartridge = CartridgeGBA;
|
||||
m_sRomFile = "gnu_stub";
|
||||
m_stEmulator = GBASystem;
|
||||
|
||||
rom = (u8 *) malloc(0x2000000);
|
||||
workRAM = (u8 *) calloc(1, 0x40000);
|
||||
bios = (u8 *) calloc(1, 0x4000);
|
||||
internalRAM = (u8 *) calloc(1, 0x8000);
|
||||
paletteRAM = (u8 *) calloc(1, 0x400);
|
||||
vram = (u8 *) calloc(1, 0x20000);
|
||||
oam = (u8 *) calloc(1, 0x400);
|
||||
pix = (u8 *) calloc(1, 4 * m_iGBAScreenWidth * m_iGBAScreenHeight);
|
||||
ioMem = (u8 *) calloc(1, 0x400);
|
||||
|
||||
useBios = m_poCoreConfig->oGetKey<bool>("use_bios_file");
|
||||
CPUInit(m_poCoreConfig->sGetKey("bios_file").c_str(), useBios);
|
||||
CPUReset();
|
||||
|
||||
for (std::list<Gtk::Widget *>::iterator it = m_listSensitiveWhenPlaying.begin();
|
||||
it != m_listSensitiveWhenPlaying.end();
|
||||
it++)
|
||||
{
|
||||
(*it)->set_sensitive();
|
||||
}
|
||||
|
||||
if (m_poCoreConfig->oGetKey<bool>("load_game_auto"))
|
||||
{
|
||||
vOnLoadGameMostRecent();
|
||||
}
|
||||
|
||||
vStartEmu();
|
||||
|
||||
emulating = 1;
|
||||
|
||||
dbgMain = remoteStubMain;
|
||||
dbgSignal = remoteStubSignal;
|
||||
dbgOutput = remoteOutput;
|
||||
debugger = true;
|
||||
|
||||
remoteSetProtocol(0);
|
||||
remoteSetPort(iPort);
|
||||
remoteInit();
|
||||
}
|
||||
|
||||
void Window::vOnGDBLoadAndWait()
|
||||
{
|
||||
bool bLoaded = false;
|
||||
|
||||
while (m_poFileOpenDialog->run() == Gtk::RESPONSE_OK)
|
||||
{
|
||||
if (bLoadROM(m_poFileOpenDialog->get_filename()))
|
||||
{
|
||||
bLoaded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_poFileOpenDialog->hide();
|
||||
|
||||
if (! bLoaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_eCartridge != CartridgeGBA)
|
||||
{
|
||||
vPopupError(_("Only GBA images are supported."));
|
||||
vOnFileClose();
|
||||
return;
|
||||
}
|
||||
|
||||
Glib::RefPtr<Xml> poXml;
|
||||
poXml = Xml::create(PKGDATADIR "/vba.glade", "TcpPortDialog");
|
||||
|
||||
Gtk::Dialog * poDialog = dynamic_cast<Gtk::Dialog *>(poXml->get_widget("TcpPortDialog"));
|
||||
Gtk::SpinButton * poSpin = dynamic_cast<Gtk::SpinButton *>(poXml->get_widget("TcpPortSpin"));
|
||||
|
||||
poDialog->set_transient_for(*this);
|
||||
|
||||
int iPort = 55555;
|
||||
poSpin->set_value(iPort);
|
||||
|
||||
bool bOk = false;
|
||||
if (poDialog->run() == Gtk::RESPONSE_OK)
|
||||
{
|
||||
bOk = true;
|
||||
iPort = poSpin->get_value_as_int();
|
||||
}
|
||||
delete poDialog;
|
||||
|
||||
if (! bOk)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dbgMain = remoteStubMain;
|
||||
dbgSignal = remoteStubSignal;
|
||||
dbgOutput = remoteOutput;
|
||||
debugger = true;
|
||||
|
||||
remoteSetProtocol(0);
|
||||
remoteSetPort(iPort);
|
||||
remoteInit();
|
||||
}
|
||||
|
||||
void Window::vOnGDBBreak()
|
||||
{
|
||||
if (armState)
|
||||
{
|
||||
armNextPC -= 4;
|
||||
reg[15].I -= 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
armNextPC -= 2;
|
||||
reg[15].I -= 2;
|
||||
}
|
||||
|
||||
debugger = true;
|
||||
}
|
||||
|
||||
void Window::vOnGDBDisconnect()
|
||||
{
|
||||
remoteCleanUp();
|
||||
debugger = false;
|
||||
}
|
||||
#endif //NO_DEBUGGER
|
||||
|
||||
void Window::vOnHelpAbout()
|
||||
{
|
||||
Gtk::AboutDialog oAboutDialog;
|
||||
|
@ -1104,12 +936,6 @@ void Window::vOnHelpAbout()
|
|||
|
||||
bool Window::bOnEmuIdle()
|
||||
{
|
||||
if (debugger && m_stEmulator.emuHasDebugger)
|
||||
{
|
||||
dbgMain();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_uiThrottleDelay != Glib::TimeVal(0, 0))
|
||||
{
|
||||
Glib::TimeVal uiTime;
|
||||
|
|
Loading…
Reference in New Issue