Thread overview
[Issue 18882] __gshared not displaying in debuginfo
May 20, 2018
Manu
May 20, 2018
Manu
May 20, 2018
Rainer Schuetze
May 20, 2018
Manu
May 20, 2018
Rainer Schuetze
Jun 16, 2019
Walter Bright
Jun 16, 2019
Walter Bright
Mar 07, 2020
Rainer Schuetze
May 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18882

--- Comment #1 from Manu <turkeyman@gmail.com> ---
Perhaps it's the extern(C++) that's the problem?

That would explain why I have debug problems a lot.

--
May 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18882

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nobody@puremagic.com        |r.sagitario@gmx.de

--
May 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18882

--- Comment #2 from Rainer Schuetze <r.sagitario@gmx.de> ---
See also issue 11024: there is no information about imports in the debug informations so you don't know which symbols are visible in the current scope and what their qualified name is.

In D functions, the qualified name is used to find the requested symbol, too. This fails for extern(C/C++) functions that don't have the qualification, or if the symbol is in another module.

You can still watch the variable using the fully qualified name (even for extern(C++) symbols), e.g. "dmd.globals.global". This actually matches C++ symbols that are in namespaces which also have to be specified.

--
May 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18882

--- Comment #3 from Manu <turkeyman@gmail.com> ---
Hmm... yeah, that's unfortunate.

I don't understand why it's hard to resolve the name. It's extern(C++), and it has no namespace supplied, so the correct symbol name should just be the mangled name, with no scope or anything.

How is it that qualified names (with the D scope) can find a C++ symbol? The C++ symbol has no concept of D scope. Why does it need to be given a scope at all?

--
May 20, 2018
https://issues.dlang.org/show_bug.cgi?id=18882

--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> ---
The debug info contains the "pretty" name, i.e. the fully qualified name, even for extern(C++) symbols. Otherwise you would have to guess the linkage and type as it is part of the mangled name.

What could be possible is to inspect all symbol at startup and create a map using the unqualified name as key. That might have a number of conflicts, though.

--
June 16, 2019
https://issues.dlang.org/show_bug.cgi?id=18882

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |symdeb
                 CC|                            |bugzilla@digitalmars.com

--
June 16, 2019
https://issues.dlang.org/show_bug.cgi?id=18882

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=17675

--
March 07, 2020
https://issues.dlang.org/show_bug.cgi?id=18882

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Rainer Schuetze <r.sagitario@gmx.de> ---
Finally got around to implement the cache for global symbols, see https://github.com/dlang/visuald/releases/tag/v0.52.0-beta1

--