|
satyr 0.43
|
Stack trace as produced by GDB. More...
Go to the source code of this file.
Data Structures | |
| struct | sr_gdb_stacktrace |
| A stack trace produced by GDB. More... | |
Stack trace as produced by GDB.
Definition in file gdb/stacktrace.h.
| struct sr_gdb_stacktrace * sr_gdb_stacktrace_dup | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Creates a duplicate of a stacktrace.
| stacktrace | The stacktrace to be copied. It's not modified by this function. |
References sr_gdb_stacktrace_dup().
Referenced by sr_gdb_stacktrace_dup().
| struct sr_gdb_thread * sr_gdb_stacktrace_find_crash_thread | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Searches all threads and tries to find the one that caused the crash. It might return NULL if the thread cannot be determined.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
References sr_gdb_stacktrace_find_crash_thread().
Referenced by sr_gdb_stacktrace_find_crash_thread().
| void sr_gdb_stacktrace_free | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Releases the memory held by the stacktrace, its threads, frames, shared libraries.
| stacktrace | If the stacktrace is NULL, no operation is performed. |
References sr_gdb_stacktrace_free().
Referenced by sr_gdb_stacktrace_free().
| struct sr_gdb_frame * sr_gdb_stacktrace_get_crash_frame | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Analyzes the stacktrace to get the frame where a crash occurred.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
References sr_gdb_stacktrace_get_crash_frame().
Referenced by sr_gdb_stacktrace_get_crash_frame().
| int sr_gdb_stacktrace_get_thread_count | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Returns a number of threads in the stacktrace.
| stacktrace | It's not modified by calling this function. |
References sr_gdb_stacktrace_get_thread_count().
Referenced by sr_gdb_stacktrace_get_thread_count().
| void sr_gdb_stacktrace_init | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Initializes all members of the stacktrace structure to their default values. No memory is released, members are simply overwritten. This is useful for initializing a stacktrace structure placed on the stack.
References sr_gdb_stacktrace_init().
Referenced by sr_gdb_stacktrace_init().
| void sr_gdb_stacktrace_limit_frame_depth | ( | struct sr_gdb_stacktrace * | stacktrace, |
| int | depth ) |
Remove frames from the bottom of threads in the stacktrace, until all threads have at most 'depth' frames.
| stacktrace | Must be non-NULL pointer. |
References sr_gdb_stacktrace_limit_frame_depth().
Referenced by sr_gdb_stacktrace_limit_frame_depth().
| struct sr_gdb_stacktrace * sr_gdb_stacktrace_new | ( | void | ) |
Creates and initializes a new stack trace structure.
References sr_gdb_stacktrace_new().
Referenced by sr_gdb_stacktrace_new().
| struct sr_gdb_stacktrace * sr_gdb_stacktrace_parse | ( | const char ** | input, |
| struct sr_location * | location ) |
Parses a textual stack trace and puts it into a structure. If parsing fails, the input parameter is not changed and NULL is returned.
| input | Pointer to the string with the stacktrace. If this function returns a non-NULL value, this pointer is modified to point after the stacktrace that was just parsed. |
| location | The caller must provide a pointer to an instance of sr_location here. The line and column members of the location are gradually increased as the parser handles the input, so the location should be initialized by sr_location_init() before calling this function to get reasonable values. When this function returns false (an error occurred), the structure will contain the error line, column, and message. |
References sr_gdb_stacktrace_parse().
Referenced by sr_gdb_stacktrace_parse().
| bool sr_gdb_stacktrace_parse_header | ( | const char ** | input, |
| struct sr_gdb_frame ** | frame, | ||
| struct sr_location * | location ) |
Parse stacktrace header if it is available in the stacktrace. The header usually contains frame where the program crashed.
| input | Pointer that will be moved to point behind the header if the header is successfully detected and parsed. |
| frame | If this function succeeds and returns true, *frame contains the crash frame that is usually a part of the header. If no frame is detected in the header, *frame is set to NULL. [New Thread 11919]
[New Thread 11917]
Core was generated by `evince file:
Program terminated with signal 8, Arithmetic exception.
#0 0x000000322a2362b9 in repeat (image=<value optimized out>,
mask=<value optimized out>, mask_bits=<value optimized out>)
at pixman-bits-image.c:145
145 pixman-bits-image.c: No such file or directory.
in pixman-bits-image.c
|
References sr_gdb_stacktrace_parse_header().
Referenced by sr_gdb_stacktrace_parse_header().
| float sr_gdb_stacktrace_quality_complex | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Evaluates the quality of the stacktrace. The quality is determined depending on the ratio of frames with function name fully known to all frames.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
References sr_gdb_stacktrace_quality_complex().
Referenced by sr_gdb_stacktrace_quality_complex().
| float sr_gdb_stacktrace_quality_simple | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Evaluates the quality of the stacktrace. The quality is the ratio of the number of frames with function name fully known to the number of all frames. This function does not take into account that some frames are more important than others.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
References sr_gdb_stacktrace_quality_simple().
Referenced by sr_gdb_stacktrace_quality_simple().
| void sr_gdb_stacktrace_remove_threads_except_one | ( | struct sr_gdb_stacktrace * | stacktrace, |
| struct sr_gdb_thread * | thread ) |
Removes all threads from the stacktrace and deletes them, except the one provided as a parameter.
| thread | This function does not check whether the thread is a member of the stacktrace. If it's not, all threads are removed from the stacktrace and then deleted. |
References sr_gdb_stacktrace_remove_threads_except_one().
Referenced by sr_gdb_stacktrace_remove_threads_except_one().
| void sr_gdb_stacktrace_set_crash_tid | ( | struct sr_gdb_stacktrace * | stacktrace, |
| uint32_t | tid ) |
Sets the crash TID, which is used to search for the crash thread, to the given value.
| tid | Value of the 'i' parameter passed on command line by Kernel when piping a core dump file to a program. |
References sr_gdb_stacktrace_set_crash_tid().
Referenced by sr_gdb_stacktrace_set_crash_tid().
| void sr_gdb_stacktrace_set_libnames | ( | struct sr_gdb_stacktrace * | stacktrace | ) |
Set library names in all frames in the stacktrace according to the the sharedlib data.
References sr_gdb_stacktrace_set_libnames().
Referenced by sr_gdb_stacktrace_set_libnames().
| char * sr_gdb_stacktrace_to_short_text | ( | struct sr_gdb_stacktrace * | stacktrace, |
| int | max_frames ) |
Return short text representation of the crash thread. The trace is normalized and functions without names (signal handlers) are removed.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
| max_frames | The maximum number of frames in the returned crash thread. Superfluous frames are not included in the output. |
References sr_gdb_stacktrace_to_short_text().
Referenced by sr_gdb_stacktrace_to_short_text().
| char * sr_gdb_stacktrace_to_text | ( | struct sr_gdb_stacktrace * | stacktrace, |
| bool | verbose ) |
Returns textual representation of the stacktrace.
| stacktrace | It must be non-NULL pointer. It's not modified by calling this function. |
References sr_gdb_stacktrace_to_text().
Referenced by sr_gdb_stacktrace_to_text().