Skip to content

Commit 9eedea9

Browse files
committed
gdbjtag.*: make verbose messages specific
- add prefix to trace messages - add more messages
1 parent 2294072 commit 9eedea9

File tree

47 files changed

+483
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+483
-305
lines changed

ilg.gnumcueclipse.core/src/ilg/gnumcueclipse/core/EclipseUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,14 @@ public static String getPreferenceValueForId(String pluginId, String key, String
392392

393393
if (value != null) {
394394
if (Activator.getInstance().isDebugging()) {
395-
System.out.println("EclipseUtils.getPreferenceValueForId(\"" + pluginId + "\", \"" + key + "\",\""
395+
System.out.println("EclipseUtils.getPreferenceValueForId(\"" + pluginId + "\", \"" + key + "\", \""
396396
+ defaultValue + "\") = \"" + value + "\" from " + from);
397397
}
398398
return value;
399399
}
400400

401401
if (Activator.getInstance().isDebugging()) {
402-
System.out.println("EclipseUtils.getPreferenceValueForId(\"" + pluginId + "\", \"" + key + "\",\""
402+
System.out.println("EclipseUtils.getPreferenceValueForId(\"" + pluginId + "\", \"" + key + "\", \""
403403
+ defaultValue + "\") = \"" + defaultValue + "\" default");
404404
}
405405
return defaultValue;

ilg.gnumcueclipse.debug.gdbjtag.jlink/src/ilg/gnumcueclipse/debug/gdbjtag/jlink/DefaultPreferenceInitializer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class DefaultPreferenceInitializer extends AbstractPreferenceInitializer
4848
public void initializeDefaultPreferences() {
4949

5050
if (Activator.getInstance().isDebugging()) {
51-
System.out.println("DefaultPreferenceInitializer.initializeDefaultPreferences()");
51+
System.out.println("jlink.DefaultPreferenceInitializer.initializeDefaultPreferences()");
5252
}
5353

5454
DefaultPreferences.putString(PersistentPreferences.GDB_SERVER_INTERFACE,
@@ -147,7 +147,7 @@ private class LateInitializer implements INodeChangeListener {
147147
public void added(NodeChangeEvent event) {
148148

149149
if (Activator.getInstance().isDebugging()) {
150-
System.out.println("LateInitializer.added() " + event + " " + event.getChild().name());
150+
System.out.println("jlink.LateInitializer.added() " + event + " " + event.getChild().name());
151151
}
152152

153153
if (Activator.PLUGIN_ID.equals(event.getChild().name())) {
@@ -163,7 +163,7 @@ public void added(NodeChangeEvent event) {
163163
public void removed(NodeChangeEvent event) {
164164

165165
if (Activator.getInstance().isDebugging()) {
166-
System.out.println("LateInitializer.removed() " + event);
166+
System.out.println("jlink.LateInitializer.removed() " + event);
167167
}
168168
}
169169

@@ -173,7 +173,7 @@ public void removed(NodeChangeEvent event) {
173173
public void finalizeInitializationsDefaultPreferences() {
174174

175175
if (Activator.getInstance().isDebugging()) {
176-
System.out.println("LateInitializer.finalizeInitializationsDefaultPreferences()");
176+
System.out.println("jlink.LateInitializer.finalizeInitializationsDefaultPreferences()");
177177
}
178178

179179
// J-Link GDB Server executable name

ilg.gnumcueclipse.debug.gdbjtag.jlink/src/ilg/gnumcueclipse/debug/gdbjtag/jlink/SemihostingProcess.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public int read() throws IOException {
6767
Thread.sleep(10000);
6868
} catch (InterruptedException e) {
6969
if (Activator.getInstance().isDebugging()) {
70-
System.out.println("NullInputStream.read() interrupted");
70+
System.out.println("jlink.SemihostingProcess.NullInputStream.read() interrupted");
7171
}
7272
}
7373
return 0;
@@ -80,16 +80,16 @@ public int available() {
8080
public void close() throws IOException {
8181

8282
if (Activator.getInstance().isDebugging()) {
83-
System.out.println("NullInputStream.close() " + Thread.currentThread());
83+
System.out.println("jlink.SemihostingProcess.NullInputStream.close() " + Thread.currentThread());
8484
}
8585

8686
if (fIsOpened) {
8787
super.close();
8888
fIsOpened = false;
8989
if (fThread != null) {
9090
if (Activator.getInstance().isDebugging()) {
91-
System.out
92-
.println("NullInputStream.close() interrupt " + Thread.currentThread() + " " + fThread);
91+
System.out.println("jlink.SemihostingProcess.NullInputStream.close() interrupt "
92+
+ Thread.currentThread() + " " + fThread);
9393
}
9494
fThread.interrupt();
9595
}
@@ -115,7 +115,7 @@ public void write(int arg) throws IOException {
115115
public SemihostingProcess(String host, int port) {
116116

117117
if (Activator.getInstance().isDebugging()) {
118-
System.out.println("SemihostingProcess(" + host + "," + port + ") " + this);
118+
System.out.println("jlink.SemihostingProcess(" + host + "," + port + ") " + this);
119119
}
120120

121121
fHost = host;
@@ -140,15 +140,15 @@ public SemihostingProcess(String host, int port) {
140140
public void destroy() {
141141

142142
if (Activator.getInstance().isDebugging()) {
143-
System.out.println("SemihostingProcess.destroy() " + Thread.currentThread() + " " + fThread);
143+
System.out.println("jlink.SemihostingProcess.destroy() " + Thread.currentThread() + " " + fThread);
144144
}
145145

146146
if (fRunning) {
147147

148148
if (fThread != null && fThread != Thread.currentThread()) {
149149
fThread.interrupt();
150150
if (Activator.getInstance().isDebugging()) {
151-
System.out.println("SemihostingProcess.destroy() after interrupt");
151+
System.out.println("jlink.SemihostingProcess.destroy() after interrupt");
152152
}
153153
}
154154

@@ -160,13 +160,13 @@ public void destroy() {
160160

161161
if (fSocket != null && !fSocket.isInputShutdown()) {
162162
if (Activator.getInstance().isDebugging()) {
163-
System.out.println("SemihostingProcess.destroy() before shutdownInput");
163+
System.out.println("jlink.SemihostingProcess.destroy() before shutdownInput");
164164
}
165165
fSocket.shutdownInput();
166166
}
167167
if (fSocket != null && !fSocket.isOutputShutdown()) {
168168
if (Activator.getInstance().isDebugging()) {
169-
System.out.println("SemihostingProcess.destroy() before shutdownOutput");
169+
System.out.println("jlink.SemihostingProcess.destroy() before shutdownOutput");
170170
}
171171
fSocket.shutdownOutput();
172172
}
@@ -177,7 +177,7 @@ public void destroy() {
177177
}
178178

179179
if (Activator.getInstance().isDebugging()) {
180-
System.out.println("SemihostingProcess.destroy() return");
180+
System.out.println("jlink.SemihostingProcess.destroy() return");
181181
}
182182
}
183183

@@ -209,19 +209,20 @@ public OutputStream getOutputStream() {
209209
@Override
210210
public int waitFor() throws InterruptedException {
211211
if (Activator.getInstance().isDebugging()) {
212-
System.out.println("SemihostingProcess.waitFor() " + Thread.currentThread() + " will wait for " + fThread);
212+
System.out.println(
213+
"jlink.SemihostingProcess.waitFor() " + Thread.currentThread() + " will wait for " + fThread);
213214
}
214215
fThread.join();
215216
if (Activator.getInstance().isDebugging()) {
216-
System.out.println("SemihostingProcess.waitFor() return " + Thread.currentThread());
217+
System.out.println("jlink.SemihostingProcess.waitFor() return " + Thread.currentThread());
217218
}
218219
return 0;
219220
}
220221

221222
public void run() {
222223

223224
if (Activator.getInstance().isDebugging()) {
224-
System.out.println("SemihostingProcess.run() " + Thread.currentThread());
225+
System.out.println("jlink.SemihostingProcess.run() " + Thread.currentThread());
225226
}
226227

227228
fRunning = true;
@@ -246,7 +247,7 @@ public void run() {
246247
if (i == 0) {
247248
// cannot connect, no way to go further
248249
if (Activator.getInstance().isDebugging()) {
249-
System.out.println("cannot connect, no way to go further.");
250+
System.out.println("jlink.SemihostingProcess.run() cannot connect, no way to go further.");
250251
}
251252

252253
return;
@@ -279,7 +280,7 @@ public void run() {
279280
// the connection.
280281

281282
if (Activator.getInstance().isDebugging()) {
282-
System.out.println("SemihostingProcess.run() Connection closed by the GDB server.");
283+
System.out.println("jlink.SemihostingProcess.run() Connection closed by the GDB server.");
283284
}
284285

285286
fPipeOut.write("Connection closed by the GDB server.".getBytes());
@@ -325,13 +326,13 @@ public void run() {
325326
}
326327

327328
if (Activator.getInstance().isDebugging()) {
328-
System.out.println("SemihostingProcess.run() completed ");
329+
System.out.println("jlink.SemihostingProcess.run() completed ");
329330
}
330331
}
331332

332333
public void submit() {
333334
if (Activator.getInstance().isDebugging()) {
334-
System.out.println("SemihostingProcess.submit() " + Thread.currentThread());
335+
System.out.println("jlink.SemihostingProcess.submit() " + Thread.currentThread());
335336
}
336337
fThread = new Thread(this);
337338
fThread.setName("Semihosting and SWV fake process");

ilg.gnumcueclipse.debug.gdbjtag.jlink/src/ilg/gnumcueclipse/debug/gdbjtag/jlink/dsf/GdbBackend.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public GdbBackend(DsfSession session, ILaunchConfiguration lc) {
4141
super(session, lc);
4242

4343
if (Activator.getInstance().isDebugging()) {
44-
System.out.println("GdbBackend() " + this);
44+
System.out.println("jlink.GdbBackend() " + this);
4545
}
4646
fLaunchConfiguration = lc;
4747
}
@@ -52,7 +52,7 @@ public GdbBackend(DsfSession session, ILaunchConfiguration lc) {
5252
public void initialize(final RequestMonitor rm) {
5353

5454
if (Activator.getInstance().isDebugging()) {
55-
System.out.println("GdbBackend.initialize() " + Thread.currentThread());
55+
System.out.println("jlink.GdbBackend.initialize() " + Thread.currentThread());
5656
}
5757

5858
super.initialize(rm);
@@ -62,7 +62,7 @@ public void initialize(final RequestMonitor rm) {
6262
public void destroy() {
6363

6464
if (Activator.getInstance().isDebugging()) {
65-
System.out.println("GdbBackend.destroy() " + Thread.currentThread());
65+
System.out.println("jlink.GdbBackend.destroy() " + Thread.currentThread());
6666
}
6767
super.destroy();
6868
}
@@ -71,7 +71,7 @@ public void destroy() {
7171
public void shutdown(final RequestMonitor rm) {
7272

7373
if (Activator.getInstance().isDebugging()) {
74-
System.out.println("GdbBackend.shutdown() " + Thread.currentThread());
74+
System.out.println("jlink.GdbBackend.shutdown() " + Thread.currentThread());
7575
}
7676
super.shutdown(rm);
7777
}
@@ -126,7 +126,7 @@ public IPath getGDBWorkingDirectory() throws CoreException {
126126
}
127127

128128
if (Activator.getInstance().isDebugging()) {
129-
System.out.println("getGDBWorkingDirectory() " + path);
129+
System.out.println("jlink.GdbBackend.getGDBWorkingDirectory() " + path);
130130
}
131131
return path;
132132
}

0 commit comments

Comments
 (0)