Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log::Fatal backtrace under Windows #771

Closed
Kirizaki opened this issue Aug 29, 2016 · 3 comments
Closed

Log::Fatal backtrace under Windows #771

Kirizaki opened this issue Aug 29, 2016 · 3 comments

Comments

@Kirizaki
Copy link
Contributor

Kirizaki commented Aug 29, 2016

I'm working on mlpack::backtrace under Windows.

I would like to use DbgHelp.dll and some additional Windows dependencies which are provided by Visual Studio 2015. At the moment I'm compiling without mlpack but I'm getting nice backtrace:

[bt]: (1) ~\backtrace.cpp:53 Backtrace::Backtrace:
[bt]: (2) ~\projects\stackwalker\main.cpp:5 Func5:
[bt]: (3) ~\projects\stackwalker\main.cpp:6 Func4:
[bt]: (4) ~\projects\stackwalker\main.cpp:7 Func3:
[bt]: (5) ~\projects\stackwalker\main.cpp:8 Func2:
[bt]: (6) ~\projects\stackwalker\main.cpp:9 TestCurrentThread:
[bt]: (7) ~\projects\stackwalker\main.cpp:21 main:
[bt]: (8) f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:65 invoke_main:
[bt]: (9) f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253 __scrt_common_main_seh:
[bt]: (10) f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:296 __scrt_common_main:
[bt]: (11) f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17 mainCRTStartup:
[bt]: (12) :0 BaseThreadInitThunk:
[bt]: (13) :0 RtlUserThreadStart:
Press any key to continue . . .

But problem is that crazy output if I'm compiling solution with argument /Wall:
http://pastebin.com/t6psRQPm

If compile with /W3 it's like:

1>------ Build started: Project: backtrace_VC8, Configuration: Debug x64 ------
1>  Backtrace.cpp
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(1544): warning C4091: 'typedef ': ignored on left of '' when no variable is declared
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(3190): warning C4091: 'typedef ': ignored on left of '' when no variable is declared
1>  main.cpp
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(1544): warning C4091: 'typedef ': ignored on left of '' when no variable is declared
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\DbgHelp.h(3190): warning C4091: 'typedef ': ignored on left of '' when no variable is declared
1>  Generating Code...
1>  backtrace_VC8.vcxproj -> C:\projects\backtrace\x64\Debug\backtrace_VC8.exe
1>  backtrace_VC8.vcxproj -> C:\projects\backtrace\x64\Debug\backtrace_VC8.pdb (Full PDB)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

And question is:
How should I treat this long warning-output?
Cleaning it is a must?

...for sure I'm gonna work on it due to some odd stuff I'm doing there.

@rcurtin
Copy link
Member

rcurtin commented Dec 27, 2016

Hm, I'm sorry I forgot to respond to this! I remember reading it and thinking that it would be a nice feature. The Visual Studio compiler can be crazy with a huge number of warnings; I don't think anyone has ever gone through to try and reduce the number of warnings. I wouldn't worry about it too much at this time. Maybe sometime later we can open an issue for lots of warnings in VS15 and someone might take the time to try and fix it, but if you get a backtrace working for Windows, even if there are warnings, I still think it would be a nice improvement and we should merge it regardless. :)

@rcurtin
Copy link
Member

rcurtin commented Dec 27, 2016

Actually there is already an issue open for the many warnings, it's #554.

@rcurtin
Copy link
Member

rcurtin commented Jan 6, 2019

I think this one is not being worked on and it doesn't seem like a huge priority, so I'll close it for inactivity. If someone is interested in figuring it out, it would be great to add, so we can reopen it if there is interest. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants