-
Notifications
You must be signed in to change notification settings - Fork 0
callstack.h
In this header the general access to the library can be found.
The structure of a callstack. It consists of the translation type and status, the backtrace and the translated callstack.
Creates a callstack of the calling function. The backtrace of the calling function is created.
The struct
is allocated and needs to be freed using the function callstack_delete(struct callstack *
.
Constructs the given callstack object. Stores the backtrace of the calling function. The callstack object
needs to be destructed using the function callstack_delete()
after use.
Constructs the given callstack object. Copies the given callstack into the given object. If the trace
is longer than
CALLSTACK_BACKTRACE_SIZE
,
only the first addresses are copied. The callstack object needs to be destructed using the function
callstack_delete()
after use.
Creates an array of strings out of the backtrace and returns it. The backtrace is only constructed
if it has ot already been created. Returns NULL
if an error happens.
The returned string array must not be freed.
Creates a single string out of the backtrace and returns it. The given separator character is used to
separate the lines. The string is allocated and needs to be free
d. Returns NULL
if an error happens.
Returns the number of frames stored in the given callstack.
Returns the type of the given callstack. See callstack_type.h for more information about the possible values.
Returns whether the given callstack is already translated.
Destroys the contents of the given callstack object.
Destroys and deallocates the given callstack object.
Copyright (C) 2022, 2024 mhahnFr.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".