mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 328391 - DisassemblyBackendDsf gotoSymbol needs to handle IExpressionDMLocation when using IExpressions.getExpressionAddressData
This commit is contained in:
parent
bbbe3dceac
commit
7e01bb61eb
1 changed files with 18 additions and 7 deletions
|
@ -39,6 +39,7 @@ import org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IExpressions;
|
import org.eclipse.cdt.dsf.debug.service.IExpressions;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMAddress;
|
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMAddress;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext;
|
||||||
|
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMLocation;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IFormattedValues;
|
import org.eclipse.cdt.dsf.debug.service.IFormattedValues;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
||||||
|
@ -862,7 +863,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public void gotoSymbol(final String symbol) {
|
public void gotoSymbol(final String symbol) {
|
||||||
evaluateSymbolAddress(symbol, false, new DataRequestMonitor<BigInteger>(getSession().getExecutor(), null) {
|
evaluateAddressExpression(symbol, false, new DataRequestMonitor<BigInteger>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
final BigInteger address = getData();
|
final BigInteger address = getData();
|
||||||
|
@ -878,14 +879,14 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateSymbolAddress(java.lang.String, boolean)
|
* @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateAddressExpression(java.lang.String, boolean)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BigInteger evaluateAddressExpression(final String symbol, final boolean suppressError) {
|
public BigInteger evaluateAddressExpression(final String symbol, final boolean suppressError) {
|
||||||
Query<BigInteger> query = new Query<BigInteger>() {
|
Query<BigInteger> query = new Query<BigInteger>() {
|
||||||
@Override
|
@Override
|
||||||
protected void execute(DataRequestMonitor<BigInteger> rm) {
|
protected void execute(DataRequestMonitor<BigInteger> rm) {
|
||||||
evaluateSymbolAddress(symbol, suppressError, rm);
|
evaluateAddressExpression(symbol, suppressError, rm);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getSession().getExecutor().execute(query);
|
getSession().getExecutor().execute(query);
|
||||||
|
@ -896,7 +897,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void evaluateSymbolAddress(final String symbol, final boolean suppressError, final DataRequestMonitor<BigInteger> rm) {
|
private void evaluateAddressExpression(final String symbol, final boolean suppressError, final DataRequestMonitor<BigInteger> rm) {
|
||||||
final IExpressions expressions= getService(IExpressions.class);
|
final IExpressions expressions= getService(IExpressions.class);
|
||||||
if (expressions == null) {
|
if (expressions == null) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "", null)); //$NON-NLS-1$
|
||||||
|
@ -910,9 +911,19 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
IExpressionDMAddress data = getData();
|
IExpressionDMAddress data = getData();
|
||||||
IAddress address = data.getAddress();
|
final IAddress address = data.getAddress();
|
||||||
rm.setData(address.getValue());
|
if (address != null && address != IExpressionDMLocation.INVALID_ADDRESS) {
|
||||||
rm.done();
|
final BigInteger addressValue = address.getValue();
|
||||||
|
fCallback.asyncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
fCallback.gotoAddress(addressValue);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
rm.setData(addressValue);
|
||||||
|
rm.done();
|
||||||
|
} else {
|
||||||
|
handleError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void handleError() {
|
protected void handleError() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue