ocaml/utils
Gabriel Scherer 2b9f94b69b PR#6270: remove need for -I directives to ocamldebug in common case
(patch by Josh Watzman)

Add absolute directory names to bytecode format for ocamldebug to use

The need for a long list of -I directives makes interactively using
ocamldebug a pain in the butt. Many folks have solved this with various
`find` invocations or even Python wrappers, but those lead to other
problems when it might include files you weren't expecting (or miss
things you were). But all of this is really annoying since the tooling
should be able to figure out itself, even heuristically, where your
source files are -- gdb gets this right, why can't we?

This patch implements one of the more important heuristics from gdb: you
typically debug on the same machine you built on, so looking for the
source files and built artifacts in the absolute paths where they were
during compilation is a good first try. We write out absolute paths into
a new structure at the beginning of the debug section and then
automatically append those directories into the load path.

This means mean that if you happen to be debugging on a machine
where the original source and build artifacts are *not* available in
their original absolute locations, things will work as before, using the
standard load path mechanism. You can also explicitly use -I to prepend
directories to the load path and override the defaults located by this
new mechanism.

I personally find this makes using ocamldebug much more pleasant :)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-06 15:06:22 +00:00
..
.ignore uniform .ignore system 2011-07-20 15:37:36 +00:00
ccomp.ml Improved implementation of OCAMLPARAM 2013-06-05 16:34:40 +00:00
ccomp.mli remove all $Id keywords 2012-10-15 17:50:56 +00:00
clflags.ml Add -trans-mod option for transparent module dependencies. 2013-12-20 06:55:26 +00:00
clflags.mli Add -trans-mod option for transparent module dependencies. 2013-12-20 06:55:26 +00:00
config.mlbuild PR#6270: remove need for -I directives to ocamldebug in common case 2014-04-06 15:06:22 +00:00
config.mli Merge branch 4.01 from branching point to 4.01.0+rc1 2013-09-04 15:12:37 +00:00
config.mlp PR#6270: remove need for -I directives to ocamldebug in common case 2014-04-06 15:06:22 +00:00
consistbl.ml remove all $Id keywords 2012-10-15 17:50:56 +00:00
consistbl.mli remove all $Id keywords 2012-10-15 17:50:56 +00:00
misc.ml Revert r13746 (demanded by Xavier) 2013-06-05 17:54:20 +00:00
misc.mli Revert r13746 (demanded by Xavier) 2013-06-05 17:54:20 +00:00
tbl.ml remove all $Id keywords 2012-10-15 17:50:56 +00:00
tbl.mli remove all $Id keywords 2012-10-15 17:50:56 +00:00
terminfo.ml remove all $Id keywords 2012-10-15 17:50:56 +00:00
terminfo.mli remove all $Id keywords 2012-10-15 17:50:56 +00:00
warnings.ml #6352: add a warning on implicit removal of optional arguments. 2014-03-26 18:09:28 +00:00
warnings.mli #6352: add a warning on implicit removal of optional arguments. 2014-03-26 18:09:28 +00:00