David Allsopp
d0bab08f15
Don't ever call stop_user_input in line_loop
...
The caller is now always responsible for calling stop_user_input, rather
than only responsible for calling it on error.
2019-10-19 11:47:07 +01:00
David Allsopp
37acb3bf24
Remove use of Printexc.catch from debugger
...
Allow the runtime to display details of any uncaught exception (with
backtraces, if enabled). Unix.handle_unix_error is still used to convert
errors from system calls to a less unmeaningful form.
2019-10-19 10:38:48 +01:00
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
Gabriel Scherer
fb99eff734
Debugger: factorize error-reporting logic
2019-03-26 09:00:01 +01:00
Gabriel Scherer
d5f8a9f948
Expose Persistent_env.Error and catch it from the debugger
...
The debugger reimplements its own error-reporting logic without using
the reporter-registration mechanism of the compiler, so it needs to be
adapted after the split between `Env` and `Persistent_env` in #2228 .
(Interestingly, this forced me to expose the `Error of error`
exception in the Persistent_signature, which was not the case
before. It was probably a mistake to not expose an exception value
that can be raised by (correctly-written) consumers of the module.)
I noticed the issue while inspecting a testsuite failure (#8544 ).
Before this patch:
```
$ cat tests/tool-debugger/find-artifacts/_ocamltest/tests/tool-debugger/find-artifacts/debuggee/ocamlc.byte/debuggee.byte.output
Loading program... done.
Breakpoint: 1
10 <|b|>print x;
Uncaught exception: Persistent_env.Error(_)
```
After:
```
$ cat tests/tool-debugger/find-artifacts/_ocamltest/tests/tool-debugger/find-artifacts/debuggee/ocamlc.byte/debuggee.byte.output
Loading program... done.
Breakpoint: 1
10 <|b|>print x;
Debugger [version 4.09.0+dev0-2019-01-18] environment error:
The files /usr/local/lib/ocaml/stdlib.cmi
and [...]_ocamltest/tests/tool-debugger/find-artifacts/debuggee/ocamlc.byte/out/blah.cmi
make inconsistent assumptions over interface Stdlib
```
2019-03-25 16:04:52 +01: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
Daniel Bünzli
a7afd89003
s/string_of_int/Int.to_string/g
2018-11-07 13:52:02 +01:00
Sébastien Hinderer
23a6845929
ocamldebug: add a few commandline options
...
This commit adds the following options to ocamldebug:
* -no-prompt: suppress all prompts
* -no-version: do not print version at startup
* -no-time: do not print times
* -no-breakpoint: do not print message at breakpoint setup and removal
* -topdirs-path: set path to the directory containing topdirs.cmi
2018-03-20 16:00:41 +01:00
Alain Frisch
6f0e6735e1
More warnings for debugger/.
2016-03-15 22:47:35 +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
cbfe627f92
merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Xavier Clerc
e66362027c
PR#6267: more information printed by "bt" command of ocamldebug
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-23 09:07:09 +00:00
Damien Doligez
cca1fc17f4
debugger: fix environment bug and remove confirmation at quit
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14379 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-19 14:23:49 +00:00
Damien Doligez
c63f9e0957
fix a few problems with whitespace and over-long lines
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-09 22:38:52 +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
6c24f4f90b
merge version 3.12 from 3.12.1 to r12205
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-08 19:52:03 +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
31b0292413
renaming "Objective Caml" to "OCaml" (first pass)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11015 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-04-26 12:16:50 +00:00
Damien Doligez
3bba52b91c
PR#4857: add -vnum option to all executables
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-20 14:06:29 +00:00
Damien Doligez
04b1656222
clean up spaces and tabs
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Damien Doligez
bdc0fadee2
merge changes from release/3.11.1 to release/3.11.2
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-20 16:26:46 +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
Damien Doligez
9ea5edac9a
merge changes 3.10.0 -> 3.10.1
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-01-11 16:13:18 +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
Nicolas Pouillard
9a4b34fa1a
[debugger] When the connection to the program is lost, try to get closer of the problem (useful for seg-faults)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7745 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-11-20 10:29:45 +00:00
Damien Doligez
125ea40d4c
fusion 3.09.0 -> 3.09.1
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-04 16:55:50 +00:00
Damien Doligez
39f06c597a
PR#3085 ajout option "-version"
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-27 01:04:19 +00:00
Basile Starynkevitch
06cfc23fad
typo..
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6000 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-04 12:32:04 +00:00
Basile Starynkevitch
4430a065a6
added reporting of Env.error-s
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5999 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-04 10:44:35 +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
Xavier Leroy
2476f0af5e
Expanser -I +dir (PR#1134)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4781 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 11:26:20 +00:00
Pierre Weis
6f4799b3e2
Utilisation de format.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-21 15:16:28 +00:00
Pierre Weis
242af96dba
Revision des messages première étape.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2919 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-03-07 18:22:19 +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
576365579c
\"private method\" -> \"method protected\"
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-11-13 09:04:16 +00:00
Xavier Leroy
a95fa92066
Utiliser Arg.current
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1636 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-07-03 14:31:28 +00:00
Xavier Leroy
967558958c
symbols: nouveau format d'executable.
...
main: parsing des arguments sur la ligne de commande revu.
command_line: meilleur message d'aide pour "break".
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1595 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-13 15:50:32 +00:00
Damien Doligez
85b978bce3
renommage command_line_interpreter -> command_line
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1518 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-05-08 18:00:18 +00:00
Jérôme Vouillon
89c20b2d86
Rattrapage des exceptions levees par get_buffer
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-30 19:43:32 +00:00
Jérôme Vouillon
d1866d5b1f
Remis la demande de confirmation avant sortie du debugger.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-23 15:24:24 +00:00
Jérôme Vouillon
564e7f88ff
Boucle principale plus robuste.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-22 23:28:07 +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