Home Symbian Debuggin: memory & register fump from exception
Post
Cancel

Symbian Debuggin: memory & register fump from exception

I made my own Exception handler to make the memory dump into a file. The memory dumps can be used for debugging purposes.
See what to do with the memory dump from NewLC article aobut tracking down the Hardware exceptions.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
_LIT(KTestFile, "C:\\Data\\myExcepption.txt");
_LIT( KStackInfo, "StackInfo: ");
void ExceptionHandler(TExcType)
{
    RFs fs;
    RFile file;
    fs.Connect();
    file.Open(fs,KTestFile,EFileWrite);
    RDebug::Print(_L("Exception handler"));
    HBufC8* buf = HBufC8::NewLC(1000);
    TPtr8 ptr = buf->Des();
    RThread().Context(ptr);
    file.Write(ptr);
    //save register info into a file
    RDebug::Printf( "%S", buf );
    CleanupStack::PopAndDestroy();
}

Using the Exception handler. The Exception handler can be easily set by calling
SetExceptionHandler function.

1
User::SetExceptionHandler(&ExceptionHandler,0xffffffff);

Note that you can not use this at the same time with Carbide On device debugging, since the TRK will use the same mechanism to catch exceptions from the Hardware.

This post is licensed under CC BY 4.0 by the author.

Fixing self-signed certificate related problems

MinGW Symbian OS Build Chain: Debugging

Comments powered by Disqus.