v1.18.9: Added loading of 16-bit Windows binary symbol data (for non-COMPILED BACKTRACK configs only)

This commit is contained in:
Jeff Parsons 2015-08-18 15:47:51 -07:00
commit 989407ca4a
9 changed files with 4176 additions and 3681 deletions

View file

@ -1131,13 +1131,15 @@ Bus.prototype.getBackTrackObjectFromAddr = function(addr)
};
/**
* getBackTrackInfo(bti)
* getBackTrackInfo(bti, fSymbol, fNearest)
*
* @this {Bus}
* @param {number} bti
* @param {boolean} [fSymbol] (true to return only symbol)
* @param {boolean} [fNearest] (true to return nearest symbol)
* @return {string|null}
*/
Bus.prototype.getBackTrackInfo = function(bti)
Bus.prototype.getBackTrackInfo = function(bti, fSymbol, fNearest)
{
if (BACKTRACK) {
var bto = this.getBackTrackObject(bti);
@ -1146,9 +1148,11 @@ Bus.prototype.getBackTrackInfo = function(bti)
var file = bto.obj.file;
if (file) {
this.assert(!bto.off);
return file.sName + '[' + str.toHexLong(bto.obj.offFile + off) + ']';
return file.getSymbol(bto.obj.offFile + off, fNearest);
}
if (!fSymbol || fNearest) {
return bto.obj.idComponent + '+' + str.toHexLong(bto.off + off);
}
return bto.obj.idComponent + '[' + str.toHexLong(bto.off + off) + ']';
}
}
return null;
@ -1166,6 +1170,19 @@ Bus.prototype.getBackTrackInfoFromAddr = function(addr)
return BACKTRACK? this.getBackTrackInfo(this.readBackTrack(addr)) : null;
};
/**
* getSymbol(addr, fNearest)
*
* @this {Bus}
* @param {number} addr
* @param {boolean} [fNearest] (true to return nearest symbol)
* @return {string|null}
*/
Bus.prototype.getSymbol = function(addr, fNearest)
{
return BACKTRACK? this.getBackTrackInfo(this.readBackTrack(addr), true, fNearest) : null;
};
/**
* saveMemory()
*