Skip to content

callstack_frame.h

mhahnFr edited this page Sep 7, 2024 · 8 revisions

In this header the callstack frame object is defined.

struct callstack_frame

This structure represents a translated callstack frame.

Note

Added in version 1.1.

char* binaryFile

The name of the binary file this frame originates from.

char* binaryFileRelative

The relative path of the name of the binary file.

Only available if C++ exclusive functions are enabled while compiling the library, see here for more information.

char* function

The name of the function this frame originates from.

char* sourceFile

The name of the source file this callstack frame lies in.

Can be NULL if it was not possible to map this frame to a source file.

char* sourceFileRelative

The relative path of the name of the source file.

Only available if C++ exclusive functions are enables while compiling the library, see here for more information.

bool sourceFileOutdated

Indicates whether the found source file has been modified since it contributed to this callstack frame.

A value of false indicates either that no modification has happened or that the modification information was not available.
A value of true indicates a modification has definitively happened.

Note

Added in version 1.2.

bool binaryFileIsSelf

Indicates whether the binary file this frame is in is the CallstackLibrary itself.

A value of false indicates either that the frame is not in the CallstackLibrary or that the origin is unknown.
A value of true indicates that the frame is definitively inside the CallstackLibrary.

Note

Added in version 2.0.

unsigned long sourceLine

The line number in the source file this frame is mapped to.

Only relevant in conjunction with sourceFile.

unsigned long sourceLineColumn

The source line column number.

A value of 0 indicates that the value is unknown.

Note

Since version 2.0, the field's type is unsigned long.

void callstack_frame_create(struct callstack_frame* self)

Initializes the given callstack frame.

Note

Added in version 1.1.

struct callstack_frame* callstack_frame_new(void)

Allocates and initializes a new instance of a callstack frame object.

Note

Added in version 1.1.

Allocates a new callstack frame object and deeply copies the given callstack frame object.

Note

Added in version 1.1.

void callstack_frame_copyHere(struct callstack_frame* destination, const struct callstack_frame* source)

Copies the given callstack frame object into the given destination.

Note

Added in version 1.1.

char* callstack_frame_getShortestName(const struct callstack_frame* self)

Returns the shortest binary file name available in the given callstack frame object.

Note

Added in version 1.1.

const char* callstack_frame_getShortestNameOr(const struct callstack_frame* self, const char* fallback)

Returns the shortest binary file name of the given callstack frame object.

If the given callstack frame object does not have a binary file name the given fallback is returned.

Note

Added in version 1.2.

char* callstack_frame_getShortestSourceFile(const struct callstack_frame* self)

Returns the shortest source file name available in the given callstack frame object.

Note

Added in version 1.1.

const char* callstack_frame_getShortestSourceFileOr(const struct callstack_frame* self, const char* fallback)

Returns the shortest source file name available in the given callstack frame object.

If the given callstack frame object does not have a source file name the given fallback is returned.

Note

Added in version 1.2.

void callstack_frame_destroy(struct callstack_frame* self)

Destructs the given callstack frame object.

Note

Added in version 1.1.

void callstack_frame_delete(struct callstack_frame* self)

Destructs and de-allocates the given callstack frame object.

Note

Added in version 1.1.