Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CEditor bombs in M5

> 
> 
> 
> > 
> > It is already done this way, look more carefully at the Core Model API.
> > You can actually choose your parser base on a property of the project.
> > 
> 
> Right, you go in and select a radio button that says Elf or PE in the UI
> which sets a property.  Well, what if I have a project that makes both?
> Personally I have worked at two companies where a single project would
> generate files in 2-3 different binary formats and so having to pick which 
> one to use seems silly when it could just "know" which one to use.
> 
> And if you add in support for a new binary file type (say core.utils.foobin.*) 
> you need to go in and augment things in packages outside of utils to 
> understand how to use this interface (FoobinBinaryParser, ...).  
> Unlike (for example) BFD which abstracts it all so the upper layers don't 
> need to worry about it.  Am I wrong?

Binary parsers are extension points, you can add as much as you want
as long as you adhere to the API.  FoobinBinaryParser or whatever you
call it will have to adhere to the define API and be define in your
plugin/plugin.xml to be pick up by the CDT.

The other API is in the definition of the C Core Model.

For the comment on multiple parsers, sure.  The first idea was that
usually, we work on one architecture at a time in a project, that goes
for the builder also in a way, where you set you configuration or your
toolchain to say, "mips".  If we can work on with multiple toolchains
on the same project (mip, ppc, x86) at the same time, we should
probaly change the behaviour also for the parsers.


As suggested by Doug, I'm trying to put all this on paper for next week.




Back to the top