March 11, 2010
> stacktrace printout, there is a need for such things.  But I think exception tracing is coming, I think Tango already has it.
>

Tango has it since a long time. Makes me wonder why it hasn't been ported to druntime, I thought the runtimes are quite similar.
March 11, 2010
> If a good debugger existed for dmd, you could determine the location, but I don't know of any good ones.  gdb doesn't do a very good job with D.
>

On Windows cv2pdb + Visual Studio works pretty damn well for me. Can't compare it to gdb though, since I haven't used that yet.
March 11, 2010
> Note to everyone, dmd 2.041 array allocation is broken (inadvertently by my array append patch).  You should not use this release.
>

Another big problem of the release is operator overloading.
March 11, 2010
On 11/03/10 20:28, Steven Schveighoffer wrote:
> If a good debugger existed for dmd, you could determine the location,
> but I don't know of any good ones. gdb doesn't do a very good job with D.
>
> -Steve

I've never had a problem with GDB, it's always worked fine for me, for everything I've used (including arrays, templates etc). Admittedly, I've only ever used a patched version of gdb with the D patches from http://dsource.org/projects/gdb-patches/, so it's far better equipped than a default gdb install. I've mainly used it with ldc/tango, I don't know how well dmd works with it though. I'm also guessing a lot of the D2 features aren't handled, I don't know though.
March 12, 2010
On 11-mar-10, at 22:09, Steven Schveighoffer wrote:

> On Thu, 11 Mar 2010 16:05:51 -0500, bearophile <bearophileHUGS@lycos.com 
> > wrote:
>
>> Steven Schveighoffer:
>>> Also if we get exception stack trace support, then you can immediately see
>>> everything.  It's probably better to focus on that.
>>
>> OK.
>> Do you want me to remove those two bug reports then?
>
> I think they should at least be marked as enhancements.  Without a stacktrace printout, there is a need for such things.  But I think exception tracing is coming, I think Tango already has it.
>
> -Steve

Yes tango has it, there are a couple of things that are a bit clumsy, due to backward compatibility to previous implementations, but I think that the basic approach is sound:

- separate function to trace addresses from the ones to resolve them

- separate functions to find symbolic information, and those that demangle it) from those that print it out

- try to avoid allocation (often the program is in a delicate spot when a stacktrace is requested, one should try to avoid making the position worse, and allocation in any case should be avoided when possible).

 I am willing to give the code I wrote in whatever license is needed, but I have used parts of code by h3r3tic, wm4 (winterwar), and Thomas Kühne, so if you want to use that code you should check also with them.

Fawzi
March 12, 2010
Fawzi Mohamed:
> Yes tango has it, there are a couple of things that are a bit clumsy, due to backward compatibility to previous implementations, but I think that the basic approach is sound:

A nice stack trace is a quite significant improvement when I program in D. It helps solve problems in quite less time. And I think in D2 backward compatibility can be broken, if you think it gives some advantages.

Thank you,
bye,
bearophile
March 12, 2010
"bearophile" <bearophileHUGS@lycos.com> wrote in message news:hnd8hr$1q6r$1@digitalmars.com...
> Fawzi Mohamed:
>> Yes tango has it, there are a couple of things that are a bit clumsy, due to backward compatibility to previous implementations, but I think that the basic approach is sound:
>
> A nice stack trace is a quite significant improvement when I program in D. It helps solve problems in quite less time.
>

Yup. Between recently discovering tango's stack-tracing for exceptions, and the template instantition backtrace that was added to DMD not long ago, I'm one very happy D camper :)


1 2
Next ›   Last »