Setting up Netbeans/Eclipse for Linux Kernel Development

Posted by red.october on Stack Overflow See other posts from Stack Overflow or by red.october
Published on 2009-09-30T21:16:37Z Indexed on 2010/06/09 1:12 UTC
Read the original article Hit count: 270

Filed under:
|
|

Hi:

I'm doing some Linux kernel development, and I'm trying to use Netbeans. Despite declared support for Make-based C projects, I cannot create a fully functional Netbeans project. This is despite compiling having Netbeans analyze a kernel binary that was compiled with full debugging information. Problems include:

  • files are wrongly excluded: Some files are incorrectly greyed out in the project, which means Netbeans does not believe they should be included in the project, when in fact they are compiled into the kernel. The main problem is that Netbeans will miss any definitions that exist in these files, such as data structures and functions, but also miss macro definitions.
  • cannot find definitions: Pretty self-explanatory - often times, Netbeans cannot find the definition of something. This is partly a result of the above problem.
  • can't find header files: self-explanatory

I'm wondering if anyone has had success with setting up Netbeans for Linux kernel development, and if so, what settings they used. Ultimately, I'm looking for Netbeans to be able to either parse the Makefile (preferred) or extract the debug information from the binary (less desirable, since this can significantly slow down compilation), and automatically determine which files are actually compiled and which macros are actually defined. Then, based on this, I would like to be able to find the definitions of any data structure, variable, function, etc. and have complete auto-completion.

Let me preface this question with some points:

  • I'm not interested in solutions involving Vim/Emacs. I know some people like them, but I'm not one of them.
  • As the title suggest, I would be also happy to know how to set-up Eclipse to do what I need
  • While I would prefer perfect coverage, something that only misses one in a million definitions is obviously fine

SO's useful "Related Questions" feature has informed me that the following question is related: http://stackoverflow.com/questions/149321/what-ide-would-be-good-for-linux-kernel-driver-development. Upon reading it, the question is more of a comparison between IDE's, whereas I'm looking for how to set-up a particular IDE. Even so, the user Wade Mealing seems to have some expertise in working with Eclipse on this kind of development, so I would certainly appreciate his (and of course all of your) answers.

Cheers

© Stack Overflow or respective owner

Related posts about c

    Related posts about eclipse