Debugging support for D - wiki
Paolo Invernizzi
paolo.invernizzi at gmail.com
Thu Sep 26 02:25:50 PDT 2013
On Thursday, 26 September 2013 at 08:02:52 UTC, Jacob Carlborg
wrote:
> On 2013-09-26 09:27, Paolo Invernizzi wrote:
>
>> I can confirm that line numbers are missing from the traces,
>> but at
>> least something like:
>>
>> (lldb) b test.d:12
>> Breakpoint 1: where = test_dmd-head_g`D4test3mooFZi + 8,
>> address =
>> 0x00000001000013a0
>>
>> works correctly, and with tabbed autocompletation of the
>> filename (dmd
>> head, OSX 10.9, lldb-300.5.33.1).
>
> I was wrong, line numbers do work for me. Both using DMD
> 2.063.2 and git HEAD. I'm using Mac OS X 10.8.5 and LLDB-179.5.
> Works fine in GDB as well.
>
> (lldb) r
> Process 24307 launched:
> '/Users/jacob/development/d/dlang/dmd/src/main' (x86_64)
> Process 24307 stopped
> * thread #1: tid = 0x1c03, 0x00000001000012ef
> main`D4main3barFZv + 15 at main.d:13, stop reason =
> EXC_BAD_ACCESS (code=1, address=0x0)
> frame #0: 0x00000001000012ef main`D4main3barFZv + 15 at
> main.d:13
> 10
> 11 void bar ()
> 12 {
> -> 13 int* a;
> 14 auto b = *a;
> 15 }
> 16
> (lldb) bt
> * thread #1: tid = 0x1c03, 0x00000001000012ef
> main`D4main3barFZv + 15 at main.d:13, stop reason =
> EXC_BAD_ACCESS (code=1, address=0x0)
> frame #0: 0x00000001000012ef main`D4main3barFZv + 15 at
> main.d:13
> frame #1: 0x00000001000012d9 main`D4main3fooFZv + 9 at
> main.d:8
> frame #2: 0x00000001000012a5 main`_Dmain + 9 at main.d:19
O_o
Jacob, you are right: line numbers are ok in lldb stack traces,
are missing from the printed d runtime stack trace.
So I guess that somehow the d runtime can find that...
- Paolo
More information about the Digitalmars-d
mailing list