package owee

  1. Overview
  2. Docs
type t = {
  1. addr : int64;
    (*

    address of the probe site

    *)
  2. semaphore : int64 option;
    (*

    address of the semaphore corresponding to the probe

    *)
  3. provider : string;
  4. name : string;
  5. args : string;
    (*

    probe arguments

    *)
}
val iter : Owee_buf.t -> Owee_elf.section array -> f:(t -> unit) -> unit

iter buf sections ~f applies f to each stapsdt note, in order of appearance in .notes.stapsdt section. Expects buf to point to the beginning of an elf file. Raises Section_not_found if .note.stapsdt section is not found. Raises if .note.stapsdt is found but .stapsdt.base is not. Raises if the owner is not "stapsdt" or the type is not 3 for version 3 of probes. Raises if parsing of notes fails for other reasons.

val find_base_address : Owee_elf.section array -> int64 option

Returns the start address of the .stapsdt.base section in ELF file, or None if the section is not present.

val adjust : int64 -> actual_base:int64 -> recorded_base:int64 -> int64

Adjust an address from a note for the prelink effect. actual_base is the start address of the .stapsdt.base section in ELF file, as returned by find_base_address and recorded_base is the address of that section as it appears in the note. They may be different if there is prelink, because prelink does not adjust notes' content for address offsets.