mirror of https://github.com/stella-emu/stella.git
Fixed error tracking PC changes in disassembly when the PC and bank mirror
didn't match. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2766 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
b6d3098e2c
commit
04f6a16f97
|
@ -14,6 +14,10 @@
|
|||
|
||||
3.9 to 3.9.1: (XXXX xx, 2013)
|
||||
|
||||
* Fixed bug in debugger disassembly when the mirror used for the current
|
||||
PC didn't match the mirror for the current bank. In this case, the
|
||||
disassembler became confused and didn't properly track the PC address.
|
||||
|
||||
* Added ability to modify 'tiadriven' commandline argument to the
|
||||
debugger 'TIA' tab, and 'ramrandom' to the debugger 'I/O' tab. These
|
||||
options were available for quite some time, but they weren't exposed
|
||||
|
|
|
@ -326,18 +326,20 @@ bool CartDebug::fillDisassemblyList(BankInfo& info, uInt16 search)
|
|||
// We place those parts in separate maps, to speed up access
|
||||
bool found = false;
|
||||
myAddrToLineList.clear();
|
||||
myAddrToLineIsROM = info.offset & 0x1000;
|
||||
for(uInt32 i = 0; i < myDisassembly.list.size(); ++i)
|
||||
{
|
||||
const DisassemblyTag& tag = myDisassembly.list[i];
|
||||
const uInt16 address = tag.address & 0xFFF;
|
||||
|
||||
// Addresses marked as 'ROW' normally won't have an address
|
||||
if(tag.address)
|
||||
if(address)
|
||||
{
|
||||
// Create a mapping from addresses to line numbers
|
||||
myAddrToLineList.insert(make_pair(tag.address, i));
|
||||
myAddrToLineList.insert(make_pair(address, i));
|
||||
|
||||
// Did we find the search value?
|
||||
if(tag.address == search)
|
||||
if(address == (search & 0xFFF))
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
@ -347,7 +349,12 @@ bool CartDebug::fillDisassemblyList(BankInfo& info, uInt16 search)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartDebug::addressToLine(uInt16 address) const
|
||||
{
|
||||
map<uInt16, int>::const_iterator iter = myAddrToLineList.find(address);
|
||||
// Switching between ZP RAM address space and Cart/ROM address space
|
||||
// means the line isn't present
|
||||
if(!myAddrToLineIsROM != !(address & 0x1000))
|
||||
return -1;
|
||||
|
||||
map<uInt16, int>::const_iterator iter = myAddrToLineList.find(address & 0xFFF);
|
||||
return iter != myAddrToLineList.end() ? iter->second : -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -360,6 +360,7 @@ class CartDebug : public DebuggerSystem
|
|||
// to corresponding lines of text in that display
|
||||
Disassembly myDisassembly;
|
||||
map<uInt16, int> myAddrToLineList;
|
||||
bool myAddrToLineIsROM;
|
||||
|
||||
// Mappings from label to address (and vice versa) for items
|
||||
// defined by the user (either through a symbol file or manually
|
||||
|
|
Loading…
Reference in New Issue