tags:

views:

163

answers:

2

Hi all,

i've to develop a stack trace walk to our win32 API plattform support to catch any exception with a behaviour of a JAVA stacktrace. Actually we got a full functional implementation for Linux plattforms.

First i've tried to implement a stackwalk using the win32 CaptureStackBackTrace API mechanism. But this method is not integrated in the actually winbase header of mingw (using MSYS/MinGW 5.1.x) ...

So i decided tried use the dbgheader mechanism follwoing the instructions of this link : http://sites.google.com/site/kenscode/prime-programs/boinc-with-mingw-on-win32

But i fail again and run into linker failures i could not solve. I think MinGW could not resolve the dbgheader library ....

DrMinGW is not an option for me, while it is a JIT Debugger, i've to implement a stack trace mechansim, for any exception occuring on runtime with a customizable log file tracebility like we know from JAVA ...

Has anyone get MSYS/MinGW runable with the win32 API in handshake? I will not change the compiler to the ugly MVC compiler instead of using MSYS/MinGW...

Thanks for any hint. Best regards,

Christian

+1  A: 

Here is a method using the Win32 API which you should be able to call from MinGW.

http://www.codeproject.com/KB/threads/StackWalker.aspx

jcoffland
A: 

Thanks for your link. I've not tested it yet, but i think i will also get in trouble, because the StackWalk64 method is also part of the dbghelp.dll which i actually got not runable. But I've checked the code and see that they load this dll by themselves:

if (m_hDbhHelp == NULL) // if not already loaded, try to load a default-one m_hDbhHelp = LoadLibrary( _T("dbghelp.dll") );

Maybe this could be a possibility to get this win32 API dll runable with MSYS/MinGW...

Hellhound
GMan