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

rdmd -g --build-only implicitly looses debug info #427

Open
dlang-bugzilla-migration opened this issue Jan 9, 2021 · 0 comments
Open

rdmd -g --build-only implicitly looses debug info #427

dlang-bugzilla-migration opened this issue Jan 9, 2021 · 0 comments
Labels
OS.OSX Related to a Mac OSX-specific behavior (excluding iOS derivatives) Prio.3.Normal A bug that is neither a blocker nor a regression T.RDMD Issues that apply only to rdmd Type.Enhancement An improvement to an existing functionality

Comments

@dlang-bugzilla-migration

Transferred from: https://issues.dlang.org/show_bug.cgi?id=8173

User @thelastmammoth reported (2012-May-31 02:23:50):

Currently, running:

$ rdmd -g --build-only main &&  gdb main

yields:

warning: Could not find object file "/tmp/.rdmd-503/rdmd-main.d-.../main.o" - no debug information available for "main.d".

(but using the manual way with dmd works... with the names mangled but that's a different issue )

perhaps it would be possible to preserve debug info when -g (or -debug, etc) is present as opposed to having -o- (which appears when --chatty is on) ?

User @CyberShadow responded (2013-Mar-10 01:17:44):

(In reply to comment #0)

Currently, running
rdmd -g --build-only main && gdb main

yields:
warning: Could not find object file "/tmp/.rdmd-503/rdmd-main.d-.../main.o" -
no debug information available for "main.d".

What OS is this on? You specified "All" but it does not apply to Windows and does not happen on Linux.

perhaps it would be possible to preserve debug info when -g (or -debug, etc) is
present as opposed to having -o- (which appears when --chatty is on) ?

I can't make out any meaning from the above.

Judging by the error message, the problem is that rdmd deletes object (.o) files after a successful build.

Tried this today on OSX and could reproduce the issue. The dwarfdump output seems correct but the debugger (lldb in my case) seems not to be able to link it to the source code (e.g. b _Dmain gives ASM output.)

@dlang-bugzilla-migration dlang-bugzilla-migration added Type.Enhancement An improvement to an existing functionality OS.OSX Related to a Mac OSX-specific behavior (excluding iOS derivatives) Prio.3.Normal A bug that is neither a blocker nor a regression T.RDMD Issues that apply only to rdmd labels Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS.OSX Related to a Mac OSX-specific behavior (excluding iOS derivatives) Prio.3.Normal A bug that is neither a blocker nor a regression T.RDMD Issues that apply only to rdmd Type.Enhancement An improvement to an existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant