Shared library information as produced by GDB.
More...
#include <stdbool.h>
#include <inttypes.h>
Go to the source code of this file.
|
enum | { SYMS_OK,
SYMS_WRONG,
SYMS_NOT_FOUND
} |
|
Shared library information as produced by GDB.
Definition in file sharedlib.h.
◆ sr_gdb_sharedlib_append()
Appends 'item' at the end of the list 'dest'.
- Returns
- This function returns the 'dest' sharedlib. If 'dest' is NULL, it returns the 'item' sharedlib.
◆ sr_gdb_sharedlib_count()
Returns the number of sharedlibs in the list.
◆ sr_gdb_sharedlib_dup()
Creates a duplicate of the sharedlib structure.
- Parameters
-
sharedlib | Structure to be duplicated. |
siblings | Whether to duplicate a single structure or whole list. |
- Returns
- Never returns NULL. Returns the duplicated structure or the first structure in the duplicated list.
◆ sr_gdb_sharedlib_find_address()
Finds whether the address belongs to some sharedlib from the list starting by 'first'.
- Returns
- Pointer to an existing structure or NULL if not found.
◆ sr_gdb_sharedlib_free()
Releases the memory held by the sharedlib. Sharedlibs referenced by .next are not released.
- Parameters
-
sharedlib | If sharedlib is NULL, no operation is performed. |
◆ sr_gdb_sharedlib_init()
Initializes all members of the sharedlib to default values. No memory is released, members are simply overwritten. This is useful for initializing a sharedlib structure placed on the stack.
◆ sr_gdb_sharedlib_new()
Creates and initializes a new sharedlib structure.
- Returns
- It never returns NULL. The returned pointer must be released by calling the function sr_gdb_sharedlib_free().
◆ sr_gdb_sharedlib_parse()
Parses the output of GDB's 'info sharedlib' command.
- Parameters
-
input | String representing the stacktrace. |
- Returns
- First element of the list of loaded libraries.