FennelEclipse

From Eigenpedia

Jump to: navigation, search

Instructions for setting up Eclipse for use in Fennel development (experimental, lots of gotchas):

  1. Get a standard command-line build of Fennel working.
  2. Download and unpack a copy of Eclipse SDK 3.1
  3. Start Eclipse
  4. Install the CDT using the Install from the Update Site method
  5. From the top menu, choose File->New->Project
  6. Open the C++ tree node and choose Standard Make C++ Project
  7. Click Next
  8. Enter fennel for project name
  9. For Project contents, uncheck Use default
  10. Enter the path to fennel (e.g. /home/calvin/open/fennel)
  11. Click Finish and tell it to remember the perspective
  12. Right-click the project and choose Properties
  13. Select the C/C++ Make Project tree node
  14. Under Workbench Build Behavior, uncheck all of the automatic build preferences (Build, Rebuild, Clean), unless you are a masochist
  15. Click Apply
  16. Under C/C++ Include Paths, add open, open/thirdparty/boost, and open/thirdparty/stlport
  17. Under C/C++ Indexer, choose No Indexer (we haven't figured out how to get either indexer working correctly, possibly because of our namespace macros)
  18. Click OK
  19. From the top menu, choose Window->Preferences
  20. Select the C/C++ subtree
  21. Select the Editor subtree
  22. Check Insert spaces for tabs
  23. Click Apply and OK
  24. Install the Perforce plugin
  25. From the Package Explorer, right-click the fennel project to get a pop-up menu
  26. Choose Team->Share Project
  27. Select Perforce for repository type and click Next
  28. Enter connection information for your client and click Finish

To debug a unit test:

  1. Under the Binaries subtree, select a test executable
  2. Right-click and choose Debug As->Debug Local C/C++ Application
  3. Choose GDB Debugger (not GDB Server)

The instructions below are for debugging Fennel running inside of Farrago's JVM, but they don't work yet.

  1. Start by following the instructions from the Farrago developer FAQ up until you see "Waiting for debugger"; note the process ID (pid)
  2. Select the fennel project in the Package Explorer
  3. From the top menu, choose Run->Debug
  4. Choose the C/C++ Attach to Local subtree
  5. Right-click New
  6. In the Debugger tab, choose GDB Debugger from the dropdown
  7. Click Apply
  8. Click Debug
  9. A list of processes should appear; the one you want will probably be named java, but use the process ID to discriminate if more than one matches
  10. A message about an internal error during launch will appear; this is probably why nothing works correctly from here on
  11. In the empty Console pane at the bottom, enter the correct resume command from the FAQ (e.g. signal SIGHUP) and hit return; a bunch of thread info should appear
  12. After this, the console no longer responds to commands, and setting a breakpoint will cause a SIGINT which brings everything to a grinding halt
Personal tools