[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] AddressFactory for CDebugTarget
|
Ling,
That sounds reasonable to me. However, changing ICDITarget would
break backwards compatibility (compile-time and run-time). This
should be added via a new ICDITargetN interface. There is precedent
for this technique in CDT; see ICDITargetConfiguration2.
John
At 04:28 PM 1/25/2007, Ling.5.Wang@xxxxxxxxx wrote:
Hi,
There is a case in our debugger that a CDebugTarget has no binary file
associated with it. For instance, we need to connect debugger to a
device and just do pure assembly level debug without any source level
debug, namely no binary file is required.
I managed to create a CDT target without a binary object. But to display
addresses of stack frames, an IAddressFactory is needed. In
CDebugTarget.getAddressFactory(),
public IAddressFactory getAddressFactory() {
if ( fAddressFactory == null ) {
if ( getExecFile() != null && getProject() !=
null ) {
IBinaryObject file;
file = getBinaryFile();
if (file != null) {
fAddressFactory =
file.getAddressFactory();
}
}
}
return fAddressFactory;
}
we can see it requires an binary file to work. So to get rid of that
requirement, I'm considering adding an CDI interface like
ICDITarget.getAddressFactory()
Which would ask CDI target to provide a default IAddressFactory.
The implementation of the new interface can simply be "return null" for
most debuggers, while with our debugger it's like this:
return new Addr32Factory();
What do you think ? Or any other better solution ?
Thanks.
-- Ling
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev