Re: Debugging D code with GDB

2022-01-05 Thread Luís Ferreira via Digitalmars-d-learn
On Tue, 2021-11-30 at 09:01 +, Iain Buclaw via Digitalmars-d-learn wrote: > On Monday, 29 November 2021 at 14:48:21 UTC, Luís Ferreira wrote: > > On Sun, 2021-11-28 at 21:59 +, Iain Buclaw via > > Digitalmars-d-learn wrote: > > > > > > DMD doesn't emit this information. GDB can't work

Re: Debugging D code with GDB

2021-12-02 Thread Eduard Staniloiu via Digitalmars-d-learn
On Tuesday, 30 November 2021 at 09:01:38 UTC, Iain Buclaw wrote: On Monday, 29 November 2021 at 14:48:21 UTC, Luís Ferreira wrote: [...] Indeed, gdb assumes calling convention is same as default for target (actually its been years since I last looked, but are calling conventions tags in

Re: Debugging D code with GDB

2021-11-30 Thread Iain Buclaw via Digitalmars-d-learn
On Monday, 29 November 2021 at 14:48:21 UTC, Luís Ferreira wrote: On Sun, 2021-11-28 at 21:59 +, Iain Buclaw via Digitalmars-d-learn wrote: DMD doesn't emit this information. GDB can't work miracles when the compiler isn't pulling its own weight. I confirm this is an issue with DMD. I

Re: Debugging D code with GDB

2021-11-29 Thread Luís Ferreira via Digitalmars-d-learn
On Sun, 2021-11-28 at 21:59 +, Iain Buclaw via Digitalmars-d-learn wrote: > On Saturday, 27 November 2021 at 14:17:11 UTC, Eduard Staniloiu > wrote: > > Hello, > > > > I'm trying to use `gdb` to debug D binaries, but I'm having > > trouble accessing the methods of a struct or class. It

Re: Debugging D code with GDB

2021-11-28 Thread Iain Buclaw via Digitalmars-d-learn
On Saturday, 27 November 2021 at 14:17:11 UTC, Eduard Staniloiu wrote: Hello, I'm trying to use `gdb` to debug D binaries, but I'm having trouble accessing the methods of a struct or class. It seems that `gdb` doesn't see them. Given the following simple example ``` // test.d struct S {

Re: Debugging D code with GDB

2021-11-28 Thread user1234 via Digitalmars-d-learn
On Sunday, 28 November 2021 at 16:44:38 UTC, russhy wrote: On Sunday, 28 November 2021 at 14:53:17 UTC, user1234 wrote: ... there is a plugin to demangle things automatically https://github.com/ANtlord/gdb-ddemangle That's off-topic. The point here is that you can (unfortunately)

Re: Debugging D code with GDB

2021-11-28 Thread russhy via Digitalmars-d-learn
On Sunday, 28 November 2021 at 14:53:17 UTC, user1234 wrote: ... there is a plugin to demangle things automatically https://github.com/ANtlord/gdb-ddemangle

Re: Debugging D code with GDB

2021-11-28 Thread user1234 via Digitalmars-d-learn
On Saturday, 27 November 2021 at 14:17:11 UTC, Eduard Staniloiu wrote: Hello, I'm trying to use `gdb` to debug D binaries, but I'm having trouble accessing the methods of a struct or class. It seems that `gdb` doesn't see them. [...] Looking forward to your answers, Edi [0] -

Re: Debugging D code with GDB

2021-11-27 Thread Alexey via Digitalmars-d-learn
I found what Nemiver is much better for debugging D programs. With GDB I've got many problems, don't remember exactly. Thou I've used it through ddd, so maybe it's ddd problems, not exactly GDB's

Debugging D code with GDB

2021-11-27 Thread Eduard Staniloiu via Digitalmars-d-learn
Hello, I'm trying to use `gdb` to debug D binaries, but I'm having trouble accessing the methods of a struct or class. It seems that `gdb` doesn't see them. Given the following simple example ``` // test.d struct S { int x; void myPrint() { writefln("x is %s\n", x); } } void