mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +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
|
||||
|
||||
Patch from Stefan Bylund for PR 69711
|
||||
|
|
|
@ -39,6 +39,7 @@ public class MIArg {
|
|||
* Parsing a MIList of the form:
|
||||
* [{name="xxx",value="yyy"},{name="xxx",value="yyy"},..]
|
||||
* [name="xxx",name="xxx",..]
|
||||
* [{name="xxx"},{name="xxx"}]
|
||||
*/
|
||||
public static MIArg[] getMIArgs(MIList miList) {
|
||||
List aList = new ArrayList();
|
||||
|
@ -65,11 +66,12 @@ public class MIArg {
|
|||
/**
|
||||
* Parsing a MITuple of the form:
|
||||
* {name="xxx",value="yyy"}
|
||||
* {name="xxx"}
|
||||
*/
|
||||
public static MIArg getMIArg(MITuple tuple) {
|
||||
MIResult[] args = tuple.getMIResults();
|
||||
MIArg arg = null;
|
||||
if (args.length == 2) {
|
||||
if (args.length > 0) {
|
||||
// Name
|
||||
String aName = ""; //$NON-NLS-1$
|
||||
MIValue value = args[0].getMIValue();
|
||||
|
@ -81,11 +83,13 @@ public class MIArg {
|
|||
|
||||
// Value
|
||||
String aValue = ""; //$NON-NLS-1$
|
||||
value = args[1].getMIValue();
|
||||
if (value != null && value instanceof MIConst) {
|
||||
aValue = ((MIConst)value).getCString();
|
||||
} else {
|
||||
aValue = ""; //$NON-NLS-1$
|
||||
if (args.length == 2) {
|
||||
value = args[1].getMIValue();
|
||||
if (value != null && value instanceof MIConst) {
|
||||
aValue = ((MIConst)value).getCString();
|
||||
} else {
|
||||
aValue = ""; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
arg = new MIArg(aName, aValue);
|
||||
|
|
Loading…
Add table
Reference in a new issue