Discussion:
line number information with dmd and gdb
Tobias Pankrath
2012-07-01 08:24:12 UTC
Permalink
Hey,

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?

Thanks
Rainer Schuetze
2012-07-03 18:16:02 UTC
Permalink
Post by Tobias Pankrath
Hey,
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?
Thanks
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:
if(condition)
return;
code;
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
kiranlucky
2012-07-23 05:06:45 UTC
Permalink
Post by Tobias Pankrath
Hey,
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?
Thanks
very nice.http://www.kiransweet.com/

Loading...