Developing Cloud9

Coding Style

When editing existing code (KLEE / LLVM), use the style of the surrounding code. For everything Cloud9, use the Google C++ style guide

Using Eclipse

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:
  1. Install Eclipse CDT and, optionally, PyDev for Eclipse, using the Eclipse update sites.
  2. Edit Eclipse's eclipse.ini configuration file, and set the -Xms and -Xmx variables to large values (e.g., 512m and 4096m respectively). The Cloud9 code base is substantial, so indexing and navigating the code requires a lot of memory.
  3. 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.
  4. 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.
  5. Create a C++ project for Cloud9, similarly to step 3. Add the LLVM/include/ and Cloud9/include workspace directories to the include path.

Editing Protocol Buffers Files

You can edit Protocol Buffers using Google's Protocol Buffers Development Tools (installation instructions here).

Working Remotely

You can invoke Eclipse remotely, through SSH X forwarding and stream compression:

 $ ssh -fTXC joe@laptop /usr/bin/eclipse

Comments