Giter Club home page Giter Club logo

Comments (2)

kinke avatar kinke commented on August 26, 2024

The behavior with Ubuntu 22's gdb v12.1 on my box is different; it 'just' shows a garbage value if the global is a TLS var.

E.g., with a thread-global var:

struct S {
    shared static int a = 666;
    int b;
}

int main() {
    S s;
    return s.a;
}
Breakpoint 1, _Dmain () at test.d:8
8	    return s.a;
(gdb) p s
$1 = {b = 0, static a = 666}
(gdb) p s.a
$2 = 666
(gdb) p S.a
$3 = 666
(gdb) p test.S.a
$4 = 666
(gdb) p S.b
Cannot reference non-static field "b"

from ldc.

 avatar commented on August 26, 2024

To be frank, I know that the LLVM API for DWARF info has a function for static members. But I cant find an open sourced language that is able to use it correctly. Possibly the problem would be that a GDB "expression" would have to be created to have the propoer access.

In other words...if you fix this problem, that will help, and not only D programmers.

from ldc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.