1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

Fix bug 173197, allow CDI targets to provide an address factory.

This commit is contained in:
Ken Ryall 2007-02-08 00:27:50 +00:00
parent eec83cfb66
commit fa70524c95
2 changed files with 15 additions and 0 deletions

View file

@ -11,6 +11,7 @@
package org.eclipse.cdt.debug.core.cdi.model;
import org.eclipse.cdt.core.IAddressFactory;
import org.eclipse.cdt.debug.core.model.IGlobalVariableDescriptor;
public interface ICDITarget2 extends ICDITarget {
@ -21,4 +22,10 @@ public interface ICDITarget2 extends ICDITarget {
*/
IGlobalVariableDescriptor[] getGlobalVariables();
/**
* Returns an AddressFactory for use with this target.
* @return an IAddressFactory.
*/
IAddressFactory getAddressFactory();
}

View file

@ -1625,6 +1625,14 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
fAddressFactory = file.getAddressFactory();
}
}
else {
// No binary file, possible when we do pure assembly level debug
// Without any binary file involved, ask CDI plugin for default
// AddressFactory, if any.
if (fCDITarget instanceof ICDITarget2) {
fAddressFactory = ((ICDITarget2) fCDITarget).getAddressFactory();
}
}
}
return fAddressFactory;
}