Skip to main content
gamedev.net
🔒 Locked

StackWalk64

Started by BlackHC 2 replies 4.9k views
Original Post
BlackHC
BlackHC
Hi, has someone any experience with the StackWalk64 function ( and the other DbgHelp functions) ? I get always an strange Access Violation from Ntdll.dll ... BlackHC I do know that I don''t know anything.
I do know that I don't know anything.
LessBread
LessBread
I''ve worked with the 32 bit version before. Here are a few related urls:

http://www.microsoft.com/msj/0597/hood0597.htm
http://www.microsoft.com/msj/0299/bugslayer/bugslayer0299.htm
http://www.mvps.org/win32/misc/stackwalk.html
http://www.codeproject.com/useritems/leakfinder.asp
http://www.codeproject.com/cpp/exception.asp

There doesn''t appear to be much commentary regarding the 64 bit dbghelp routines.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Jan Wassenberg
Jan Wassenberg
- Do you have the 5.1 dbghelp.dll? You''ll need it for DIA stuff; grab it from someone who has WinXP or try to download a ''MS debug pack'' or something.

- you synchronizing your calls to the library? It''s single threaded.

- read in one of Matt Pietrek''s articles that you need to set certain members of STACKFRAME:

  
/* x86 only: init STACKFRAME for first StackWalk call (undocumented) */
frame.AddrPC.Offset = context.Eip;
frame.AddrPC.Mode = AddrModeFlat;
frame.AddrStack.Offset = context.Esp;
frame.AddrStack.Mode = AddrModeFlat;
frame.AddrFrame.Offset = context.Ebp;
frame.AddrFrame.Mode = AddrModeFlat;


That''s it until you tell us your Windows version and where it''s crashing


Lessbread: there''s not much difference; in fact, on my system, the 32 bit routines point to the 64 bit versions.

500x3
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3
BlackHC
BlackHC
It's real strange how it crashes. Well, my trace function which uses StackWalk64 works well - 'til it returned - then I get an Access Violation from Ntdll.dll. My programm still doesn't crash because I do exception handling. If the programm continues, I get a lot of strange messages from heap, that some heap block has been modified past the requested size of 30.

Other question : Do I really need set up frame.AddrStack ?
In the doc just AddrPC and AddrFrame need to be set up.

Now I trying to get the WinXP symbols I downloaded working with my Visual C++ 6 ... :-~

Thx
BlackHC


I do know that I don't know anything.

EDIT:
I've located the error somewhere in the STL and somehow removed it by copying some function parts into others. Strange,strange,strange.

Thx for your help however.

[edited by - BlackHC on March 8, 2003 8:09:43 AM]
I do know that I don't know anything.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.