|Posted by Rainer Schuetze|
in reply to Tobias Pankrath
Posted in reply to Tobias Pankrath
On 7/1/2012 10:24 AM, Tobias Pankrath wrote:
> I've run into problems when debugging a program of mine using gdb
> (7.4.1) and dmd (2.59 / 2.60).
> While running the program in a step by step fashion it occurs that the
> current line jumps back and forth. So I'm more less blind till the line
> number information turns correct again. Sadly I've yet to reduce this
> problem to a program that's fit for a bug report.
> Does anyone have this problem, too? Any workarounds?
I've seen that, too, but haven't analyzed it thoroughly, because I've been getting used to these. Some unexpected cases from the top of my head (seen on windows, but I guess the problem is OS independent):
- line numbers inside templates are sometimes off by 1
- line numbers within string mixins including line breaks overlap with the following source code
- implicite struct destructors might jump back to the place of the construction
- code like this:
sometimes steps into the line of the "return" statement, even if the condition is false, but then continues with the code
- passing default arguments jumps to the function definition, returns to the invocation before the call, then jumps there again. Very frustrating if you think you can skip the function call by using "until return/finish"
- it is sometimes hard to step into/out of foreach loops, because there is too much magic involved