[Issue 21079] New: Can't "step" into interface methods in gdb
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 27 00:44:38 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21079
Issue ID: 21079
Summary: Can't "step" into interface methods in gdb
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: symdeb
Severity: normal
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dlang-bugzilla at thecybershadow.net
Given the program:
///////// test.d ////////
import std.stdio;
interface I
{
void foo();
}
class C : I
{
void foo()
{
writeln("Hello");
}
}
void main()
{
I c = new C;
c.foo();
}
/////////////////////////
When compiling it with `dmd -g test.d`, and debugging it with `gdb ./test`,
attempting to "step" into the c.foo() call causes the debugger to skip over it
entirely.
Transcript:
(gdb) start
Temporary breakpoint 1 at 0x48095c: file test.d, line 18.
Starting program: /home/vladimir/tmp/2020-07-27-scratch/00:38:03/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Temporary breakpoint 1, D main () at test.d:18
18 I c = new C;
(gdb) next
19 c.foo();
(gdb) step
Hello
20 }
The problem doesn't manifest in GDC and LDC, which correctly step into C.foo,
which leads me to believe this is a defect in the debug information generated
by DMD.
--
More information about the Digitalmars-d-bugs
mailing list