From 243797edc714892eceb4d5a591e155e1bd8455f8 Mon Sep 17 00:00:00 2001 From: roy77 Date: Wed, 14 Jan 2015 14:31:12 +0100 Subject: [PATCH] Revert "Comment out System.out ind GDBstubs" This reverts commit 98a4dbb7168f2e2137207e2f498825f55d7ffd8e. --- .../platform/MSPEXP430F5438/Exp5438Gui.java | 2 +- se/sics/mspsim/util/GDBStubs.java | 25 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/se/sics/mspsim/platform/MSPEXP430F5438/Exp5438Gui.java b/se/sics/mspsim/platform/MSPEXP430F5438/Exp5438Gui.java index ef29f48..7e123ee 100644 --- a/se/sics/mspsim/platform/MSPEXP430F5438/Exp5438Gui.java +++ b/se/sics/mspsim/platform/MSPEXP430F5438/Exp5438Gui.java @@ -75,7 +75,7 @@ public class Exp5438Gui extends AbstractNodeGUI { }; public Exp5438Gui(Exp5438Node node) { - super("MSPSIM fork by Prof. Rüdiger Heintz 0.4.13", "images/MSP-EXP430F5438.jpg"); + super("MSPSIM fork by Prof. Rüdiger Heintz 0.4.13", "images/MSP-EXP430F5438.jpg"); this.node = node; } diff --git a/se/sics/mspsim/util/GDBStubs.java b/se/sics/mspsim/util/GDBStubs.java index 5eeac20..9ca72fb 100755 --- a/se/sics/mspsim/util/GDBStubs.java +++ b/se/sics/mspsim/util/GDBStubs.java @@ -120,7 +120,8 @@ public class GDBStubs implements Runnable { cmd += (char) c; buffer.add(c & 0xff); if (c == '$') { - System.out.println("GDBStubs: server send start $ without end #"); + System.out + .println("GDBStubs: server send start $ without end #"); } } @@ -176,7 +177,7 @@ public class GDBStubs implements Runnable { */ private void handleCmd(String cmd, Integer[] cmdBytes, int cmdLen) throws IOException, EmulationException { -// System.out.println("cmd: " + cmd); + System.out.println("cmd: " + cmd); char c = cmd.charAt(0); String parts[]; switch (c) { @@ -282,7 +283,7 @@ public class GDBStubs implements Runnable { Memory mem = cpu.getMemory(); if (c == 'm') { - //System.out.println("Returning memory from: 0x" + Integer.toHexString(addr) + " len = " + len); + System.out.println("Returning memory from: 0x" + Integer.toHexString(addr) + " len = " + len); /* This might be wrong - which is the correct byte order? */ for (int i = 0; i < len; i+=2) { String data2 = Utils.hex16(mem.get(addr, Memory.AccessMode.WORD)); @@ -300,8 +301,8 @@ public class GDBStubs implements Runnable { // supplierNames.add(Val+" "+Integer.toHexString(addr+2*i)); // } - //System.out.println("Writing to memory at: " + Integer.toHexString(addr) + " len = " + len + " with: " - // + ((wdata.length > 1) ? wdata[1] : "")); + System.out.println("Writing to memory at: " + Integer.toHexString(addr) + " len = " + len + " with: " + + ((wdata.length > 1) ? wdata[1] : "")); cPos++; for (int i = 0; i < len; i+=2) { mem.set(addr, cmdBytes[cPos++]+cmdBytes[cPos++]*256, Memory.AccessMode.WORD); @@ -394,14 +395,14 @@ public class GDBStubs implements Runnable { } public void sendResponse(String resp, String info) throws IOException { -// System.out.print("ans: "); + System.out.print("ans: "); String a = ""; a += '$'; int cs = 0; if (resp != null) { for (int i = 0; i < resp.length(); i++) { a += resp.charAt(i); - //System.out.print(resp.charAt(i)); + System.out.print(resp.charAt(i)); cs += resp.charAt(i); } } @@ -421,11 +422,11 @@ public class GDBStubs implements Runnable { c = c - 10 + 'a'; } a += (char) c; -// if (info == "") { -// System.out.println(""); -// } else { -// System.out.println(" (" + info + ")"); -// } + if (info == "") { + System.out.println(""); + } else { + System.out.println(" (" + info + ")"); + } output.write(a.getBytes()); } } \ No newline at end of file