Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Melcher committed Feb 16, 2017
2 parents e6befc8 + 42bb6f6 commit 1d61439
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Monitor/TMacMonitor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@
{
if ( controller )
{
[controller addHistoryLine:[NSString stringWithCString:inLine encoding:NSUTF8StringEncoding] type:type];
NSString *s = [NSString stringWithCString:inLine encoding:NSUTF8StringEncoding];
s = [s stringByReplacingOccurrencesOfString:@"\t" withString:@" "];
[controller addHistoryLine:s type:type];
}
}

Expand Down
24 changes: 24 additions & 0 deletions Monitor/TMonitor.cp
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,30 @@ TMonitor::ExecuteCommand( const char* inCommand )
}
theArgInt += 16;
}
} else if ( ::sscanf(inCommand, "dis %X", &theArgInt) == 1 ) {
KUInt32 addr = theArgInt;
KUInt32 data;

for ( int i = 0; i < 16; ++i )
{
if ( mMemory->Read((TMemory::VAddr) addr, data) )
{
(void) ::sprintf(
theLine, "Memory error when accessing %.8X [%.8X]",
(unsigned int) theArgInt,
(unsigned int) mMemory->GetFaultStatusRegister() );
PrintLine(theLine, MONITOR_LOG_ERROR);
break;
} else {
char disasm[256];

UDisasm::Disasm(disasm, 256, addr, data);
::snprintf(theLine, 256, " %08X %s", addr, disasm);
PrintLine(theLine, MONITOR_LOG_INFO);
}

addr += 4;
}
} else if (::sscanf(inCommand, "dm %X", &theArgInt) == 1) {
KUInt32 theData[4];
KUInt32 last;
Expand Down

0 comments on commit 1d61439

Please sign in to comment.