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

ERL-1058: -compile([debug_info]). has no effect #4209

Closed
OTP-Maintainer opened this issue Oct 4, 2019 · 0 comments
Closed

ERL-1058: -compile([debug_info]). has no effect #4209

OTP-Maintainer opened this issue Oct 4, 2019 · 0 comments
Assignees
Labels
bug Issue is reported as a bug priority:medium team:VM Assigned to OTP team VM
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: kjellwinblad
Affected version: OTP-23.0
Fixed in version: OTP-23.0-rc2
Component: compiler
Migrated from: https://bugs.erlang.org/browse/ERL-1058


The statement "-compile([debug_info])." in an erlang file does not seem to have any effect. I have only tested this with the master branch (commit 91851e286082b271299fb8d332492430cf084902) but other versions seems to be affected as well. The following text (copied from https://stackoverflow.com/questions/21198092/) describes how to reproduce the bug:


From https://stackoverflow.com/questions/21198092 :
{code:}

After overcoming some troubles with installation I tried to use erlang debugger on simple module:

I included -compile([debug_info]). option in source file and compiled with:

1> c(test_module).

This did not work as expected: After running

2> debugger:start().

the monitor window appeared, then I clicked

Module->Interpret...->test_module.erl

and got error

"Error when interpreting: test_module.erl: No debug_info in BEAM file".

Deleting -compile([debug_info]). line and changing

1> c(test_module).

to

1> c(test_module, [debug_info]).

solved the problem.

What is the difference between these two ways of setting compilation option, why one works and the other does not?
{code}


@OTP-Maintainer OTP-Maintainer added bug Issue is reported as a bug team:VM Assigned to OTP team VM priority:medium labels Feb 10, 2021
@OTP-Maintainer OTP-Maintainer added this to the OTP-23.0-rc2 milestone Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug priority:medium team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants