Stacktrace

As StackTrace ( " stack ( memory) back tracking " ) is referred to in the information technology, the issue and interpret the contents of the stack. A stack trace is usually created diagnostic purposes in the event of a program crash, as it lets the call cascade that led to the error reconstruct.

Normally, especially the return addresses of the procedures are stored on the stack that called each next procedure. This results in a list of procedure addresses whose tracing makes it possible to detect up to the current state of the path of procedure calls from the start of the program.

This is particularly useful in case of error. A function often produces an error if it receives wrong parameters. However, the programmer does not always know what (operating system ) function is called in the end of his program. It can determine from the stacktrace, at which point his program a function is called, which led to the error.

Therefore, it is displayed by default, for example, in Linux after a kernel panic a stack trace.

Stack trace in Java

In the Java stack trace of the fixed component and language with the concept of exception handling is connected:

Try {    doSomething (); } Catch (Exception exc) {    exc.printStackTrace (); } The output of the stacktrace looks for example like this:

Java.lang.ArrayIndexOutOfBoundsException: 3    at example.common.TestTry.execute ( Testtry.java: 17)    at example.common.TestTry.main ( Testtry.java: 11) It is therefore not output hexdump with register contents, but the stack trace as text. This information allows the programmer to locate an error that occurs during the program run faster and fix it.

744259
de