Skip to content

Commit afbfe8b

Browse files
committed
Documented the function info header
1 parent 87f7f06 commit afbfe8b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

include/functionInfo/functionInfo.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,43 @@ extern "C" {
3030
#include <stddef.h>
3131
#include <stdint.h>
3232

33+
/**
34+
* Represents the gathered information for a function.
35+
*
36+
* @since v2.1
37+
*/
3338
struct functionInfo {
39+
/** The beginning address of the function in memory. */
3440
uintptr_t begin;
41+
/** The length of the function. May include padding. */
3542
size_t length;
43+
/** Whether the requested function was found. */
3644
bool found;
3745
};
3846

47+
/**
48+
* @brief Loads the information for the function of the given name.
49+
*
50+
* The runtime image of the given name is searched for the function. If the
51+
* function is not found in it all loaded runtime images are searched. If no
52+
* runtime image of the given name is loaded all runtime images are searched.
53+
*
54+
* @param functionName the name of the function to load its information
55+
* @param libraryName the name of the runtime image to search first
56+
* @return the gathered information for the desired function
57+
* @since v2.1
58+
*/
3959
struct functionInfo functionInfo_loadHint(const char* functionName, const char* libraryName);
4060

61+
/**
62+
* @brief Loads the information for the function of the given name.
63+
*
64+
* All loaded runtime images are searched for the function.
65+
*
66+
* @param functionName the name of the function to load its information
67+
* @return the gathered information for the desired function
68+
* @since v2.1
69+
*/
4170
static inline struct functionInfo functionInfo_load(const char* functionName) {
4271
return functionInfo_loadHint(functionName, NULL);
4372
}

0 commit comments

Comments
 (0)