Use the signal handler's `sigcontext` to find the exact stack frame and
instruction address where the fatal signal ocurred, then disassemble
those exact locations (rather than hoping the 4th frame is the offending
one).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Error 27 error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 1 from 'DWORD' to 'HANDLE'
Since it cannot convert (HANDLE)hProcess to a HANDLE, the obvious solution is to add a cast: (HANDLE)(HANDLE)hProcess.
Error 26 error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 2 from 'void *' to 'DWORD'
../../../../lib/exceptionhandler/exchndl.cpp: In function ‘BOOL IntelStackWalk(DWORD, void*, void*, _tagSTACKFRAME*, CONTEXT*, BOOL (*)(void*, const void*, void*, DWORD, DWORD*), void* (*)(void*, DWORD), DWORD (*)(void*, DWORD), DWORD (*)(void*, void*,
_tagADDRESS*))’:
../../../../lib/exceptionhandler/exchndl.cpp:599: error: invalid conversion from ‘long unsigned int’ to ‘const void*’
Since it needs a void *, no, I mean a DWORD, no, I mean a void *, the obvious solution is to add a cast: ...id *)(DWORD)(void *)(DWORD)(void *)StackFrame->AddrFrame.Offset
Some distributions disallow this (newer Ubuntu for example), so the gdb call
didn't output anything useful. Based on a patch by Safety0ff.
(cherry picked from commit 023ea5b2cea6f57b6690ac7d25fd472aefc911eb)
It will write the crash report file to CSIDL_PERSONAL (c:\Users\user name\Documents\logs\warzone2100.rpt)
*All* platforms will now always have --debug-file enable as a default. This will write the logs to <configdir>/logs/WZlog*.txt
When a user overrides the configdir, then we will try to use that directory instead of the default as well.
refs ticket:1759
2.3: r10532
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10538 4a71c877-e1ca-e34f-864e-861f7616d084
* Make sure that config.h is #included (for PACKAGE_DISTRIBUTOR)
* addDumpInfo: don't (explicitly) convert the parameter to std::string
- std::ostream already takes care of that ''if'' necessary (usually it isn't)
* addDumpInfo: use a 24 hour clock (%H to strftime instead of %I)
- more info in the same bytes!
* sizeof instead of magic numbers
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9904 4a71c877-e1ca-e34f-864e-861f7616d084
This is used to differentiate LOG_ERROR (which is a *non* fatal error, but a error none the less) and fatal errors which result in program termination with no *visible* output (on windows/macs) on our end because of the crappy GUI functions so we usually dump it to stderr.txt and there is no clue that the program had to exit for whatever reason.
Hopefully, this will be helpful to windows people so they can differentiate between *our* exit/abort routines, and crashes that occur in drivers which look exactly the same since they get dumped back to the desktop with no visible clue why.
LOG_FATAL is *always* on in both debug & release builds.
On LOG_FATAL debug lines, on windows, we now throw up a modal dialog box with the current error message. At this time, this only happens when we have a error, and we use abort() right after the error, which makes it fatal.
That explains why this touches ~60 files :)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8320 4a71c877-e1ca-e34f-864e-861f7616d084
Extension functions dealing with ...
* strings are in string_ext.h
* stdio (namely printf variants) are in stdio_ext.h
* math are in math_ext.h
These headers are no longer included by frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084