Some more Debugger factoring

This commit is contained in:
Jeff Parsons 2016-09-14 21:11:57 -07:00
commit e5c5a8e6be
17 changed files with 1124 additions and 1539 deletions

View file

@ -73,18 +73,21 @@ try {
* ]
*
* Every component name comes from the component filename, minus the ".js" extension;
* Create is the constructor returned by require(). The only bit of fudging we do is
* overriding the constructor for component "cpu" with the constructor for "x86cpu",
* because when a "cpu" definition is encountered, it's the "x86cpu" subclass that we
* actually want to create, not the "cpu" superclass. See aSubClasses for the complete
* list of subclassed components we manage like that.
* Create is the constructor returned by require().
*
* TODO: Update the list of ignored (ie, ignorable) components.
*/
var Component;
var dbg;
var aComponents = [];
var asComponentsIgnore = ["embed","save"];
var asComponentsIgnore = ["embed", "save"];
/*
* A few of the components are subclasses of other classes (eg, "x86cpu" is a subclass
* of "cpu"). In those situations, we "hoist" the subclass constructor into the
* corresponding superclass, because it is the name of the superclass that we rely on during
* machine initialization.
*/
var aSubClasses = {
"pcx86/lib/x86cpu": "pcx86/lib/cpu",
"pcx86/lib/debugger": "shared/lib/debugger"

View file

@ -164,11 +164,6 @@ function DebuggerX86(parmsDbg)
*/
this.dbgAddrNextCode = this.newAddr();
this.dbgAddrNextData = this.newAddr();
/*
* fAssemble is true when "assemble mode" is active, false when not.
*/
this.fAssemble = false;
this.dbgAddrAssemble = this.newAddr();
/*

View file

@ -2631,7 +2631,7 @@ Card.prototype.dumpVideoCard = function()
* TODO: Make these options more general-purpose (it currently assumes a conventional VGA planar layout).
*
* @this {Card}
* @param {Array.<string>} asArgs
* @param {Array.<string>} asArgs (all numeric arguments default to base 16 unless otherwise specified)
*/
Card.prototype.dumpVideoBuffer = function(asArgs)
{
@ -2648,12 +2648,12 @@ Card.prototype.dumpVideoBuffer = function(asArgs)
var s = asArgs[i];
if (!i) {
idw = str.parseInt(s);
idw = str.parseInt(s, 16);
continue;
}
var ch = s.charAt(0);
j = str.parseInt(s.substr(1));
j = str.parseInt(s.substr(1), 16);
switch(ch) {
case 'l':