[Issue 4149] refs displayed as pointers in gdb

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 14 02:24:10 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=4149


Iain Buclaw <ibuclaw at ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com
           Platform|Other                       |All
         OS/Version|Windows                     |All


--- Comment #17 from Iain Buclaw <ibuclaw at ubuntu.com> 2014-02-14 02:22:13 PST ---
Confirmed on Linux, changing platform from 'Other', 'Windows' to 'All', 'All'

---
void foo(ref int a)
{
  a = 42;
}

void main()
{
  int i;
  foo(i);
  assert(i == 42);
}
---

(gdb) break test.foo(ref int) 
Breakpoint 2 at 0x41705c: file test.d, line 3.
(gdb) continue
Continuing.

Breakpoint 2, test.foo(ref int) (a=0x7fffffffde68) at test.d:3
(gdb) ptype a
type = int *

---

Also, cannot reproduce on GDC, so this is DMD-specific.

(gdb) break test.foo(ref int) 
Breakpoint 2 at 0x402c0f: file test.d, line 3.
(gdb) continue
Continuing.

Breakpoint 2, test.foo(ref int) (a=@0x7fffffffdf4c: 0) at test.d:3
(gdb) ptype a
type = int &

---

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list