analyze_stack_frame.py
The analyze_stack_frame.py script takes a line in a stack frame in the mtx_debug.log or in a specified file and prints the function name, the source filename, and the line number of this stack frame. This information can be sent to a MATRIXX representative for troubleshooting errors.
Syntax
analyze_stack_frame.py -h -d -f stack_line
Options
- -h, --help
- Returns information about the script.
- -d, --debug
- If this option is specified, extra messages are printed to help with debugging this script.
- -f, --file
- If this option is specified, this is the name of the file to analyze. The file can contain any number of stack frames to analyze.
- stack_line
- The line in the stack frame to analyze. Stack
frames are located in an
LM_ERROR
message and are preceded with the--Stack
notation. The stack line is in the formatfilename(function_name+offset) [return_address_in_hex]
. When referencing a stack frame in the command, enclose the line in double quotes (" "). The[return_address_in_hex]
need not be included in the command.
The expected stack frame format is: fileName(functionName+offset), for example:
mtx(main+0x14af) [0x40ca8f]
or
mtx(_ZN6MtxRpf9Framework4initERKN7MtxUtil8EcbsmiIDEPKcS6_ii+0x4a)[0x40ecca]
Analyze a Test01 Stack Frame
analyze_stack_frame.py "/home/workspace/MTX/test/Test01/Test01(_ZN58Test01_Header_Test8TestBodyEv+0xb10) [0x409b20]"