IDA C++ SDK 9.2
Loading...
Searching...
No Matches
loader.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 1990-2025 Hex-Rays
4 * ALL RIGHTS RESERVED.
5 *
6 */
7
8#ifndef _LOADER_HPP
9#define _LOADER_HPP
10#include <ida.hpp>
11
34
35//----------------------------------------------------------------------
36// DEFINITION OF LDR MODULES
37//----------------------------------------------------------------------
38
39class linput_t; // loader input source. see diskio.hpp for the functions
40struct extlang_t; // check expr.hpp
41struct plugmod_t; // idp.hpp
42
45{
51#define LDRF_RELOAD 0x0001
52#define LDRF_REQ_PROC 0x0002
56
76 int (idaapi *accept_file)(
79 linput_t *li,
80 const char *filename);
81
84#define ACCEPT_ARCHIVE 0x2000
87#define ACCEPT_CONTINUE 0x4000
90#define ACCEPT_FIRST 0x8000
91
99 void (idaapi *load_file)(
100 linput_t *li,
102 const char *fileformatname);
106#define NEF_SEGS 0x0001
107#define NEF_RSCS 0x0002
108#define NEF_NAME 0x0004
109#define NEF_MAN 0x0008
110#define NEF_FILL 0x0010
111#define NEF_IMPS 0x0020
112#define NEF_FIRST 0x0080
114#define NEF_CODE 0x0100
116#define NEF_RELOAD 0x0200
125#define NEF_FLAT 0x0400
126#define NEF_MINI 0x0800
129#define NEF_LOPT 0x1000
130#define NEF_LALL 0x2000
132
140 int (idaapi *save_file)(FILE *fp, const char *fileformatname);
141
152 int (idaapi *move_segm)(
153 ea_t from,
156 const char *fileformatname);
157
174 qstring *temp_file,
175 linput_t *li,
178 const char *fileformatname,
179 const char *defmember,
181};
182
183
185
186idaman AS_PRINTF(1, 0) NORETURN void ida_export vloader_failure(const char *format, va_list va);
187
188
194
195AS_PRINTF(1, 2) NORETURN inline void loader_failure(const char *format=nullptr, ...)
196{
197 va_list va;
200}
201
202//-------------------------------------------------------------------------
203#if defined(__NT__)
204# define DLLEXT "dll"
205#elif defined(__LINUX__)
206# define DLLEXT "so"
207#elif defined(__MAC__)
208# define DLLEXT "dylib"
209#else
210# error Unknown loader ext
211#endif
212
213//----------------------------------------------------------------------
215#ifdef __EA64__
216# define LOADER_DLL "*." DLLEXT
217#else
218# define LOADER_DLL "*32." DLLEXT
219#endif
220
221//----------------------------------------------------------------------
222// Functions for the UI to load files
223//----------------------------------------------------------------------
226{
234 int pri;
235
239#define LIF_ARCHLDR 0x0001
241
242 bool is_archldr(void) { return (lflags & LIF_ARCHLDR) != 0; }
243};
245
247
248idaman load_info_t *ida_export build_loaders_list(linput_t *li, const char *filename);
249
250
252
253idaman void ida_export free_loaders_list(load_info_t *list);
254
255
261
262idaman char *ida_export get_loader_name_from_dll(char *dllname);
263
264
271
272idaman ssize_t ida_export get_loader_name(char *buf, size_t bufsize);
273
274
294
295idaman bool ida_export load_binary_file(
296 const char *filename,
297 linput_t *li,
298 ushort _neflags,
299 qoff64_t fileoff,
300 ea_t basepara,
301 ea_t binoff,
302 uint64 nbytes);
303
304
318
319idaman bool ida_export load_nonbinary_file(
320 const char *filename,
321 linput_t *li,
322 const char *sysdlldir,
323 ushort _neflags,
324 load_info_t *loader);
325
326
331
332idaman int ida_export process_archive(
333 qstring *temp_file,
334 linput_t *li,
335 qstring *module_name,
336 ushort *neflags,
337 const char *defmember,
338 const load_info_t *loader,
339 qstring *errbuf=nullptr);
340
341//--------------------------------------------------------------------------
352
353//------------------------------------------------------------------
368
369idaman int ida_export gen_file(ofile_type_t otype, FILE *fp, ea_t ea1, ea_t ea2, int flags);
370
374#define GENFLG_MAPSEG 0x0001
375#define GENFLG_MAPNAME 0x0002
376#define GENFLG_MAPDMNG 0x0004
377#define GENFLG_MAPLOC 0x0008
378#define GENFLG_IDCTYPE 0x0008
379#define GENFLG_ASMTYPE 0x0010
380#define GENFLG_GENHTML 0x0020
381#define GENFLG_ASMINC 0x0040
383
384//----------------------------------------------------------------------
385// Helper functions for the loaders & ui
386//----------------------------------------------------------------------
387
399
400idaman int ida_export file2base(
401 linput_t *li,
402 qoff64_t pos,
403 ea_t ea1,
404 ea_t ea2,
405 int patchable);
406
407#define FILEREG_PATCHABLE 1
410#define FILEREG_NOTPATCHABLE 0
412
413
422
423idaman int ida_export mem2base(const void *memptr, ea_t ea1, ea_t ea2, qoff64_t fpos);
424
425
432
433idaman int ida_export base2file(FILE *fp, qoff64_t pos, ea_t ea1, ea_t ea2);
434
435
450
451idaman bool ida_export extract_module_from_archive(
452 char *filename,
453 size_t bufsize,
454 char **temp_file_ptr,
455 bool is_remote);
456
457
463
464idaman void ida_export create_filename_cmt(void);
465
466
469
470idaman filetype_t ida_export get_basic_file_type(linput_t *li);
471
472
478
479idaman size_t ida_export get_file_type_name(char *buf, size_t bufsize);
480
481
482//----------------------------------------------------------------------
483// Work with IDS files: read and use information from them
484//
485
488{
489 const char *dllname;
490 void (idaapi*func)(uval_t num, const char *name, uval_t node);
492};
493
494
505
506typedef int idaapi importer_t(linput_t *li, impinfo_t *ii);
507
508
525
526idaman void ida_export import_module(
527 const char *module,
528 const char *windir,
529 uval_t modnode,
530 importer_t *importer,
531 const char *ostype);
532
533
539
540idaman void ida_export set_import_ordinal(
541 uval_t modnode,
542 ea_t ea,
543 uval_t ord);
544
545
551
552idaman void ida_export set_import_name(
553 uval_t modnode,
554 ea_t ea,
555 const char *name);
556
557
568
569idaman int ida_export load_ids_module(char *fname);
570
571
572//----------------------------------------------------------------------
573// DEFINITION OF PLUGIN MODULES
574//----------------------------------------------------------------------
578{
579public:
581 int flags;
585#define PLUGIN_MOD 0x0001
588#define PLUGIN_DRAW 0x0002
589#define PLUGIN_SEG 0x0004
590#define PLUGIN_UNL 0x0008
595#define PLUGIN_HIDE 0x0010
597#define PLUGIN_DBG 0x0020
599#define PLUGIN_PROC 0x0040
601#define PLUGIN_FIX 0x0080
602#define PLUGIN_MULTI 0x0100
606#define PLUGIN_SCRIPTED 0x8000
609
610 plugmod_t *(idaapi *init)(void);
611#if !defined(NO_OBSOLETE_FUNCS) || defined(__DEFINE_PLUGIN_RETURN_CODES__)
616#define PLUGIN_SKIP nullptr
617#define PLUGIN_OK ((plugmod_t *)1)
619#define PLUGIN_KEEP ((plugmod_t *)2)
621#endif
622
623 void (idaapi *term)(void);
626 bool (idaapi *run)(size_t arg);
628 const char *comment;
631 const char *help;
632 const char *wanted_name;
633 const char *wanted_hotkey;
634};
635
636#ifndef __X86__
637 CASSERT(sizeof(plugin_t) == 64);
638#else
639 CASSERT(sizeof(plugin_t) == 36);
640#endif
641
642#if !defined(__KERNEL__) && !defined(PLUGIN_SUBMODULE)
643idaman ida_module_data plugin_t PLUGIN; // (declaration for plugins)
644#endif
645
651
652idaman const char *ida_export get_plugin_options(const char *plugin);
653
654
655//--------------------------------------------------------------------------
657#ifdef __EA64__
658# define PLUGIN_DLL "*." DLLEXT
659#else
660# define PLUGIN_DLL "*32." DLLEXT
661#endif
662
663
664// LOW LEVEL DLL LOADING FUNCTIONS
665// Only the kernel should use these functions!
667#define LNE_MAXSEG 10 // Max number of segments
668
669#if 0
670extern char dlldata[4096]; // Reserved place for DLL data
671#define DLLDATASTART 0xA0 // Absolute offset of dlldata
672extern char ldrdata[64]; // Reserved place for LOADER data
673#define LDRDATASTART (DLLDATASTART+sizeof(dlldata)) // Absolute offset of ldrdata
674#endif
675
676struct idadll_t
677{
678 void *dllinfo[LNE_MAXSEG];
679 void *entry; // first entry point of DLL
680 idadll_t(void) { dllinfo[0] = nullptr; entry = nullptr; }
681 bool is_loaded(void) const { return dllinfo[0] != nullptr; }
682};
683
684#define MODULE_ENTRY_LOADER "LDSC"
685#define MODULE_ENTRY_PLUGIN "PLUGIN"
686#define MODULE_ENTRY_IDP "LPH"
687
688int _load_core_module(
689 idadll_t *dllmem,
690 const char *file,
691 const char *entry);
692 // dllmem - allocated segments
693 // dos: segment 1 (data) isn't allocated
694 // Returns 0 - ok, else:
695#define RE_NOFILE 1 /* No such file */
696#define RE_NOTIDP 2 /* Not IDP file */
697#define RE_NOPAGE 3 /* Can't load: bad segments */
698#define RE_NOLINK 4 /* No linkage info */
699#define RE_BADRTP 5 /* Bad relocation type */
700#define RE_BADORD 6 /* Bad imported ordinal */
701#define RE_BADATP 7 /* Bad relocation atype */
702#define RE_BADMAP 8 /* DLLDATA offset is invalid */
703
704void load_core_module_or_die(
705 idadll_t *dllmem,
706 const char *file,
707 const char *entry);
708idaman bool ida_export load_core_module(
709 idadll_t *dllmem,
710 const char *file,
711 const char *entry);
712
713idaman void ida_export free_dll(idadll_t *dllmem);
715
726
740
741
743
744idaman const idp_descs_t *ida_export get_idp_descs(void);
745
746
747//--------------------------------------------------------------------------
749#ifdef __EA64__
750# define IDP_DLL "*." DLLEXT
751#else
752# define IDP_DLL "*32." DLLEXT
753#endif
754
755
756//--------------------------------------------------------------------------
759{
761 char *path;
762 char *org_name;
763 char *name;
767 size_t arg;
769 idadll_t dllmem;
770 int flags;
771 char *comment;
774 {
775 memset(this, 0, sizeof(*this));
776 }
777};
778
779
782
783idaman plugin_info_t *ida_export get_plugins(void);
784
785
791
792idaman plugin_t *ida_export find_plugin(const char *name, bool load_if_needed=false);
793
794inline plugin_t *load_plugin(const char *name)
795{
796 return find_plugin(name, true);
797}
798
799
803
804idaman bool ida_export run_plugin(const plugin_t *ptr, size_t arg);
805
806
808
809inline bool idaapi load_and_run_plugin(const char *name, size_t arg)
810{
811 return run_plugin(load_plugin(name), arg);
812}
813
814
817
818idaman bool ida_export invoke_plugin(plugin_info_t *ptr);
819
820
823{
826 dbg_info_t(plugin_info_t *_pi, struct debugger_t *_dbg) : pi(_pi), dbg(_dbg) {}
827};
829
830
832
833idaman size_t ida_export get_debugger_plugins(const dbg_info_t **array);
834
835
837
838idaman void ida_export init_plugins(int flag);
839
840
842
843idaman void ida_export term_plugins(int flag);
844
845
846//------------------------------------------------------------------------
847
851
852idaman qoff64_t ida_export get_fileregion_offset(ea_t ea);
853
854
857
858idaman ea_t ida_export get_fileregion_ea(qoff64_t offset);
859
860
861//------------------------------------------------------------------------
868
869idaman int ida_export gen_exe_file(FILE *fp);
870
871
872//------------------------------------------------------------------------
882
883idaman bool ida_export reload_file(const char *file, bool is_remote);
884
885
886//---------------------------------------------------------------------------
887// S N A P S H O T F U N C T I O N S
888
890#define MAX_DATABASE_DESCRIPTION 128
891
892class snapshot_t;
894
896class snapshot_t
897{
898private:
899 snapshot_t &operator=(const snapshot_t &);
900 snapshot_t(const snapshot_t &);
901
902 int compare(const snapshot_t &r) const
903 {
904 return ::compare(id, r.id);
905 }
906
907public:
908 qtime64_t id = 0;
913#define SSF_AUTOMATIC 0x0001
915 char desc[MAX_DATABASE_DESCRIPTION];
916 char filename[QMAXPATH];
919 DECLARE_COMPARISON_OPERATORS(snapshot_t)
920 void clear()
921 {
922 for ( snapshots_t::iterator p=children.begin();
923 p != children.end();
924 ++p )
925 {
926 delete *p;
927 }
928 children.clear();
929 }
930
932 {
933 desc[0] = '\0';
934 filename[0] = '\0';
935 }
936
938 {
939 clear();
940 }
941};
943
944//------------------------------------------------------------------------
948
949idaman bool ida_export build_snapshot_tree(snapshot_t *root);
950
951
952//------------------------------------------------------------------------
960idaman bool ida_export update_snapshot_attributes(
961 const char *filename,
962 const snapshot_t *root,
963 const snapshot_t *attr,
964 int uf);
965
969#define SSUF_DESC 0x00000001
970#define SSUF_PATH 0x00000002
971#define SSUF_FLAGS 0x00000004
973
974//------------------------------------------------------------------------
981
982idaman int ida_export visit_snapshot_tree(
983 snapshot_t *root,
984 int (idaapi *callback)(snapshot_t *ss, void *ud),
985 void *ud=nullptr);
986
987
989
990idaman int ida_export flush_buffers(void);
991
992
994
995idaman bool ida_export is_trusted_idb(void);
996
997//------------------------------------------------------------------------
1007
1008idaman bool ida_export save_database(
1009 const char *outfile=nullptr,
1010 uint32 flags=-1,
1011 const snapshot_t *root = nullptr,
1012 const snapshot_t *attr = nullptr);
1013
1017#define DBFL_KILL 0x01
1018#define DBFL_COMP 0x02
1019#define DBFL_BAK 0x04
1020#define DBFL_TEMP 0x08
1022
1026
1027idaman bool ida_export is_database_flag(uint32 dbfl);
1028
1032
1033idaman void ida_export set_database_flag(uint32 dbfl, bool cnd=true);
1034inline void clr_database_flag(uint32 dbfl) { set_database_flag(dbfl, false); }
1035
1037inline bool is_temp_database(void) { return is_database_flag(DBFL_TEMP); }
1038
1039
1040//------------------------------------------------------------------------
1049
1050
1054idaman const char *ida_export get_path(path_type_t pt);
1055
1060idaman void ida_export set_path(path_type_t pt, const char *path);
1061
1062
1065idaman bool ida_export is_database_ext(const char *ext);
1066
1067
1070idaman const char *ida_export get_elf_debug_file_directory();
1071
1073
1074#endif
idaman bool ida_export is_loaded(ea_t ea)
Does the specified address have a byte value (is initialized?)
A plugin is a module in the plugins subdirectory that can perform an action asked by the user.
Definition loader.hpp:578
void(idaapi *term)(void)
Terminate plugin.
plugmod_t *idaapi * init(void)
Initialize plugin - returns a pointer to plugmod_t.
bool(idaapi *run)(size_t arg)
Invoke plugin.
int version
Should be equal to IDP_INTERFACE_VERSION.
Definition loader.hpp:580
const char * help
Multiline help about the plugin.
Definition loader.hpp:631
const char * wanted_hotkey
The preferred hotkey to run the plugin.
Definition loader.hpp:633
int flags
Plugin features
Definition loader.hpp:581
const char * comment
Long comment about the plugin.
Definition loader.hpp:628
const char * wanted_name
The preferred short name of the plugin.
Definition loader.hpp:632
Reimplementation of vector class from STL.
Definition pro.h:2250
snapshot_t ** iterator
Definition pro.h:2606
Snapshot attributes.
Definition loader.hpp:897
snapshot_t()
Definition loader.hpp:931
uint16 flags
Snapshot flags
Definition loader.hpp:909
qtime64_t id
snapshot ID. This value is computed using qgettimeofday()
Definition loader.hpp:908
char filename[QMAXPATH]
snapshot file name
Definition loader.hpp:916
char desc[MAX_DATABASE_DESCRIPTION]
snapshot description
Definition loader.hpp:915
~snapshot_t()
Definition loader.hpp:937
DEFINE_MEMORY_ALLOCATION_FUNCS() DECLARE_COMPARISON_OPERATORS(snapshot_t) void clear()
Definition loader.hpp:918
snapshots_t children
snapshot children
Definition loader.hpp:917
path_type_t
Definition loader.hpp:1044
@ PATH_TYPE_IDB
full path of IDB file
Definition loader.hpp:1046
@ PATH_TYPE_CMD
full path to the file specified in the command line
Definition loader.hpp:1045
@ PATH_TYPE_ID0
full path of ID0 file
Definition loader.hpp:1047
idaman THREAD_SAFE va_list va
See qsscanf()
Definition err.h:21
idaman THREAD_SAFE const char * format
Definition fpro.h:78
idaman THREAD_SAFE AS_PRINTF(1, 0) void ida_export vqperror(const char *format
Print error message to stderr (analog of perror)
idaman move_segm_code_t ida_export move_segm(segment_t *s, ea_t to, int flags=0)
This function moves all information to the new address.
Contains the inf structure definition and some functions common to the whole IDA project.
filetype_t
Known input file formats (kept in idainfo::filetype):
Definition ida.hpp:35
int nbytes
Definition kernwin.hpp:2861
uval_t uval_t
Definition kernwin.hpp:1878
idaman int64 pos
Definition kernwin.hpp:1365
unsigned __int64 uint64
Definition llong.hpp:13
idaman int ida_export flush_buffers(void)
Flush buffers to the disk.
CASSERT(sizeof(plugin_t)==64)
idaman void ida_export init_plugins(int flag)
Initialize plugins with the specified flag.
void clr_database_flag(uint32 dbfl)
Definition loader.hpp:1034
idaman bool ida_export update_snapshot_attributes(const char *filename, const snapshot_t *root, const snapshot_t *attr, int uf)
Update the snapshot attributes.
idaman filetype_t ida_export get_basic_file_type(linput_t *li)
Get the input file type.
bool is_temp_database(void)
Is a temporary database?
Definition loader.hpp:1037
idaman int ida_export visit_snapshot_tree(snapshot_t *root, int(idaapi *callback)(snapshot_t *ss, void *ud), void *ud=nullptr)
Visit the snapshot tree.
idaman bool ida_export save_database(const char *outfile=nullptr, uint32 flags=-1, const snapshot_t *root=nullptr, const snapshot_t *attr=nullptr)
Save current database using a new file name.
idaman bool ida_export reload_file(const char *file, bool is_remote)
Reload the input file.
idaman qoff64_t ida_export get_fileregion_offset(ea_t ea)
Get offset in the input file which corresponds to the given ea.
idaman int ida_export mem2base(const void *memptr, ea_t ea1, ea_t ea2, qoff64_t fpos)
Load database from the memory.
idaman plugin_info_t *ida_export get_plugins(void)
Get pointer to the list of plugins.
idaman bool ida_export is_database_ext(const char *ext)
Check the file extension.
idaman bool ida_export load_binary_file(const char *filename, linput_t *li, ushort _neflags, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes)
Load a binary file into the database.
idaman int ida_export gen_exe_file(FILE *fp)
Generate an exe file (unload the database in binary form).
qvector< snapshot_t * > snapshots_t
vector of database snapshots
Definition loader.hpp:893
idaman load_info_t *ida_export build_loaders_list(linput_t *li, const char *filename)
Build list of potential loaders.
idaman void ida_export import_module(const char *module, const char *windir, uval_t modnode, importer_t *importer, const char *ostype)
Find and import a DLL module.
int idaapi importer_t(linput_t *li, impinfo_t *ii)
Callback for checking dll module - passed to import_module().
Definition loader.hpp:506
idaman void ida_export create_filename_cmt(void)
Add long comment at idainfo::min_ea.
idaman int ida_export gen_file(ofile_type_t otype, FILE *fp, ea_t ea1, ea_t ea2, int flags)
Generate an output file.
idaman bool ida_export run_plugin(const plugin_t *ptr, size_t arg)
Run a loaded plugin with the specified argument.
idaman const char *ida_export get_path(path_type_t pt)
Get the file path.
DECLARE_TYPE_AS_MOVABLE(load_info_t)
idaman const char *ida_export get_plugin_options(const char *plugin)
Get plugin options from the command line.
idaman size_t ida_export get_file_type_name(char *buf, size_t bufsize)
Get name of the current file type.
bool idaapi load_and_run_plugin(const char *name, size_t arg)
Load & run a plugin.
Definition loader.hpp:809
idaman bool ida_export invoke_plugin(plugin_info_t *ptr)
Run a plugin as configured.
idaman ssize_t ida_export get_loader_name(char *buf, size_t bufsize)
Get name of loader used to load the input file into the database.
idaman ida_module_data plugin_t PLUGIN
Definition loader.hpp:643
va_start(va, format)
idaman AS_PRINTF(1, 0) NORETURN void ida_export vloader_failure(const char *format
See loader_failure()
idaman void ida_export set_database_flag(uint32 dbfl, bool cnd=true)
Set or clear database flag.
idaman int ida_export file2base(linput_t *li, qoff64_t pos, ea_t ea1, ea_t ea2, int patchable)
Load portion of file into the database.
idaman void ida_export set_import_ordinal(uval_t modnode, ea_t ea, uval_t ord)
Set information about the ordinal import entry.
idaman size_t ida_export get_debugger_plugins(const dbg_info_t **array)
Get information about available debuggers.
idaman bool ida_export extract_module_from_archive(char *filename, size_t bufsize, char **temp_file_ptr, bool is_remote)
Extract a module for an archive file.
idaman bool ida_export build_snapshot_tree(snapshot_t *root)
Build the snapshot tree.
idaman int ida_export load_ids_module(char *fname)
Load and apply IDS file.
idaman const char *ida_export get_elf_debug_file_directory()
Get the value of the ELF_DEBUG_FILE_DIRECTORY configuration directive.
idaman char *ida_export get_loader_name_from_dll(char *dllname)
Get name of loader from its DLL file (for example, for PE files we will get "PE").
idaman void ida_export free_loaders_list(load_info_t *list)
Free the list of loaders.
idaman bool ida_export load_nonbinary_file(const char *filename, linput_t *li, const char *sysdlldir, ushort _neflags, load_info_t *loader)
Load a non-binary file into the database.
idaman void ida_export term_plugins(int flag)
Terminate plugins with the specified flag.
idaman bool ida_export is_database_flag(uint32 dbfl)
Get the current database flag.
idaman void ida_export set_path(path_type_t pt, const char *path)
Set the file path.
idaman bool ida_export is_trusted_idb(void)
Is the database considered as trusted?
qvector< idp_name_t > idp_names_t
vector of processor names
Definition loader.hpp:725
idaman int ida_export process_archive(qstring *temp_file, linput_t *li, qstring *module_name, ushort *neflags, const char *defmember, const load_info_t *loader, qstring *errbuf=nullptr)
Calls loader_t::process_archive() For parameters and return value description look at loader_t::proce...
idaman int ida_export base2file(FILE *fp, qoff64_t pos, ea_t ea1, ea_t ea2)
Unload database to a binary file.
idaman plugin_t *ida_export find_plugin(const char *name, bool load_if_needed=false)
Find a user-defined plugin and optionally load it.
idaman void ida_export set_import_name(uval_t modnode, ea_t ea, const char *name)
Set information about the named import entry.
idaman const idp_descs_t *ida_export get_idp_descs(void)
Get IDA processor modules descriptions.
ofile_type_t
Output file types.
Definition loader.hpp:344
@ OFILE_DIF
Difference.
Definition loader.hpp:350
@ OFILE_EXE
Executable file.
Definition loader.hpp:346
@ OFILE_MAP
MAP file.
Definition loader.hpp:345
@ OFILE_ASM
Assembly.
Definition loader.hpp:349
@ OFILE_IDC
IDC file.
Definition loader.hpp:347
@ OFILE_LST
Disassembly listing.
Definition loader.hpp:348
vloader_failure(format, va)
idaman ea_t ida_export get_fileregion_ea(qoff64_t offset)
Get linear address which corresponds to the specified input file offset.
qvector< idp_desc_t > idp_descs_t
vector of processor module descriptions
Definition loader.hpp:739
plugin_t * load_plugin(const char *name)
Definition loader.hpp:794
unsigned short uint16
unsigned 16 bit value
Definition pro.h:346
unsigned int uint32
unsigned 32 bit value
Definition pro.h:348
uint64 asize_t
Definition pro.h:423
uint64 ea_t
Definition pro.h:421
uint64 qtime64_t
64-bit time value expressed as seconds and microseconds since the Epoch
Definition pro.h:499
idaman size_t bufsize
Definition pro.h:600
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
unsigned short ushort
unsigned 16 bit value
Definition pro.h:338
_qstring< char > qstring
regular string
Definition pro.h:3694
Information for the user interface about available debuggers.
Definition loader.hpp:823
struct debugger_t * dbg
Definition loader.hpp:825
dbg_info_t(plugin_info_t *_pi, struct debugger_t *_dbg)
Definition loader.hpp:826
plugin_info_t * pi
Definition loader.hpp:824
This structure describes a debugger API module.
Definition idd.hpp:948
bool is_remote() const
Definition idd.hpp:1072
External language (to support third party language interpreters)
Definition expr.hpp:655
Processor module description.
Definition loader.hpp:729
qstring path
module file name
Definition loader.hpp:730
qstring family
processor's family
Definition loader.hpp:732
idp_desc_t()
Definition loader.hpp:736
idp_names_t names
processor names
Definition loader.hpp:733
time_t mtime
time of last modification
Definition loader.hpp:731
bool checked
internal, for cache management
Definition loader.hpp:735
bool is_script
the processor module is a script
Definition loader.hpp:734
Processor name.
Definition loader.hpp:718
qstring lname
long processor name
Definition loader.hpp:719
idp_name_t()
Definition loader.hpp:722
bool hidden
is hidden
Definition loader.hpp:721
qstring sname
short processor name
Definition loader.hpp:720
See importer_t.
Definition loader.hpp:488
const char * dllname
Definition loader.hpp:489
const char * name
Definition loader.hpp:490
void(idaapi *func)(uval_t num
const char uval_t node
Definition loader.hpp:490
List of loaders.
Definition loader.hpp:226
filetype_t ftype
Definition loader.hpp:231
qstring dllname
Definition loader.hpp:228
uint32 lflags
loader info flags
Definition loader.hpp:233
load_info_t * next
Definition loader.hpp:227
qstring processor
desired processor name
Definition loader.hpp:230
bool is_archldr(void)
Definition loader.hpp:242
qstring ftypename
Definition loader.hpp:229
uint32 loader_flags
copy of loader_t::flags
Definition loader.hpp:232
int pri
2-archldr, 1-place first, 0-normal priority
Definition loader.hpp:234
Loader description block - must be exported from the loader module.
Definition loader.hpp:45
uint32 flags
Loader flags
Definition loader.hpp:47
linput_t qstring ushort const char const char qstring * errbuf
Definition loader.hpp:180
ushort neflags
Definition loader.hpp:101
qstring linput_t const char * filename
Definition loader.hpp:80
qstring * processor
Definition loader.hpp:78
int(idaapi *process_archive)(qstring *temp_file
Display list of archive members and let the user select one.
qstring linput_t * li
Definition loader.hpp:79
ushort const char * fileformatname
Definition loader.hpp:102
ea_t asize_t size
Definition loader.hpp:155
ea_t to
Definition loader.hpp:154
void(idaapi *load_file)(linput_t *li
Load file into the database.
linput_t qstring ushort const char const char * defmember
Definition loader.hpp:179
int(idaapi *accept_file)(qstring *fileformatname
Check input file format.
int(idaapi *move_segm)(ea_t from
Take care of a moved segment (fix up relocations, for example).
linput_t qstring * module_name
Definition loader.hpp:176
uint32 version
api version, should be IDP_INTERFACE_VERSION
Definition loader.hpp:46
Structure to store plugin information.
Definition loader.hpp:759
idadll_t dllmem
Definition loader.hpp:769
char * org_name
original short name of the plugin
Definition loader.hpp:762
plugin_t * entry
pointer to the plugin if it is already loaded
Definition loader.hpp:768
int flags
a copy of plugin_t::flags
Definition loader.hpp:770
plugin_info_t()
Definition loader.hpp:773
char * path
full path to the plugin
Definition loader.hpp:761
char * name
short name of the plugin it will appear in the menu
Definition loader.hpp:763
char * comment
a copy of plugin_t::comment
Definition loader.hpp:771
ushort org_hotkey
original hotkey to run the plugin
Definition loader.hpp:765
ushort hotkey
current hotkey to run the plugin
Definition loader.hpp:766
size_t arg
argument used to call the plugin
Definition loader.hpp:767
plugin_info_t * next
next plugin information
Definition loader.hpp:760
qstring idaplg_name
"name" provided by ida-plugin.json or basename of path (without extension)
Definition loader.hpp:772
Definition idp.hpp:2143