[Issue 15631] New: gdb: Parent's scope not considered for symbol lookup
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Jan 30 17:04:19 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15631
Issue ID: 15631
Summary: gdb: Parent's scope not considered for symbol lookup
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: pro.mathias.lang at gmail.com
CC: ibuclaw at gdcproject.org
Tested with 'GNU gdb (GDB) 7.10.1' (latest release) + DMD
2.069-but-really-2.070.
Using the following code:
```
class Base { int value; }
class Derivative : Base
{
int derived_value;
void foo () { assert(value == 0); assert(derived_value == 0); }
}
void main ()
{
auto d = new Derivative();
d.foo;
}
```
and compiling with DMD:
```
Breakpoint 1, gdb_scope.Derivative.foo() (this=0x7ffff7ec3000) at gdb_scope.d:5
5 void foo () { assert(value == 0); assert(derived_value == 0); }
(gdb) p value
No symbol "value" in current context.
(gdb) p *this
$1 = {derived_value = 0}
```
This issue makes it quite complex to trace DMD using gdb, unless DMD is
compiled with GDC.
--
More information about the Digitalmars-d-bugs
mailing list