You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7830 Reporter: jserot Assigned to:@nojb Status: resolved (set by @nojb on 2018-08-21T17:01:27Z) Resolution: fixed Priority: normal Severity: crash Platform: Mac OS: Mac OS OS Version: 10.9.5 Version: 4.06.0 Target version: 4.08.0+dev/beta1/beta2 Category: tools (ocaml{lex,yacc,dep,debug,...}) Monitored by:@nojb@gasche
Bug description
Ocamldebug sometimes quits launching an « Not_found » exception when trying to visualize some program variables. Here's a session example :
8<--------- START of EXAMPLE
$ ocamldebug -version
The OCaml debugger, version 4.06.0
$ ocamldebug rfsmc
OCaml Debugger version 4.06.0
Executing file .ocamldebug
Directories: _build lib lib/_build . /Users/jserot/.opam/4.06.0/lib/ocaml
(ocd) set arguments -dot -target_dir /tmp ../../examples/single/chrono/chrono.fsm
(ocd) break @ Fsm 308
Loading program... done.
Breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
(ocd) run
Time: 10027 - pc: 758316 - module Fsm
Breakpoint: 1
308 <|b|>let bind_param vs (p,ty) =
(ocd) print tenv
Removed breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
Uncaught exception: Not_found
8<--------- END of EXAMPLE
The problem is not systematic and seems to depend on the variable to be printed (or at least on the module where it is defined). For example, setting a breakpoint in the Main (top-level) module is ok.This makes isolating a minimum triggering program difficult.
I therefore give a pointer to a publicly available program on which it shows and a sequence of step to reproduce it.
Build the executable (-g option is set by default)
cd rfsm
mkdir ../rfsm-install
./configure --prefix ../rfsm-install --no-gui
make
Go to the src/compiler directory and launch the debugger
cd src/compiler/
ocamldebug rfsmc
Set argument and put a breakpoint somewhere in the code
(ocd) set arguments -dot -target_dir /tmp ../../examples/single/chrono/chrono.fsm
(ocd) break @ Fsm 308
Run
(ocd) run
Try to print a variable (tenv, an argument of the function build_instance here)
(ocd) print tenv
This gives :
*** Removed breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
Uncaught exception: Not_found
Additional information
I did not try with 4.07.0 but since Ocamldebug is not mentioned in the Changelog i doubt this would make a difference (additionally, my program is bound to 4.06.0 because it must build under windows..)
The text was updated successfully, but these errors were encountered:
TL;DR: seems to be a missing try ... with in ocamldebug's code when a .cmi cannot be found.
I run this on 4.07 and got the following backtrace for ocamldebug.
Raised at file "typing/env.ml", line 762, characters 18-27
Called from file "typing/env.ml", line 858, characters 13-47
Called from file "typing/env.ml", line 2044, characters 23-52
Called from file "typing/envaux.ml", line 66, characters 22-110
Called from file "typing/envaux.ml", line 64, characters 20-44
Called from file "typing/envaux.ml", line 45, characters 12-38
Called from file "typing/envaux.ml", line 43, characters 10-125
Called from file "typing/envaux.ml", line 41, characters 24-50
Called from file "typing/envaux.ml", line 40, characters 10-114
Called from file "command_line.ml", line 507, characters 7-76
Failure occurs when trying to open cmi of "Utils", which is a (packed) module of a library dependency (lascar).
Problem goes away adding the necessary include directory by hand, as in:
Original bug ID: 7830
Reporter: jserot
Assigned to: @nojb
Status: resolved (set by @nojb on 2018-08-21T17:01:27Z)
Resolution: fixed
Priority: normal
Severity: crash
Platform: Mac
OS: Mac OS
OS Version: 10.9.5
Version: 4.06.0
Target version: 4.08.0+dev/beta1/beta2
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @nojb @gasche
Bug description
Ocamldebug sometimes quits launching an « Not_found » exception when trying to visualize some program variables. Here's a session example :
8<--------- START of EXAMPLE
$ ocamldebug -version
The OCaml debugger, version 4.06.0
$ ocamldebug rfsmc
OCaml Debugger version 4.06.0
Executing file .ocamldebug
Directories: _build lib lib/_build . /Users/jserot/.opam/4.06.0/lib/ocaml
(ocd) set arguments -dot -target_dir /tmp ../../examples/single/chrono/chrono.fsm
(ocd) break @ Fsm 308
Loading program... done.
Breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
(ocd) run
Time: 10027 - pc: 758316 - module Fsm
Breakpoint: 1
308 <|b|>let bind_param vs (p,ty) =
(ocd) print tenv
Removed breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
Uncaught exception: Not_found
8<--------- END of EXAMPLE
The problem is not systematic and seems to depend on the variable to be printed (or at least on the module where it is defined). For example, setting a breakpoint in the Main (top-level) module is ok.This makes isolating a minimum triggering program difficult.
I therefore give a pointer to a publicly available program on which it shows and a sequence of step to reproduce it.
Steps to reproduce
(ocd) set arguments -dot -target_dir /tmp ../../examples/single/chrono/chrono.fsm
(ocd) break @ Fsm 308
(ocd) run
(ocd) print tenv
This gives :
*** Removed breakpoint 1 at 758316: file lib/fsm.ml, line 308, characters 5-3585
Uncaught exception: Not_found
Additional information
I did not try with 4.07.0 but since Ocamldebug is not mentioned in the Changelog i doubt this would make a difference (additionally, my program is bound to 4.06.0 because it must build under windows..)
The text was updated successfully, but these errors were encountered: