Click here to Skip to main content
13,045,920 members (46,676 online)
Click here to Skip to main content


28 bookmarked
Posted 21 Aug 2009

Post mortem C++ exception analysis in embedded applications

, 21 Aug 2009
An article on analysing a program exception or software crash.
#include "stdafx.h"
#include <iostream>
#include "C3.h"
#include "C4.h"
#include "ex.h"

long C4::Test4(double f4)
    BYTE* pStack = NULL;
    BYTE* pFrame = NULL;
    long d4 = 4;
		long data = 4;

		C3 c3;
		data += c3.Test3();

		return (long)(data * f4);
	catch (...)
            mov pFrame, ebp;   
            mov pStack, esp;   

        AnalyzeCallStack(pFrame, pStack);

		std::cout << "crash C4::Test4() throw exception" << std::endl;
   		std::cout << "crash C4::Test4() swallow exception" << std::endl;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Werner Willemsens
Team Leader
Belgium Belgium
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Aug 2009
Article Copyright 2009 by Werner Willemsens
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid