mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-08 02:53:12 +02:00
[273114] Wrap lines of more than 100 characters, in our GDB traces
This commit is contained in:
parent
698d5bb0ba
commit
3bc0e2a9d1
2 changed files with 20 additions and 8 deletions
|
@ -125,7 +125,12 @@ public class GdbPlugin extends Plugin {
|
|||
|
||||
public static void debug(String message) {
|
||||
if (DEBUG) {
|
||||
System.out.print(message);
|
||||
while (message.length() > 100) {
|
||||
String partial = message.substring(0, 100);
|
||||
message = message.substring(100);
|
||||
System.out.println(partial + "\\"); //$NON-NLS-1$
|
||||
}
|
||||
System.out.print(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -554,9 +554,13 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
|||
public void run() {
|
||||
if (getMITracingStream() != null) {
|
||||
try {
|
||||
getMITracingStream().write(GdbPlugin.getDebugTime().getBytes());
|
||||
getMITracingStream().write(' ');
|
||||
getMITracingStream().write(str.getBytes());
|
||||
String message = GdbPlugin.getDebugTime() + " " + str; //$NON-NLS-1$
|
||||
while (message.length() > 100) {
|
||||
String partial = message.substring(0, 100) + "\\\n"; //$NON-NLS-1$
|
||||
message = message.substring(100);
|
||||
getMITracingStream().write(partial.getBytes());
|
||||
}
|
||||
getMITracingStream().write(message.getBytes());
|
||||
} catch (IOException e) {
|
||||
// The tracing stream could be closed at any time
|
||||
// since the user can set a preference to turn off
|
||||
|
@ -604,10 +608,13 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
|||
public void run() {
|
||||
if (getMITracingStream() != null) {
|
||||
try {
|
||||
getMITracingStream().write(GdbPlugin.getDebugTime().getBytes());
|
||||
getMITracingStream().write(' ');
|
||||
getMITracingStream().write(finalLine.getBytes());
|
||||
getMITracingStream().write('\n');
|
||||
String message = GdbPlugin.getDebugTime() + " " + finalLine + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
while (message.length() > 100) {
|
||||
String partial = message.substring(0, 100) + "\\\n"; //$NON-NLS-1$
|
||||
message = message.substring(100);
|
||||
getMITracingStream().write(partial.getBytes());
|
||||
}
|
||||
getMITracingStream().write(message.getBytes());
|
||||
} catch (IOException e) {
|
||||
// The tracing stream could be closed at any time
|
||||
// since the user can set a preference to turn off
|
||||
|
|
Loading…
Add table
Reference in a new issue