I've noticed that stack trace support has been added for Windows in the latest DMD release. However, it seems to only print function addresses (basically useless) instead of function names like it does on Linux. Is there a way to enable function names being printed on Windows? (Compiling w/ debugging symbols doesn't seem to do it.)

On Thu, 26 May 2011 16:14:23 +0300, dsimcha <dsimcha@yahoo.com> wrote:
> I've noticed that stack trace support has been added for Windows in the latest DMD release. However, it seems to only print function addresses (basically useless) instead of function names like it does on Linux. Is there a way to enable function names being printed on Windows? (Compiling w/ debugging symbols doesn't seem to do it.)
Function names work for me when using -g or -gc. I recall that you need a recent version of dbghelp.dll to see the function names.
--
Best regards,
Vladimir mailto:vladimir@thecybershadow.net

Ok, got it. I think I've found out why different people keep getting different results. If I compile and link in one step, everything works, i.e.:
dmd -g test.d
test
If I compile and link in separate steps, which is the default for my IDE, it doesn't work, i.e.:
dmd -c -g test.d
dmd test.obj
test
Unless there's a good reason why this shouldn't work, I'll be filing a bug report.
BTW, the binary produced by the second method is ~90k smaller than the one
produced by the first method, so it's probably missing some information.

On Thu, 26 May 2011 17:51:40 +0300, dsimcha <dsimcha@yahoo.com> wrote:
> If I compile and link in separate steps, which is the default for my IDE, it
> doesn't work, i.e.:
I believe you need to pass -g to dmd when linking, too.
--
Best regards,
Vladimir mailto:vladimir@thecybershadow.net