On Tue, Mar 13, 2012 at 12:46 PM, Kai Tietz <[email protected]> wrote:
> 2012/3/13 Earnie Boyd <[email protected]>:
>> On Tue, Mar 13, 2012 at 4:41 AM, Vincent Torri <[email protected]> 
>> wrote:
>>> Hey,
>>>
>>> I'm trying to get the callstack of programs, so I try to use dbghelp.
>>> The code is here:
>>>
>>> http://codepad.org/wAhYYChY
>>>
>>> compilation is fine (see the first line to see how I compile it with
>>> mingw). I use mingw-w64, Windows XP SP2 running in virtualbox.
>>>
>>> The binary compiled with Visual Studio 2008 express is working correctly
>>> The binary compiled with mingw gives the following errors :
>>>
>>> SymGetSymFromAddr64() failed (  487) Attempt to access invalid address.
>>> SymGetLineFromAddr64() failed (  487) Attempt to access invalid address.
>>>
>>
>> MSDN says "Note  This function is provided only for compatibility.
>> Applications should use SymFromAddr."
>>
>> How would these work in a 32 bit platform?  Examples on MSDN suggest
>> that it wouldn't.
>>
>> --
>> Earnie
>
> Correct, Use here SysFromAddr.  Nevertheless the underlying issue here
> is that dbghelp API depends internally on MS generated CV information
> for providing more detailed information.  So I assume the
> access-violation you see is caused by invalid lookup for those tables.

Indeed, the doc says that I should use SysFromAddr. But I have exactly
the same errors. The updated code :

http://codepad.org/PXHxGyyL

> PS:  Your to be "fixed" cast should use instead of (DWORD) the (DWORD_PTR) 
> cast.

Thank you, it's done

Vincent

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to