From 15ae1043e9726f065cd75763624132041c2f5f0a Mon Sep 17 00:00:00 2001 From: urchlay Date: Tue, 14 Jun 2005 00:58:39 +0000 Subject: [PATCH] Disassembly display in Debugger.state() now shows machine code bytes. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@492 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/debugger/Debugger.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/stella/src/debugger/Debugger.cxx b/stella/src/debugger/Debugger.cxx index 8610830ed..5f93ea9df 100644 --- a/stella/src/debugger/Debugger.cxx +++ b/stella/src/debugger/Debugger.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Debugger.cxx,v 1.3 2005-06-13 19:04:54 urchlay Exp $ +// $Id: Debugger.cxx,v 1.4 2005-06-14 00:58:39 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -94,7 +94,7 @@ const string Debugger::run(const string& command) const string Debugger::state() { string result; - char buf[255]; + char buf[255], bbuf[255]; result += "\nPC="; result += to_hex_16(myDebugger->pc()); @@ -115,7 +115,14 @@ const string Debugger::state() sprintf(buf, "%d", mySystem->cycles()); result += buf; result += "\n "; - myDebugger->disassemble(myDebugger->pc(), buf); + int count = myDebugger->disassemble(myDebugger->pc(), buf); + for(int i=0; ipc() + i)); + result += bbuf; + } + if(count < 3) result += " "; + if(count < 2) result += " "; + result += " "; result += buf; return result;