Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-08-07 10:30:42 -0400
committerUwe Stieber2014-08-07 10:30:42 -0400
commit99d31d18a85c80e465015b7eb929029ad6f98cc5 (patch)
tree088b71a3a3fd5de77b2c2dbfd3df995990a007e9
parent31e92411108d7983ed6c9105d5e97bba30c10ad1 (diff)
downloadorg.eclipse.tcf-99d31d18a85c80e465015b7eb929029ad6f98cc5.tar.gz
org.eclipse.tcf-99d31d18a85c80e465015b7eb929029ad6f98cc5.tar.xz
org.eclipse.tcf-99d31d18a85c80e465015b7eb929029ad6f98cc5.zip
VxW: Fix transport type is not the same as GdbRemote network config marker
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
index ca4fbdede..780ae9be0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.core.AbstractChannel.TraceListener;
import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IDiagnostics;
import org.eclipse.tcf.te.tcf.core.util.JSONUtils;
import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent;
@@ -155,8 +156,16 @@ public class ChannelTraceListener implements TraceListener {
return;
}
+ // Decode the arguments again for tracing purpose
+ String args = JSONUtils.decodeStringFromByteArray(data);
+
+ // Filter out 'Diagnostic echo "ping"' and response
+ if (type == 'C' && IDiagnostics.NAME.equals(service) && "echo".equals(name) && "ping".equals(args)) { //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
// Format the message
- final String message = formatMessage(type, token, service, name, data, received);
+ final String message = formatMessage(type, token, service, name, args, received);
// Get the file writer
FileWriter writer = LogManager.getInstance().getWriter(logname, channel);
if (writer != null) {
@@ -174,13 +183,10 @@ public class ChannelTraceListener implements TraceListener {
/**
* Format the trace message.
*/
- protected String formatMessage(char type, String token, String service, String name, byte[] data, boolean received) {
+ protected String formatMessage(char type, String token, String service, String name, String args, boolean received) {
// Get the current time stamp
String time = TIME_FORMAT.format(new Date(System.currentTimeMillis()));
- // Decode the arguments again for tracing purpose
- String args = JSONUtils.decodeStringFromByteArray(data);
-
// Construct the full message
//
// The message format is: <time>: [<---|--->] <type> <token> <service>#<name> <args>

Back to the top