When editing existing code (KLEE / LLVM), use the style of the surrounding code. For everything Cloud9, use the Google C++ style guide
You can use Eclipse to edit Cloud9's source code. Eclipse offers powerful code navigation facilities, especially useful for those not familiar with the Cloud9/KLEE/LLVM code bases.
Setting up Eclipse Projects
To properly set-up the Cloud9 Eclipse projects, do the following:
- Install Eclipse CDT and, optionally, PyDev for Eclipse, using the Eclipse update sites.
- Edit Eclipse's eclipse.ini configuration file, and set the
-Xmx variables to large values (e.g.,
4096m respectively). The Cloud9 code base is substantial, so indexing and navigating the code requires a lot of memory.
- Create a C++ project for LLVM. In the project wizard, uncheck the "Use default location box" and enter the LLVM path in the Cloud9 depot. As a project type, select empty Makefile project, using the Linux toolchain.
- In the project's Paths and Symbols settings, add the
LLVM/include/ workspace directory to the include path. Make sure to add it to all configurations and languages.
- Create a C++ project for Cloud9, similarly to step 3. Add the
Cloud9/include workspace directories to the include path.
Editing Protocol Buffers Files
You can invoke Eclipse remotely, through SSH X forwarding and stream compression:
$ ssh -fTXC joe@laptop /usr/bin/eclipse