SVN: backtracexx: backtracexx.cpp backtracexx.hpp

pluto pluto at pld-linux.org
Fri Jul 13 12:42:19 CEST 2007


Author: pluto
Date: Fri Jul 13 12:42:19 2007
New Revision: 8674

Modified:
   backtracexx/backtracexx.cpp
   backtracexx/backtracexx.hpp
Log:
- don't require PEXCEPTION_POINTERS while PCONTEXT is enough for stack walking.

Modified: backtracexx/backtracexx.cpp
==============================================================================
--- backtracexx/backtracexx.cpp	(original)
+++ backtracexx/backtracexx.cpp	Fri Jul 13 12:42:19 2007
@@ -143,7 +143,7 @@
 	{
 	}
 
-	Trace scan( PEXCEPTION_POINTERS ex )
+	Trace scan( ::PCONTEXT ctx )
 	{
 		Trace trace;
 
@@ -162,9 +162,9 @@
 		::CONTEXT context = { 0 };
 		::STACKFRAME64 stackFrame = { 0 };
 		stackFrame.AddrPC.Mode = stackFrame.AddrFrame.Mode = stackFrame.AddrStack.Mode = AddrModeFlat;
-		if ( ex )
+		if ( ctx )
 		{
-			context = *( ex->ContextRecord );
+			context = *ctx;
 			Frame frame;
 			frame.address = context.Eip;
 			lookupSymbol( frame );

Modified: backtracexx/backtracexx.hpp
==============================================================================
--- backtracexx/backtracexx.hpp	(original)
+++ backtracexx/backtracexx.hpp	Fri Jul 13 12:42:19 2007
@@ -19,7 +19,7 @@
 #else
 
 #define BACKTRACEXX_EXPORT	__attribute__(( visibility( "default" ) ))
-typedef void* PEXCEPTION_POINTERS;
+typedef void* PCONTEXT;
 
 #endif
 
@@ -42,7 +42,7 @@
 	//	ex == 0, scan() stack from current frame.
 	//	ex != 0, scan() stack from specified context (e.g. passed from SEH handler).
 	//
-	BACKTRACEXX_EXPORT Trace scan( ::PEXCEPTION_POINTERS /* not used on linux */ ex = 0 );
+	BACKTRACEXX_EXPORT Trace scan( ::PCONTEXT /* not used on linux */ ctx = 0 );
 	BACKTRACEXX_EXPORT std::ostream& operator << ( std::ostream&, Trace const& );
 }
 


More information about the pld-cvs-commit mailing list