[ddbg] finding source files

Jascha Wetzel firstname at mainia.de
Sat Sep 15 09:28:31 PDT 2007


Bill Baxter wrote:
> Jascha Wetzel wrote:
>> Bill Baxter wrote:
>>> What's up with finding source files in ddbg?
>>>
>>> What I do most for testing is run my program.
>>> If it crashes, I run it again inside ddbg.
>>> It crashes again and then I type 'ps'.
>>>
>>> At that point it pretty much always tells me "source file for current 
>>> location unknown".  Ok, so that's probably because I'm on the wrong 
>>> frame (I'd think even then it should print out the topmost frame that 
>>> does have source).  But if I 'f 2' to get to what should be my code 
>>> it *still* says 'source file for current location unknown'.
>>>
>>> 'lsm' though, tells me all the files just fine.
>>>
>>> If I set a breakpoint and run to that, though, 'ps' works.
>>>
>>> Any chance listing could be made to work without having to set 
>>> breakpoints?
>>>
>>> --bb
>>
>> i will add printing the "last known" source position in the next 
>> release. it should certainly work in all the other situations.
>> i will try to reproduce this problem. it would be great if you could 
>> provide me with a testcase to do so.
> 
> Great.  Here you go.
> I don't know if all the different files are strictly necessary to 
> reproduce it but this does reproduce the problem for me.
> 
> When you run it, 'us' should give frame 2 as something like main.d:22.
> But doing "f 2" then "ps" says "source file for current location unknown".
> 
> ps *does* try to print source from the current active frame, right?  If 
> instead it always tries to print the source of frame 0 then that would 
> explain it, but that's odd behavior and isn't in line with how other 
> debuggers work.
> 
> This is with ddbg v0.10b, DMD 1.021 compiler.
> 
> --bb

ah ic, i fixed that one already in my soon-to-be 0.11 version.
i've put a current build here: 
http://ddbg.mainia.de/Ddbg-0.11-beta%20preview.zip

the ps command was ignoring the selected frame and always using the 
current instruction pointer.


More information about the Digitalmars-d-debugger mailing list