Patent ID: 9645869
Date: 2017-05-09
CPC Classifications: G06F

Claim:
1. A method of using exception information for binary code, the method comprising: compiling an original source code into an intermediate code assembly; generating binary code from the intermediate code assembly; executing the binary code; monitoring, by the operating system, the execution of the binary code; when an exception has occurred, creating, by the binary code, an exception object containing information related to the exception, the information including a code reference identifying a function name and a string representation of a call stack at the time the exception was thrown, wherein a frame of the call stack identifies a line number for a function; notifying an exception detection component of the exception object; upon notification of the exception object, examining, by the exception detection component, the call stack frame to determine which component will handle the exception; sending the exception object to a context provider; accessing, by the context provider, the intermediate code assembly to retrieve intermediate code fragments based on the function name and the line number associated with the exception object; passing the retrieved intermediate code fragments to a reflector component; converting the intermediate code fragments, by the reflector component, to a source code approximation of the original source code, the source code approximation being in a source code format different from the original source code; writing, by the reflector component, the source code approximation, an exception type for the exception, an Internet Protocol (IP) address for a computer executing the binary code, stack trace information for the stack, a date and a time when the exception was raised, and function names associated with the line numbers of the exception object to a code fragment log for subsequent analysis; transferring the code fragment log to a remote system; and performing, by a software engineer at the remote system, subsequent analysis using the source code approximation to locate the actual source code associated with the intermediate code fragments.