PT_LIBRARY_VERSION(3)

πŸ“¦ version 2.1.2, in fedora 43, fedora 44

πŸ’– PT_LIBRARY_VERSION πŸ’–

okay bestie, welcome to the manual page for pt_library_version β€” it lives in section 3 of the manual (that's the library-functions section, iykyk) and it's genuinely the cutest little function in the whole intel-pt decoder library. it tells you what version of the library you're actually holding in your hands. no cap. πŸŽ€


✨ NAME ✨

pt_library_version β€” version information πŸ’…


🌸 SYNOPSIS 🌸

so here's how you summon it, bestie:

#include <intel-pt.h>
struct pt_version pt_library_version();

and then β€” crucially β€” you gotta link with -lipt. don't forget. the linker will not be cute about it. 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

pt_library_version() returns the decoder library version. that's it. that's the whole vibe. it's giving "one job, done flawlessly". πŸ‘‘


🌈 RETURN VALUE 🌈

pt_library_version() hands you back a pt_version structure, and that structure is declared exactly like this, character for character, no edits, periodt:

/** The library version. */
struct pt_version {
    /** Major version number. */
    uint8_t major;

    /** Minor version number. */
    uint8_t minor;

    /** Patch level. */
    uint16_t patch;

    /** Build number. */
    uint32_t build;

    /** Version extension. */
    const char *ext;
};
lowkey obsessed with how tidy that is. major, minor, patch, build and a lil ext string at the end for the version extension. 🌟

and that's the whole page, bestie β€” you now know the function, the struct, the include, and the -lipt link flag. this was PT_LIBRARY_VERSION, page 3 of the manual, and it signed off with the same name at the bottom, dated like all the classic manpages are. 🫢 go check your library version, it's your main character moment. πŸ’–βœ¨

πŸ“¦ where this page comes from