D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8173 - rdmd -g --build-only main looses debug info
Summary: rdmd -g --build-only main looses debug info
Status: RESOLVED MOVED
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-31 02:23 UTC by thelastmammoth
Modified: 2021-01-09 19:19 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thelastmammoth 2012-05-31 02:23:50 UTC
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) ?
Comment 1 Vladimir Panteleev 2013-03-10 01:17:44 UTC
(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.
Comment 2 Mathias LANG 2021-01-09 19:19:23 UTC
Moved to: https://github.com/dlang/tools/issues/427