pub const IDAX_ERROR_NONE: u32 = 0;
pub const IDAX_ERROR_VALIDATION: u32 = 1;
pub const IDAX_ERROR_NOT_FOUND: u32 = 2;
pub const IDAX_ERROR_CONFLICT: u32 = 3;
pub const IDAX_ERROR_UNSUPPORTED: u32 = 4;
pub const IDAX_ERROR_SDK_FAILURE: u32 = 5;
pub const IDAX_ERROR_INTERNAL: u32 = 6;
unsafe extern "C" {
#[doc = " Get the error category from the last failed call (thread-local)."]
pub fn idax_last_error_category() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[doc = " Get the error code from the last failed call (thread-local)."]
pub fn idax_last_error_code() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
#[doc = " Get the error message from the last failed call (thread-local).\n Returns a pointer to a thread-local buffer. Do NOT free."]
pub fn idax_last_error_message() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
#[doc = " Free a malloc'd string returned by an idax function."]
pub fn idax_free_string(s: *mut ::std::os::raw::c_char);
}
unsafe extern "C" {
#[doc = " Free a malloc'd byte array returned by an idax function."]
pub fn idax_free_bytes(p: *mut u8);
}
unsafe extern "C" {
#[doc = " Free a malloc'd uint64 array returned by an idax function."]
pub fn idax_free_addresses(p: *mut u64);
}
unsafe extern "C" {
pub fn idax_database_init(
argc: ::std::os::raw::c_int,
argv: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_open(
path: *const ::std::os::raw::c_char,
auto_analysis: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_open_binary(
path: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_open_non_binary(
path: *const ::std::os::raw::c_char,
mode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_save() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_close(save: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_file_to_database(
file_path: *const ::std::os::raw::c_char,
file_offset: i64,
ea: u64,
size: u64,
patchable: ::std::os::raw::c_int,
remote: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_memory_to_database(
bytes: *const u8,
len: usize,
ea: u64,
file_offset: i64,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDatabaseCompilerInfo {
pub id: u32,
pub uncertain: ::std::os::raw::c_int,
pub name: *mut ::std::os::raw::c_char,
pub abbreviation: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDatabaseCompilerInfo"]
[::std::mem::size_of::<IdaxDatabaseCompilerInfo>() - 24usize];
["Alignment of IdaxDatabaseCompilerInfo"]
[::std::mem::align_of::<IdaxDatabaseCompilerInfo>() - 8usize];
["Offset of field: IdaxDatabaseCompilerInfo::id"]
[::std::mem::offset_of!(IdaxDatabaseCompilerInfo, id) - 0usize];
["Offset of field: IdaxDatabaseCompilerInfo::uncertain"]
[::std::mem::offset_of!(IdaxDatabaseCompilerInfo, uncertain) - 4usize];
["Offset of field: IdaxDatabaseCompilerInfo::name"]
[::std::mem::offset_of!(IdaxDatabaseCompilerInfo, name) - 8usize];
["Offset of field: IdaxDatabaseCompilerInfo::abbreviation"]
[::std::mem::offset_of!(IdaxDatabaseCompilerInfo, abbreviation) - 16usize];
};
impl Default for IdaxDatabaseCompilerInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_database_compiler_info(out: *mut IdaxDatabaseCompilerInfo)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_compiler_info_free(info: *mut IdaxDatabaseCompilerInfo);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDatabaseImportSymbol {
pub address: u64,
pub name: *mut ::std::os::raw::c_char,
pub ordinal: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDatabaseImportSymbol"]
[::std::mem::size_of::<IdaxDatabaseImportSymbol>() - 24usize];
["Alignment of IdaxDatabaseImportSymbol"]
[::std::mem::align_of::<IdaxDatabaseImportSymbol>() - 8usize];
["Offset of field: IdaxDatabaseImportSymbol::address"]
[::std::mem::offset_of!(IdaxDatabaseImportSymbol, address) - 0usize];
["Offset of field: IdaxDatabaseImportSymbol::name"]
[::std::mem::offset_of!(IdaxDatabaseImportSymbol, name) - 8usize];
["Offset of field: IdaxDatabaseImportSymbol::ordinal"]
[::std::mem::offset_of!(IdaxDatabaseImportSymbol, ordinal) - 16usize];
};
impl Default for IdaxDatabaseImportSymbol {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDatabaseImportModule {
pub index: usize,
pub name: *mut ::std::os::raw::c_char,
pub symbols: *mut IdaxDatabaseImportSymbol,
pub symbol_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDatabaseImportModule"]
[::std::mem::size_of::<IdaxDatabaseImportModule>() - 32usize];
["Alignment of IdaxDatabaseImportModule"]
[::std::mem::align_of::<IdaxDatabaseImportModule>() - 8usize];
["Offset of field: IdaxDatabaseImportModule::index"]
[::std::mem::offset_of!(IdaxDatabaseImportModule, index) - 0usize];
["Offset of field: IdaxDatabaseImportModule::name"]
[::std::mem::offset_of!(IdaxDatabaseImportModule, name) - 8usize];
["Offset of field: IdaxDatabaseImportModule::symbols"]
[::std::mem::offset_of!(IdaxDatabaseImportModule, symbols) - 16usize];
["Offset of field: IdaxDatabaseImportModule::symbol_count"]
[::std::mem::offset_of!(IdaxDatabaseImportModule, symbol_count) - 24usize];
};
impl Default for IdaxDatabaseImportModule {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_database_import_modules(
out: *mut *mut IdaxDatabaseImportModule,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_import_modules_free(modules: *mut IdaxDatabaseImportModule, count: usize);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDatabaseSnapshot {
pub id: i64,
pub flags: u16,
pub description: *mut ::std::os::raw::c_char,
pub filename: *mut ::std::os::raw::c_char,
pub children: *mut IdaxDatabaseSnapshot,
pub child_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDatabaseSnapshot"][::std::mem::size_of::<IdaxDatabaseSnapshot>() - 48usize];
["Alignment of IdaxDatabaseSnapshot"][::std::mem::align_of::<IdaxDatabaseSnapshot>() - 8usize];
["Offset of field: IdaxDatabaseSnapshot::id"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, id) - 0usize];
["Offset of field: IdaxDatabaseSnapshot::flags"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, flags) - 8usize];
["Offset of field: IdaxDatabaseSnapshot::description"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, description) - 16usize];
["Offset of field: IdaxDatabaseSnapshot::filename"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, filename) - 24usize];
["Offset of field: IdaxDatabaseSnapshot::children"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, children) - 32usize];
["Offset of field: IdaxDatabaseSnapshot::child_count"]
[::std::mem::offset_of!(IdaxDatabaseSnapshot, child_count) - 40usize];
};
impl Default for IdaxDatabaseSnapshot {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_database_snapshots(
out: *mut *mut IdaxDatabaseSnapshot,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_snapshots_free(snapshots: *mut IdaxDatabaseSnapshot, count: usize);
}
unsafe extern "C" {
pub fn idax_database_set_snapshot_description(
description: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_is_snapshot_database(
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_input_file_path(
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_file_type_name(
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_loader_format_name(
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_input_md5(out: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_image_base(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_min_address(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_max_address(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_processor_id(out: *mut i32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_processor_name(
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_address_bitness(out: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_is_big_endian(out: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_abi_name(out: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_database_address_span(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_mapped(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_loaded(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_code(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_data(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_unknown(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_head(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_is_tail(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_item_start(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_item_end(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_item_size(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_next_head(ea: u64, limit: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_prev_head(ea: u64, limit: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_next_not_tail(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_prev_not_tail(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_next_mapped(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_prev_mapped(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_find_first(
start: u64,
end: u64,
predicate: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_address_find_next(
ea: u64,
predicate: ::std::os::raw::c_int,
end: u64,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
#[doc = " Flat C representation of a segment snapshot."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxSegment {
pub start: u64,
pub end: u64,
pub bitness: ::std::os::raw::c_int,
#[doc = "< ida::segment::Type enum as int"]
pub type_: ::std::os::raw::c_int,
pub perm_read: ::std::os::raw::c_int,
pub perm_write: ::std::os::raw::c_int,
pub perm_exec: ::std::os::raw::c_int,
#[doc = "< malloc'd, free with idax_free_string"]
pub name: *mut ::std::os::raw::c_char,
#[doc = "< malloc'd, free with idax_free_string"]
pub class_name: *mut ::std::os::raw::c_char,
pub visible: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxSegment"][::std::mem::size_of::<IdaxSegment>() - 64usize];
["Alignment of IdaxSegment"][::std::mem::align_of::<IdaxSegment>() - 8usize];
["Offset of field: IdaxSegment::start"][::std::mem::offset_of!(IdaxSegment, start) - 0usize];
["Offset of field: IdaxSegment::end"][::std::mem::offset_of!(IdaxSegment, end) - 8usize];
["Offset of field: IdaxSegment::bitness"]
[::std::mem::offset_of!(IdaxSegment, bitness) - 16usize];
["Offset of field: IdaxSegment::type_"][::std::mem::offset_of!(IdaxSegment, type_) - 20usize];
["Offset of field: IdaxSegment::perm_read"]
[::std::mem::offset_of!(IdaxSegment, perm_read) - 24usize];
["Offset of field: IdaxSegment::perm_write"]
[::std::mem::offset_of!(IdaxSegment, perm_write) - 28usize];
["Offset of field: IdaxSegment::perm_exec"]
[::std::mem::offset_of!(IdaxSegment, perm_exec) - 32usize];
["Offset of field: IdaxSegment::name"][::std::mem::offset_of!(IdaxSegment, name) - 40usize];
["Offset of field: IdaxSegment::class_name"]
[::std::mem::offset_of!(IdaxSegment, class_name) - 48usize];
["Offset of field: IdaxSegment::visible"]
[::std::mem::offset_of!(IdaxSegment, visible) - 56usize];
};
impl Default for IdaxSegment {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
#[doc = " Free strings inside an IdaxSegment (does NOT free the struct itself)."]
pub fn idax_segment_free(seg: *mut IdaxSegment);
}
unsafe extern "C" {
pub fn idax_segment_at(ea: u64, out: *mut IdaxSegment) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_by_name(
name: *const ::std::os::raw::c_char,
out: *mut IdaxSegment,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_by_index(index: usize, out: *mut IdaxSegment) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_count(out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_create(
start: u64,
end: u64,
name: *const ::std::os::raw::c_char,
class_name: *const ::std::os::raw::c_char,
type_: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_remove(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_name(
ea: u64,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_class(
ea: u64,
class_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_type(ea: u64, type_: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_permissions(
ea: u64,
read: ::std::os::raw::c_int,
write: ::std::os::raw::c_int,
exec: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_bitness(ea: u64, bits: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_comment(
ea: u64,
repeatable: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_comment(
ea: u64,
text: *const ::std::os::raw::c_char,
repeatable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_resize(ea: u64, new_start: u64, new_end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_move(ea: u64, new_start: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_next(ea: u64, out: *mut IdaxSegment) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_prev(ea: u64, out: *mut IdaxSegment) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_default_segment_register(
ea: u64,
register_index: ::std::os::raw::c_int,
value: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_segment_set_default_segment_register_for_all(
register_index: ::std::os::raw::c_int,
value: u64,
) -> ::std::os::raw::c_int;
}
#[doc = " Flat C representation of a function snapshot."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxFunction {
pub start: u64,
pub end: u64,
#[doc = "< malloc'd, free with idax_free_string"]
pub name: *mut ::std::os::raw::c_char,
pub bitness: ::std::os::raw::c_int,
pub returns: ::std::os::raw::c_int,
pub is_library: ::std::os::raw::c_int,
pub is_thunk: ::std::os::raw::c_int,
pub is_visible: ::std::os::raw::c_int,
pub frame_local_size: u64,
pub frame_regs_size: u64,
pub frame_args_size: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxFunction"][::std::mem::size_of::<IdaxFunction>() - 72usize];
["Alignment of IdaxFunction"][::std::mem::align_of::<IdaxFunction>() - 8usize];
["Offset of field: IdaxFunction::start"][::std::mem::offset_of!(IdaxFunction, start) - 0usize];
["Offset of field: IdaxFunction::end"][::std::mem::offset_of!(IdaxFunction, end) - 8usize];
["Offset of field: IdaxFunction::name"][::std::mem::offset_of!(IdaxFunction, name) - 16usize];
["Offset of field: IdaxFunction::bitness"]
[::std::mem::offset_of!(IdaxFunction, bitness) - 24usize];
["Offset of field: IdaxFunction::returns"]
[::std::mem::offset_of!(IdaxFunction, returns) - 28usize];
["Offset of field: IdaxFunction::is_library"]
[::std::mem::offset_of!(IdaxFunction, is_library) - 32usize];
["Offset of field: IdaxFunction::is_thunk"]
[::std::mem::offset_of!(IdaxFunction, is_thunk) - 36usize];
["Offset of field: IdaxFunction::is_visible"]
[::std::mem::offset_of!(IdaxFunction, is_visible) - 40usize];
["Offset of field: IdaxFunction::frame_local_size"]
[::std::mem::offset_of!(IdaxFunction, frame_local_size) - 48usize];
["Offset of field: IdaxFunction::frame_regs_size"]
[::std::mem::offset_of!(IdaxFunction, frame_regs_size) - 56usize];
["Offset of field: IdaxFunction::frame_args_size"]
[::std::mem::offset_of!(IdaxFunction, frame_args_size) - 64usize];
};
impl Default for IdaxFunction {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
#[doc = " Free strings inside an IdaxFunction."]
pub fn idax_function_free(func: *mut IdaxFunction);
}
unsafe extern "C" {
pub fn idax_function_at(ea: u64, out: *mut IdaxFunction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_by_index(index: usize, out: *mut IdaxFunction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_count(out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_create(
start: u64,
end: u64,
out: *mut IdaxFunction,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_remove(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_name_at(
ea: u64,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_set_start(ea: u64, new_start: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_set_end(ea: u64, new_end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_update(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_reanalyze(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_comment(
ea: u64,
repeatable: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_set_comment(
ea: u64,
text: *const ::std::os::raw::c_char,
repeatable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_callers(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_callees(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_is_outlined(
ea: u64,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_set_outlined(
ea: u64,
outlined: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
#[doc = " Chunk descriptor."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxChunk {
pub start: u64,
pub end: u64,
pub is_tail: ::std::os::raw::c_int,
pub owner: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxChunk"][::std::mem::size_of::<IdaxChunk>() - 32usize];
["Alignment of IdaxChunk"][::std::mem::align_of::<IdaxChunk>() - 8usize];
["Offset of field: IdaxChunk::start"][::std::mem::offset_of!(IdaxChunk, start) - 0usize];
["Offset of field: IdaxChunk::end"][::std::mem::offset_of!(IdaxChunk, end) - 8usize];
["Offset of field: IdaxChunk::is_tail"][::std::mem::offset_of!(IdaxChunk, is_tail) - 16usize];
["Offset of field: IdaxChunk::owner"][::std::mem::offset_of!(IdaxChunk, owner) - 24usize];
};
unsafe extern "C" {
pub fn idax_function_chunks(
ea: u64,
out: *mut *mut IdaxChunk,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_chunk_count(ea: u64, out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_add_tail(
func_ea: u64,
tail_start: u64,
tail_end: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_remove_tail(func_ea: u64, tail_ea: u64) -> ::std::os::raw::c_int;
}
#[doc = " Stack frame variable."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxFrameVariable {
pub name: *mut ::std::os::raw::c_char,
pub byte_offset: usize,
pub byte_size: usize,
pub comment: *mut ::std::os::raw::c_char,
pub is_special: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxFrameVariable"][::std::mem::size_of::<IdaxFrameVariable>() - 40usize];
["Alignment of IdaxFrameVariable"][::std::mem::align_of::<IdaxFrameVariable>() - 8usize];
["Offset of field: IdaxFrameVariable::name"]
[::std::mem::offset_of!(IdaxFrameVariable, name) - 0usize];
["Offset of field: IdaxFrameVariable::byte_offset"]
[::std::mem::offset_of!(IdaxFrameVariable, byte_offset) - 8usize];
["Offset of field: IdaxFrameVariable::byte_size"]
[::std::mem::offset_of!(IdaxFrameVariable, byte_size) - 16usize];
["Offset of field: IdaxFrameVariable::comment"]
[::std::mem::offset_of!(IdaxFrameVariable, comment) - 24usize];
["Offset of field: IdaxFrameVariable::is_special"]
[::std::mem::offset_of!(IdaxFrameVariable, is_special) - 32usize];
};
impl Default for IdaxFrameVariable {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_frame_variable_free(var: *mut IdaxFrameVariable);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxRegisterVariable {
pub range_start: u64,
pub range_end: u64,
pub canonical_name: *mut ::std::os::raw::c_char,
pub user_name: *mut ::std::os::raw::c_char,
pub comment: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxRegisterVariable"][::std::mem::size_of::<IdaxRegisterVariable>() - 40usize];
["Alignment of IdaxRegisterVariable"][::std::mem::align_of::<IdaxRegisterVariable>() - 8usize];
["Offset of field: IdaxRegisterVariable::range_start"]
[::std::mem::offset_of!(IdaxRegisterVariable, range_start) - 0usize];
["Offset of field: IdaxRegisterVariable::range_end"]
[::std::mem::offset_of!(IdaxRegisterVariable, range_end) - 8usize];
["Offset of field: IdaxRegisterVariable::canonical_name"]
[::std::mem::offset_of!(IdaxRegisterVariable, canonical_name) - 16usize];
["Offset of field: IdaxRegisterVariable::user_name"]
[::std::mem::offset_of!(IdaxRegisterVariable, user_name) - 24usize];
["Offset of field: IdaxRegisterVariable::comment"]
[::std::mem::offset_of!(IdaxRegisterVariable, comment) - 32usize];
};
impl Default for IdaxRegisterVariable {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_register_variable_free(var: *mut IdaxRegisterVariable);
}
unsafe extern "C" {
pub fn idax_register_variables_free(vars: *mut IdaxRegisterVariable, count: usize);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxStackFrame {
pub local_variables_size: u64,
pub saved_registers_size: u64,
pub arguments_size: u64,
pub total_size: u64,
pub variables: *mut IdaxFrameVariable,
pub variable_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxStackFrame"][::std::mem::size_of::<IdaxStackFrame>() - 48usize];
["Alignment of IdaxStackFrame"][::std::mem::align_of::<IdaxStackFrame>() - 8usize];
["Offset of field: IdaxStackFrame::local_variables_size"]
[::std::mem::offset_of!(IdaxStackFrame, local_variables_size) - 0usize];
["Offset of field: IdaxStackFrame::saved_registers_size"]
[::std::mem::offset_of!(IdaxStackFrame, saved_registers_size) - 8usize];
["Offset of field: IdaxStackFrame::arguments_size"]
[::std::mem::offset_of!(IdaxStackFrame, arguments_size) - 16usize];
["Offset of field: IdaxStackFrame::total_size"]
[::std::mem::offset_of!(IdaxStackFrame, total_size) - 24usize];
["Offset of field: IdaxStackFrame::variables"]
[::std::mem::offset_of!(IdaxStackFrame, variables) - 32usize];
["Offset of field: IdaxStackFrame::variable_count"]
[::std::mem::offset_of!(IdaxStackFrame, variable_count) - 40usize];
};
impl Default for IdaxStackFrame {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_stack_frame_free(frame: *mut IdaxStackFrame);
}
unsafe extern "C" {
pub fn idax_function_frame(ea: u64, out: *mut IdaxStackFrame) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_sp_delta_at(ea: u64, out: *mut i64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_frame_variable_by_name(
ea: u64,
name: *const ::std::os::raw::c_char,
out: *mut IdaxFrameVariable,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_frame_variable_by_offset(
ea: u64,
byte_offset: usize,
out: *mut IdaxFrameVariable,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_define_stack_variable(
function_ea: u64,
name: *const ::std::os::raw::c_char,
frame_offset: i32,
type_: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_add_register_variable(
function_ea: u64,
range_start: u64,
range_end: u64,
register_name: *const ::std::os::raw::c_char,
user_name: *const ::std::os::raw::c_char,
comment: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_find_register_variable(
function_ea: u64,
ea: u64,
register_name: *const ::std::os::raw::c_char,
out: *mut IdaxRegisterVariable,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_remove_register_variable(
function_ea: u64,
range_start: u64,
range_end: u64,
register_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_rename_register_variable(
function_ea: u64,
ea: u64,
register_name: *const ::std::os::raw::c_char,
new_user_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_has_register_variables(
function_ea: u64,
ea: u64,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_register_variables(
function_ea: u64,
out: *mut *mut IdaxRegisterVariable,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_item_addresses(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_function_code_addresses(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
#[doc = " Flat C representation of an instruction operand."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxOperand {
pub index: ::std::os::raw::c_int,
#[doc = "< ida::instruction::OperandType as int"]
pub type_: ::std::os::raw::c_int,
pub register_id: u16,
pub value: u64,
pub target_address: u64,
pub byte_width: ::std::os::raw::c_int,
#[doc = "< malloc'd"]
pub register_name: *mut ::std::os::raw::c_char,
#[doc = "< ida::instruction::RegisterClass as int"]
pub register_class: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxOperand"][::std::mem::size_of::<IdaxOperand>() - 56usize];
["Alignment of IdaxOperand"][::std::mem::align_of::<IdaxOperand>() - 8usize];
["Offset of field: IdaxOperand::index"][::std::mem::offset_of!(IdaxOperand, index) - 0usize];
["Offset of field: IdaxOperand::type_"][::std::mem::offset_of!(IdaxOperand, type_) - 4usize];
["Offset of field: IdaxOperand::register_id"]
[::std::mem::offset_of!(IdaxOperand, register_id) - 8usize];
["Offset of field: IdaxOperand::value"][::std::mem::offset_of!(IdaxOperand, value) - 16usize];
["Offset of field: IdaxOperand::target_address"]
[::std::mem::offset_of!(IdaxOperand, target_address) - 24usize];
["Offset of field: IdaxOperand::byte_width"]
[::std::mem::offset_of!(IdaxOperand, byte_width) - 32usize];
["Offset of field: IdaxOperand::register_name"]
[::std::mem::offset_of!(IdaxOperand, register_name) - 40usize];
["Offset of field: IdaxOperand::register_class"]
[::std::mem::offset_of!(IdaxOperand, register_class) - 48usize];
};
impl Default for IdaxOperand {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " Flat C representation of a decoded instruction."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxInstruction {
pub address: u64,
pub size: u64,
pub opcode: u16,
#[doc = "< malloc'd"]
pub mnemonic: *mut ::std::os::raw::c_char,
#[doc = "< malloc'd array"]
pub operands: *mut IdaxOperand,
pub operand_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxInstruction"][::std::mem::size_of::<IdaxInstruction>() - 48usize];
["Alignment of IdaxInstruction"][::std::mem::align_of::<IdaxInstruction>() - 8usize];
["Offset of field: IdaxInstruction::address"]
[::std::mem::offset_of!(IdaxInstruction, address) - 0usize];
["Offset of field: IdaxInstruction::size"]
[::std::mem::offset_of!(IdaxInstruction, size) - 8usize];
["Offset of field: IdaxInstruction::opcode"]
[::std::mem::offset_of!(IdaxInstruction, opcode) - 16usize];
["Offset of field: IdaxInstruction::mnemonic"]
[::std::mem::offset_of!(IdaxInstruction, mnemonic) - 24usize];
["Offset of field: IdaxInstruction::operands"]
[::std::mem::offset_of!(IdaxInstruction, operands) - 32usize];
["Offset of field: IdaxInstruction::operand_count"]
[::std::mem::offset_of!(IdaxInstruction, operand_count) - 40usize];
};
impl Default for IdaxInstruction {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
#[doc = " Free all malloc'd fields inside an IdaxInstruction."]
pub fn idax_instruction_free(insn: *mut IdaxInstruction);
}
unsafe extern "C" {
pub fn idax_instruction_decode(ea: u64, out: *mut IdaxInstruction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_create(ea: u64, out: *mut IdaxInstruction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_text(
ea: u64,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_hex(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_decimal(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_octal(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_binary(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_character(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_float(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_format(
ea: u64,
n: ::std::os::raw::c_int,
format: ::std::os::raw::c_int,
base: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_offset(
ea: u64,
n: ::std::os::raw::c_int,
base: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_struct_offset_by_name(
ea: u64,
n: ::std::os::raw::c_int,
structure_name: *const ::std::os::raw::c_char,
delta: i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_struct_offset_by_id(
ea: u64,
n: ::std::os::raw::c_int,
structure_id: u64,
delta: i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_based_struct_offset(
ea: u64,
n: ::std::os::raw::c_int,
operand_value: u64,
base: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_struct_offset_path(
ea: u64,
n: ::std::os::raw::c_int,
out_ids: *mut *mut u64,
out_count: *mut usize,
out_delta: *mut i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_struct_offset_path_names(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_string_array_free(
values: *mut *mut ::std::os::raw::c_char,
count: usize,
);
}
unsafe extern "C" {
pub fn idax_instruction_set_operand_stack_variable(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_clear_operand_representation(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_set_forced_operand(
ea: u64,
n: ::std::os::raw::c_int,
text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_get_forced_operand(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_text(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_byte_width(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_register_name(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_operand_register_class(
ea: u64,
n: ::std::os::raw::c_int,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_toggle_operand_sign(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_toggle_operand_negate(
ea: u64,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_code_refs_from(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_data_refs_from(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_call_targets(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_jump_targets(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_has_fall_through(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_is_call(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_is_return(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_is_jump(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_is_conditional_jump(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_next(ea: u64, out: *mut IdaxInstruction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_instruction_prev(ea: u64, out: *mut IdaxInstruction) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_byte(ea: u64, out: *mut u8) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_word(ea: u64, out: *mut u16) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_dword(ea: u64, out: *mut u32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_qword(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_bytes(
ea: u64,
count: u64,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_read_string(
ea: u64,
max_len: u64,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_UNSIGNED_INTEGER: IdaxDataTypedValueKind = 0;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_SIGNED_INTEGER: IdaxDataTypedValueKind = 1;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_FLOATING_POINT: IdaxDataTypedValueKind = 2;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_POINTER: IdaxDataTypedValueKind = 3;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_STRING: IdaxDataTypedValueKind = 4;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_BYTES: IdaxDataTypedValueKind = 5;
pub const IdaxDataTypedValueKind_IDAX_DATA_TYPED_ARRAY: IdaxDataTypedValueKind = 6;
pub type IdaxDataTypedValueKind = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDataTypedValue {
pub kind: ::std::os::raw::c_int,
pub unsigned_value: u64,
pub signed_value: i64,
pub floating_value: f64,
pub pointer_value: u64,
pub string_value: *mut ::std::os::raw::c_char,
pub bytes: *mut u8,
pub byte_count: usize,
pub elements: *mut IdaxDataTypedValue,
pub element_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDataTypedValue"][::std::mem::size_of::<IdaxDataTypedValue>() - 80usize];
["Alignment of IdaxDataTypedValue"][::std::mem::align_of::<IdaxDataTypedValue>() - 8usize];
["Offset of field: IdaxDataTypedValue::kind"]
[::std::mem::offset_of!(IdaxDataTypedValue, kind) - 0usize];
["Offset of field: IdaxDataTypedValue::unsigned_value"]
[::std::mem::offset_of!(IdaxDataTypedValue, unsigned_value) - 8usize];
["Offset of field: IdaxDataTypedValue::signed_value"]
[::std::mem::offset_of!(IdaxDataTypedValue, signed_value) - 16usize];
["Offset of field: IdaxDataTypedValue::floating_value"]
[::std::mem::offset_of!(IdaxDataTypedValue, floating_value) - 24usize];
["Offset of field: IdaxDataTypedValue::pointer_value"]
[::std::mem::offset_of!(IdaxDataTypedValue, pointer_value) - 32usize];
["Offset of field: IdaxDataTypedValue::string_value"]
[::std::mem::offset_of!(IdaxDataTypedValue, string_value) - 40usize];
["Offset of field: IdaxDataTypedValue::bytes"]
[::std::mem::offset_of!(IdaxDataTypedValue, bytes) - 48usize];
["Offset of field: IdaxDataTypedValue::byte_count"]
[::std::mem::offset_of!(IdaxDataTypedValue, byte_count) - 56usize];
["Offset of field: IdaxDataTypedValue::elements"]
[::std::mem::offset_of!(IdaxDataTypedValue, elements) - 64usize];
["Offset of field: IdaxDataTypedValue::element_count"]
[::std::mem::offset_of!(IdaxDataTypedValue, element_count) - 72usize];
};
impl Default for IdaxDataTypedValue {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_data_read_typed(
ea: u64,
type_: *mut ::std::os::raw::c_void,
out: *mut IdaxDataTypedValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_write_typed(
ea: u64,
type_: *mut ::std::os::raw::c_void,
value: *const IdaxDataTypedValue,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_typed_value_free(value: *mut IdaxDataTypedValue);
}
unsafe extern "C" {
pub fn idax_data_write_byte(ea: u64, value: u8) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_write_word(ea: u64, value: u16) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_write_dword(ea: u64, value: u32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_write_qword(ea: u64, value: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_write_bytes(ea: u64, data: *const u8, len: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_patch_byte(ea: u64, value: u8) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_patch_word(ea: u64, value: u16) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_patch_dword(ea: u64, value: u32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_patch_qword(ea: u64, value: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_patch_bytes(ea: u64, data: *const u8, len: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_revert_patch(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_revert_patches(
ea: u64,
count: u64,
reverted: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_original_byte(ea: u64, out: *mut u8) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_original_word(ea: u64, out: *mut u16) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_original_dword(ea: u64, out: *mut u32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_original_qword(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_byte(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_word(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_dword(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_qword(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_oword(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_tbyte(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_float(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_double(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_string(ea: u64, length: u64, string_type: i32)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_define_struct(
ea: u64,
length: u64,
structure_id: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_undefine(ea: u64, count: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_data_find_binary_pattern(
start: u64,
end: u64,
pattern: *const ::std::os::raw::c_char,
forward: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_get(ea: u64, out: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_set(ea: u64, name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_force_set(
ea: u64,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_remove(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_demangled(
ea: u64,
form: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_resolve(
name: *const ::std::os::raw::c_char,
context: u64,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxNameEntry {
pub address: u64,
pub name: *mut ::std::os::raw::c_char,
pub user_defined: ::std::os::raw::c_int,
pub auto_generated: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxNameEntry"][::std::mem::size_of::<IdaxNameEntry>() - 24usize];
["Alignment of IdaxNameEntry"][::std::mem::align_of::<IdaxNameEntry>() - 8usize];
["Offset of field: IdaxNameEntry::address"]
[::std::mem::offset_of!(IdaxNameEntry, address) - 0usize];
["Offset of field: IdaxNameEntry::name"][::std::mem::offset_of!(IdaxNameEntry, name) - 8usize];
["Offset of field: IdaxNameEntry::user_defined"]
[::std::mem::offset_of!(IdaxNameEntry, user_defined) - 16usize];
["Offset of field: IdaxNameEntry::auto_generated"]
[::std::mem::offset_of!(IdaxNameEntry, auto_generated) - 20usize];
};
impl Default for IdaxNameEntry {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_name_all_user_defined(
start: u64,
end: u64,
out: *mut *mut IdaxNameEntry,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_entries_free(entries: *mut IdaxNameEntry, count: usize);
}
unsafe extern "C" {
pub fn idax_name_is_public(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_is_weak(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_is_user_defined(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_is_auto_generated(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_is_valid_identifier(
text: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_sanitize_identifier(
text: *const ::std::os::raw::c_char,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_set_public(ea: u64, value: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_name_set_weak(ea: u64, value: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[doc = " Flat C representation of a cross-reference."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxXref {
pub from: u64,
pub to: u64,
pub is_code: ::std::os::raw::c_int,
#[doc = "< ida::xref::ReferenceType as int"]
pub type_: ::std::os::raw::c_int,
pub user_defined: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxXref"][::std::mem::size_of::<IdaxXref>() - 32usize];
["Alignment of IdaxXref"][::std::mem::align_of::<IdaxXref>() - 8usize];
["Offset of field: IdaxXref::from"][::std::mem::offset_of!(IdaxXref, from) - 0usize];
["Offset of field: IdaxXref::to"][::std::mem::offset_of!(IdaxXref, to) - 8usize];
["Offset of field: IdaxXref::is_code"][::std::mem::offset_of!(IdaxXref, is_code) - 16usize];
["Offset of field: IdaxXref::type_"][::std::mem::offset_of!(IdaxXref, type_) - 20usize];
["Offset of field: IdaxXref::user_defined"]
[::std::mem::offset_of!(IdaxXref, user_defined) - 24usize];
};
unsafe extern "C" {
pub fn idax_xref_refs_from(
ea: u64,
out: *mut *mut IdaxXref,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_refs_to(
ea: u64,
out: *mut *mut IdaxXref,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_code_refs_from(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_code_refs_to(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_data_refs_from(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_data_refs_to(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_refs_from_range(
ea: u64,
out: *mut *mut IdaxXref,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_refs_to_range(
ea: u64,
out: *mut *mut IdaxXref,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_code_refs_from_range(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_code_refs_to_range(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_data_refs_from_range(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_data_refs_to_range(
ea: u64,
out: *mut *mut u64,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_add_code(
from: u64,
to: u64,
type_: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_add_data(
from: u64,
to: u64,
type_: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_remove_code(from: u64, to: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_xref_remove_data(from: u64, to: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_get(
ea: u64,
repeatable: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_set(
ea: u64,
text: *const ::std::os::raw::c_char,
repeatable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_append(
ea: u64,
text: *const ::std::os::raw::c_char,
repeatable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_remove(ea: u64, repeatable: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_add_anterior(
ea: u64,
text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_add_posterior(
ea: u64,
text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_get_anterior(
ea: u64,
line_index: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_get_posterior(
ea: u64,
line_index: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_set_anterior(
ea: u64,
line_index: ::std::os::raw::c_int,
text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_set_posterior(
ea: u64,
line_index: ::std::os::raw::c_int,
text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_clear_anterior(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_clear_posterior(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_remove_anterior_line(
ea: u64,
line_index: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_remove_posterior_line(
ea: u64,
line_index: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_set_anterior_lines(
ea: u64,
lines: *const *const ::std::os::raw::c_char,
count: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_set_posterior_lines(
ea: u64,
lines: *const *const ::std::os::raw::c_char,
count: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_anterior_lines(
ea: u64,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_posterior_lines(
ea: u64,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_comment_lines_free(lines: *mut *mut ::std::os::raw::c_char, count: usize);
}
unsafe extern "C" {
pub fn idax_comment_render(
ea: u64,
include_repeatable: ::std::os::raw::c_int,
include_extra_lines: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_text(
query: *const ::std::os::raw::c_char,
start: u64,
forward: ::std::os::raw::c_int,
case_sensitive: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_binary_pattern(
hex: *const ::std::os::raw::c_char,
start: u64,
forward: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_immediate(
value: u64,
start: u64,
forward: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_next_code(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_next_data(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_next_unknown(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_next_error(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_search_next_defined(ea: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_is_enabled() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_set_enabled(enabled: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_is_idle() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_wait() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_wait_range(start: u64, end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule_range(start: u64, end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule_code(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule_function(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule_reanalysis(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_schedule_reanalysis_range(start: u64, end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_cancel(start: u64, end: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_analysis_revert_decisions(start: u64, end: u64) -> ::std::os::raw::c_int;
}
#[doc = " Opaque type handle. Must be freed with idax_type_free()."]
pub type IdaxTypeHandle = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxTypeEnumMemberInput {
pub name: *const ::std::os::raw::c_char,
pub value: u64,
pub comment: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxTypeEnumMemberInput"][::std::mem::size_of::<IdaxTypeEnumMemberInput>() - 24usize];
["Alignment of IdaxTypeEnumMemberInput"]
[::std::mem::align_of::<IdaxTypeEnumMemberInput>() - 8usize];
["Offset of field: IdaxTypeEnumMemberInput::name"]
[::std::mem::offset_of!(IdaxTypeEnumMemberInput, name) - 0usize];
["Offset of field: IdaxTypeEnumMemberInput::value"]
[::std::mem::offset_of!(IdaxTypeEnumMemberInput, value) - 8usize];
["Offset of field: IdaxTypeEnumMemberInput::comment"]
[::std::mem::offset_of!(IdaxTypeEnumMemberInput, comment) - 16usize];
};
impl Default for IdaxTypeEnumMemberInput {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxTypeEnumMember {
pub name: *mut ::std::os::raw::c_char,
pub value: u64,
pub comment: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxTypeEnumMember"][::std::mem::size_of::<IdaxTypeEnumMember>() - 24usize];
["Alignment of IdaxTypeEnumMember"][::std::mem::align_of::<IdaxTypeEnumMember>() - 8usize];
["Offset of field: IdaxTypeEnumMember::name"]
[::std::mem::offset_of!(IdaxTypeEnumMember, name) - 0usize];
["Offset of field: IdaxTypeEnumMember::value"]
[::std::mem::offset_of!(IdaxTypeEnumMember, value) - 8usize];
["Offset of field: IdaxTypeEnumMember::comment"]
[::std::mem::offset_of!(IdaxTypeEnumMember, comment) - 16usize];
};
impl Default for IdaxTypeEnumMember {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxTypeMember {
pub name: *mut ::std::os::raw::c_char,
pub type_: IdaxTypeHandle,
pub byte_offset: usize,
pub bit_size: usize,
pub comment: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxTypeMember"][::std::mem::size_of::<IdaxTypeMember>() - 40usize];
["Alignment of IdaxTypeMember"][::std::mem::align_of::<IdaxTypeMember>() - 8usize];
["Offset of field: IdaxTypeMember::name"]
[::std::mem::offset_of!(IdaxTypeMember, name) - 0usize];
["Offset of field: IdaxTypeMember::type_"]
[::std::mem::offset_of!(IdaxTypeMember, type_) - 8usize];
["Offset of field: IdaxTypeMember::byte_offset"]
[::std::mem::offset_of!(IdaxTypeMember, byte_offset) - 16usize];
["Offset of field: IdaxTypeMember::bit_size"]
[::std::mem::offset_of!(IdaxTypeMember, bit_size) - 24usize];
["Offset of field: IdaxTypeMember::comment"]
[::std::mem::offset_of!(IdaxTypeMember, comment) - 32usize];
};
impl Default for IdaxTypeMember {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_type_void() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_int8() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_int16() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_int32() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_int64() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_uint8() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_uint16() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_uint32() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_uint64() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_float32() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_float64() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_pointer_to(target: IdaxTypeHandle) -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_array_of(element: IdaxTypeHandle, count: usize) -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_create_struct() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_create_union() -> IdaxTypeHandle;
}
unsafe extern "C" {
pub fn idax_type_free(ti: IdaxTypeHandle);
}
unsafe extern "C" {
pub fn idax_type_clone(ti: IdaxTypeHandle, out: *mut IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_function_type(
return_type: IdaxTypeHandle,
argument_types: *const IdaxTypeHandle,
argument_count: usize,
calling_convention: ::std::os::raw::c_int,
has_varargs: ::std::os::raw::c_int,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_enum_type(
members: *const IdaxTypeEnumMemberInput,
member_count: usize,
byte_width: usize,
bitmask: ::std::os::raw::c_int,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_void(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_integer(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_floating_point(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_pointer(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_array(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_function(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_struct(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_union(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_enum(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_typedef(ti: IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_size(ti: IdaxTypeHandle, out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_to_string(
ti: IdaxTypeHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_pointee_type(
ti: IdaxTypeHandle,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_array_element_type(
ti: IdaxTypeHandle,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_array_length(ti: IdaxTypeHandle, out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_resolve_typedef(
ti: IdaxTypeHandle,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_function_return_type(
ti: IdaxTypeHandle,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_function_argument_types(
ti: IdaxTypeHandle,
out: *mut *mut IdaxTypeHandle,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_calling_convention(
ti: IdaxTypeHandle,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_is_variadic_function(
ti: IdaxTypeHandle,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_enum_members(
ti: IdaxTypeHandle,
out: *mut *mut IdaxTypeEnumMember,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_by_name(
name: *const ::std::os::raw::c_char,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_from_declaration(
c_decl: *const ::std::os::raw::c_char,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_apply(ti: IdaxTypeHandle, ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_save_as(
ti: IdaxTypeHandle,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_retrieve(ea: u64, out: *mut IdaxTypeHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_retrieve_operand(
ea: u64,
operand_index: ::std::os::raw::c_int,
out: *mut IdaxTypeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_remove(ea: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_member_count(ti: IdaxTypeHandle, out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_members(
ti: IdaxTypeHandle,
out: *mut *mut IdaxTypeMember,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_member_by_name(
ti: IdaxTypeHandle,
name: *const ::std::os::raw::c_char,
out: *mut IdaxTypeMember,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_member_by_offset(
ti: IdaxTypeHandle,
byte_offset: usize,
out: *mut IdaxTypeMember,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_add_member(
ti: IdaxTypeHandle,
name: *const ::std::os::raw::c_char,
member_type: IdaxTypeHandle,
byte_offset: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_load_library(
til_name: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_unload_library(
til_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_local_type_count(out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_local_type_name(
ordinal: usize,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_import(
source_til_name: *const ::std::os::raw::c_char,
type_name: *const ::std::os::raw::c_char,
out: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_apply_named(
ea: u64,
type_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_type_handle_array_free(handles: *mut IdaxTypeHandle, count: usize);
}
unsafe extern "C" {
pub fn idax_type_enum_members_free(members: *mut IdaxTypeEnumMember, count: usize);
}
unsafe extern "C" {
pub fn idax_type_member_free(member: *mut IdaxTypeMember);
}
unsafe extern "C" {
pub fn idax_type_members_free(members: *mut IdaxTypeMember, count: usize);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxEntryPoint {
pub ordinal: u64,
pub address: u64,
#[doc = "< malloc'd"]
pub name: *mut ::std::os::raw::c_char,
#[doc = "< malloc'd"]
pub forwarder: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxEntryPoint"][::std::mem::size_of::<IdaxEntryPoint>() - 32usize];
["Alignment of IdaxEntryPoint"][::std::mem::align_of::<IdaxEntryPoint>() - 8usize];
["Offset of field: IdaxEntryPoint::ordinal"]
[::std::mem::offset_of!(IdaxEntryPoint, ordinal) - 0usize];
["Offset of field: IdaxEntryPoint::address"]
[::std::mem::offset_of!(IdaxEntryPoint, address) - 8usize];
["Offset of field: IdaxEntryPoint::name"]
[::std::mem::offset_of!(IdaxEntryPoint, name) - 16usize];
["Offset of field: IdaxEntryPoint::forwarder"]
[::std::mem::offset_of!(IdaxEntryPoint, forwarder) - 24usize];
};
impl Default for IdaxEntryPoint {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_entry_free(entry: *mut IdaxEntryPoint);
}
unsafe extern "C" {
pub fn idax_entry_count(out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_by_index(index: usize, out: *mut IdaxEntryPoint) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_by_ordinal(ordinal: u64, out: *mut IdaxEntryPoint) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_add(
ordinal: u64,
address: u64,
name: *const ::std::os::raw::c_char,
make_code: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_rename(
ordinal: u64,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_forwarder(
ordinal: u64,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_set_forwarder(
ordinal: u64,
target: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_entry_clear_forwarder(ordinal: u64) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxFixup {
pub source: u64,
pub type_: ::std::os::raw::c_int,
pub flags: u32,
pub base: u64,
pub target: u64,
pub selector: u16,
pub offset: u64,
pub displacement: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxFixup"][::std::mem::size_of::<IdaxFixup>() - 56usize];
["Alignment of IdaxFixup"][::std::mem::align_of::<IdaxFixup>() - 8usize];
["Offset of field: IdaxFixup::source"][::std::mem::offset_of!(IdaxFixup, source) - 0usize];
["Offset of field: IdaxFixup::type_"][::std::mem::offset_of!(IdaxFixup, type_) - 8usize];
["Offset of field: IdaxFixup::flags"][::std::mem::offset_of!(IdaxFixup, flags) - 12usize];
["Offset of field: IdaxFixup::base"][::std::mem::offset_of!(IdaxFixup, base) - 16usize];
["Offset of field: IdaxFixup::target"][::std::mem::offset_of!(IdaxFixup, target) - 24usize];
["Offset of field: IdaxFixup::selector"][::std::mem::offset_of!(IdaxFixup, selector) - 32usize];
["Offset of field: IdaxFixup::offset"][::std::mem::offset_of!(IdaxFixup, offset) - 40usize];
["Offset of field: IdaxFixup::displacement"]
[::std::mem::offset_of!(IdaxFixup, displacement) - 48usize];
};
unsafe extern "C" {
pub fn idax_fixup_at(source: u64, out: *mut IdaxFixup) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_set(source: u64, fixup: *const IdaxFixup) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_remove(source: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_exists(source: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_contains(start: u64, size: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_in_range(
start: u64,
end: u64,
out: *mut *mut IdaxFixup,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_first(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_next(address: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_prev(address: u64, out: *mut u64) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxFixupCustomHandler {
pub name: *const ::std::os::raw::c_char,
pub properties: u32,
pub size: u8,
pub width: u8,
pub shift: u8,
pub reference_type: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxFixupCustomHandler"][::std::mem::size_of::<IdaxFixupCustomHandler>() - 24usize];
["Alignment of IdaxFixupCustomHandler"]
[::std::mem::align_of::<IdaxFixupCustomHandler>() - 8usize];
["Offset of field: IdaxFixupCustomHandler::name"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, name) - 0usize];
["Offset of field: IdaxFixupCustomHandler::properties"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, properties) - 8usize];
["Offset of field: IdaxFixupCustomHandler::size"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, size) - 12usize];
["Offset of field: IdaxFixupCustomHandler::width"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, width) - 13usize];
["Offset of field: IdaxFixupCustomHandler::shift"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, shift) - 14usize];
["Offset of field: IdaxFixupCustomHandler::reference_type"]
[::std::mem::offset_of!(IdaxFixupCustomHandler, reference_type) - 16usize];
};
impl Default for IdaxFixupCustomHandler {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_fixup_register_custom(
handler: *const IdaxFixupCustomHandler,
out: *mut u16,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_unregister_custom(custom_type: u16) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_fixup_find_custom(
name: *const ::std::os::raw::c_char,
out: *mut u16,
) -> ::std::os::raw::c_int;
}
#[doc = " Flat C transfer model for ida::event::Event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxEvent {
pub kind: ::std::os::raw::c_int,
pub address: u64,
pub secondary_address: u64,
pub new_name: *const ::std::os::raw::c_char,
pub old_name: *const ::std::os::raw::c_char,
pub old_value: u32,
pub repeatable: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxEvent"][::std::mem::size_of::<IdaxEvent>() - 48usize];
["Alignment of IdaxEvent"][::std::mem::align_of::<IdaxEvent>() - 8usize];
["Offset of field: IdaxEvent::kind"][::std::mem::offset_of!(IdaxEvent, kind) - 0usize];
["Offset of field: IdaxEvent::address"][::std::mem::offset_of!(IdaxEvent, address) - 8usize];
["Offset of field: IdaxEvent::secondary_address"]
[::std::mem::offset_of!(IdaxEvent, secondary_address) - 16usize];
["Offset of field: IdaxEvent::new_name"][::std::mem::offset_of!(IdaxEvent, new_name) - 24usize];
["Offset of field: IdaxEvent::old_name"][::std::mem::offset_of!(IdaxEvent, old_name) - 32usize];
["Offset of field: IdaxEvent::old_value"]
[::std::mem::offset_of!(IdaxEvent, old_value) - 40usize];
["Offset of field: IdaxEvent::repeatable"]
[::std::mem::offset_of!(IdaxEvent, repeatable) - 44usize];
};
impl Default for IdaxEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " Legacy generic event callback.\n Kept for backwards compatibility."]
pub type IdaxEventCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event_kind: ::std::os::raw::c_int,
address: u64,
secondary: u64,
),
>;
pub type IdaxEventSegmentAddedCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, start: u64)>;
pub type IdaxEventSegmentDeletedCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, start: u64, end: u64),
>;
pub type IdaxEventFunctionAddedCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, entry: u64)>;
pub type IdaxEventFunctionDeletedCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, entry: u64)>;
pub type IdaxEventRenamedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
address: u64,
new_name: *const ::std::os::raw::c_char,
old_name: *const ::std::os::raw::c_char,
),
>;
pub type IdaxEventBytePatchedCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, address: u64, old_value: u32),
>;
pub type IdaxEventCommentChangedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
address: u64,
repeatable: ::std::os::raw::c_int,
),
>;
pub type IdaxEventExCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, event: *const IdaxEvent),
>;
pub type IdaxEventFilterCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxEvent,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn idax_event_subscribe(
event_kind: ::std::os::raw::c_int,
callback: IdaxEventCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_segment_added(
callback: IdaxEventSegmentAddedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_segment_deleted(
callback: IdaxEventSegmentDeletedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_function_added(
callback: IdaxEventFunctionAddedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_function_deleted(
callback: IdaxEventFunctionDeletedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_renamed(
callback: IdaxEventRenamedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_byte_patched(
callback: IdaxEventBytePatchedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_comment_changed(
callback: IdaxEventCommentChangedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_event(
callback: IdaxEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_on_event_filtered(
filter: IdaxEventFilterCallback,
callback: IdaxEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_event_unsubscribe(token: u64) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxPluginActionContext {
pub action_id: *const ::std::os::raw::c_char,
pub widget_title: *const ::std::os::raw::c_char,
pub widget_type: ::std::os::raw::c_int,
pub current_address: u64,
pub current_value: u64,
pub has_selection: ::std::os::raw::c_int,
pub is_external_address: ::std::os::raw::c_int,
pub register_name: *const ::std::os::raw::c_char,
pub widget_handle: *mut ::std::os::raw::c_void,
pub focused_widget_handle: *mut ::std::os::raw::c_void,
pub decompiler_view_handle: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxPluginActionContext"][::std::mem::size_of::<IdaxPluginActionContext>() - 80usize];
["Alignment of IdaxPluginActionContext"]
[::std::mem::align_of::<IdaxPluginActionContext>() - 8usize];
["Offset of field: IdaxPluginActionContext::action_id"]
[::std::mem::offset_of!(IdaxPluginActionContext, action_id) - 0usize];
["Offset of field: IdaxPluginActionContext::widget_title"]
[::std::mem::offset_of!(IdaxPluginActionContext, widget_title) - 8usize];
["Offset of field: IdaxPluginActionContext::widget_type"]
[::std::mem::offset_of!(IdaxPluginActionContext, widget_type) - 16usize];
["Offset of field: IdaxPluginActionContext::current_address"]
[::std::mem::offset_of!(IdaxPluginActionContext, current_address) - 24usize];
["Offset of field: IdaxPluginActionContext::current_value"]
[::std::mem::offset_of!(IdaxPluginActionContext, current_value) - 32usize];
["Offset of field: IdaxPluginActionContext::has_selection"]
[::std::mem::offset_of!(IdaxPluginActionContext, has_selection) - 40usize];
["Offset of field: IdaxPluginActionContext::is_external_address"]
[::std::mem::offset_of!(IdaxPluginActionContext, is_external_address) - 44usize];
["Offset of field: IdaxPluginActionContext::register_name"]
[::std::mem::offset_of!(IdaxPluginActionContext, register_name) - 48usize];
["Offset of field: IdaxPluginActionContext::widget_handle"]
[::std::mem::offset_of!(IdaxPluginActionContext, widget_handle) - 56usize];
["Offset of field: IdaxPluginActionContext::focused_widget_handle"]
[::std::mem::offset_of!(IdaxPluginActionContext, focused_widget_handle) - 64usize];
["Offset of field: IdaxPluginActionContext::decompiler_view_handle"]
[::std::mem::offset_of!(IdaxPluginActionContext, decompiler_view_handle) - 72usize];
};
impl Default for IdaxPluginActionContext {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type IdaxActionHandler =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void)>;
pub type IdaxActionHandlerEx = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
action_context: *const IdaxPluginActionContext,
),
>;
pub type IdaxActionEnabledCheck = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type IdaxActionEnabledCheckEx = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
action_context: *const IdaxPluginActionContext,
) -> ::std::os::raw::c_int,
>;
pub type IdaxPluginHostCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
host: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn idax_plugin_register_action(
id: *const ::std::os::raw::c_char,
label: *const ::std::os::raw::c_char,
hotkey: *const ::std::os::raw::c_char,
tooltip: *const ::std::os::raw::c_char,
icon: ::std::os::raw::c_int,
handler: IdaxActionHandler,
handler_context: *mut ::std::os::raw::c_void,
enabled_check: IdaxActionEnabledCheck,
enabled_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_register_action_ex(
id: *const ::std::os::raw::c_char,
label: *const ::std::os::raw::c_char,
hotkey: *const ::std::os::raw::c_char,
tooltip: *const ::std::os::raw::c_char,
icon: ::std::os::raw::c_int,
handler: IdaxActionHandler,
handler_ex: IdaxActionHandlerEx,
handler_context: *mut ::std::os::raw::c_void,
enabled_check: IdaxActionEnabledCheck,
enabled_check_ex: IdaxActionEnabledCheckEx,
enabled_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_unregister_action(
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_attach_to_menu(
menu_path: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_attach_to_toolbar(
toolbar: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_attach_to_popup(
widget_title: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_detach_from_menu(
menu_path: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_detach_from_toolbar(
toolbar: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_detach_from_popup(
widget_title: *const ::std::os::raw::c_char,
action_id: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_action_context_widget_host(
action_context: *const IdaxPluginActionContext,
out: *mut *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_action_context_with_widget_host(
action_context: *const IdaxPluginActionContext,
callback: IdaxPluginHostCallback,
callback_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_action_context_decompiler_view_host(
action_context: *const IdaxPluginActionContext,
out: *mut *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_plugin_action_context_with_decompiler_view_host(
action_context: *const IdaxPluginActionContext,
callback: IdaxPluginHostCallback,
callback_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxLoaderLoadFlags {
pub create_segments: ::std::os::raw::c_int,
pub load_resources: ::std::os::raw::c_int,
pub rename_entries: ::std::os::raw::c_int,
pub manual_load: ::std::os::raw::c_int,
pub fill_gaps: ::std::os::raw::c_int,
pub create_import_segment: ::std::os::raw::c_int,
pub first_file: ::std::os::raw::c_int,
pub binary_code_segment: ::std::os::raw::c_int,
pub reload: ::std::os::raw::c_int,
pub auto_flat_group: ::std::os::raw::c_int,
pub mini_database: ::std::os::raw::c_int,
pub loader_options_dialog: ::std::os::raw::c_int,
pub load_all_segments: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxLoaderLoadFlags"][::std::mem::size_of::<IdaxLoaderLoadFlags>() - 52usize];
["Alignment of IdaxLoaderLoadFlags"][::std::mem::align_of::<IdaxLoaderLoadFlags>() - 4usize];
["Offset of field: IdaxLoaderLoadFlags::create_segments"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, create_segments) - 0usize];
["Offset of field: IdaxLoaderLoadFlags::load_resources"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, load_resources) - 4usize];
["Offset of field: IdaxLoaderLoadFlags::rename_entries"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, rename_entries) - 8usize];
["Offset of field: IdaxLoaderLoadFlags::manual_load"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, manual_load) - 12usize];
["Offset of field: IdaxLoaderLoadFlags::fill_gaps"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, fill_gaps) - 16usize];
["Offset of field: IdaxLoaderLoadFlags::create_import_segment"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, create_import_segment) - 20usize];
["Offset of field: IdaxLoaderLoadFlags::first_file"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, first_file) - 24usize];
["Offset of field: IdaxLoaderLoadFlags::binary_code_segment"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, binary_code_segment) - 28usize];
["Offset of field: IdaxLoaderLoadFlags::reload"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, reload) - 32usize];
["Offset of field: IdaxLoaderLoadFlags::auto_flat_group"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, auto_flat_group) - 36usize];
["Offset of field: IdaxLoaderLoadFlags::mini_database"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, mini_database) - 40usize];
["Offset of field: IdaxLoaderLoadFlags::loader_options_dialog"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, loader_options_dialog) - 44usize];
["Offset of field: IdaxLoaderLoadFlags::load_all_segments"]
[::std::mem::offset_of!(IdaxLoaderLoadFlags, load_all_segments) - 48usize];
};
unsafe extern "C" {
pub fn idax_loader_decode_load_flags(
raw_flags: u16,
out: *mut IdaxLoaderLoadFlags,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_encode_load_flags(
flags: *const IdaxLoaderLoadFlags,
out_raw_flags: *mut u16,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_file_to_database(
li_handle: *mut ::std::os::raw::c_void,
file_offset: i64,
ea: u64,
size: u64,
patchable: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_memory_to_database(
data: *const u8,
ea: u64,
size: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_abort_load(message: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn idax_loader_input_size(
li_handle: *mut ::std::os::raw::c_void,
out: *mut i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_tell(
li_handle: *mut ::std::os::raw::c_void,
out: *mut i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_seek(
li_handle: *mut ::std::os::raw::c_void,
offset: i64,
out: *mut i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_read_bytes(
li_handle: *mut ::std::os::raw::c_void,
count: usize,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_read_bytes_at(
li_handle: *mut ::std::os::raw::c_void,
offset: i64,
count: usize,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_read_string(
li_handle: *mut ::std::os::raw::c_void,
offset: i64,
max_len: usize,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_input_filename(
li_handle: *mut ::std::os::raw::c_void,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_set_processor(
processor_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_loader_create_filename_comment() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxThreadInfo {
pub id: ::std::os::raw::c_int,
#[doc = "< malloc'd"]
pub name: *mut ::std::os::raw::c_char,
pub is_current: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxThreadInfo"][::std::mem::size_of::<IdaxThreadInfo>() - 24usize];
["Alignment of IdaxThreadInfo"][::std::mem::align_of::<IdaxThreadInfo>() - 8usize];
["Offset of field: IdaxThreadInfo::id"][::std::mem::offset_of!(IdaxThreadInfo, id) - 0usize];
["Offset of field: IdaxThreadInfo::name"]
[::std::mem::offset_of!(IdaxThreadInfo, name) - 8usize];
["Offset of field: IdaxThreadInfo::is_current"]
[::std::mem::offset_of!(IdaxThreadInfo, is_current) - 16usize];
};
impl Default for IdaxThreadInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxBackendInfo {
#[doc = "< malloc'd"]
pub name: *mut ::std::os::raw::c_char,
#[doc = "< malloc'd"]
pub display_name: *mut ::std::os::raw::c_char,
pub remote: ::std::os::raw::c_int,
pub supports_appcall: ::std::os::raw::c_int,
pub supports_attach: ::std::os::raw::c_int,
pub loaded: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxBackendInfo"][::std::mem::size_of::<IdaxBackendInfo>() - 32usize];
["Alignment of IdaxBackendInfo"][::std::mem::align_of::<IdaxBackendInfo>() - 8usize];
["Offset of field: IdaxBackendInfo::name"]
[::std::mem::offset_of!(IdaxBackendInfo, name) - 0usize];
["Offset of field: IdaxBackendInfo::display_name"]
[::std::mem::offset_of!(IdaxBackendInfo, display_name) - 8usize];
["Offset of field: IdaxBackendInfo::remote"]
[::std::mem::offset_of!(IdaxBackendInfo, remote) - 16usize];
["Offset of field: IdaxBackendInfo::supports_appcall"]
[::std::mem::offset_of!(IdaxBackendInfo, supports_appcall) - 20usize];
["Offset of field: IdaxBackendInfo::supports_attach"]
[::std::mem::offset_of!(IdaxBackendInfo, supports_attach) - 24usize];
["Offset of field: IdaxBackendInfo::loaded"]
[::std::mem::offset_of!(IdaxBackendInfo, loaded) - 28usize];
};
impl Default for IdaxBackendInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerRegisterInfo {
#[doc = "< malloc'd"]
pub name: *mut ::std::os::raw::c_char,
pub read_only: ::std::os::raw::c_int,
pub instruction_pointer: ::std::os::raw::c_int,
pub stack_pointer: ::std::os::raw::c_int,
pub frame_pointer: ::std::os::raw::c_int,
pub may_contain_address: ::std::os::raw::c_int,
pub custom_format: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerRegisterInfo"]
[::std::mem::size_of::<IdaxDebuggerRegisterInfo>() - 32usize];
["Alignment of IdaxDebuggerRegisterInfo"]
[::std::mem::align_of::<IdaxDebuggerRegisterInfo>() - 8usize];
["Offset of field: IdaxDebuggerRegisterInfo::name"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, name) - 0usize];
["Offset of field: IdaxDebuggerRegisterInfo::read_only"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, read_only) - 8usize];
["Offset of field: IdaxDebuggerRegisterInfo::instruction_pointer"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, instruction_pointer) - 12usize];
["Offset of field: IdaxDebuggerRegisterInfo::stack_pointer"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, stack_pointer) - 16usize];
["Offset of field: IdaxDebuggerRegisterInfo::frame_pointer"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, frame_pointer) - 20usize];
["Offset of field: IdaxDebuggerRegisterInfo::may_contain_address"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, may_contain_address) - 24usize];
["Offset of field: IdaxDebuggerRegisterInfo::custom_format"]
[::std::mem::offset_of!(IdaxDebuggerRegisterInfo, custom_format) - 28usize];
};
impl Default for IdaxDebuggerRegisterInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_SIGNED_INTEGER:
IdaxDebuggerAppcallValueKind = 0;
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_UNSIGNED_INTEGER:
IdaxDebuggerAppcallValueKind = 1;
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_FLOATING_POINT:
IdaxDebuggerAppcallValueKind = 2;
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_STRING: IdaxDebuggerAppcallValueKind =
3;
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_ADDRESS: IdaxDebuggerAppcallValueKind =
4;
pub const IdaxDebuggerAppcallValueKind_IDAX_DEBUGGER_APPCALL_BOOLEAN: IdaxDebuggerAppcallValueKind =
5;
pub type IdaxDebuggerAppcallValueKind = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerAppcallValue {
pub kind: ::std::os::raw::c_int,
pub signed_value: i64,
pub unsigned_value: u64,
pub floating_value: f64,
#[doc = "< malloc'd for output, nullable"]
pub string_value: *mut ::std::os::raw::c_char,
pub address_value: u64,
pub boolean_value: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerAppcallValue"]
[::std::mem::size_of::<IdaxDebuggerAppcallValue>() - 56usize];
["Alignment of IdaxDebuggerAppcallValue"]
[::std::mem::align_of::<IdaxDebuggerAppcallValue>() - 8usize];
["Offset of field: IdaxDebuggerAppcallValue::kind"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, kind) - 0usize];
["Offset of field: IdaxDebuggerAppcallValue::signed_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, signed_value) - 8usize];
["Offset of field: IdaxDebuggerAppcallValue::unsigned_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, unsigned_value) - 16usize];
["Offset of field: IdaxDebuggerAppcallValue::floating_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, floating_value) - 24usize];
["Offset of field: IdaxDebuggerAppcallValue::string_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, string_value) - 32usize];
["Offset of field: IdaxDebuggerAppcallValue::address_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, address_value) - 40usize];
["Offset of field: IdaxDebuggerAppcallValue::boolean_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallValue, boolean_value) - 48usize];
};
impl Default for IdaxDebuggerAppcallValue {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxDebuggerAppcallOptions {
pub has_thread_id: ::std::os::raw::c_int,
pub thread_id: ::std::os::raw::c_int,
pub manual: ::std::os::raw::c_int,
pub include_debug_event: ::std::os::raw::c_int,
pub has_timeout_milliseconds: ::std::os::raw::c_int,
pub timeout_milliseconds: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerAppcallOptions"]
[::std::mem::size_of::<IdaxDebuggerAppcallOptions>() - 24usize];
["Alignment of IdaxDebuggerAppcallOptions"]
[::std::mem::align_of::<IdaxDebuggerAppcallOptions>() - 4usize];
["Offset of field: IdaxDebuggerAppcallOptions::has_thread_id"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, has_thread_id) - 0usize];
["Offset of field: IdaxDebuggerAppcallOptions::thread_id"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, thread_id) - 4usize];
["Offset of field: IdaxDebuggerAppcallOptions::manual"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, manual) - 8usize];
["Offset of field: IdaxDebuggerAppcallOptions::include_debug_event"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, include_debug_event) - 12usize];
["Offset of field: IdaxDebuggerAppcallOptions::has_timeout_milliseconds"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, has_timeout_milliseconds) - 16usize];
["Offset of field: IdaxDebuggerAppcallOptions::timeout_milliseconds"]
[::std::mem::offset_of!(IdaxDebuggerAppcallOptions, timeout_milliseconds) - 20usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerAppcallRequest {
pub function_address: u64,
#[doc = "< IdaxTypeHandle"]
pub function_type: *mut ::std::os::raw::c_void,
pub arguments: *mut IdaxDebuggerAppcallValue,
pub argument_count: usize,
pub options: IdaxDebuggerAppcallOptions,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerAppcallRequest"]
[::std::mem::size_of::<IdaxDebuggerAppcallRequest>() - 56usize];
["Alignment of IdaxDebuggerAppcallRequest"]
[::std::mem::align_of::<IdaxDebuggerAppcallRequest>() - 8usize];
["Offset of field: IdaxDebuggerAppcallRequest::function_address"]
[::std::mem::offset_of!(IdaxDebuggerAppcallRequest, function_address) - 0usize];
["Offset of field: IdaxDebuggerAppcallRequest::function_type"]
[::std::mem::offset_of!(IdaxDebuggerAppcallRequest, function_type) - 8usize];
["Offset of field: IdaxDebuggerAppcallRequest::arguments"]
[::std::mem::offset_of!(IdaxDebuggerAppcallRequest, arguments) - 16usize];
["Offset of field: IdaxDebuggerAppcallRequest::argument_count"]
[::std::mem::offset_of!(IdaxDebuggerAppcallRequest, argument_count) - 24usize];
["Offset of field: IdaxDebuggerAppcallRequest::options"]
[::std::mem::offset_of!(IdaxDebuggerAppcallRequest, options) - 32usize];
};
impl Default for IdaxDebuggerAppcallRequest {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerAppcallResult {
pub return_value: IdaxDebuggerAppcallValue,
#[doc = "< malloc'd"]
pub diagnostics: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerAppcallResult"]
[::std::mem::size_of::<IdaxDebuggerAppcallResult>() - 64usize];
["Alignment of IdaxDebuggerAppcallResult"]
[::std::mem::align_of::<IdaxDebuggerAppcallResult>() - 8usize];
["Offset of field: IdaxDebuggerAppcallResult::return_value"]
[::std::mem::offset_of!(IdaxDebuggerAppcallResult, return_value) - 0usize];
["Offset of field: IdaxDebuggerAppcallResult::diagnostics"]
[::std::mem::offset_of!(IdaxDebuggerAppcallResult, diagnostics) - 56usize];
};
impl Default for IdaxDebuggerAppcallResult {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerModuleInfo {
pub name: *const ::std::os::raw::c_char,
pub base: u64,
pub size: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerModuleInfo"][::std::mem::size_of::<IdaxDebuggerModuleInfo>() - 24usize];
["Alignment of IdaxDebuggerModuleInfo"]
[::std::mem::align_of::<IdaxDebuggerModuleInfo>() - 8usize];
["Offset of field: IdaxDebuggerModuleInfo::name"]
[::std::mem::offset_of!(IdaxDebuggerModuleInfo, name) - 0usize];
["Offset of field: IdaxDebuggerModuleInfo::base"]
[::std::mem::offset_of!(IdaxDebuggerModuleInfo, base) - 8usize];
["Offset of field: IdaxDebuggerModuleInfo::size"]
[::std::mem::offset_of!(IdaxDebuggerModuleInfo, size) - 16usize];
};
impl Default for IdaxDebuggerModuleInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDebuggerExceptionInfo {
pub ea: u64,
pub code: u32,
pub can_continue: ::std::os::raw::c_int,
pub message: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDebuggerExceptionInfo"]
[::std::mem::size_of::<IdaxDebuggerExceptionInfo>() - 24usize];
["Alignment of IdaxDebuggerExceptionInfo"]
[::std::mem::align_of::<IdaxDebuggerExceptionInfo>() - 8usize];
["Offset of field: IdaxDebuggerExceptionInfo::ea"]
[::std::mem::offset_of!(IdaxDebuggerExceptionInfo, ea) - 0usize];
["Offset of field: IdaxDebuggerExceptionInfo::code"]
[::std::mem::offset_of!(IdaxDebuggerExceptionInfo, code) - 8usize];
["Offset of field: IdaxDebuggerExceptionInfo::can_continue"]
[::std::mem::offset_of!(IdaxDebuggerExceptionInfo, can_continue) - 12usize];
["Offset of field: IdaxDebuggerExceptionInfo::message"]
[::std::mem::offset_of!(IdaxDebuggerExceptionInfo, message) - 16usize];
};
impl Default for IdaxDebuggerExceptionInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const IdaxDebuggerBreakpointChange_IDAX_DEBUGGER_BREAKPOINT_ADDED:
IdaxDebuggerBreakpointChange = 0;
pub const IdaxDebuggerBreakpointChange_IDAX_DEBUGGER_BREAKPOINT_REMOVED:
IdaxDebuggerBreakpointChange = 1;
pub const IdaxDebuggerBreakpointChange_IDAX_DEBUGGER_BREAKPOINT_CHANGED:
IdaxDebuggerBreakpointChange = 2;
pub type IdaxDebuggerBreakpointChange = ::std::os::raw::c_uint;
pub type IdaxDebuggerProcessStartedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
module_info: *const IdaxDebuggerModuleInfo,
),
>;
pub type IdaxDebuggerProcessExitedCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, exit_code: ::std::os::raw::c_int),
>;
pub type IdaxDebuggerProcessSuspendedCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, address: u64)>;
pub type IdaxDebuggerBreakpointHitCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
thread_id: ::std::os::raw::c_int,
address: u64,
),
>;
pub type IdaxDebuggerTraceCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
thread_id: ::std::os::raw::c_int,
ip: u64,
) -> ::std::os::raw::c_int,
>;
pub type IdaxDebuggerExceptionCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
exception_info: *const IdaxDebuggerExceptionInfo,
),
>;
pub type IdaxDebuggerThreadStartedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
thread_id: ::std::os::raw::c_int,
thread_name: *const ::std::os::raw::c_char,
),
>;
pub type IdaxDebuggerThreadExitedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
thread_id: ::std::os::raw::c_int,
exit_code: ::std::os::raw::c_int,
),
>;
pub type IdaxDebuggerLibraryLoadedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
module_info: *const IdaxDebuggerModuleInfo,
),
>;
pub type IdaxDebuggerLibraryUnloadedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
library_name: *const ::std::os::raw::c_char,
),
>;
pub type IdaxDebuggerBreakpointChangedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
change: ::std::os::raw::c_int,
address: u64,
),
>;
pub type IdaxDebuggerAppcallExecutorCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
request: *const IdaxDebuggerAppcallRequest,
out_result: *mut IdaxDebuggerAppcallResult,
) -> ::std::os::raw::c_int,
>;
pub type IdaxDebuggerAppcallExecutorCleanupCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void)>;
unsafe extern "C" {
pub fn idax_thread_info_free(info: *mut IdaxThreadInfo);
}
unsafe extern "C" {
pub fn idax_backend_info_free(info: *mut IdaxBackendInfo);
}
unsafe extern "C" {
pub fn idax_debugger_register_info_free(info: *mut IdaxDebuggerRegisterInfo);
}
unsafe extern "C" {
pub fn idax_debugger_appcall_value_free(value: *mut IdaxDebuggerAppcallValue);
}
unsafe extern "C" {
pub fn idax_debugger_appcall_result_free(result: *mut IdaxDebuggerAppcallResult);
}
unsafe extern "C" {
pub fn idax_debugger_available_backends(
out: *mut *mut IdaxBackendInfo,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_current_backend(out: *mut IdaxBackendInfo) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_load_backend(
name: *const ::std::os::raw::c_char,
use_remote: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_start(
path: *const ::std::os::raw::c_char,
args: *const ::std::os::raw::c_char,
working_dir: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_start(
path: *const ::std::os::raw::c_char,
args: *const ::std::os::raw::c_char,
working_dir: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_attach(pid: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_attach(
pid: ::std::os::raw::c_int,
event_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_detach() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_terminate() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_suspend() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_resume() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_step_into() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_step_over() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_step_out() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_run_to(address: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_state(out: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_instruction_pointer(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_stack_pointer(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_register_value(
reg_name: *const ::std::os::raw::c_char,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_set_register(
reg_name: *const ::std::os::raw::c_char,
value: u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_add_breakpoint(address: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_remove_breakpoint(address: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_has_breakpoint(
address: u64,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_read_memory(
address: u64,
size: u64,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_write_memory(
address: u64,
data: *const u8,
len: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_is_request_running() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_run_requests() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_suspend() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_resume() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_step_into() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_step_over() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_step_out() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_run_to(address: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_thread_count(out: *mut usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_thread_id_at(
index: usize,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_thread_name_at(
index: usize,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_current_thread_id(
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_threads(
out: *mut *mut IdaxThreadInfo,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_select_thread(thread_id: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_select_thread(
thread_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_suspend_thread(thread_id: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_suspend_thread(
thread_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_resume_thread(thread_id: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_request_resume_thread(
thread_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_register_info(
register_name: *const ::std::os::raw::c_char,
out: *mut IdaxDebuggerRegisterInfo,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_is_integer_register(
register_name: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_is_floating_register(
register_name: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_is_custom_register(
register_name: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_appcall(
request: *const IdaxDebuggerAppcallRequest,
out: *mut IdaxDebuggerAppcallResult,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_cleanup_appcall(
has_thread_id: ::std::os::raw::c_int,
thread_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_register_executor(
name: *const ::std::os::raw::c_char,
callback: IdaxDebuggerAppcallExecutorCallback,
cleanup: IdaxDebuggerAppcallExecutorCleanupCallback,
context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_unregister_executor(
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_appcall_with_executor(
name: *const ::std::os::raw::c_char,
request: *const IdaxDebuggerAppcallRequest,
out: *mut IdaxDebuggerAppcallResult,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_process_started(
callback: IdaxDebuggerProcessStartedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_process_exited(
callback: IdaxDebuggerProcessExitedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_process_suspended(
callback: IdaxDebuggerProcessSuspendedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_breakpoint_hit(
callback: IdaxDebuggerBreakpointHitCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_trace(
callback: IdaxDebuggerTraceCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_exception(
callback: IdaxDebuggerExceptionCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_thread_started(
callback: IdaxDebuggerThreadStartedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_thread_exited(
callback: IdaxDebuggerThreadExitedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_library_loaded(
callback: IdaxDebuggerLibraryLoadedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_library_unloaded(
callback: IdaxDebuggerLibraryUnloadedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_on_breakpoint_changed(
callback: IdaxDebuggerBreakpointChangedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_debugger_unsubscribe(token: u64) -> ::std::os::raw::c_int;
}
#[doc = " Opaque handle to a decompiled function. Must be freed with idax_decompiled_free()."]
pub type IdaxDecompiledHandle = *mut ::std::os::raw::c_void;
pub type IdaxDecompilerToken = u64;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxDecompilerMaturityEvent {
pub function_address: u64,
pub new_maturity: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerMaturityEvent"]
[::std::mem::size_of::<IdaxDecompilerMaturityEvent>() - 16usize];
["Alignment of IdaxDecompilerMaturityEvent"]
[::std::mem::align_of::<IdaxDecompilerMaturityEvent>() - 8usize];
["Offset of field: IdaxDecompilerMaturityEvent::function_address"]
[::std::mem::offset_of!(IdaxDecompilerMaturityEvent, function_address) - 0usize];
["Offset of field: IdaxDecompilerMaturityEvent::new_maturity"]
[::std::mem::offset_of!(IdaxDecompilerMaturityEvent, new_maturity) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDecompilerPseudocodeEvent {
pub function_address: u64,
pub cfunc_handle: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerPseudocodeEvent"]
[::std::mem::size_of::<IdaxDecompilerPseudocodeEvent>() - 16usize];
["Alignment of IdaxDecompilerPseudocodeEvent"]
[::std::mem::align_of::<IdaxDecompilerPseudocodeEvent>() - 8usize];
["Offset of field: IdaxDecompilerPseudocodeEvent::function_address"]
[::std::mem::offset_of!(IdaxDecompilerPseudocodeEvent, function_address) - 0usize];
["Offset of field: IdaxDecompilerPseudocodeEvent::cfunc_handle"]
[::std::mem::offset_of!(IdaxDecompilerPseudocodeEvent, cfunc_handle) - 8usize];
};
impl Default for IdaxDecompilerPseudocodeEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDecompilerCursorPositionEvent {
pub function_address: u64,
pub cursor_address: u64,
pub view_handle: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerCursorPositionEvent"]
[::std::mem::size_of::<IdaxDecompilerCursorPositionEvent>() - 24usize];
["Alignment of IdaxDecompilerCursorPositionEvent"]
[::std::mem::align_of::<IdaxDecompilerCursorPositionEvent>() - 8usize];
["Offset of field: IdaxDecompilerCursorPositionEvent::function_address"]
[::std::mem::offset_of!(IdaxDecompilerCursorPositionEvent, function_address) - 0usize];
["Offset of field: IdaxDecompilerCursorPositionEvent::cursor_address"]
[::std::mem::offset_of!(IdaxDecompilerCursorPositionEvent, cursor_address) - 8usize];
["Offset of field: IdaxDecompilerCursorPositionEvent::view_handle"]
[::std::mem::offset_of!(IdaxDecompilerCursorPositionEvent, view_handle) - 16usize];
};
impl Default for IdaxDecompilerCursorPositionEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxDecompilerHintRequestEvent {
pub function_address: u64,
pub item_address: u64,
pub view_handle: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerHintRequestEvent"]
[::std::mem::size_of::<IdaxDecompilerHintRequestEvent>() - 24usize];
["Alignment of IdaxDecompilerHintRequestEvent"]
[::std::mem::align_of::<IdaxDecompilerHintRequestEvent>() - 8usize];
["Offset of field: IdaxDecompilerHintRequestEvent::function_address"]
[::std::mem::offset_of!(IdaxDecompilerHintRequestEvent, function_address) - 0usize];
["Offset of field: IdaxDecompilerHintRequestEvent::item_address"]
[::std::mem::offset_of!(IdaxDecompilerHintRequestEvent, item_address) - 8usize];
["Offset of field: IdaxDecompilerHintRequestEvent::view_handle"]
[::std::mem::offset_of!(IdaxDecompilerHintRequestEvent, view_handle) - 16usize];
};
impl Default for IdaxDecompilerHintRequestEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type IdaxDecompilerMaturityChangedCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxDecompilerMaturityEvent,
),
>;
pub type IdaxDecompilerPseudocodeCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxDecompilerPseudocodeEvent,
),
>;
pub type IdaxDecompilerCursorPositionCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxDecompilerCursorPositionEvent,
),
>;
pub type IdaxDecompilerCreateHintCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxDecompilerHintRequestEvent,
out_text: *mut *const ::std::os::raw::c_char,
out_lines: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxDecompilerItemAtPosition {
pub type_: ::std::os::raw::c_int,
pub address: u64,
pub item_index: ::std::os::raw::c_int,
pub is_expression: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerItemAtPosition"]
[::std::mem::size_of::<IdaxDecompilerItemAtPosition>() - 24usize];
["Alignment of IdaxDecompilerItemAtPosition"]
[::std::mem::align_of::<IdaxDecompilerItemAtPosition>() - 8usize];
["Offset of field: IdaxDecompilerItemAtPosition::type_"]
[::std::mem::offset_of!(IdaxDecompilerItemAtPosition, type_) - 0usize];
["Offset of field: IdaxDecompilerItemAtPosition::address"]
[::std::mem::offset_of!(IdaxDecompilerItemAtPosition, address) - 8usize];
["Offset of field: IdaxDecompilerItemAtPosition::item_index"]
[::std::mem::offset_of!(IdaxDecompilerItemAtPosition, item_index) - 16usize];
["Offset of field: IdaxDecompilerItemAtPosition::is_expression"]
[::std::mem::offset_of!(IdaxDecompilerItemAtPosition, is_expression) - 20usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxDecompilerExpressionInfo {
pub type_: ::std::os::raw::c_int,
pub address: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerExpressionInfo"]
[::std::mem::size_of::<IdaxDecompilerExpressionInfo>() - 16usize];
["Alignment of IdaxDecompilerExpressionInfo"]
[::std::mem::align_of::<IdaxDecompilerExpressionInfo>() - 8usize];
["Offset of field: IdaxDecompilerExpressionInfo::type_"]
[::std::mem::offset_of!(IdaxDecompilerExpressionInfo, type_) - 0usize];
["Offset of field: IdaxDecompilerExpressionInfo::address"]
[::std::mem::offset_of!(IdaxDecompilerExpressionInfo, address) - 8usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxDecompilerStatementInfo {
pub type_: ::std::os::raw::c_int,
pub address: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxDecompilerStatementInfo"]
[::std::mem::size_of::<IdaxDecompilerStatementInfo>() - 16usize];
["Alignment of IdaxDecompilerStatementInfo"]
[::std::mem::align_of::<IdaxDecompilerStatementInfo>() - 8usize];
["Offset of field: IdaxDecompilerStatementInfo::type_"]
[::std::mem::offset_of!(IdaxDecompilerStatementInfo, type_) - 0usize];
["Offset of field: IdaxDecompilerStatementInfo::address"]
[::std::mem::offset_of!(IdaxDecompilerStatementInfo, address) - 8usize];
};
pub type IdaxDecompilerExpressionVisitor = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
expression: *const IdaxDecompilerExpressionInfo,
) -> ::std::os::raw::c_int,
>;
pub type IdaxDecompilerStatementVisitor = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
statement: *const IdaxDecompilerStatementInfo,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn idax_decompiler_available(out: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_decompile(
ea: u64,
out: *mut IdaxDecompiledHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_free(handle: IdaxDecompiledHandle);
}
unsafe extern "C" {
pub fn idax_decompiler_on_maturity_changed(
callback: IdaxDecompilerMaturityChangedCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut IdaxDecompilerToken,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_on_func_printed(
callback: IdaxDecompilerPseudocodeCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut IdaxDecompilerToken,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_on_refresh_pseudocode(
callback: IdaxDecompilerPseudocodeCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut IdaxDecompilerToken,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_on_curpos_changed(
callback: IdaxDecompilerCursorPositionCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut IdaxDecompilerToken,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_on_create_hint(
callback: IdaxDecompilerCreateHintCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut IdaxDecompilerToken,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_unsubscribe(token: IdaxDecompilerToken) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_pseudocode(
handle: IdaxDecompiledHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_microcode(
handle: IdaxDecompiledHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_lines(
handle: IdaxDecompiledHandle,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_lines_free(lines: *mut *mut ::std::os::raw::c_char, count: usize);
}
unsafe extern "C" {
pub fn idax_decompiled_raw_lines(
handle: IdaxDecompiledHandle,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_set_raw_line(
handle: IdaxDecompiledHandle,
line_index: usize,
tagged_text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_header_line_count(
handle: IdaxDecompiledHandle,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_declaration(
handle: IdaxDecompiledHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_entry_address(
handle: IdaxDecompiledHandle,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxLocalVariable {
pub name: *mut ::std::os::raw::c_char,
pub type_name: *mut ::std::os::raw::c_char,
pub is_argument: ::std::os::raw::c_int,
pub width: ::std::os::raw::c_int,
pub has_user_name: ::std::os::raw::c_int,
#[doc = "< 0=unknown, 1=register, 2=stack"]
pub storage: ::std::os::raw::c_int,
pub comment: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxLocalVariable"][::std::mem::size_of::<IdaxLocalVariable>() - 40usize];
["Alignment of IdaxLocalVariable"][::std::mem::align_of::<IdaxLocalVariable>() - 8usize];
["Offset of field: IdaxLocalVariable::name"]
[::std::mem::offset_of!(IdaxLocalVariable, name) - 0usize];
["Offset of field: IdaxLocalVariable::type_name"]
[::std::mem::offset_of!(IdaxLocalVariable, type_name) - 8usize];
["Offset of field: IdaxLocalVariable::is_argument"]
[::std::mem::offset_of!(IdaxLocalVariable, is_argument) - 16usize];
["Offset of field: IdaxLocalVariable::width"]
[::std::mem::offset_of!(IdaxLocalVariable, width) - 20usize];
["Offset of field: IdaxLocalVariable::has_user_name"]
[::std::mem::offset_of!(IdaxLocalVariable, has_user_name) - 24usize];
["Offset of field: IdaxLocalVariable::storage"]
[::std::mem::offset_of!(IdaxLocalVariable, storage) - 28usize];
["Offset of field: IdaxLocalVariable::comment"]
[::std::mem::offset_of!(IdaxLocalVariable, comment) - 32usize];
};
impl Default for IdaxLocalVariable {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_local_variable_free(var: *mut IdaxLocalVariable);
}
unsafe extern "C" {
pub fn idax_decompiled_variables_free(vars: *mut IdaxLocalVariable, count: usize);
}
unsafe extern "C" {
pub fn idax_decompiled_variable_count(
handle: IdaxDecompiledHandle,
out: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_variables(
handle: IdaxDecompiledHandle,
out: *mut *mut IdaxLocalVariable,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_rename_variable(
handle: IdaxDecompiledHandle,
old_name: *const ::std::os::raw::c_char,
new_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_set_comment(
handle: IdaxDecompiledHandle,
ea: u64,
text: *const ::std::os::raw::c_char,
position: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_get_comment(
handle: IdaxDecompiledHandle,
ea: u64,
position: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_save_comments(handle: IdaxDecompiledHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiled_line_to_address(
handle: IdaxDecompiledHandle,
line_number: ::std::os::raw::c_int,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_mark_dirty(
func_ea: u64,
close_views: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_mark_dirty_with_callers(
func_ea: u64,
close_views: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_view_from_host(
view_host: *mut ::std::os::raw::c_void,
out_function_ea: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_view_for_function(
address: u64,
out_function_ea: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_current_view(out_function_ea: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_raw_pseudocode_lines(
cfunc_handle: *mut ::std::os::raw::c_void,
out: *mut *mut *mut ::std::os::raw::c_char,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_pseudocode_lines_free(
lines: *mut *mut ::std::os::raw::c_char,
count: usize,
);
}
unsafe extern "C" {
pub fn idax_decompiler_set_pseudocode_line(
cfunc_handle: *mut ::std::os::raw::c_void,
line_index: usize,
tagged_text: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_pseudocode_header_line_count(
cfunc_handle: *mut ::std::os::raw::c_void,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_item_at_position(
cfunc_handle: *mut ::std::os::raw::c_void,
tagged_line: *const ::std::os::raw::c_char,
char_index: ::std::os::raw::c_int,
out: *mut IdaxDecompilerItemAtPosition,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_item_type_name(
item_type: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_for_each_expression(
handle: IdaxDecompiledHandle,
callback: IdaxDecompilerExpressionVisitor,
context: *mut ::std::os::raw::c_void,
out_visited: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_for_each_item(
handle: IdaxDecompiledHandle,
expression_callback: IdaxDecompilerExpressionVisitor,
statement_callback: IdaxDecompilerStatementVisitor,
context: *mut ::std::os::raw::c_void,
out_visited: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type IdaxMicrocodeMatchCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
address: u64,
itype: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type IdaxMicrocodeApplyCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
mctx: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn idax_decompiler_register_microcode_filter(
match_cb: IdaxMicrocodeMatchCallback,
apply_cb: IdaxMicrocodeApplyCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_decompiler_unregister_microcode_filter(token: u64) -> ::std::os::raw::c_int;
}
#[doc = " Opaque handle to a storage node. Must be freed with idax_storage_node_free()."]
pub type IdaxNodeHandle = *mut ::std::os::raw::c_void;
unsafe extern "C" {
pub fn idax_storage_node_open(
name: *const ::std::os::raw::c_char,
create: ::std::os::raw::c_int,
out: *mut IdaxNodeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_open_by_id(
node_id: u64,
out: *mut IdaxNodeHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_free(node: IdaxNodeHandle);
}
unsafe extern "C" {
pub fn idax_storage_node_id(node: IdaxNodeHandle, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_name(
node: IdaxNodeHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_alt_get(
node: IdaxNodeHandle,
index: u64,
tag: u8,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_alt_set(
node: IdaxNodeHandle,
index: u64,
value: u64,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_alt_remove(
node: IdaxNodeHandle,
index: u64,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_sup_get(
node: IdaxNodeHandle,
index: u64,
tag: u8,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_sup_set(
node: IdaxNodeHandle,
index: u64,
data: *const u8,
len: usize,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_hash_get(
node: IdaxNodeHandle,
key: *const ::std::os::raw::c_char,
tag: u8,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_hash_set(
node: IdaxNodeHandle,
key: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_blob_get(
node: IdaxNodeHandle,
index: u64,
tag: u8,
out: *mut *mut u8,
out_len: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_blob_set(
node: IdaxNodeHandle,
index: u64,
data: *const u8,
len: usize,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_blob_remove(
node: IdaxNodeHandle,
index: u64,
tag: u8,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_blob_size(
node: IdaxNodeHandle,
index: u64,
tag: u8,
out: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_storage_node_blob_string(
node: IdaxNodeHandle,
index: u64,
tag: u8,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
#[doc = " Opaque handle to a graph. Must be freed with idax_graph_free()."]
pub type IdaxGraphHandle = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxGraphNodeInfo {
pub background_color: u32,
pub frame_color: u32,
pub address: u64,
#[doc = "< malloc'd, free with idax_free_string"]
pub text: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxGraphNodeInfo"][::std::mem::size_of::<IdaxGraphNodeInfo>() - 24usize];
["Alignment of IdaxGraphNodeInfo"][::std::mem::align_of::<IdaxGraphNodeInfo>() - 8usize];
["Offset of field: IdaxGraphNodeInfo::background_color"]
[::std::mem::offset_of!(IdaxGraphNodeInfo, background_color) - 0usize];
["Offset of field: IdaxGraphNodeInfo::frame_color"]
[::std::mem::offset_of!(IdaxGraphNodeInfo, frame_color) - 4usize];
["Offset of field: IdaxGraphNodeInfo::address"]
[::std::mem::offset_of!(IdaxGraphNodeInfo, address) - 8usize];
["Offset of field: IdaxGraphNodeInfo::text"]
[::std::mem::offset_of!(IdaxGraphNodeInfo, text) - 16usize];
};
impl Default for IdaxGraphNodeInfo {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxGraphEdgeInfo {
pub color: u32,
pub width: ::std::os::raw::c_int,
pub source_port: ::std::os::raw::c_int,
pub target_port: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxGraphEdgeInfo"][::std::mem::size_of::<IdaxGraphEdgeInfo>() - 16usize];
["Alignment of IdaxGraphEdgeInfo"][::std::mem::align_of::<IdaxGraphEdgeInfo>() - 4usize];
["Offset of field: IdaxGraphEdgeInfo::color"]
[::std::mem::offset_of!(IdaxGraphEdgeInfo, color) - 0usize];
["Offset of field: IdaxGraphEdgeInfo::width"]
[::std::mem::offset_of!(IdaxGraphEdgeInfo, width) - 4usize];
["Offset of field: IdaxGraphEdgeInfo::source_port"]
[::std::mem::offset_of!(IdaxGraphEdgeInfo, source_port) - 8usize];
["Offset of field: IdaxGraphEdgeInfo::target_port"]
[::std::mem::offset_of!(IdaxGraphEdgeInfo, target_port) - 12usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxGraphEdge {
pub source: ::std::os::raw::c_int,
pub target: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxGraphEdge"][::std::mem::size_of::<IdaxGraphEdge>() - 8usize];
["Alignment of IdaxGraphEdge"][::std::mem::align_of::<IdaxGraphEdge>() - 4usize];
["Offset of field: IdaxGraphEdge::source"]
[::std::mem::offset_of!(IdaxGraphEdge, source) - 0usize];
["Offset of field: IdaxGraphEdge::target"]
[::std::mem::offset_of!(IdaxGraphEdge, target) - 4usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxAddressRange {
pub start: u64,
pub end: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxAddressRange"][::std::mem::size_of::<IdaxAddressRange>() - 16usize];
["Alignment of IdaxAddressRange"][::std::mem::align_of::<IdaxAddressRange>() - 8usize];
["Offset of field: IdaxAddressRange::start"]
[::std::mem::offset_of!(IdaxAddressRange, start) - 0usize];
["Offset of field: IdaxAddressRange::end"]
[::std::mem::offset_of!(IdaxAddressRange, end) - 8usize];
};
pub type IdaxGraphOnRefresh = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
graph: IdaxGraphHandle,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnNodeText = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
node: ::std::os::raw::c_int,
out_text: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnNodeColor = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, node: ::std::os::raw::c_int) -> u32,
>;
pub type IdaxGraphOnClicked = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
node: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnDoubleClicked = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
node: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnHint = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
node: ::std::os::raw::c_int,
out_hint: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnCreatingGroup = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
nodes: *const ::std::os::raw::c_int,
count: usize,
) -> ::std::os::raw::c_int,
>;
pub type IdaxGraphOnDestroyed =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxGraphCallbacks {
pub context: *mut ::std::os::raw::c_void,
pub on_refresh: IdaxGraphOnRefresh,
pub on_node_text: IdaxGraphOnNodeText,
pub on_node_color: IdaxGraphOnNodeColor,
pub on_clicked: IdaxGraphOnClicked,
pub on_double_clicked: IdaxGraphOnDoubleClicked,
pub on_hint: IdaxGraphOnHint,
pub on_creating_group: IdaxGraphOnCreatingGroup,
pub on_destroyed: IdaxGraphOnDestroyed,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxGraphCallbacks"][::std::mem::size_of::<IdaxGraphCallbacks>() - 72usize];
["Alignment of IdaxGraphCallbacks"][::std::mem::align_of::<IdaxGraphCallbacks>() - 8usize];
["Offset of field: IdaxGraphCallbacks::context"]
[::std::mem::offset_of!(IdaxGraphCallbacks, context) - 0usize];
["Offset of field: IdaxGraphCallbacks::on_refresh"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_refresh) - 8usize];
["Offset of field: IdaxGraphCallbacks::on_node_text"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_node_text) - 16usize];
["Offset of field: IdaxGraphCallbacks::on_node_color"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_node_color) - 24usize];
["Offset of field: IdaxGraphCallbacks::on_clicked"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_clicked) - 32usize];
["Offset of field: IdaxGraphCallbacks::on_double_clicked"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_double_clicked) - 40usize];
["Offset of field: IdaxGraphCallbacks::on_hint"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_hint) - 48usize];
["Offset of field: IdaxGraphCallbacks::on_creating_group"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_creating_group) - 56usize];
["Offset of field: IdaxGraphCallbacks::on_destroyed"]
[::std::mem::offset_of!(IdaxGraphCallbacks, on_destroyed) - 64usize];
};
impl Default for IdaxGraphCallbacks {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_graph_create() -> IdaxGraphHandle;
}
unsafe extern "C" {
pub fn idax_graph_free(graph: IdaxGraphHandle);
}
unsafe extern "C" {
pub fn idax_graph_add_node(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_remove_node(
graph: IdaxGraphHandle,
node: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_total_node_count(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_visible_node_count(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_node_exists(
graph: IdaxGraphHandle,
node: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_add_edge(
graph: IdaxGraphHandle,
source: ::std::os::raw::c_int,
target: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_add_edge_with_info(
graph: IdaxGraphHandle,
source: ::std::os::raw::c_int,
target: ::std::os::raw::c_int,
info: *const IdaxGraphEdgeInfo,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_remove_edge(
graph: IdaxGraphHandle,
source: ::std::os::raw::c_int,
target: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_replace_edge(
graph: IdaxGraphHandle,
from: ::std::os::raw::c_int,
to: ::std::os::raw::c_int,
new_from: ::std::os::raw::c_int,
new_to: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_clear(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_successors(
graph: IdaxGraphHandle,
node: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_int,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_predecessors(
graph: IdaxGraphHandle,
node: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_int,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_visible_nodes(
graph: IdaxGraphHandle,
out: *mut *mut ::std::os::raw::c_int,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_edges(
graph: IdaxGraphHandle,
out: *mut *mut IdaxGraphEdge,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_path_exists(
graph: IdaxGraphHandle,
source: ::std::os::raw::c_int,
target: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_create_group(
graph: IdaxGraphHandle,
nodes: *const ::std::os::raw::c_int,
count: usize,
out_group: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_delete_group(
graph: IdaxGraphHandle,
group: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_set_group_expanded(
graph: IdaxGraphHandle,
group: ::std::os::raw::c_int,
expanded: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_is_group(
graph: IdaxGraphHandle,
node: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_is_collapsed(
graph: IdaxGraphHandle,
group: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_group_members(
graph: IdaxGraphHandle,
group: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_int,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_set_layout(
graph: IdaxGraphHandle,
layout: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_current_layout(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_redo_layout(graph: IdaxGraphHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_show_graph(
title: *const ::std::os::raw::c_char,
graph: IdaxGraphHandle,
callbacks: *const IdaxGraphCallbacks,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_refresh_graph(title: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_has_graph_viewer(
title: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_is_graph_viewer_visible(
title: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_activate_graph_viewer(
title: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_close_graph_viewer(
title: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_free_node_ids(p: *mut ::std::os::raw::c_int);
}
unsafe extern "C" {
pub fn idax_graph_free_edges(p: *mut IdaxGraphEdge);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxBasicBlock {
pub start: u64,
pub end: u64,
pub type_: ::std::os::raw::c_int,
pub successors: *mut ::std::os::raw::c_int,
pub successor_count: usize,
pub predecessors: *mut ::std::os::raw::c_int,
pub predecessor_count: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxBasicBlock"][::std::mem::size_of::<IdaxBasicBlock>() - 56usize];
["Alignment of IdaxBasicBlock"][::std::mem::align_of::<IdaxBasicBlock>() - 8usize];
["Offset of field: IdaxBasicBlock::start"]
[::std::mem::offset_of!(IdaxBasicBlock, start) - 0usize];
["Offset of field: IdaxBasicBlock::end"][::std::mem::offset_of!(IdaxBasicBlock, end) - 8usize];
["Offset of field: IdaxBasicBlock::type_"]
[::std::mem::offset_of!(IdaxBasicBlock, type_) - 16usize];
["Offset of field: IdaxBasicBlock::successors"]
[::std::mem::offset_of!(IdaxBasicBlock, successors) - 24usize];
["Offset of field: IdaxBasicBlock::successor_count"]
[::std::mem::offset_of!(IdaxBasicBlock, successor_count) - 32usize];
["Offset of field: IdaxBasicBlock::predecessors"]
[::std::mem::offset_of!(IdaxBasicBlock, predecessors) - 40usize];
["Offset of field: IdaxBasicBlock::predecessor_count"]
[::std::mem::offset_of!(IdaxBasicBlock, predecessor_count) - 48usize];
};
impl Default for IdaxBasicBlock {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "C" {
pub fn idax_basic_block_free(block: *mut IdaxBasicBlock);
}
unsafe extern "C" {
pub fn idax_graph_flowchart(
function_address: u64,
out: *mut *mut IdaxBasicBlock,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_flowchart_for_ranges(
ranges: *const IdaxAddressRange,
range_count: usize,
out: *mut *mut IdaxBasicBlock,
count: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_graph_flowchart_free(blocks: *mut IdaxBasicBlock, count: usize);
}
unsafe extern "C" {
pub fn idax_ui_message(text: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn idax_ui_warning(text: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn idax_ui_info(text: *const ::std::os::raw::c_char);
}
unsafe extern "C" {
pub fn idax_ui_ask_yn(
question: *const ::std::os::raw::c_char,
default_yes: ::std::os::raw::c_int,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_ask_string(
prompt: *const ::std::os::raw::c_char,
default_value: *const ::std::os::raw::c_char,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_ask_file(
for_saving: ::std::os::raw::c_int,
default_path: *const ::std::os::raw::c_char,
prompt: *const ::std::os::raw::c_char,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_ask_address(
prompt: *const ::std::os::raw::c_char,
default_value: u64,
out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_ask_long(
prompt: *const ::std::os::raw::c_char,
default_value: i64,
out: *mut i64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_jump_to(address: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_screen_address(out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_selection(start_out: *mut u64, end_out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_refresh_all_views();
}
unsafe extern "C" {
pub fn idax_ui_user_directory(out: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
#[doc = " Opaque widget handle."]
pub type IdaxWidgetHandle = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxShowWidgetOptions {
pub position: ::std::os::raw::c_int,
pub restore_previous: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxShowWidgetOptions"][::std::mem::size_of::<IdaxShowWidgetOptions>() - 8usize];
["Alignment of IdaxShowWidgetOptions"]
[::std::mem::align_of::<IdaxShowWidgetOptions>() - 4usize];
["Offset of field: IdaxShowWidgetOptions::position"]
[::std::mem::offset_of!(IdaxShowWidgetOptions, position) - 0usize];
["Offset of field: IdaxShowWidgetOptions::restore_previous"]
[::std::mem::offset_of!(IdaxShowWidgetOptions, restore_previous) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxUIEvent {
pub kind: ::std::os::raw::c_int,
pub address: u64,
pub previous_address: u64,
pub widget: *mut ::std::os::raw::c_void,
pub previous_widget: *mut ::std::os::raw::c_void,
pub widget_id: u64,
pub previous_widget_id: u64,
pub is_new_database: ::std::os::raw::c_int,
pub startup_script: *const ::std::os::raw::c_char,
pub widget_title: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxUIEvent"][::std::mem::size_of::<IdaxUIEvent>() - 80usize];
["Alignment of IdaxUIEvent"][::std::mem::align_of::<IdaxUIEvent>() - 8usize];
["Offset of field: IdaxUIEvent::kind"][::std::mem::offset_of!(IdaxUIEvent, kind) - 0usize];
["Offset of field: IdaxUIEvent::address"]
[::std::mem::offset_of!(IdaxUIEvent, address) - 8usize];
["Offset of field: IdaxUIEvent::previous_address"]
[::std::mem::offset_of!(IdaxUIEvent, previous_address) - 16usize];
["Offset of field: IdaxUIEvent::widget"][::std::mem::offset_of!(IdaxUIEvent, widget) - 24usize];
["Offset of field: IdaxUIEvent::previous_widget"]
[::std::mem::offset_of!(IdaxUIEvent, previous_widget) - 32usize];
["Offset of field: IdaxUIEvent::widget_id"]
[::std::mem::offset_of!(IdaxUIEvent, widget_id) - 40usize];
["Offset of field: IdaxUIEvent::previous_widget_id"]
[::std::mem::offset_of!(IdaxUIEvent, previous_widget_id) - 48usize];
["Offset of field: IdaxUIEvent::is_new_database"]
[::std::mem::offset_of!(IdaxUIEvent, is_new_database) - 56usize];
["Offset of field: IdaxUIEvent::startup_script"]
[::std::mem::offset_of!(IdaxUIEvent, startup_script) - 64usize];
["Offset of field: IdaxUIEvent::widget_title"]
[::std::mem::offset_of!(IdaxUIEvent, widget_title) - 72usize];
};
impl Default for IdaxUIEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxPopupEvent {
pub widget: *mut ::std::os::raw::c_void,
pub widget_id: u64,
pub widget_title: *const ::std::os::raw::c_char,
pub popup: *mut ::std::os::raw::c_void,
pub widget_type: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxPopupEvent"][::std::mem::size_of::<IdaxPopupEvent>() - 40usize];
["Alignment of IdaxPopupEvent"][::std::mem::align_of::<IdaxPopupEvent>() - 8usize];
["Offset of field: IdaxPopupEvent::widget"]
[::std::mem::offset_of!(IdaxPopupEvent, widget) - 0usize];
["Offset of field: IdaxPopupEvent::widget_id"]
[::std::mem::offset_of!(IdaxPopupEvent, widget_id) - 8usize];
["Offset of field: IdaxPopupEvent::widget_title"]
[::std::mem::offset_of!(IdaxPopupEvent, widget_title) - 16usize];
["Offset of field: IdaxPopupEvent::popup"]
[::std::mem::offset_of!(IdaxPopupEvent, popup) - 24usize];
["Offset of field: IdaxPopupEvent::widget_type"]
[::std::mem::offset_of!(IdaxPopupEvent, widget_type) - 32usize];
};
impl Default for IdaxPopupEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxLineRenderEntry {
pub line_number: ::std::os::raw::c_int,
pub bg_color: u32,
pub start_column: ::std::os::raw::c_int,
pub length: ::std::os::raw::c_int,
pub character_range: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxLineRenderEntry"][::std::mem::size_of::<IdaxLineRenderEntry>() - 20usize];
["Alignment of IdaxLineRenderEntry"][::std::mem::align_of::<IdaxLineRenderEntry>() - 4usize];
["Offset of field: IdaxLineRenderEntry::line_number"]
[::std::mem::offset_of!(IdaxLineRenderEntry, line_number) - 0usize];
["Offset of field: IdaxLineRenderEntry::bg_color"]
[::std::mem::offset_of!(IdaxLineRenderEntry, bg_color) - 4usize];
["Offset of field: IdaxLineRenderEntry::start_column"]
[::std::mem::offset_of!(IdaxLineRenderEntry, start_column) - 8usize];
["Offset of field: IdaxLineRenderEntry::length"]
[::std::mem::offset_of!(IdaxLineRenderEntry, length) - 12usize];
["Offset of field: IdaxLineRenderEntry::character_range"]
[::std::mem::offset_of!(IdaxLineRenderEntry, character_range) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct IdaxRenderingEvent {
pub widget: *mut ::std::os::raw::c_void,
pub widget_id: u64,
pub widget_type: ::std::os::raw::c_int,
pub opaque: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxRenderingEvent"][::std::mem::size_of::<IdaxRenderingEvent>() - 32usize];
["Alignment of IdaxRenderingEvent"][::std::mem::align_of::<IdaxRenderingEvent>() - 8usize];
["Offset of field: IdaxRenderingEvent::widget"]
[::std::mem::offset_of!(IdaxRenderingEvent, widget) - 0usize];
["Offset of field: IdaxRenderingEvent::widget_id"]
[::std::mem::offset_of!(IdaxRenderingEvent, widget_id) - 8usize];
["Offset of field: IdaxRenderingEvent::widget_type"]
[::std::mem::offset_of!(IdaxRenderingEvent, widget_type) - 16usize];
["Offset of field: IdaxRenderingEvent::opaque"]
[::std::mem::offset_of!(IdaxRenderingEvent, opaque) - 24usize];
};
impl Default for IdaxRenderingEvent {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type IdaxUITimerCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type IdaxUIEventExCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, event: *const IdaxUIEvent),
>;
pub type IdaxUIEventFilterCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event: *const IdaxUIEvent,
) -> ::std::os::raw::c_int,
>;
pub type IdaxUIPopupCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, event: *const IdaxPopupEvent),
>;
pub type IdaxUIActionCallback =
::std::option::Option<unsafe extern "C" fn(context: *mut ::std::os::raw::c_void)>;
pub type IdaxUIRenderingCallback = ::std::option::Option<
unsafe extern "C" fn(context: *mut ::std::os::raw::c_void, event: *mut IdaxRenderingEvent),
>;
pub type IdaxWidgetHostCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
host: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
pub fn idax_ui_create_widget(
title: *const ::std::os::raw::c_char,
out: *mut IdaxWidgetHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_show_widget(
widget: IdaxWidgetHandle,
position: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_show_widget_ex(
widget: IdaxWidgetHandle,
options: *const IdaxShowWidgetOptions,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_activate_widget(widget: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_close_widget(widget: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_find_widget(
title: *const ::std::os::raw::c_char,
out: *mut IdaxWidgetHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_is_widget_visible(widget: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_widget_type(widget: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_widget_title(
widget: IdaxWidgetHandle,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_widget_id(widget: IdaxWidgetHandle, out: *mut u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_widget_host(
widget: IdaxWidgetHandle,
out: *mut *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_with_widget_host(
widget: IdaxWidgetHandle,
callback: IdaxWidgetHostCallback,
context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_ask_form(
markup: *const ::std::os::raw::c_char,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_create_custom_viewer(
title: *const ::std::os::raw::c_char,
lines: *const *const ::std::os::raw::c_char,
line_count: usize,
out: *mut IdaxWidgetHandle,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_set_custom_viewer_lines(
viewer: IdaxWidgetHandle,
lines: *const *const ::std::os::raw::c_char,
line_count: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_custom_viewer_line_count(
viewer: IdaxWidgetHandle,
out: *mut usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_custom_viewer_jump_to_line(
viewer: IdaxWidgetHandle,
line_index: usize,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_custom_viewer_current_line(
viewer: IdaxWidgetHandle,
mouse: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_refresh_custom_viewer(viewer: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_close_custom_viewer(viewer: IdaxWidgetHandle) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_register_timer(
interval_ms: ::std::os::raw::c_int,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_register_timer_with_callback(
interval_ms: ::std::os::raw::c_int,
callback: IdaxUITimerCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_unregister_timer(token: u64) -> ::std::os::raw::c_int;
}
pub type IdaxUIEventCallback = ::std::option::Option<
unsafe extern "C" fn(
context: *mut ::std::os::raw::c_void,
event_kind: ::std::os::raw::c_int,
address: u64,
),
>;
unsafe extern "C" {
pub fn idax_ui_subscribe(
event_kind: ::std::os::raw::c_int,
callback: IdaxUIEventCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_database_closed(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_database_inited(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_ready_to_run(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_screen_ea_changed(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_current_widget_changed(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_visible(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_invisible(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_closing(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_visible_for_widget(
widget: IdaxWidgetHandle,
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_invisible_for_widget(
widget: IdaxWidgetHandle,
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_widget_closing_for_widget(
widget: IdaxWidgetHandle,
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_cursor_changed(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_view_activated(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_view_deactivated(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_view_created(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_view_closed(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_event(
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_event_filtered(
filter: IdaxUIEventFilterCallback,
callback: IdaxUIEventExCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_on_popup_ready(
callback: IdaxUIPopupCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_attach_dynamic_action(
popup: *mut ::std::os::raw::c_void,
widget: IdaxWidgetHandle,
action_id: *const ::std::os::raw::c_char,
label: *const ::std::os::raw::c_char,
callback: IdaxUIActionCallback,
context: *mut ::std::os::raw::c_void,
menu_path: *const ::std::os::raw::c_char,
icon: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_rendering_event_add_entry(
event: *mut IdaxRenderingEvent,
entry: *const IdaxLineRenderEntry,
);
}
unsafe extern "C" {
pub fn idax_ui_on_rendering_info(
callback: IdaxUIRenderingCallback,
context: *mut ::std::os::raw::c_void,
token_out: *mut u64,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_ui_unsubscribe(token: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lines_colstr(
text: *const ::std::os::raw::c_char,
color: u8,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lines_tag_remove(
tagged_text: *const ::std::os::raw::c_char,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lines_tag_advance(
tagged_text: *const ::std::os::raw::c_char,
pos: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lines_tag_strlen(tagged_text: *const ::std::os::raw::c_char) -> usize;
}
unsafe extern "C" {
pub fn idax_lines_make_addr_tag(
item_index: ::std::os::raw::c_int,
out: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lines_decode_addr_tag(
tagged_text: *const ::std::os::raw::c_char,
pos: usize,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_diagnostics_set_log_level(level: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_diagnostics_log_level() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_diagnostics_log(
level: ::std::os::raw::c_int,
domain: *const ::std::os::raw::c_char,
message: *const ::std::os::raw::c_char,
);
}
unsafe extern "C" {
pub fn idax_diagnostics_reset_performance_counters();
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxPerformanceCounters {
pub log_messages: u64,
pub invariant_failures: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxPerformanceCounters"][::std::mem::size_of::<IdaxPerformanceCounters>() - 16usize];
["Alignment of IdaxPerformanceCounters"]
[::std::mem::align_of::<IdaxPerformanceCounters>() - 8usize];
["Offset of field: IdaxPerformanceCounters::log_messages"]
[::std::mem::offset_of!(IdaxPerformanceCounters, log_messages) - 0usize];
["Offset of field: IdaxPerformanceCounters::invariant_failures"]
[::std::mem::offset_of!(IdaxPerformanceCounters, invariant_failures) - 8usize];
};
unsafe extern "C" {
pub fn idax_diagnostics_performance_counters(
out: *mut IdaxPerformanceCounters,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct IdaxLuminaBatchResult {
pub requested: usize,
pub completed: usize,
pub succeeded: usize,
pub failed: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IdaxLuminaBatchResult"][::std::mem::size_of::<IdaxLuminaBatchResult>() - 32usize];
["Alignment of IdaxLuminaBatchResult"]
[::std::mem::align_of::<IdaxLuminaBatchResult>() - 8usize];
["Offset of field: IdaxLuminaBatchResult::requested"]
[::std::mem::offset_of!(IdaxLuminaBatchResult, requested) - 0usize];
["Offset of field: IdaxLuminaBatchResult::completed"]
[::std::mem::offset_of!(IdaxLuminaBatchResult, completed) - 8usize];
["Offset of field: IdaxLuminaBatchResult::succeeded"]
[::std::mem::offset_of!(IdaxLuminaBatchResult, succeeded) - 16usize];
["Offset of field: IdaxLuminaBatchResult::failed"]
[::std::mem::offset_of!(IdaxLuminaBatchResult, failed) - 24usize];
};
unsafe extern "C" {
pub fn idax_lumina_has_connection(
feature: ::std::os::raw::c_int,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lumina_close_connection(feature: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lumina_close_all_connections() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lumina_pull(
addresses: *const u64,
count: usize,
auto_apply: ::std::os::raw::c_int,
feature: ::std::os::raw::c_int,
out: *mut IdaxLuminaBatchResult,
) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
pub fn idax_lumina_push(
addresses: *const u64,
count: usize,
push_mode: ::std::os::raw::c_int,
feature: ::std::os::raw::c_int,
out: *mut IdaxLuminaBatchResult,
) -> ::std::os::raw::c_int;
}