mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-09 19:43:27 +02:00
2004-07-09 Alain Magloire
Patch from gwatson to deal with Mac version of gdb, there gdb as a different syntax but still valid. * mi/org/eclipse/cdt/debug/mi/core/output/MIArg.java
This commit is contained in:
parent
265609f825
commit
33193b4d7c
2 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-07-09 Alain Magloire
|
||||||
|
|
||||||
|
Patch from gwatson to deal with Mac
|
||||||
|
version of gdb, there gdb as a different
|
||||||
|
syntax but still valid.
|
||||||
|
|
||||||
|
* mi/org/eclipse/cdt/debug/mi/core/output/MIArg.java
|
||||||
|
|
||||||
2004-07-09 Alain Magloire
|
2004-07-09 Alain Magloire
|
||||||
|
|
||||||
Patch from Stefan Bylund for PR 69711
|
Patch from Stefan Bylund for PR 69711
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class MIArg {
|
||||||
* Parsing a MIList of the form:
|
* Parsing a MIList of the form:
|
||||||
* [{name="xxx",value="yyy"},{name="xxx",value="yyy"},..]
|
* [{name="xxx",value="yyy"},{name="xxx",value="yyy"},..]
|
||||||
* [name="xxx",name="xxx",..]
|
* [name="xxx",name="xxx",..]
|
||||||
|
* [{name="xxx"},{name="xxx"}]
|
||||||
*/
|
*/
|
||||||
public static MIArg[] getMIArgs(MIList miList) {
|
public static MIArg[] getMIArgs(MIList miList) {
|
||||||
List aList = new ArrayList();
|
List aList = new ArrayList();
|
||||||
|
@ -65,11 +66,12 @@ public class MIArg {
|
||||||
/**
|
/**
|
||||||
* Parsing a MITuple of the form:
|
* Parsing a MITuple of the form:
|
||||||
* {name="xxx",value="yyy"}
|
* {name="xxx",value="yyy"}
|
||||||
|
* {name="xxx"}
|
||||||
*/
|
*/
|
||||||
public static MIArg getMIArg(MITuple tuple) {
|
public static MIArg getMIArg(MITuple tuple) {
|
||||||
MIResult[] args = tuple.getMIResults();
|
MIResult[] args = tuple.getMIResults();
|
||||||
MIArg arg = null;
|
MIArg arg = null;
|
||||||
if (args.length == 2) {
|
if (args.length > 0) {
|
||||||
// Name
|
// Name
|
||||||
String aName = ""; //$NON-NLS-1$
|
String aName = ""; //$NON-NLS-1$
|
||||||
MIValue value = args[0].getMIValue();
|
MIValue value = args[0].getMIValue();
|
||||||
|
@ -81,11 +83,13 @@ public class MIArg {
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
String aValue = ""; //$NON-NLS-1$
|
String aValue = ""; //$NON-NLS-1$
|
||||||
value = args[1].getMIValue();
|
if (args.length == 2) {
|
||||||
if (value != null && value instanceof MIConst) {
|
value = args[1].getMIValue();
|
||||||
aValue = ((MIConst)value).getCString();
|
if (value != null && value instanceof MIConst) {
|
||||||
} else {
|
aValue = ((MIConst)value).getCString();
|
||||||
aValue = ""; //$NON-NLS-1$
|
} else {
|
||||||
|
aValue = ""; //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arg = new MIArg(aName, aValue);
|
arg = new MIArg(aName, aValue);
|
||||||
|
|
Loading…
Add table
Reference in a new issue