This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

header file

Hi,

1. From either (e)abi or coff format, is there any utility to extract the original header file in which a function is declared? It is surely possible but I haven't found how to do that.

2. And eclipse can index files and provide navigation features. Is it done by eclipse CDT? Is the indexing and navigation completely handled by eclipse itself without knowing the actual compiler tool-chain being used, so the CDT is something like a cpp front end?

3. TI has specific extensions of C such as PACK in some devices. What happens if some TI extensions, or GCC extensions are not supported by CDT? Does it just ignore that token?

Dave

  • Dave Smith62 said:
    1. From either (e)abi or coff format, is there any utility to extract the original header file in which a function is declared? It is surely possible but I haven't found how to do that.

    By "extract" I presume you mean only to name the header file where the declaration appears, using nothing but the final executable .out file as input.  There is no utility which does that.

    Dave Smith62 said:
    2. And eclipse can index files and provide navigation features. Is it done by eclipse CDT? Is the indexing and navigation completely handled by eclipse itself without knowing the actual compiler tool-chain being used, so the CDT is something like a cpp front end?

    Yes, and yes.

    Dave Smith62 said:
    3. TI has specific extensions of C such as PACK in some devices. What happens if some TI extensions, or GCC extensions are not supported by CDT? Does it just ignore that token?

    I don't know anything about the CDT, so I cannot say for sure.  I suspect it just ignores such tokens.  If you want to know for sure, then I suggest you start a new thread in the CCS forum.  Or, if you prefer, I can move this thread into that forum.

    Thanks and regards,

    -George

  • 1. Do you really mean "declared", as in just the prototype? Then no. If you really mean "defined," such as in-line C++ class members, then yes, the DWARF debugging information will contain the definition location.

  • I meant "declaured". As you indicated it is "no"; but when we press F3 in eclipse it could jump to prototype definitions in .h file, and pressing f3 again goes to the definition. If dwarf doesn't contain the where information of prototype in header, then is it actually handled by CDT+eclipse?
  • I don't know exactly what's going on, but I do know that Eclipse runs some code analyzers by default, so it seems likely that Eclipse itself is figuring out where the function is declared. In that case, you would be better off pursuing this issue in the CCS forum, as George suggests.