Join GitHub today
The list command of ocamldebug uses the wrong file #6888
Original bug ID: 6888
Whenever using the "list" command of ocamldebug, the displayed file is always the one from the top of the current stack, regardless of the currently selected frame, while the line number is conversely the one of the current frame.
This can lead to a crash of the debugger whenever the mistakenly chosen file has less lines than the current line of the topmost frame.
Steps to reproduce
Run a program in the debugger and stop somewhere.
The displayed file is the one of the first frame, not the one from the "up" command.
Comment author: @gasche
Thanks for the report. Next time, it would be even better to have a real repro-case (eg. a tarball with two files and a shell script running the toplevel in the right setting to observe the crash). Preparing a repro case is rather boring for reporters, but it is also rather boring for potential-bug-fixers which have to do it anyway.