idakit_sys/name.rs
1//! Name-classification flag bits ([`FF_NAME`], [`FF_LABL`]) and the name write (`set_name`).
2
3use std::ffi::{c_char, c_int};
4
5use crate::Address;
6
7/// `FF_NAME` (`bytes.hpp`): the address has an explicit or auto-generated name.
8///
9/// With [`FF_LABL`] it forms IDA's two-bit name classification. The SDK `#undef`s these at the
10/// end of the header, so the values are mirrored here and pinned to IDA's own predicates by an
11/// alignment test in `idakit`.
12pub const FF_NAME: u64 = 1 << 14;
13/// `FF_LABL` (`bytes.hpp`): the address has a dummy (address-derived) name. See [`FF_NAME`].
14pub const FF_LABL: u64 = 1 << 15;
15
16// name write (plain libida symbol)
17unsafe extern "C" {
18 /// Set `address`'s name to `name` under `flags` (`SN_*` bits); returns whether it succeeded.
19 pub fn set_name(address: Address, name: *const c_char, flags: c_int) -> bool;
20}