summaryrefslogtreecommitdiff
path: root/emulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'emulator.cpp')
-rw-r--r--emulator.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/emulator.cpp b/emulator.cpp
index 59c1367..95cb0df 100644
--- a/emulator.cpp
+++ b/emulator.cpp
@@ -355,7 +355,7 @@ void ParseAndReact(
for (size_t i = 0; i < static_cast<size_t>(msg_data_len); i++) {
const auto res = exchange_ctx.Consume(msg_data[i]);
if (res == nullptr) continue;
- if (res->packet.length() > 0) {
+ if (DEBUG_TRACE_GDB_REMOTE && res->packet.length() > 0) {
printf("<- \"%s\"\n", exchange_ctx.GetLastPacket().c_str());
const auto packet = GDBRemote::Packet::Parse(res->packet);
printf(
@@ -363,7 +363,8 @@ void ParseAndReact(
GDBRemote::Packet::PacketTypeToString(packet.type));
}
if (res->ack.length() > 0 && !g_no_ack_mode) {
- printf("-> \"%s\"\n", res->ack.c_str());
+ if (DEBUG_TRACE_GDB_REMOTE)
+ printf("-> \"%s\"\n", res->ack.c_str());
if (send(conn_fd, &res->ack[0], res->ack.length(), 0) == -1)
perror("Send failed (ack/nak)");
}
@@ -371,7 +372,8 @@ void ParseAndReact(
const auto packet = GDBRemote::Packet::Parse(res->packet);
const auto response =
exchange_ctx.WrapDataToSend(CreateResponse(m68k_debug, packet));
- printf("-> \"%s\"\n", response.c_str());
+ if (DEBUG_TRACE_GDB_REMOTE)
+ printf("-> \"%s\"\n", response.c_str());
if (send(conn_fd, &response[0], response.length(), 0) == -1)
perror("Send failed (response)");
}
@@ -434,7 +436,8 @@ int emulator(M68KDebuggingControl& m68k_debug)
m68k_debug.ResetPendingBreakpoint();
const auto response =
exchange_ctx.WrapDataToSend("S05");
- printf("-> \"%s\"\n", response.c_str());
+ if (DEBUG_TRACE_GDB_REMOTE)
+ printf("-> \"%s\"\n", response.c_str());
if (send(conn_fd, &response[0], response.length(), 0) == -1)
perror("Send failed (response)");
}