1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[265866] - fixed parsing gdb reply from line info

This commit is contained in:
Alena Laskavaia 2009-02-23 19:09:58 +00:00
parent 7cf033c0bd
commit 1dbc6e0877

View file

@ -71,6 +71,8 @@ public class CLIInfoLineInfo extends MIInfo {
} }
protected void parseLineInfo(String str, List aList) { 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$ String[] strbits = str.split("\\s"); //$NON-NLS-1$
for (int i = 0; i < strbits.length; i++) { for (int i = 0; i < strbits.length; i++) {
if (strbits[i].equals("Line")) //$NON-NLS-1$ 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$ if (strbits[i].equals("ends")) //$NON-NLS-1$
{ {
endAddress = new BigInteger(strbits[i+2].substring(2), 16); 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$ strbits = str.split("\""); //$NON-NLS-1$
for (int i = 0; i < strbits.length; i++) { if (strbits.length>0) fileName = strbits[1];
fileName = strbits[1];
}
} }
} }