Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Windows > obtaining stack...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 236 of 318
Post > Topic >>

obtaining stack traces through code

by "Darren R. Starr" <dstarr@[EMAIL PROTECTED] > Jan 3, 2005 at 03:06 PM

When developing code under Visual Studio, there is a library 
(imagehlp.dll) which allows traversal of browser database information 
from within code.

For example, I can easily write a function which will dump the stack 
trace of the running program from the current execution point by making 
use of this library. This is extremely useful when debugging from 
CodeWarrior since the CodeWarrior debugger is less than reliable at best.

It is important to me that I should be able to write a function prints 
out the following information upon being called :

Dumping stack trace :
   3 ... cyclic.cpp (451) void Cycler::cycling(int a, int b, int c)
         Frame Pointer - 0x3949438F
           DumpStackTrace();
   2 ... cyclic.cpp (100) void Cycler::cycler()
	Frame Pointer - 0x7843344A
	  cycling(1, 2, 4);
   1 ... main.cpp
	Frame Pointer - 0x43959843
	c->cycler();

This is in fact extremely easy to accomplish on Windows using Visual 
C++. Please see http://www.microsoft.com/msj/0597/hood0597.aspx
for 
further information.




 1 Posts in Topic:
obtaining stack traces through code
"Darren R. Starr&quo  2005-01-03 15:06:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 5:19:21 CDT 2008.