#1
|
|||
|
|||
how to trace a program exception?
I have patched a program, which now starts O.K. but runs for exactly 4 min and then unexpectedly terminates.
If I tried to trace the exe/dll which throws the exception, but the debugger does not give me any clues. How can I trace the exception event? rgds rcer |
#2
|
||||
|
||||
Don't know what exactly you are tracing, but hope this can help
Put BP on KiUserExceptionDispatcher |
The Following User Says Thank You to b30wulf For This Useful Post: | ||
rcer (09-26-2015) |
#3
|
|||
|
|||
Quote:
This is a very CONCISE but a very classic paper : Quote:
Tracing Exception Handlers : http://www.hexblog.com/?p=19 That gives an excellent overview of the entire process. In all probability, your program is simply having a "timer" that terminate the process, after 4 minutes, if the required conditions are not met, by using SEH ... You would need to follow through by checking the entire SEH "tree" to see from WHICH level exactly the exception is generated and at which level of the SEH tree is is actually handled. For an "unhandled" exception , it can simply traverse many levels above right up to the TOP level, before showing it to the user or terminating the process. |
#4
|
|||
|
|||
Maybe this is a way: Put a BP GetSystemTime and BP GetLocalTime and trace with olly from where the exception is called, only a suggestion.
Regards |
#5
|
|||
|
|||
Guys,
Excellent advice & information! I managed to trace this and it is indeed a call to a "timer" which terminates the process. thanks rcer |
#6
|
|||
|
|||
Great info,
but I am on Mac and I cannot found any info about tracing exception handler on unix system can someone point me on the right direction? thanks nashito |
#7
|
|||
|
|||
Quote:
you can use 'strace' - trace system calls and signals - if available! however I c++ If an exception is uncaught, the special library function std::terminate() is automatically called. Terminate is actually a pointer to a function and default value is the Standard C library function std::abort(). look at: Code:
http://en.cppreference.com/w/cpp/error/terminate Code:
https://spin.atomicobject.com/2013/01/13/exceptions-stack-traces-c/ |
The Following 2 Users Say Thank You to Mr.reCoder For This Useful Post: | ||
abhi93696 (03-14-2017) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The Exception Table hook | STRELiTZIA | General Discussion | 0 | 10-25-2011 17:05 |
Asprotect Last Exception | britedream | General Discussion | 10 | 11-03-2005 20:59 |
Trace new hasp protected program | Elickson | General Discussion | 2 | 09-05-2005 09:05 |
Last exception for asprotect | britedream | General Discussion | 7 | 04-09-2004 15:56 |