A Linux kprobe location is an object which locates a Linux kprobe.
The purpose of such an object is to provide the location of the target Linux kprobe when you create a Linux kprobe event rule.
The two ways to locate a Linux kprobe are:
Get the type of a Linux kprobe location with lttng_kernel_probe_location_get_type().
Destroy a Linux kprobe location with lttng_kernel_probe_location_destroy().
◆ lttng_kernel_probe_location_status
Return type of Linux kprobe location API functions.
| Enumerator |
|---|
| LTTNG_KERNEL_PROBE_LOCATION_STATUS_OK | Success.
|
| LTTNG_KERNEL_PROBE_LOCATION_STATUS_INVALID | Unsatisfied precondition.
|
◆ lttng_kernel_probe_location_type
Linux kprobe location type.
Get the type of a Linux kprobe location with lttng_kernel_probe_location_get_type().
| Enumerator |
|---|
| LTTNG_KERNEL_PROBE_LOCATION_TYPE_SYMBOL_OFFSET | Offset from a named symbol.
|
| LTTNG_KERNEL_PROBE_LOCATION_TYPE_ADDRESS | Address within the kernel.
|
| LTTNG_KERNEL_PROBE_LOCATION_TYPE_UNKNOWN | Unknown (error).
|
◆ lttng_kernel_probe_location_address_create()
◆ lttng_kernel_probe_location_address_get_address()
Sets *address to the address within the kernel of the Linux kprobe location location.
- Parameters
-
| [in] | location | Linux kprobe location of which to get the address within the kernel. |
| [out] | address | On success, this function sets *address to the address (bytes) within the kernel of location. |
- Return values
-
- Precondition
-
◆ lttng_kernel_probe_location_destroy()
Destroys the Linux kprobe location location.
- Parameters
-
| [in] | location | Linux kprobe location to destroy.
May be NULL.
|
◆ lttng_kernel_probe_location_get_type()
Returns the type of the Linux kprobe location location.
- Parameters
-
| [in] | location | Linux kprobe location of which to get the type. |
- Returns
- Type of
location.
- Precondition
-
◆ lttng_kernel_probe_location_symbol_create()
Creates a Linux kprobe location at the offset offset bytes from the kernel symbol named symbol.
- Parameters
-
| [in] | symbol_name | Symbol name of the Linux kprobe location to create (copied). |
| [in] | offset | Offset (bytes) from symbol of the Linux kprobe location to create. |
- Returns
Linux kprobe location with the type LTTNG_KERNEL_PROBE_LOCATION_TYPE_SYMBOL_OFFSET on success, or NULL on error.
Destroy the returned location with lttng_kernel_probe_location_destroy().
- Precondition
-
◆ lttng_kernel_probe_location_symbol_get_name()
Returns the symbol name of the Linux kprobe location location.
- Parameters
-
| [in] | location | Linux kprobe location of which to get the symbol name. |
- Returns
Symbol name of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
- Precondition
-
- See also
- lttng_kernel_probe_location_symbol_get_offset() – Get the offset from symbol of a Linux kprobe location.
◆ lttng_kernel_probe_location_symbol_get_offset()
Sets *offset to the offset from symbol of the Linux kprobe location location.
- Parameters
-
| [in] | location | Linux kprobe location of which to get the offset from symbol. |
| [out] | offset | On success, this function sets *offset to the offset (bytes) from symbol of location. |
- Return values
-
- Precondition
-
- See also
- lttng_kernel_probe_location_symbol_get_name() – Get the symbol name of a Linux kprobe location.