mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Removed an extraneous back-end call to resolve the memory address.
This commit is contained in:
parent
0f9a2839a8
commit
210443c47a
1 changed files with 17 additions and 24 deletions
|
@ -30,7 +30,6 @@ import org.eclipse.dd.dsf.debug.service.IExpressions;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues;
|
import org.eclipse.dd.dsf.debug.service.IFormattedValues;
|
||||||
import org.eclipse.dd.dsf.debug.service.IMemory;
|
import org.eclipse.dd.dsf.debug.service.IMemory;
|
||||||
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMContext;
|
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMData;
|
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
||||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
||||||
|
@ -293,7 +292,7 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
|
||||||
|
|
||||||
private BigInteger resolveMemoryAddress(final IDMContext idmContext, final String expression) throws DebugException {
|
private BigInteger resolveMemoryAddress(final IDMContext idmContext, final String expression) throws DebugException {
|
||||||
|
|
||||||
// Use a Query to "synchronise" the downstream calls
|
// Use a Query to "synchronize" the downstream calls
|
||||||
Query<BigInteger> query = new Query<BigInteger>() {
|
Query<BigInteger> query = new Query<BigInteger>() {
|
||||||
@Override
|
@Override
|
||||||
protected void execute(final DataRequestMonitor<BigInteger> drm) {
|
protected void execute(final DataRequestMonitor<BigInteger> drm) {
|
||||||
|
@ -302,32 +301,26 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
|
||||||
if (expressionService != null) {
|
if (expressionService != null) {
|
||||||
// Create the expression
|
// Create the expression
|
||||||
final IExpressionDMContext expressionDMC = expressionService.createExpression(idmContext, expression);
|
final IExpressionDMContext expressionDMC = expressionService.createExpression(idmContext, expression);
|
||||||
expressionService.getExpressionData(expressionDMC, new DataRequestMonitor<IExpressionDMData>(getExecutor(), drm) {
|
String formatId = IFormattedValues.HEX_FORMAT;
|
||||||
@Override
|
FormattedValueDMContext valueDmc = expressionService.getFormattedValueContext(expressionDMC, formatId);
|
||||||
protected void handleOK() {
|
expressionService.getFormattedExpressionValue(
|
||||||
// Evaluate the expression - request HEX since it works in every case
|
valueDmc,
|
||||||
String formatId = IFormattedValues.HEX_FORMAT;
|
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) {
|
||||||
FormattedValueDMContext valueDmc = expressionService.getFormattedValueContext(expressionDMC, formatId);
|
@Override
|
||||||
expressionService.getFormattedExpressionValue(
|
protected void handleOK() {
|
||||||
valueDmc,
|
// Store the result
|
||||||
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) {
|
FormattedValueDMData data = getData();
|
||||||
@Override
|
String value = data.getFormattedValue().substring(2); // Strip the "0x"
|
||||||
protected void handleOK() {
|
drm.setData(new BigInteger(value, 16));
|
||||||
// Store the result
|
drm.done();
|
||||||
FormattedValueDMData data = getData();
|
}
|
||||||
String value = data.getFormattedValue().substring(2); // Strip the "0x"
|
}
|
||||||
drm.setData(new BigInteger(value, 16));
|
);
|
||||||
drm.done();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
fExecutor.execute(query);
|
fExecutor.execute(query);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// The happy case
|
// The happy case
|
||||||
return query.get();
|
return query.get();
|
||||||
|
|
Loading…
Add table
Reference in a new issue