I have a small patch to bin/cilly that helps me when I'm debugging Cil code in 
emacs with 
ocamldebug. I am usually invoking my-camldebug from a directory where my source 
C files are. I can 
easily set breakpoints in my own Cil code, but moving up the call chain is 
thwarted by the 
debugger's inability to find Cil sources. This patch fixes that for me and may 
be useful to others.

Index: cilly
===================================================================
--- cilly    (revision 12136)
+++ cilly    (working copy)
@@ -120,7 +120,7 @@

      if(defined $ENV{OCAMLDEBUG} || $self->{OCAMLDEBUG}) {
          print "OCAMLDEBUG is on\n";
-        my @idirs = ("src", "src/frontc", "src/ccured", "src/ext",
+        my @idirs = (".", "src", "src/frontc", "src/ccured", "src/ext",
                       "ocamlutil",
                       "obj/$::archos");
      my @iflags = map { ('-I', "$::cilhome/$_") } @idirs;


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to