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

The list command of ocamldebug uses the wrong file #6888

Closed
vicuna opened this issue Jun 2, 2015 · 4 comments
Closed

The list command of ocamldebug uses the wrong file #6888

vicuna opened this issue Jun 2, 2015 · 4 comments
Milestone

Comments

@vicuna
Copy link

vicuna commented Jun 2, 2015

Original bug ID: 6888
Reporter: @ppedrot
Status: closed (set by @damiendoligez on 2016-02-08T17:07:16Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Target version: 4.03.0+dev / +beta1
Category: tools (ocaml{lex,yacc,dep,debug,...})

Bug description

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.

fr
up
list

The displayed file is the one of the first frame, not the one from the "up" command.

File attachments

@vicuna
Copy link
Author

vicuna commented Jun 2, 2015

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.

@vicuna
Copy link
Author

vicuna commented Jun 5, 2015

Comment author: @damiendoligez

There is an easy workaround: use ocamldebug under emacs, then you don't need the list command.

@vicuna
Copy link
Author

vicuna commented Nov 27, 2015

Comment author: @ppedrot

Here is a minimal test. Just decompress the archive and run the compile.sh script to raise an uncaught exception.

@vicuna
Copy link
Author

vicuna commented Feb 8, 2016

Comment author: @damiendoligez

Fixed in trunk (commit 8c9ac88).

Thanks for the report and for the repro case.

@vicuna vicuna closed this as completed Feb 8, 2016
@vicuna vicuna added the tools label Mar 14, 2019
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant