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

Bugzilla 251039.

This commit is contained in:
Randy Rohrbach 2008-10-16 19:31:58 +00:00
parent 3fd4ddeddc
commit 0113d94674
3 changed files with 18 additions and 0 deletions

View file

@ -655,6 +655,9 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
*/
int startIdx = "GRP(".length(); //$NON-NLS-1$
int endIdx = expression.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
String remaining = expression.substring(endIdx+1);
if ( ! remaining.startsWith(".REG(") ) { //$NON-NLS-1$
return null;
@ -665,6 +668,9 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
*/
startIdx = ".REG(".length(); //$NON-NLS-1$
endIdx = remaining.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
remaining = remaining.substring(endIdx+1);
/*
@ -675,6 +681,9 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
}
startIdx = ".BFLD(".length(); //$NON-NLS-1$
endIdx = remaining.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
String bitFieldName = remaining.substring(startIdx, endIdx);
/*

View file

@ -359,6 +359,9 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode
*/
int startIdx = "GRP(".length(); //$NON-NLS-1$
int endIdx = expression.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
String groupName = expression.substring(startIdx, endIdx);
return groupName.trim();
}

View file

@ -648,6 +648,9 @@ public class RegisterVMNode extends AbstractExpressionVMNode
*/
int startIdx = "GRP(".length(); //$NON-NLS-1$
int endIdx = expression.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
String remaining = expression.substring(endIdx+1);
if ( ! remaining.startsWith(".REG(") ) { //$NON-NLS-1$
return null;
@ -658,6 +661,9 @@ public class RegisterVMNode extends AbstractExpressionVMNode
*/
startIdx = ".REG(".length(); //$NON-NLS-1$
endIdx = remaining.indexOf(')', startIdx);
if ( startIdx == -1 || endIdx == -1 ) {
return null;
}
String regName = remaining.substring(startIdx,endIdx);
return regName.trim();
}