WinDbg

Andre Pany andre at s-e-a-p.de
Tue Apr 20 08:42:37 UTC 2021


On Monday, 19 April 2021 at 17:12:38 UTC, Imperatorn wrote:
> On Monday, 19 April 2021 at 15:24:24 UTC, Andre Pany wrote:
>> On Sunday, 18 April 2021 at 14:14:53 UTC, Andre Pany wrote:
>>> [...]
>>
>> I had a deeper look, actually there is neither a functional 
>> nor a performance problem. The debugger steps into 
>> DRuntime/photos coding but as the source code is not 
>> available, it looks quite strange for beginners.
>>
>> So far I haven't found out how to add the DRuntime/photos 
>> source code to WinDbg.
>>
>> Kind regards
>> Andre
>
> Hmm, it should just be to add the source dir

I am not sure how to do this with WinDbg preview. I can only add 
single source files. I added from DRuntime the file object.d and 
from Phobos array.d, but this doesn't help.

I wonder whether somehow it is possible to tell the debugger to 
not jump into DRuntime/Phobos, because most of the time you are 
not interested in it.

For now, while trying to debug my application I am ending in 
pressing the debugger navigations button 15 times before getting 
into the method I am interested in:

```
Breakpoint 0 hit
dt!D main+0xf:
00007ff6`4335502f 31c9            xor     ecx,ecx
0:000> t
dt!pe.client.kernel.Kernel.create:
00007ff6`43436f70 55              push    rbp
0:000> t
dt!pe.client.kernel.Kernel.create+0xe:
00007ff6`43436f7e 48837d1000      cmp     qword ptr [rbp+10h],0 
ss:00000036`d47af6f0=0000000000000000
0:000> t
dt!pe.client.kernel.Kernel.create+0x19:
00007ff6`43436f89 488d0d90b53300  lea     
rcx,[dt!D3pe6client6kernel6Kernel7__ClassZ (00007ff6`43772520)]
0:000> t
dt!d_newclass:
00007ff6`43544870 55              push    rbp
0:000> t
dt!d_newclass+0x1:
00007ff6`43544871 488bec          mov     rbp,rsp
0:000> t
dt!d_newclass+0x4:
00007ff6`43544874 4883ec50        sub     rsp,50h
0:000> t
dt!d_newclass+0x8:
00007ff6`43544878 48895dd8        mov     qword ptr [rbp-28h],rbx 
ss:00000036`d47af648=0000000000000000
0:000> t
dt!d_newclass+0xc:
00007ff6`4354487c 488975e0        mov     qword ptr [rbp-20h],rsi 
ss:00000036`d47af650=0000000000000000
0:000> t
dt!d_newclass+0x10:
00007ff6`43544880 48897de8        mov     qword ptr [rbp-18h],rdi 
ss:00000036`d47af658={dt!_a0_ (00007ff6`43754890)}
0:000> t
dt!d_newclass+0x14:
00007ff6`43544884 4889cf          mov     rdi,rcx
0:000> t
dt!d_newclass+0x17:
00007ff6`43544887 488bcf          mov     rcx,rdi
0:000> t
dt!d_newclass+0x1a:
00007ff6`4354488a 488b07          mov     rax,qword ptr [rdi] 
ds:00007ff6`43772520={dt!D14TypeInfo_Class6__vtblZ 
(00007ff6`43790090)}
0:000> t
dt!d_newclass+0x1d:
00007ff6`4354488d 48ff5058        call    qword ptr [rax+58h] 
ds:00007ff6`437900e8={dt!ILT+65715(_D6object14TypeInfo_Class11initializerMxFNaNbNiNfZAxv) (00007ff6`433410b8)}
0:000> t
dt!D6object14TypeInfo_Class11initializerMxFNaNbNiNfZAxv:
00007ff6`4354c490 488b5118        mov     rdx,qword ptr [rcx+18h] 
ds:00007ff6`43772538={dt!D3pe6client6kernel6Kernel6__initZ 
(00007ff6`437724a0)}
0:000> t
dt!D6object14TypeInfo_Class11initializerMxFNaNbNiNfZAxv+0x4:
00007ff6`4354c494 488b4110        mov     rax,qword ptr [rcx+10h] 
ds:00007ff6`43772530=0000000000000068
0:000> t
dt!D6object14TypeInfo_Class11initializerMxFNaNbNiNfZAxv+0x8:
00007ff6`4354c498 c3              ret
0:000> t
dt!d_newclass+0x21:
00007ff6`43544891 488945f0        mov     qword ptr [rbp-10h],rax 
ss:00000036`d47af660=00000036d47af730
0:000> t
dt!d_newclass+0x25:
00007ff6`43544895 488955f8        mov     qword ptr [rbp-8],rdx 
ss:00000036`d47af668=00007ff6435d4369
```

Kind regards
André


More information about the Digitalmars-d mailing list