Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-debug-dev] AddressFactory for CDebugTarget

Sounds good to me too. Obviously a binary "knows" about it's address
factory, but it's the target that "defines" it. 

-----Original Message-----
From: cdt-debug-dev-bounces@xxxxxxxxxxx
[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of
Ling.5.Wang@xxxxxxxxx
Sent: 25 January 2007 22:48
To: cdt-debug-dev@xxxxxxxxxxx
Subject: RE: [cdt-debug-dev] AddressFactory for CDebugTarget

Great, that's surely a better way of implementation. Thanks.

-- Ling 

> -----Original Message-----
> From: cdt-debug-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of ext John 
> Cortell
> Sent: Thursday, January 25, 2007 4:36 PM
> To: CDT Debug developers list; cdt-debug-dev@xxxxxxxxxxx
> Subject: 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
> 
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> 
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

-- 
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




Back to the top