Thread overview
[Issue 14927] GDB cannot be used to debug D programs on OS X
Aug 18, 2015
Iain Buclaw
Aug 18, 2015
Iain Buclaw
Aug 18, 2015
Iain Buclaw
Aug 18, 2015
Jack Stouffer
Aug 18, 2015
Iain Buclaw
Aug 18, 2015
David Nadlinger
Mar 01, 2018
Luís Marques
Dec 17, 2022
Iain Buclaw
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
> And `info variables` returns the mangled D names for variables and not their real name, despite the language being set to D and doing `demangle [some_name]` returns the correct names.

This is why you must *NEVER* use -gc on Linux/OSX/FreeBSD.  The -gc switch marks all functions as 'C' language functions, and gdb will not attempt to demangle such functions when it loads the symbol table.

FYI - there is a PR open that has been dwindling: https://github.com/D-Programming-Language/dmd/pull/4766

--
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nobody@puremagic.com        |ibuclaw@gdcproject.org

--
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

--- Comment #2 from Jack Stouffer <jack@jackstouffer.com> ---
(In reply to Iain Buclaw from comment #1)
> This is why you must *NEVER* use -gc on Linux/OSX/FreeBSD.  The -gc switch marks all functions as 'C' language functions, and gdb will not attempt to demangle such functions when it loads the symbol table.

Compiling with -g -gs doesn't fix any of the above problems. Doing `info locals` still responds with "No symbol table info available."

--
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Jack Stouffer from comment #2)
> (In reply to Iain Buclaw from comment #1)
> > This is why you must *NEVER* use -gc on Linux/OSX/FreeBSD.  The -gc switch marks all functions as 'C' language functions, and gdb will not attempt to demangle such functions when it loads the symbol table.
> 

I wonder if DMD's choice of emitting symbols as _D3foo3bar instead of __D3foo3bar is biting them on OSX.

--
August 18, 2015
https://issues.dlang.org/show_bug.cgi?id=14927

David Nadlinger <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@klickverbot.at

--- Comment #4 from David Nadlinger <code@klickverbot.at> ---
(In reply to Iain Buclaw from comment #3)
> (In reply to Jack Stouffer from comment #2)
> > (In reply to Iain Buclaw from comment #1)
> > > This is why you must *NEVER* use -gc on Linux/OSX/FreeBSD.  The -gc switch marks all functions as 'C' language functions, and gdb will not attempt to demangle such functions when it loads the symbol table.
> > 
> 
> I wonder if DMD's choice of emitting symbols as _D3foo3bar instead of __D3foo3bar is biting them on OSX.

It certainly is for the demangling side of things.

--
March 01, 2018
https://issues.dlang.org/show_bug.cgi?id=14927

Luís Marques <luis@luismarques.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luis@luismarques.eu

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14927

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
December 13
https://issues.dlang.org/show_bug.cgi?id=14927

--- Comment #5 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19029

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--