Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Adding non-primary outputs to resource tree

Hi Matthew,
CDT team tracks patches in bugzilla. Could you create a report and attach the patch there?

Thanks,
Andrew

On Tue, Jun 22, 2010 at 7:31 AM, Matthew Fortune <Matthew.Fortune@xxxxxxxxxx> wrote:

Ed/any,

 

It turns out that calculateOutputs in BuildDescription does take in to account the output types for each tool, but it is a little inconsistent… Essentially it will ignore all but the primary output of the target tool. I don’t know if this is intentional or a bug but I have changed the logic to process the primary output of a target tool using the toolchain’s artifact+extension and then continue on to process all the non-primary outputs of a target tool in the same way as it does for non-target tools.

 

If that makes sense then the patch is attached! Is this a sensible change?

 

Regards,

Matthew

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthew Fortune
Sent: 21 June 2010 21:56


To: CDT General developers list.
Subject: RE: [cdt-dev] Adding non-primary outputs to resource tree

 

Hi Ed,

 

> I am integrating a linker that can emit a map file alongside the primary output (an ELF binary). I would like the file to appear in the workspace and assumed that representing it using an outputType would accomplish that.

>

> Am I correct to think that additional outputs should appear as resources when the build completes or do I need to implement something else?

 

[[ejs]] Any outputs that go into the project's directory tree should show up in their appropriate locations as a result of the "refresh resources" task that follows a build.

 

But I suspect either your binaries are built outside a project, or too deep inside it, and you want the *.map file to show upin the top level Binaries folder next to your ELF binary.  Is that it?  The "binary parser" facility is used to promote content there (see Project > Properties> C/C++ Build > Settings > Binary Parsers).  The project view doesn't use the "outputType" attribute, AFAIK.

 

The binaries and map file are being output directly to the output folder (<project>/[Release|Debug]). Whilst the intermediate object files and binaries appear in the Debug or Release folder in the resources view the map file does not (and I did check it was created!). I will however see if I can trace through the ‘refresh resources’ task and figure out if there is some subtlety (I assume I will find that in the cdt source relatively easily).

 

It isa nasty hack, and 50% a joking suggestion, but you could implement a "binary" parser that detects map files and register that with your toolchain.  See the 'org.eclipse.cdt.core.BinaryParser' extension point and the corresponding MBS stuff which I don't know.  (This may have unintended consequences, though, such as suddenly being able to launch map files with the debugger... I'm not sure on this point ;)

 

Maybe if I get really desperate! I have to assume I am doing something very wrong if this should just work.

 

Other than that, I think the Common Project Navigator (e.g. "Project Explorer" view) provides extensions that let you add content, likevirtual folders, to a project as well.  You may look into that option as well, but that's an Eclipse platform feature and not a CDT one.

 

Thanks for the tips, I’ll post back when I have dug a bit deeper.

 

Regards,

Matthew

 

-- Ed

 


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top