mirror of https://github.com/stella-emu/stella.git
Added mini message box to debugger, which will be used to inform the
user of debugger-related state information. Reworked breakpoint/trap support to display a message in debugger messagebox indicating what condition caused the debugger to start. This is much better than before, when no feedback was given as to why the debugger started. Some usability fixes to ListWidget/RomWidget. There are still a few more tweaks to do before the final release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@788 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
b96efe9da8
commit
7fd1a9089b
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Debugger.cxx,v 1.92 2005-09-15 19:43:36 stephena Exp $
|
// $Id: Debugger.cxx,v 1.93 2005-09-20 19:09:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
|
@ -41,6 +41,7 @@
|
||||||
#include "TiaInfoWidget.hxx"
|
#include "TiaInfoWidget.hxx"
|
||||||
#include "TiaOutputWidget.hxx"
|
#include "TiaOutputWidget.hxx"
|
||||||
#include "TiaZoomWidget.hxx"
|
#include "TiaZoomWidget.hxx"
|
||||||
|
#include "EditTextWidget.hxx"
|
||||||
|
|
||||||
#include "RomWidget.hxx"
|
#include "RomWidget.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
@ -146,6 +147,7 @@ void Debugger::initialize()
|
||||||
myTiaOutput = dd->tiaOutput();
|
myTiaOutput = dd->tiaOutput();
|
||||||
myTiaZoom = dd->tiaZoom();
|
myTiaZoom = dd->tiaZoom();
|
||||||
myRom = dd->rom();
|
myRom = dd->rom();
|
||||||
|
myMessage = dd->message();
|
||||||
|
|
||||||
// set up any breakpoint that was on the command line
|
// set up any breakpoint that was on the command line
|
||||||
// (and remove the key from the settings, so they won't get set again)
|
// (and remove the key from the settings, so they won't get set again)
|
||||||
|
@ -195,9 +197,20 @@ void Debugger::setConsole(Console* console)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool Debugger::start()
|
bool Debugger::start(const string& message, int address)
|
||||||
{
|
{
|
||||||
return myOSystem->eventHandler().enterDebugMode();
|
bool result = myOSystem->eventHandler().enterDebugMode();
|
||||||
|
|
||||||
|
// This must be done *after* we enter debug mode,
|
||||||
|
// so the message isn't erased
|
||||||
|
ostringstream buf;
|
||||||
|
buf << message;
|
||||||
|
if(address > -1)
|
||||||
|
buf << valueToString(address);
|
||||||
|
|
||||||
|
myMessage->setEditString(buf.str());
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Debugger.hxx,v 1.75 2005-09-15 19:43:36 stephena Exp $
|
// $Id: Debugger.hxx,v 1.76 2005-09-20 19:09:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef DEBUGGER_HXX
|
#ifndef DEBUGGER_HXX
|
||||||
|
@ -28,6 +28,7 @@ class TIADebug;
|
||||||
class TiaInfoWidget;
|
class TiaInfoWidget;
|
||||||
class TiaOutputWidget;
|
class TiaOutputWidget;
|
||||||
class TiaZoomWidget;
|
class TiaZoomWidget;
|
||||||
|
class EditTextWidget;
|
||||||
class RomWidget;
|
class RomWidget;
|
||||||
class Expression;
|
class Expression;
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ typedef uInt16 (Debugger::*DEBUGGER_WORD_METHOD)();
|
||||||
for all debugging operations in Stella (parser, 6502 debugger, etc).
|
for all debugging operations in Stella (parser, 6502 debugger, etc).
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: Debugger.hxx,v 1.75 2005-09-15 19:43:36 stephena Exp $
|
@version $Id: Debugger.hxx,v 1.76 2005-09-20 19:09:10 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class Debugger : public DialogContainer
|
class Debugger : public DialogContainer
|
||||||
{
|
{
|
||||||
|
@ -116,8 +117,11 @@ class Debugger : public DialogContainer
|
||||||
/**
|
/**
|
||||||
Wrapper method for EventHandler::enterDebugMode() for those classes
|
Wrapper method for EventHandler::enterDebugMode() for those classes
|
||||||
that don't have access to EventHandler.
|
that don't have access to EventHandler.
|
||||||
|
|
||||||
|
@param message Message to display when entering debugger
|
||||||
|
@param data An address associated with the message
|
||||||
*/
|
*/
|
||||||
bool start();
|
bool start(const string& message = "", int address = -1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Wrapper method for EventHandler::leaveDebugMode() for those classes
|
Wrapper method for EventHandler::leaveDebugMode() for those classes
|
||||||
|
@ -358,6 +362,7 @@ class Debugger : public DialogContainer
|
||||||
TiaOutputWidget* myTiaOutput;
|
TiaOutputWidget* myTiaOutput;
|
||||||
TiaZoomWidget* myTiaZoom;
|
TiaZoomWidget* myTiaZoom;
|
||||||
RomWidget* myRom;
|
RomWidget* myRom;
|
||||||
|
EditTextWidget* myMessage;
|
||||||
|
|
||||||
EquateList *equateList;
|
EquateList *equateList;
|
||||||
PackedBitArray *breakPoints;
|
PackedBitArray *breakPoints;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: DebuggerDialog.cxx,v 1.5 2005-09-15 19:43:36 stephena Exp $
|
// $Id: DebuggerDialog.cxx,v 1.6 2005-09-20 19:09:10 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
#include "RomWidget.hxx"
|
#include "RomWidget.hxx"
|
||||||
#include "TiaWidget.hxx"
|
#include "TiaWidget.hxx"
|
||||||
#include "DataGridOpsWidget.hxx"
|
#include "DataGridOpsWidget.hxx"
|
||||||
|
#include "EditTextWidget.hxx"
|
||||||
#include "Rect.hxx"
|
#include "Rect.hxx"
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
#include "DebuggerParser.hxx"
|
#include "DebuggerParser.hxx"
|
||||||
|
@ -75,6 +76,8 @@ void DebuggerDialog::loadConfig()
|
||||||
myCpu->loadConfig();
|
myCpu->loadConfig();
|
||||||
myRam->loadConfig();
|
myRam->loadConfig();
|
||||||
myRom->loadConfig();
|
myRom->loadConfig();
|
||||||
|
|
||||||
|
myMessageBox->setEditString("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -173,6 +176,7 @@ void DebuggerDialog::addTabArea()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DebuggerDialog::addStatusArea()
|
void DebuggerDialog::addStatusArea()
|
||||||
{
|
{
|
||||||
|
const GUI::Font& font = instance()->consoleFont();
|
||||||
GUI::Rect r = instance()->debugger().getStatusBounds();
|
GUI::Rect r = instance()->debugger().getStatusBounds();
|
||||||
int xpos, ypos;
|
int xpos, ypos;
|
||||||
|
|
||||||
|
@ -182,6 +186,12 @@ void DebuggerDialog::addStatusArea()
|
||||||
ypos += myTiaInfo->getHeight() + 10;
|
ypos += myTiaInfo->getHeight() + 10;
|
||||||
myTiaZoom = new TiaZoomWidget(this, xpos+10, ypos);
|
myTiaZoom = new TiaZoomWidget(this, xpos+10, ypos);
|
||||||
addToFocusList(myTiaZoom->getFocusList());
|
addToFocusList(myTiaZoom->getFocusList());
|
||||||
|
|
||||||
|
xpos += 10; ypos += myTiaZoom->getHeight() + 20;
|
||||||
|
myMessageBox = new EditTextWidget(this, xpos, ypos, myTiaZoom->getWidth(),
|
||||||
|
font.getLineHeight(), "");
|
||||||
|
myMessageBox->setFont(font);
|
||||||
|
myMessageBox->setEditable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: DebuggerDialog.hxx,v 1.3 2005-09-15 19:43:36 stephena Exp $
|
// $Id: DebuggerDialog.hxx,v 1.4 2005-09-20 19:09:10 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -29,6 +29,7 @@ class CpuWidget;
|
||||||
class RamWidget;
|
class RamWidget;
|
||||||
class RomWidget;
|
class RomWidget;
|
||||||
class TabWidget;
|
class TabWidget;
|
||||||
|
class EditTextWidget;
|
||||||
class TiaInfoWidget;
|
class TiaInfoWidget;
|
||||||
class TiaOutputWidget;
|
class TiaOutputWidget;
|
||||||
class TiaZoomWidget;
|
class TiaZoomWidget;
|
||||||
|
@ -43,11 +44,12 @@ class DebuggerDialog : public Dialog
|
||||||
int x, int y, int w, int h);
|
int x, int y, int w, int h);
|
||||||
~DebuggerDialog();
|
~DebuggerDialog();
|
||||||
|
|
||||||
PromptWidget* prompt() { return myPrompt; }
|
PromptWidget* prompt() { return myPrompt; }
|
||||||
TiaInfoWidget* tiaInfo() { return myTiaInfo; }
|
TiaInfoWidget* tiaInfo() { return myTiaInfo; }
|
||||||
TiaOutputWidget* tiaOutput() { return myTiaOutput; }
|
TiaOutputWidget* tiaOutput() { return myTiaOutput; }
|
||||||
TiaZoomWidget* tiaZoom() { return myTiaZoom; }
|
TiaZoomWidget* tiaZoom() { return myTiaZoom; }
|
||||||
RomWidget* rom() { return myRom; }
|
RomWidget* rom() { return myRom; }
|
||||||
|
EditTextWidget* message() { return myMessageBox; }
|
||||||
|
|
||||||
virtual void loadConfig();
|
virtual void loadConfig();
|
||||||
virtual void handleKeyDown(int ascii, int keycode, int modifiers);
|
virtual void handleKeyDown(int ascii, int keycode, int modifiers);
|
||||||
|
@ -63,6 +65,7 @@ class DebuggerDialog : public Dialog
|
||||||
CpuWidget* myCpu;
|
CpuWidget* myCpu;
|
||||||
RamWidget* myRam;
|
RamWidget* myRam;
|
||||||
RomWidget* myRom;
|
RomWidget* myRom;
|
||||||
|
EditTextWidget* myMessageBox;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addTiaArea();
|
void addTiaArea();
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: M6502.cxx,v 1.14 2005-08-24 22:54:30 stephena Exp $
|
// $Id: M6502.cxx,v 1.15 2005-09-20 19:09:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "M6502.hxx"
|
#include "M6502.hxx"
|
||||||
|
@ -29,10 +29,10 @@ M6502::M6502(uInt32 systemCyclesPerProcessorCycle)
|
||||||
mySystemCyclesPerProcessorCycle(systemCyclesPerProcessorCycle)
|
mySystemCyclesPerProcessorCycle(systemCyclesPerProcessorCycle)
|
||||||
{
|
{
|
||||||
#ifdef DEVELOPER_SUPPORT
|
#ifdef DEVELOPER_SUPPORT
|
||||||
myDebugger = NULL;
|
myDebugger = NULL;
|
||||||
breakPoints = NULL;
|
myBreakPoints = NULL;
|
||||||
readTraps = NULL;
|
myReadTraps = NULL;
|
||||||
writeTraps = NULL;
|
myWriteTraps = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Compute the BCD lookup table
|
// Compute the BCD lookup table
|
||||||
|
@ -368,7 +368,8 @@ unsigned int M6502::addCondBreak(Expression *e, string name)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void M6502::delCondBreak(unsigned int brk)
|
void M6502::delCondBreak(unsigned int brk)
|
||||||
{
|
{
|
||||||
if(brk < myBreakConds.size()) {
|
if(brk < myBreakConds.size())
|
||||||
|
{
|
||||||
delete myBreakConds[brk];
|
delete myBreakConds[brk];
|
||||||
myBreakConds.remove_at(brk);
|
myBreakConds.remove_at(brk);
|
||||||
myBreakCondNames.remove_at(brk);
|
myBreakCondNames.remove_at(brk);
|
||||||
|
@ -393,26 +394,26 @@ const StringList& M6502::getCondBreakNames()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int M6502::evalCondBreaks()
|
int M6502::evalCondBreaks()
|
||||||
{
|
{
|
||||||
for(unsigned int i=0; i<myBreakConds.size(); i++) {
|
for(unsigned int i=0; i<myBreakConds.size(); i++)
|
||||||
Expression *e = myBreakConds[i];
|
{
|
||||||
if(e->evaluate()) {
|
Expression* e = myBreakConds[i];
|
||||||
string name = myBreakCondNames[i]; // TODO: use this
|
if(e->evaluate())
|
||||||
cerr << "breakpoint due to condition: " << name << endl;
|
|
||||||
return i;
|
return i;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1; // no break hit
|
return -1; // no break hit
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void M6502::setBreakPoints(PackedBitArray *bp) {
|
void M6502::setBreakPoints(PackedBitArray *bp)
|
||||||
breakPoints = bp;
|
{
|
||||||
|
myBreakPoints = bp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void M6502::setTraps(PackedBitArray *read, PackedBitArray *write) {
|
void M6502::setTraps(PackedBitArray *read, PackedBitArray *write)
|
||||||
readTraps = read;
|
{
|
||||||
writeTraps = write;
|
myReadTraps = read;
|
||||||
|
myWriteTraps = write;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: M6502.hxx,v 1.13 2005-08-24 22:54:30 stephena Exp $
|
// $Id: M6502.hxx,v 1.14 2005-09-20 19:09:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef M6502_HXX
|
#ifndef M6502_HXX
|
||||||
|
@ -41,7 +41,7 @@ typedef GUI::Array<Expression*> ExpressionList;
|
||||||
has a 64K addressing space.
|
has a 64K addressing space.
|
||||||
|
|
||||||
@author Bradford W. Mott
|
@author Bradford W. Mott
|
||||||
@version $Id: M6502.hxx,v 1.13 2005-08-24 22:54:30 stephena Exp $
|
@version $Id: M6502.hxx,v 1.14 2005-09-20 19:09:10 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class M6502
|
class M6502
|
||||||
{
|
{
|
||||||
|
@ -229,12 +229,17 @@ class M6502
|
||||||
/// Pointer to the debugger for this processor or the null pointer
|
/// Pointer to the debugger for this processor or the null pointer
|
||||||
Debugger* myDebugger;
|
Debugger* myDebugger;
|
||||||
|
|
||||||
PackedBitArray *breakPoints;
|
PackedBitArray* myBreakPoints;
|
||||||
PackedBitArray *readTraps;
|
PackedBitArray* myReadTraps;
|
||||||
PackedBitArray *writeTraps;
|
PackedBitArray* myWriteTraps;
|
||||||
|
|
||||||
// did we just now hit a trap?
|
// Did we just now hit a trap?
|
||||||
bool justHitTrap;
|
bool myJustHitTrapFlag;
|
||||||
|
struct HitTrapInfo {
|
||||||
|
string message;
|
||||||
|
int address;
|
||||||
|
};
|
||||||
|
HitTrapInfo myHitTrapInfo;
|
||||||
|
|
||||||
StringList myBreakCondNames;
|
StringList myBreakCondNames;
|
||||||
ExpressionList myBreakConds;
|
ExpressionList myBreakConds;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: M6502Hi.cxx,v 1.12 2005-08-24 22:54:30 stephena Exp $
|
// $Id: M6502Hi.cxx,v 1.13 2005-09-20 19:09:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include "M6502Hi.hxx"
|
#include "M6502Hi.hxx"
|
||||||
|
@ -34,7 +34,7 @@ M6502High::M6502High(uInt32 systemCyclesPerProcessorCycle)
|
||||||
myLastAddress = 0;
|
myLastAddress = 0;
|
||||||
|
|
||||||
#ifdef DEVELOPER_SUPPORT
|
#ifdef DEVELOPER_SUPPORT
|
||||||
justHitTrap = false;
|
myJustHitTrapFlag = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +54,12 @@ inline uInt8 M6502High::peek(uInt16 address)
|
||||||
mySystem->incrementCycles(mySystemCyclesPerProcessorCycle);
|
mySystem->incrementCycles(mySystemCyclesPerProcessorCycle);
|
||||||
|
|
||||||
#ifdef DEVELOPER_SUPPORT
|
#ifdef DEVELOPER_SUPPORT
|
||||||
if(readTraps != NULL)
|
if(myReadTraps != NULL && myReadTraps->isSet(address))
|
||||||
if(readTraps->isSet(address))
|
{
|
||||||
justHitTrap = true;
|
myJustHitTrapFlag = true;
|
||||||
|
myHitTrapInfo.message = "Read trap: ";
|
||||||
|
myHitTrapInfo.address = address;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return mySystem->peek(address);
|
return mySystem->peek(address);
|
||||||
|
@ -73,9 +76,12 @@ inline void M6502High::poke(uInt16 address, uInt8 value)
|
||||||
mySystem->incrementCycles(mySystemCyclesPerProcessorCycle);
|
mySystem->incrementCycles(mySystemCyclesPerProcessorCycle);
|
||||||
|
|
||||||
#ifdef DEVELOPER_SUPPORT
|
#ifdef DEVELOPER_SUPPORT
|
||||||
if(writeTraps != NULL)
|
if(myWriteTraps != NULL && myWriteTraps->isSet(address))
|
||||||
if(writeTraps->isSet(address))
|
{
|
||||||
justHitTrap = true;
|
myJustHitTrapFlag = true;
|
||||||
|
myHitTrapInfo.message = "Write trap: ";
|
||||||
|
myHitTrapInfo.address = address;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mySystem->poke(address, value);
|
mySystem->poke(address, value);
|
||||||
|
@ -84,6 +90,8 @@ inline void M6502High::poke(uInt16 address, uInt8 value)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool M6502High::execute(uInt32 number)
|
bool M6502High::execute(uInt32 number)
|
||||||
{
|
{
|
||||||
|
int cond = -1;
|
||||||
|
|
||||||
// Clear all of the execution status bits except for the fatal error bit
|
// Clear all of the execution status bits except for the fatal error bit
|
||||||
myExecutionStatus &= FatalErrorBit;
|
myExecutionStatus &= FatalErrorBit;
|
||||||
|
|
||||||
|
@ -96,28 +104,29 @@ bool M6502High::execute(uInt32 number)
|
||||||
uInt8 operand = 0;
|
uInt8 operand = 0;
|
||||||
|
|
||||||
#ifdef DEVELOPER_SUPPORT
|
#ifdef DEVELOPER_SUPPORT
|
||||||
if(justHitTrap)
|
if(myJustHitTrapFlag)
|
||||||
{
|
{
|
||||||
if(myDebugger->start()) {
|
if(myDebugger->start(myHitTrapInfo.message, myHitTrapInfo.address))
|
||||||
justHitTrap = false;
|
{
|
||||||
|
myJustHitTrapFlag = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(breakPoints != NULL)
|
if(myBreakPoints != NULL)
|
||||||
{
|
{
|
||||||
if(breakPoints->isSet(PC)) {
|
if(myBreakPoints->isSet(PC))
|
||||||
if(myDebugger->start()) {
|
{
|
||||||
|
if(myDebugger->start("Breakpoint hit: ", PC))
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(evalCondBreaks() > -1)
|
if((cond = evalCondBreaks()) > -1)
|
||||||
{
|
{
|
||||||
if(myDebugger->start()) {
|
string buf = "CBP: " + myBreakCondNames[cond];
|
||||||
|
if(myDebugger->start(buf))
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: ListWidget.cxx,v 1.31 2005-09-13 18:27:42 stephena Exp $
|
// $Id: ListWidget.cxx,v 1.32 2005-09-20 19:09:10 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -91,9 +91,9 @@ void ListWidget::setHighlighted(int item)
|
||||||
{
|
{
|
||||||
assert(item >= -1 && item < (int)_list.size());
|
assert(item >= -1 && item < (int)_list.size());
|
||||||
|
|
||||||
if (isEnabled() && _highlightedItem != item)
|
if(isEnabled())
|
||||||
{
|
{
|
||||||
if (_editMode)
|
if(_editMode)
|
||||||
abortEditMode();
|
abortEditMode();
|
||||||
|
|
||||||
_highlightedItem = item;
|
_highlightedItem = item;
|
||||||
|
@ -133,7 +133,10 @@ void ListWidget::recalc()
|
||||||
_currentPos = size - 1;
|
_currentPos = size - 1;
|
||||||
if (_currentPos < 0)
|
if (_currentPos < 0)
|
||||||
_currentPos = 0;
|
_currentPos = 0;
|
||||||
_selectedItem = -1;
|
|
||||||
|
if(_selectedItem < 0 || _selectedItem >= size)
|
||||||
|
_selectedItem = 0;
|
||||||
|
|
||||||
_editMode = false;
|
_editMode = false;
|
||||||
scrollBarRecalc();
|
scrollBarRecalc();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue