Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Extension/replacement of PDOMCLinkage
Extension/replacement of PDOMCLinkage [message #1708011] Fri, 11 September 2015 12:52
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: L√ľnen
Senior Member
I am currently trying to add support for resolving members of nested anonymous unions/structs (like supported by IAR compilers). The PDOMCLinkage already handles this case properly for members of top-level anonymous composite types within createBinding(PDOMNode, IBinding, long), where it adds respective bindings to the enclosing scope. However, it does not handle the case of members in nested anonymous composite types:

volatile union {
unsigned short a;
struct {
union {
unsigned short b;
};
union {
unsigned short c;
};
};
};

void Init(void) {
a = 1; // handled by PDOMCLinkage, thus resolvable
b = 2; // not handled by PDOMCLinkage, thus not resolvable
}

I could easily add support by adjusting the PDOMCLinkage to also handle the above case. However, registering an alternative IPDOMLinkageFactory for the "C" linkage via the extension point does not work (a contribution in a client bundle will be loaded first, so the contribution in org.eclipse.cdt.core will overwrite it).

As I already have created an own language, I also thought of defining an own linkage ID (and to register a modified PCOMCLinkage for that linkage ID). However, it seems such a linkage will never be considered by the index as PDOMManager has its own static list of linkages to use for the index (IDS_FOR_LINKAGES_TO_INDEX). Also the list of linkages defined in Linkage cannot be extended.

What would be the appropriate way to handle this case?

[Updated on: Fri, 11 September 2015 12:53]

Report message to a moderator

Previous Topic:no c++ project available
Next Topic:Am I dumb? ,How to create a make file?
Goto Forum:
  


Current Time: Mon Jul 23 12:03:15 GMT 2018

Powered by FUDForum. Page generated in 0.02086 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top