D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7952 - invalid dwarf2 offset when trying to debug with gdb
Summary: invalid dwarf2 offset when trying to debug with gdb
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Mac OS X
: P2 normal
Assignee: No Owner
URL:
Keywords: bounty, DebugInfo
Depends on:
Blocks:
 
Reported: 2012-04-20 12:01 UTC by Martin Jacobsson
Modified: 2017-06-05 18:04 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Jacobsson 2012-04-20 12:01:31 UTC
I've tried to debug a simple hello world program with gdb 7.4 on os x.
The program is built with  -gc -debug -m64 

(gdb) list
invalid dwarf2 offset 1594098948


When running the same executable in lldb I can list the source code when setting a breakpoint, but
no frame variables are showing (a separate issue).

/Martin
Comment 1 Iain Buclaw 2014-02-14 02:33:06 UTC
For OSX, I think users should stop using GDB, as it is getting quite outdated and doesn't have any of the recent D support added to it.
Comment 2 Martin Nowak 2017-06-05 18:04:31 UTC
Closing since OSX no longer ships with gdb and the problem was likely solved in the meantime anyhow.
Newer gdb versions should work, see e.g. https://www.patosai.com/posts/2015/03/24/installing-gdb-on-os-x-yosemite for how to install gdb instead of lldb.
Not sure how good the lldb support is.