diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-04-06 15:06:22 +0000 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-04-06 15:06:22 +0000 |
commit | 2b9f94b69b1e7e5729750e5d66d391b9d8c5d0f2 (patch) | |
tree | 517af0f38497fd4a6a2442fe07e65ad4a9965e5f /boot | |
parent | e8d15e704c163fed91781e6356028fbe433b4cc5 (diff) |
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
Diffstat (limited to 'boot')
-rwxr-xr-x | boot/ocamlc | bin | 1527499 -> 1527509 bytes |
-rwxr-xr-x | boot/ocamldep | bin | 420563 -> 420745 bytes |
-rwxr-xr-x | boot/ocamllex | bin | 183978 -> 184025 bytes |
3 files changed, 0 insertions, 0 deletions
diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex 60a2ecb42..f118c0c0b 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamldep b/boot/ocamldep Binary files differindex f2e26672a..e0948caf0 100755 --- a/boot/ocamldep +++ b/boot/ocamldep diff --git a/boot/ocamllex b/boot/ocamllex Binary files differindex 51eadf10c..06909bd65 100755 --- a/boot/ocamllex +++ b/boot/ocamllex |