digitalmars.D.debugger - GDB behaves strange with DMD
- Gorthad (25/25) Jul 04 2017 Hello everyone.
- Martin Krejcirik (4/5) Jul 07 2017 This is acually a regression since 2.072. I'll file a bug report.
- Gorthad (4/8) Sep 11 2017 Could you please send a link to the bug tracker issue and/or
Hello everyone. I'm trying to debug programs compiled with DMD using GDB. My dmd version is 2.074.1, gdb version is 7.11.1, operating system is Ubuntu 16.04. I have this little helloworld.d: import std.stdio; void main() { auto a = 5; writeln("Hello, world!"); foreach (i; 0 .. 5) a = a + i; writeln("aaaaaaaa"); writeln(a); } Then I compile it with tag -g and when I try to debug it with GDB, I get this: pastebin.com/GJD7q9XM As you see, GDB seems to have wrong info about line numbers. When I compile it with tag -gc, it's basically all the same except I need to write 'list _Dmain' in order to access the source code from gdb: pastebin.com/5TkqxEvu In bigger projects current line in GDB can jump all over the place without any obvious logic. Do you have any ideas how to fix it? Thank you.
Jul 04 2017
Dne 4. 7. 2017 v 13:46 Gorthad napsal(a):As you see, GDB seems to have wrong info about line numbers.This is acually a regression since 2.072. I'll file a bug report. -- mk
Jul 07 2017
On Friday, 7 July 2017 at 17:10:23 UTC, Martin Krejcirik wrote:Dne 4. 7. 2017 v 13:46 Gorthad napsal(a):Could you please send a link to the bug tracker issue and/or provide some info about its current status? Thank you!As you see, GDB seems to have wrong info about line numbers.This is acually a regression since 2.072. I'll file a bug report.
Sep 11 2017