Commit Graph

27 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
David Allsopp e2f278c7a4 Preserve backtraces in debugger
Add Primitives.cleanup which allows handlers for unexpected exceptions
to cleanup and reraise the exception with its backtrace.
2019-10-19 10:38:48 +01:00
Jacques-Henri Jourdan 593f94055a Dynlink support for ocamldebug
This commit adds dynlink support for ocamldebug. As a side effect, it also:
  - factorizes the various functions searching for a code fragment into one,
    called [caml_find_code_fragment];
  - removes the [caml_register_code_fragment], which does not seem to
    be used anywhere, and which clearly should not be used by external code.
2019-07-16 10:52:48 +02:00
Jeremie Dimino 7e0862a212 Refactor load path management and initial environment
- Add a Load_path module which caches files lookup

- Instead of falling back to the external environment, allow to
  declare in the environment that a module comes from the external
  world. This allows persistent structures to shadows non-persistent
  ones
2019-01-30 16:36:38 +00:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
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
Gabriel Scherer 57fe3746f6 Revert "PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)"
There seems to be a problematic interaction with backtrace collection. To test this,
  make world.opt
  cd testsuite
  make one DIR=tests/backtrace/

This needs to be sorted out before the patch can go in again.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 14:55:06 +00:00
Xavier Clerc dd7bd5b339 PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 11:48:35 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 5e67123bf6 PR#4975: spelling mistakes "overriden" and "informations"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-21 12:00:49 +00:00
Damien Doligez ed32f569e3 merge changes from ocaml3110 to ocaml3111rc0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Xavier Leroy 776ae225a0 ocamldebug under Win32 (S. Le Gall, Lexifi)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8955 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-07-29 08:31:41 +00:00
Nicolas Pouillard 87919802b8 Pass a Lexing.position value to make source_of_module, get_buffer and show
listing more accurate.
Also move the yes_or_no function to it's own module Question to avoid a
module dependency cycle, since Lexer use Parser types and Parser
implementation use Input_handling that defined yes_or_no that use Lexer.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7767 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-12-09 13:49:10 +00:00
Damien Doligez 123fb9f713 changement des locations, deuxieme tranche
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-02 22:36:46 +00:00
Damien Doligez e22208ccca fix PR#1202
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-10-29 17:53:24 +00:00
Damien Doligez c3faabe473 Ne pas chercher le programme dans le path (PR#85)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-05-08 18:13:36 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Jérôme Vouillon 93da06f5aa Erreur de syntaxe...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-15 20:53:10 +00:00
Jérôme Vouillon ea25d438a9 kill_programme doit supprimer tous les points d'arrets.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-15 16:29:10 +00:00
Damien Doligez 03ec746bf1 deTABisation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-05-19 15:42:21 +00:00
Jérôme Vouillon f41d91f465 Remis le print_string..., et affichage de "done" pas seulement pour
debugger (!).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1445 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-23 15:22:30 +00:00
Jérôme Vouillon 7d8e4df1c3 print_string change' en print_endline.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-22 23:27:22 +00:00
Jérôme Vouillon 4b966034a5 Il faut pouvoir differencier un programme qui vient de se lancer d'un
programme qui a "forke'".


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-22 20:06:05 +00:00
Xavier Leroy db037c79de Premier jet du portage OCaml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1209 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-11-29 16:55:09 +00:00