Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-02-23 19:11:32 +0000
committerAlena Laskavaia2009-02-23 19:11:32 +0000
commit1c0ebde0f780a076b3f4bd662a34045cd29c10ae (patch)
treee2cef41facaa0cc57f86200adf0e280efbec4590
parentc588e480804d8ddf803981b7f0186a4396698454 (diff)
downloadorg.eclipse.cdt-1c0ebde0f780a076b3f4bd662a34045cd29c10ae.tar.gz
org.eclipse.cdt-1c0ebde0f780a076b3f4bd662a34045cd29c10ae.tar.xz
org.eclipse.cdt-1c0ebde0f780a076b3f4bd662a34045cd29c10ae.zip
[265866] - incorrect parsing for info line
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java
index 4da7591610c..7964a9150c6 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/CLIInfoLineInfo.java
@@ -71,6 +71,8 @@ public class CLIInfoLineInfo extends MIInfo {
}
protected void parseLineInfo(String str, List aList) {
+ if (str.endsWith("."))
+ str = str.substring(0, str.length()-1);
String[] strbits = str.split("\\s"); //$NON-NLS-1$
for (int i = 0; i < strbits.length; i++) {
if (strbits[i].equals("Line")) //$NON-NLS-1$
@@ -88,13 +90,11 @@ public class CLIInfoLineInfo extends MIInfo {
if (strbits[i].equals("ends")) //$NON-NLS-1$
{
endAddress = new BigInteger(strbits[i+2].substring(2), 16);
- endLocation = strbits[i+3];
+ endLocation = i+3<strbits.length? strbits[i+3]: null;
}
}
strbits = str.split("\""); //$NON-NLS-1$
- for (int i = 0; i < strbits.length; i++) {
- fileName = strbits[1];
- }
+ if (strbits.length>0) fileName = strbits[1];
}
}

Back to the top