Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ocamldebug] Catch out_of_range in "list" command #977

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Next version (4.05.0):
This can be tested with ocamlopt -config
(Sébastien Hinderer)

- PR#7137, GPR#960: "-open" command line flag now accepts a module path
- PR#7137, GPR#960: "-open" command line flag now accepts a module path
(not a module name) (Arseniy Alekseyev and Leo White)

### Standard library:
Expand Down Expand Up @@ -102,6 +102,9 @@ Next version (4.05.0):
it previously raised an EPIPE error, it now returns 0 like other OSes
(Jonathan Protzenko)

### Debugger:
- GPR#977: Catch Out_of_range in "list" command (Yunxing)

### Tools:

- PR#5163: ocamlobjinfo, dump globals defined by bytecode executables
Expand Down
5 changes: 4 additions & 1 deletion debugger/command_line.ml
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,10 @@ let instr_list _ppf lexbuf =
| Not_found -> error ("No source file for " ^ mdle ^ ".") in
let point =
if column <> -1 then
(point_of_coord buffer line 1) + column
try
(point_of_coord buffer line 1) + column
with Out_of_range ->
-1
else
-1 in
let beginning =
Expand Down