|
Lines 13-18
Link Here
|
| 13 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
| 14 |
package org.eclipse.cdt.dsf.mi.service; |
14 |
package org.eclipse.cdt.dsf.mi.service; |
| 15 |
|
15 |
|
|
|
16 |
import java.util.Arrays; |
| 16 |
import java.util.HashMap; |
17 |
import java.util.HashMap; |
| 17 |
import java.util.Hashtable; |
18 |
import java.util.Hashtable; |
| 18 |
import java.util.Map; |
19 |
import java.util.Map; |
|
Lines 70-75
Link Here
|
| 70 |
* @since 2.0 |
71 |
* @since 2.0 |
| 71 |
*/ |
72 |
*/ |
| 72 |
public class MIExpressions extends AbstractDsfService implements IMIExpressions, ICachingService { |
73 |
public class MIExpressions extends AbstractDsfService implements IMIExpressions, ICachingService { |
|
|
74 |
|
| 75 |
private static final int PARTITION_LENGTH = 100; |
| 73 |
|
76 |
|
| 74 |
/** |
77 |
/** |
| 75 |
* A format that gives more details about an expression and supports pretty-printing |
78 |
* A format that gives more details about an expression and supports pretty-printing |
|
Lines 314-320
Link Here
|
| 314 |
/** |
317 |
/** |
| 315 |
* @since 4.0 |
318 |
* @since 4.0 |
| 316 |
*/ |
319 |
*/ |
| 317 |
private MIExpressionDMC(String sessionId, ExpressionInfo info, IDMContext parent) { |
320 |
MIExpressionDMC(String sessionId, ExpressionInfo info, IDMContext parent) { |
| 318 |
super(sessionId, new IDMContext[] { parent }); |
321 |
super(sessionId, new IDMContext[] { parent }); |
| 319 |
exprInfo = info; |
322 |
exprInfo = info; |
| 320 |
} |
323 |
} |
|
Lines 381-387
Link Here
|
| 381 |
this.exprInfo = info; |
384 |
this.exprInfo = info; |
| 382 |
} |
385 |
} |
| 383 |
} |
386 |
} |
| 384 |
|
387 |
|
| 385 |
protected static class InvalidContextExpressionDMC extends AbstractDMContext |
388 |
protected static class InvalidContextExpressionDMC extends AbstractDMContext |
| 386 |
implements IExpressionDMContext |
389 |
implements IExpressionDMContext |
| 387 |
{ |
390 |
{ |
|
Lines 411-416
Link Here
|
| 411 |
@Override |
414 |
@Override |
| 412 |
public String getExpression() { |
415 |
public String getExpression() { |
| 413 |
return expression; |
416 |
return expression; |
|
|
417 |
} |
| 418 |
} |
| 419 |
|
| 420 |
/** |
| 421 |
* @since 4.1 |
| 422 |
*/ |
| 423 |
protected static class IndexedPartitionDMC extends MIExpressionDMC implements IIndexedPartitionDMContext { |
| 424 |
|
| 425 |
final private ExpressionInfo fParentInfo; |
| 426 |
private final int fIndex; |
| 427 |
private final int fLength; |
| 428 |
|
| 429 |
public IndexedPartitionDMC( |
| 430 |
String sessionId, |
| 431 |
ExpressionInfo parentInfo, |
| 432 |
IFrameDMContext frameCtx, |
| 433 |
int index, |
| 434 |
int length) { |
| 435 |
this(sessionId, parentInfo, (IDMContext)frameCtx, index, length); |
| 436 |
} |
| 437 |
|
| 438 |
private IndexedPartitionDMC( |
| 439 |
String sessionId, |
| 440 |
ExpressionInfo parentInfo, |
| 441 |
IDMContext parent, |
| 442 |
int index, |
| 443 |
int length) { |
| 444 |
super(sessionId, createExpressionInfo(parentInfo, index, length), parent); |
| 445 |
fIndex = index; |
| 446 |
fLength = length; |
| 447 |
fParentInfo = parentInfo; |
| 448 |
} |
| 449 |
|
| 450 |
public ExpressionInfo getParentInfo() { |
| 451 |
return fParentInfo; |
| 452 |
} |
| 453 |
|
| 454 |
/* (non-Javadoc) |
| 455 |
* @see org.eclipse.cdt.dsf.debug.service.IExpressions4.IIndexedPartitionDMContext#getParentExpression() |
| 456 |
*/ |
| 457 |
@Override |
| 458 |
public String getParentExpression() { |
| 459 |
return getParentInfo().getFullExpr(); |
| 460 |
} |
| 461 |
|
| 462 |
@Override |
| 463 |
public int getIndex() { |
| 464 |
return fIndex; |
| 465 |
} |
| 466 |
|
| 467 |
@Override |
| 468 |
public int getLength() { |
| 469 |
return fLength; |
| 470 |
} |
| 471 |
|
| 472 |
@Override |
| 473 |
public boolean equals(Object other) { |
| 474 |
return super.baseEquals(other) && |
| 475 |
((IndexedPartitionDMC) other).getIndex() == getIndex() && |
| 476 |
((IndexedPartitionDMC) other).getLength() == getLength(); |
| 477 |
} |
| 478 |
|
| 479 |
@Override |
| 480 |
public int hashCode() { |
| 481 |
return super.baseHashCode() + 17*getIndex() + 31*getLength(); |
| 482 |
} |
| 483 |
|
| 484 |
@Override |
| 485 |
public String toString() { |
| 486 |
return String.format( "%s[%d-%d]", baseToString(), Integer.valueOf( getIndex() ), Integer.valueOf( getIndex() + getLength() ) ); //$NON-NLS-1$ |
| 487 |
} |
| 488 |
|
| 489 |
private static ExpressionInfo createExpressionInfo(ExpressionInfo parentInfo, int index, int length) { |
| 490 |
String expression = String.format( |
| 491 |
"*(%s+%d)@%d", //$NON-NLS-1$ |
| 492 |
parentInfo.getRelExpr(), |
| 493 |
Integer.valueOf(index), |
| 494 |
Integer.valueOf(length)); |
| 495 |
return new ExpressionInfo(expression, expression); |
| 414 |
} |
496 |
} |
| 415 |
} |
497 |
} |
| 416 |
|
498 |
|
|
Lines 1064-1096
Link Here
|
| 1064 |
* The data request monitor that will contain the requested data |
1146 |
* The data request monitor that will contain the requested data |
| 1065 |
*/ |
1147 |
*/ |
| 1066 |
@Override |
1148 |
@Override |
| 1067 |
public void getSubExpressions(final IExpressionDMContext dmc, |
1149 |
public void getSubExpressions(IExpressionDMContext dmc, DataRequestMonitor<IExpressionDMContext[]> rm) { |
| 1068 |
final DataRequestMonitor<IExpressionDMContext[]> rm) |
1150 |
getSubExpressions(dmc, -1, -1, rm); |
| 1069 |
{ |
|
|
| 1070 |
if (dmc instanceof MIExpressionDMC) { |
| 1071 |
fExpressionCache.execute( |
| 1072 |
new ExprMetaGetChildren(dmc), |
| 1073 |
new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) { |
| 1074 |
@Override |
| 1075 |
protected void handleSuccess() { |
| 1076 |
ExpressionInfo[] childrenExpr = getData().getChildrenExpressions(); |
| 1077 |
IExpressionDMContext[] childArray = new IExpressionDMContext[childrenExpr.length]; |
| 1078 |
for (int i=0; i<childArray.length; i++) { |
| 1079 |
childArray[i] = createExpression( |
| 1080 |
dmc.getParents()[0], childrenExpr[i]); |
| 1081 |
} |
| 1082 |
|
| 1083 |
rm.setData(childArray); |
| 1084 |
rm.done(); |
| 1085 |
} |
| 1086 |
}); |
| 1087 |
} else if (dmc instanceof InvalidContextExpressionDMC) { |
| 1088 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
| 1089 |
rm.done(); |
| 1090 |
} else { |
| 1091 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid expression context.", null)); //$NON-NLS-1$ |
| 1092 |
rm.done(); |
| 1093 |
} |
| 1094 |
} |
1151 |
} |
| 1095 |
|
1152 |
|
| 1096 |
/** |
1153 |
/** |
|
Lines 1112-1148
Link Here
|
| 1112 |
public void getSubExpressions(final IExpressionDMContext exprCtx, final int startIndex, |
1169 |
public void getSubExpressions(final IExpressionDMContext exprCtx, final int startIndex, |
| 1113 |
final int length, final DataRequestMonitor<IExpressionDMContext[]> rm) { |
1170 |
final int length, final DataRequestMonitor<IExpressionDMContext[]> rm) { |
| 1114 |
|
1171 |
|
| 1115 |
if (startIndex < 0 || length < 0) { |
1172 |
if (exprCtx instanceof IndexedPartitionDMC) { |
| 1116 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid range for evaluating sub expressions.", null)); //$NON-NLS-1$ |
1173 |
getIndexedPartitionChildren((IndexedPartitionDMC)exprCtx, startIndex, length, rm); |
| 1117 |
rm.done(); |
|
|
| 1118 |
return; |
| 1119 |
} |
1174 |
} |
| 1120 |
|
1175 |
else if (exprCtx instanceof MIExpressionDMC) { |
| 1121 |
if (exprCtx instanceof MIExpressionDMC) { |
1176 |
getRealSubExpressionCount( |
| 1122 |
fExpressionCache.execute( |
1177 |
exprCtx, |
| 1123 |
new ExprMetaGetChildren(exprCtx, startIndex + length), |
1178 |
IMIExpressions.CHILD_COUNT_LIMIT_UNSPECIFIED, |
| 1124 |
new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) { |
1179 |
new DataRequestMonitor<Integer>(getExecutor(), rm) { |
| 1125 |
@Override |
1180 |
/* (non-Javadoc) |
| 1126 |
protected void handleSuccess() { |
1181 |
* @see org.eclipse.cdt.dsf.concurrent.RequestMonitor#handleSuccess() |
| 1127 |
ExpressionInfo[] childrenExpr = getData().getChildrenExpressions(); |
1182 |
*/ |
| 1128 |
|
1183 |
@Override |
| 1129 |
if (startIndex >= childrenExpr.length) { |
1184 |
protected void handleSuccess() { |
| 1130 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, "Invalid range for evaluating sub expressions.", null)); //$NON-NLS-1$ |
1185 |
int realNumChildren = getData().intValue(); |
| 1131 |
rm.done(); |
1186 |
if (realNumChildren <= PARTITION_LENGTH) { |
| 1132 |
return; |
1187 |
getRealSubExpressions(exprCtx, startIndex, length, rm); |
| 1133 |
} |
1188 |
} |
| 1134 |
|
1189 |
else { |
| 1135 |
int numChildren = childrenExpr.length - startIndex; |
1190 |
rm.setData(getTopLevelIndexedPartitions((MIExpressionDMC)exprCtx, realNumChildren, startIndex, length )); |
| 1136 |
numChildren = Math.min(length, numChildren); |
|
|
| 1137 |
IExpressionDMContext[] childrenArray = new IExpressionDMContext[numChildren]; |
| 1138 |
for (int i=0; i < numChildren; i++) { |
| 1139 |
childrenArray[i] = createExpression( |
| 1140 |
exprCtx.getParents()[0], childrenExpr[startIndex + i]); |
| 1141 |
} |
| 1142 |
rm.setData(childrenArray); |
| 1143 |
rm.done(); |
1191 |
rm.done(); |
| 1144 |
} |
1192 |
} |
| 1145 |
}); |
1193 |
} |
|
|
1194 |
}); |
| 1146 |
} else if (exprCtx instanceof InvalidContextExpressionDMC) { |
1195 |
} else if (exprCtx instanceof InvalidContextExpressionDMC) { |
| 1147 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
1196 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
| 1148 |
rm.done(); |
1197 |
rm.done(); |
|
Lines 1187-1201
Link Here
|
| 1187 |
final int numChildLimit, final DataRequestMonitor<Integer> rm) { |
1236 |
final int numChildLimit, final DataRequestMonitor<Integer> rm) { |
| 1188 |
|
1237 |
|
| 1189 |
if (dmc instanceof MIExpressionDMC) { |
1238 |
if (dmc instanceof MIExpressionDMC) { |
| 1190 |
fExpressionCache.execute( |
1239 |
if (dmc instanceof IndexedPartitionDMC) { |
| 1191 |
new ExprMetaGetChildCount(dmc, numChildLimit), |
1240 |
int length = ((IndexedPartitionDMC)dmc).getLength(); |
| 1192 |
new DataRequestMonitor<ExprMetaGetChildCountInfo>(getExecutor(), rm) { |
1241 |
rm.setData(computeNumberOfChildren(length)); |
|
|
1242 |
rm.done(); |
| 1243 |
} |
| 1244 |
else { |
| 1245 |
getRealSubExpressionCount( |
| 1246 |
dmc, |
| 1247 |
numChildLimit, |
| 1248 |
new DataRequestMonitor<Integer>(getExecutor(), rm) { |
| 1249 |
|
| 1193 |
@Override |
1250 |
@Override |
| 1194 |
protected void handleSuccess() { |
1251 |
protected void handleSuccess() { |
| 1195 |
rm.setData(getData().getChildNum()); |
1252 |
rm.setData(computeNumberOfChildren(getData().intValue())); |
| 1196 |
rm.done(); |
1253 |
rm.done(); |
| 1197 |
} |
1254 |
} |
| 1198 |
}); |
1255 |
}); |
|
|
1256 |
} |
| 1199 |
} else if (dmc instanceof InvalidContextExpressionDMC) { |
1257 |
} else if (dmc instanceof InvalidContextExpressionDMC) { |
| 1200 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
1258 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
| 1201 |
rm.done(); |
1259 |
rm.done(); |
|
Lines 1442-1445
Link Here
|
| 1442 |
} |
1500 |
} |
| 1443 |
}); |
1501 |
}); |
| 1444 |
} |
1502 |
} |
|
|
1503 |
|
| 1504 |
private IndexedPartitionDMC[] getTopLevelIndexedPartitions( |
| 1505 |
MIExpressionDMC exprCtx, |
| 1506 |
int realNumChildren, |
| 1507 |
int startIndex, |
| 1508 |
int length) { |
| 1509 |
|
| 1510 |
int numChildren = computeNumberOfChildren(realNumChildren); |
| 1511 |
if (startIndex >= numChildren) |
| 1512 |
return new IndexedPartitionDMC[0]; |
| 1513 |
int startIndex1 = (startIndex < 0) ? 0 : startIndex; |
| 1514 |
int length1 = (length < 0) ? numChildren - startIndex1 : Math.min(length, numChildren - startIndex1); |
| 1515 |
|
| 1516 |
IndexedPartitionDMC[] children = new IndexedPartitionDMC[numChildren]; |
| 1517 |
int index = 0; |
| 1518 |
for(int i = 0; i < children.length; ++i) { |
| 1519 |
int partLength = computePartitionLength(realNumChildren, i); |
| 1520 |
children[i] = createIndexedPartition( |
| 1521 |
exprCtx.getParents()[0], |
| 1522 |
exprCtx.getExpressionInfo(), |
| 1523 |
index, |
| 1524 |
partLength); |
| 1525 |
index += partLength; |
| 1526 |
} |
| 1527 |
return Arrays.copyOfRange(children, startIndex1, startIndex1 + length1 ); |
| 1528 |
} |
| 1529 |
|
| 1530 |
private void getIndexedPartitionChildren( |
| 1531 |
final IndexedPartitionDMC partDmc, |
| 1532 |
final int startIndex, |
| 1533 |
final int length, |
| 1534 |
final DataRequestMonitor<IExpressionDMContext[]> rm) { |
| 1535 |
|
| 1536 |
final int startIndex1 = (startIndex < 0) ? 0 : startIndex; |
| 1537 |
final int length1 = (length < 0) ? Integer.MAX_VALUE : length; |
| 1538 |
|
| 1539 |
final int partStartIndex = partDmc.getIndex(); |
| 1540 |
final int partLength = partDmc.getLength(); |
| 1541 |
if (partLength > PARTITION_LENGTH) { |
| 1542 |
// create subpartitions |
| 1543 |
int numChildren = computeNumberOfChildren(partLength); |
| 1544 |
|
| 1545 |
if (startIndex1 >= numChildren) { |
| 1546 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, "Invalid range for evaluating sub expressions.", null)); //$NON-NLS-1$ |
| 1547 |
rm.done(); |
| 1548 |
return; |
| 1549 |
} |
| 1550 |
|
| 1551 |
int numPart = Math.min(numChildren, length1); |
| 1552 |
IndexedPartitionDMC[] children = new IndexedPartitionDMC[numPart]; |
| 1553 |
int index = partStartIndex; |
| 1554 |
for (int i = 0; i < startIndex1; ++i) |
| 1555 |
index += computePartitionLength(partLength, i); |
| 1556 |
for (int i = 0; i < children.length; ++i) { |
| 1557 |
int childPartLength = computePartitionLength(partLength, i + startIndex1); |
| 1558 |
children[i] = createIndexedPartition( |
| 1559 |
partDmc, |
| 1560 |
partDmc.getParentInfo(), |
| 1561 |
index, |
| 1562 |
childPartLength); |
| 1563 |
index += childPartLength; |
| 1564 |
} |
| 1565 |
rm.setData(children); |
| 1566 |
rm.done(); |
| 1567 |
} |
| 1568 |
else { |
| 1569 |
// this is the last partition level, create "real" children |
| 1570 |
getRealSubExpressions(createExpression(partDmc.getParents()[0], partDmc.getParentInfo()), partDmc.getIndex() + startIndex, length, rm); |
| 1571 |
} |
| 1572 |
} |
| 1573 |
|
| 1574 |
void getRealSubExpressions( |
| 1575 |
final IExpressionDMContext exprCtx, |
| 1576 |
int startIndex, |
| 1577 |
int length, |
| 1578 |
final DataRequestMonitor<IExpressionDMContext[]> rm) { |
| 1579 |
|
| 1580 |
ExprMetaGetChildren getChildren = (startIndex < 0 || length < 0) ? |
| 1581 |
new ExprMetaGetChildren(exprCtx) : new ExprMetaGetChildren(exprCtx, startIndex + length); |
| 1582 |
final int startIndex1 = (startIndex < 0) ? 0 : startIndex; |
| 1583 |
final int length1 = (length < 0) ? Integer.MAX_VALUE : length; |
| 1584 |
fExpressionCache.execute( |
| 1585 |
getChildren, |
| 1586 |
new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) { |
| 1587 |
@Override |
| 1588 |
protected void handleSuccess() { |
| 1589 |
ExpressionInfo[] childrenExpr = getData().getChildrenExpressions(); |
| 1590 |
|
| 1591 |
if (startIndex1 >= childrenExpr.length) { |
| 1592 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, "Invalid range for evaluating sub expressions.", null)); //$NON-NLS-1$ |
| 1593 |
rm.done(); |
| 1594 |
return; |
| 1595 |
} |
| 1596 |
|
| 1597 |
int numChildren = childrenExpr.length - startIndex1; |
| 1598 |
numChildren = Math.min(length1, numChildren); |
| 1599 |
IExpressionDMContext[] childrenArray = new IExpressionDMContext[numChildren]; |
| 1600 |
for (int i=0; i < numChildren; i++) { |
| 1601 |
childrenArray[i] = createExpression(exprCtx.getParents()[0], childrenExpr[startIndex1 + i]); |
| 1602 |
} |
| 1603 |
rm.setData(childrenArray); |
| 1604 |
rm.done(); |
| 1605 |
} |
| 1606 |
}); |
| 1607 |
} |
| 1608 |
|
| 1609 |
/** |
| 1610 |
* Returns the number of "real" children if it is less or equal to the partition size, |
| 1611 |
* otherwise returns the number of partitions. |
| 1612 |
*/ |
| 1613 |
private int computeNumberOfChildren(int realNumberOfChildren) { |
| 1614 |
int childNum = realNumberOfChildren; |
| 1615 |
int extra = (childNum > PARTITION_LENGTH && childNum % PARTITION_LENGTH > 0) ? 1 : 0; |
| 1616 |
while (childNum > PARTITION_LENGTH) { |
| 1617 |
childNum /= PARTITION_LENGTH; |
| 1618 |
} |
| 1619 |
childNum += extra; |
| 1620 |
return childNum; |
| 1621 |
} |
| 1622 |
|
| 1623 |
private int computePartitionLength(int realNumberOfChildren, int index) { |
| 1624 |
int childNum = realNumberOfChildren; |
| 1625 |
int depth = 0; |
| 1626 |
int length = PARTITION_LENGTH; |
| 1627 |
while (childNum > PARTITION_LENGTH) { |
| 1628 |
childNum /= PARTITION_LENGTH; |
| 1629 |
if (depth > 0) |
| 1630 |
length *= PARTITION_LENGTH; |
| 1631 |
++depth; |
| 1632 |
} |
| 1633 |
int diff = realNumberOfChildren - length*index; |
| 1634 |
return ( diff > length ) ? length : diff ; |
| 1635 |
} |
| 1636 |
|
| 1637 |
private IndexedPartitionDMC createIndexedPartition(IDMContext ctx, ExpressionInfo info, int index, int length) { |
| 1638 |
IFrameDMContext frameDmc = DMContexts.getAncestorOfType(ctx, IFrameDMContext.class); |
| 1639 |
if (frameDmc != null) { |
| 1640 |
return new IndexedPartitionDMC(getSession().getId(), info, frameDmc, index, length); |
| 1641 |
} |
| 1642 |
|
| 1643 |
IMIExecutionDMContext execCtx = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class); |
| 1644 |
if (execCtx != null) { |
| 1645 |
// If we have a thread context but not a frame context, we give the user |
| 1646 |
// the expression as per the top-most frame of the specified thread. |
| 1647 |
// To do this, we create our own frame context. |
| 1648 |
MIStack stackService = getServicesTracker().getService(MIStack.class); |
| 1649 |
if (stackService != null) { |
| 1650 |
frameDmc = stackService.createFrameDMContext(execCtx, 0); |
| 1651 |
return new IndexedPartitionDMC(getSession().getId(), info, frameDmc, index, length); |
| 1652 |
} |
| 1653 |
} |
| 1654 |
|
| 1655 |
return new IndexedPartitionDMC(getSession().getId(), info, ctx, index, length); |
| 1656 |
} |
| 1657 |
|
| 1658 |
private void getRealSubExpressionCount(IExpressionDMContext dmc, int numChildLimit, final DataRequestMonitor<Integer> rm) { |
| 1659 |
if (dmc instanceof MIExpressionDMC) { |
| 1660 |
fExpressionCache.execute( |
| 1661 |
new ExprMetaGetChildCount(dmc, numChildLimit), |
| 1662 |
new DataRequestMonitor<ExprMetaGetChildCountInfo>(getExecutor(), rm) { |
| 1663 |
@Override |
| 1664 |
protected void handleSuccess() { |
| 1665 |
rm.setData(getData().getChildNum()); |
| 1666 |
rm.done(); |
| 1667 |
} |
| 1668 |
}); |
| 1669 |
} else if (dmc instanceof InvalidContextExpressionDMC) { |
| 1670 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context for evaluating expressions.", null)); //$NON-NLS-1$ |
| 1671 |
rm.done(); |
| 1672 |
} else { |
| 1673 |
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Invalid expression context.", null)); //$NON-NLS-1$ |
| 1674 |
rm.done(); |
| 1675 |
} |
| 1676 |
} |
| 1445 |
} |
1677 |
} |