Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How to activate indexer for files used to build an executable?

I am working on a standalone Debugger using the CDT GDB Debug components. I have it generally working, taking an executable name and some arguments to run the program.

I am loading the executable into the Executables project via the import Executables command logic used in the Executables view. This ends up using the CDT StandardExecutableImporter class which creates an IResource for the executable and links it externally to the real executable file. A resource path is made from the absolute path (e.g. /tmp/a.out).

The Debugger is able to boot up and open the source file with main(), display it in the C editor, and perform general debug actions such as break, continue, step.

At the moment, I am unable to traverse to any items outside of the file itself (e.g. hitting F3 on an external function or macro from a header file) and want to get this working. I have the standard gcc include path/builtins language settings provider set and the Outline View can open the header files ok.

I have a list of all the source files used in the executable found by the DwarfReader.

I was wondering what the best way for me to make those files visible to the indexer and have it perform indexing. The source file for main() opened by the Debugger is not formally added to the project (just an ExternalTranslationUnit is created). Is it enough just to add all the .c files as IResources for the project and link them externally like the binary or do I need to manually add the files to the index somehow?

Thanks in advance,

-- Jeff J.

Back to the top