cemu-idapython/patches/ida51.patch
gergely.erdelyi 7157ef2b3a Source drop for version 0.9.55
-This line, and those below, will be ignored--

M    python/idc.py
M    build.py
M    patches/ida51.patch
M    swig/idp.i
M    swig/bytes.i
M    swig/idaapi.i
M    BUILDING.txt
2007-12-06 13:56:20 +00:00

860 lines
27 KiB
Diff

diff -ur idasdk-versions/5.1/include/area.hpp swigsdk-versions/5.1/include/area.hpp
--- idasdk-versions/5.1/include/area.hpp 2006-09-20 17:37:08.000000000 +0300
+++ swigsdk-versions/5.1/include/area.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -57,6 +57,7 @@
};
+#ifndef SWIG
// Internal classes
class sarray; // sorted array - keeps information in Btree.
@@ -603,6 +604,7 @@
{ return areacb_t_for_all_areas(this, ea1, ea2, av, ud); }
};
+#endif // SWIG
// Last request information -- for internal use
diff -ur idasdk-versions/5.1/include/bytes.hpp swigsdk-versions/5.1/include/bytes.hpp
--- idasdk-versions/5.1/include/bytes.hpp 2007-01-22 04:07:12.000000000 +0200
+++ swigsdk-versions/5.1/include/bytes.hpp 2007-12-01 12:25:09.000000000 +0200
@@ -1644,9 +1644,9 @@
const uchar *mask, // comparision mask
size_t len, // length of string to search
int step, // direction:
+ int flags);
#define BIN_SEARCH_FORWARD 1
#define BIN_SEARCH_BACKWARD (-1)
- int flags);
#define BIN_SEARCH_CASE 0x01
#define BIN_SEARCH_NOCASE 0x00
#define BIN_SEARCH_NOBREAK 0x02
diff -ur idasdk-versions/5.1/include/dbg.hpp swigsdk-versions/5.1/include/dbg.hpp
--- idasdk-versions/5.1/include/dbg.hpp 2006-11-20 13:18:02.000000000 +0200
+++ swigsdk-versions/5.1/include/dbg.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -31,6 +31,7 @@
idaman debugger_t ida_export_data *dbg; // Current debugger - NULL if no debugger
+#ifndef SWIG
//--------------------------------------------------------------------
// D E B U G G E R C A L L B A C K S
//--------------------------------------------------------------------
@@ -519,6 +520,7 @@
// Notification: none (synchronous function)
bool idaapi is_reg_integer(const char *regname);
+#endif // SWIG
//--------------------------------------------------------------------
// B R E A K P O I N T S
@@ -543,6 +545,7 @@
};
+#ifndef SWIG
// Get number of breakpoints.
// Type: Synchronous function
// Notification: none (synchronous function)
@@ -779,6 +782,7 @@
//--------------------------------------------------------------------
// T R A C I N G E V E N T S
//--------------------------------------------------------------------
+#endif // SWIG
// Trace event types:
enum tev_type_t
@@ -799,6 +803,7 @@
};
+#ifndef SWIG
// Get number of trace events available in trace buffer.
// Type: Synchronous function
// Notification: none (synchronous function)
@@ -877,6 +882,7 @@
// corresponds to a valid breakpoint.
ea_t idaapi get_bpt_tev_ea(int n);
+#endif // SWIG
//--------------------------------------------------------------------
// Utility functions
diff -ur idasdk-versions/5.1/include/expr.hpp swigsdk-versions/5.1/include/expr.hpp
--- idasdk-versions/5.1/include/expr.hpp 2006-04-12 16:29:34.000000000 +0300
+++ swigsdk-versions/5.1/include/expr.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -37,12 +37,16 @@
number of arguments. The actual number of
arguments will be passed in res->num */
+#ifndef SWIG
union
{
+#endif // SWIG
char *str; /* T_str */
sval_t num; /* T_long */
ushort e[6]; /* T_flt */
+#ifndef SWIG
};
+#endif // SWIG
};
diff -ur idasdk-versions/5.1/include/funcs.hpp swigsdk-versions/5.1/include/funcs.hpp
--- idasdk-versions/5.1/include/funcs.hpp 2007-02-17 21:04:02.000000000 +0200
+++ swigsdk-versions/5.1/include/funcs.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -88,10 +88,12 @@
bool is_far(void) const { return (flags & FUNC_FAR) != 0; }
bool does_return(void) const { return (flags & FUNC_NORET) == 0; }
bool analyzed_sp(void) const { return (flags & FUNC_SP_READY) != 0; }
+#ifndef SWIG
union
{
struct // attributes of a function entry chunk
{
+#endif // SWIG
//
// Stack frame of the function. It is represented as a structure:
//
@@ -147,15 +149,19 @@
int tailqty; // number of function tails
area_t *tails; // array of tails, sorted by ea
// use func_tail_iterator_t to access function tails
+#ifndef SWIG
};
struct // attributes of a function tail chunk
{
+#endif // SWIG
ea_t owner; // the address of the main function possessing this tail
int refqty; // number of referers
ea_t *referers; // array of referers (function start addresses)
// use func_parent_iterator_t to access the referers
+#ifndef SWIG
};
};
+#endif // SWIG
};
inline bool is_func_entry(const func_t *pfn) { return pfn != NULL && (pfn->flags & FUNC_TAIL) == 0; }
diff -ur idasdk-versions/5.1/include/ida.hpp swigsdk-versions/5.1/include/ida.hpp
--- idasdk-versions/5.1/include/ida.hpp 2007-01-31 16:35:16.000000000 +0200
+++ swigsdk-versions/5.1/include/ida.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -369,6 +369,7 @@
inline bool idaapi should_create_stkvars(void) { return (inf.af & AF_LVAR) != 0; }
+#ifndef SWIG
// set a 'bit' in 'where' if 'value' if not zero
inline void idaapi setflag(uchar &where,uchar bit,int value)
@@ -390,10 +391,13 @@
else where &= ~bit;
}
+#endif // SWIG
//------------------------------------------------------------------------//
+#ifndef SWIG
#define BADADDR ea_t(-1) // this value is used for 'bad address'
#define BADSEL sel_t(-1) // 'bad selector' value
+#endif // SWIG
// Maximum address allowed to use in the program being disassebled.
// This is obsolete, don't use it!
diff -ur idasdk-versions/5.1/include/idd.hpp swigsdk-versions/5.1/include/idd.hpp
--- idasdk-versions/5.1/include/idd.hpp 2006-12-08 16:52:40.000000000 +0200
+++ swigsdk-versions/5.1/include/idd.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -53,6 +53,7 @@
char name[MAXSTR];
};
+#ifndef SWIG
//====================================================================
//
// Registers
@@ -173,6 +174,7 @@
e_exception_t exc; // EXCEPTION
};
};
+#endif // SWIG
// Hardware breakpoint types
typedef int bpttype_t;
@@ -183,6 +185,7 @@
BPT_SOFT = 4; // Software breakpoint
+#ifndef SWIG
// Exception information
struct exception_info_t
{
@@ -441,6 +444,7 @@
#error "Size of debugger_t is incorrect"
#endif
#endif
+#endif // SWIG
#pragma pack(pop)
#endif // _IDD_HPP
diff -ur idasdk-versions/5.1/include/idp.hpp swigsdk-versions/5.1/include/idp.hpp
--- idasdk-versions/5.1/include/idp.hpp 2007-02-09 12:54:06.000000000 +0200
+++ swigsdk-versions/5.1/include/idp.hpp 2007-12-06 14:52:16.000000000 +0200
@@ -31,6 +31,7 @@
#define IDP_INTERFACE_VERSION 76
+#ifndef SWIG
//-----------------------------------------------------------------------
// AbstractRegister and WorkReg are deprecated!
class WorkReg;
@@ -110,6 +111,7 @@
#define CF_HLL 0x10000 // Instruction may be present in a high level
// language function.
};
+#endif // SWIG
idaman bool ida_export InstrIsSet(int icode,int bit); // does the specified instruction
// have the specified feature?
@@ -119,6 +121,7 @@
idaman bool ida_export is_indirect_jump_insn(ea_t ea);
idaman bool ida_export is_basic_block_end(bool call_insn_stops_block); // in:cmd
+#ifndef SWIG
//-----------------------------------------------------------------------
// Structures related to checkarg_dispatch()
@@ -189,6 +192,7 @@
// arguments: NULL, char * const **outptr
// This callback must be implemented
};
+#endif // SWIG
#ifdef __BORLANDC__
#pragma option pop
@@ -553,6 +557,7 @@
// processor is changed.
// (NULL terminated)
+#ifndef SWIG
//
// Callback function. IDP module can take appropriate
// actions when some events occurs in the kernel.
@@ -1111,6 +1116,7 @@
// defined by the loaders
};
int (idaapi* notify)(idp_notify msgid, ...); // Various notifications for the idp
+#endif // SWIG
// Get the stack variable scaling factor
// Useful for processors who refer to the stack with implicit scaling factor.
@@ -1363,8 +1369,10 @@
int icode_return;
+#ifndef SWIG
// Set IDP-specific option (see below)
set_options_t *set_idp_options;
+#endif // SWIG
// Is the instruction created only for alignment purposes?
// returns: number of bytes in the instruction
@@ -1500,10 +1508,12 @@
idaman char *ida_export get_idp_name(char *buf, size_t bufsize);
+#ifndef SWIG
// Unload the processor module.
// This function is for the kernel only.
void free_processor_module(void);
+#endif // SWIG
// Set target assembler
@@ -1512,11 +1522,13 @@
idaman void ida_export set_target_assembler(int asmnum);
+#ifndef SWIG
// Read IDA.CFG file and configure IDA for the current processor
// This is an internal kernel function.
// It should not be used in modules.
void read_config_file(int npass);
+#endif // SWIG
// get number of bits in a byte at the given address
diff -ur idasdk-versions/5.1/include/kernwin.hpp swigsdk-versions/5.1/include/kernwin.hpp
--- idasdk-versions/5.1/include/kernwin.hpp 2007-01-29 05:44:54.000000000 +0200
+++ swigsdk-versions/5.1/include/kernwin.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -28,8 +28,10 @@
#include <help.h>
#include <llong.hpp>
+#ifndef SWIG
typedef int atype_t; // autoanalysis types
typedef int idastate_t; // ida state indicator (ready, thinking, waiting)
+#endif // SWIG
typedef uchar color_t; // see <lines.hpp>
typedef uval_t bmask_t; // see <enum.hpp>
typedef tid_t enum_t; // see <enum.hpp>
@@ -95,6 +97,7 @@
class value_t;
class linput_t;
+#ifndef SWIG
union callui_t // Return codes (size of this type should be 4 bytes at most)
{ // (otherwise different compilers return it differently)
bool cnd;
@@ -877,6 +880,8 @@
idaman void ida_export vshow_hex_file(linput_t *li, long pos, size_t count, const char *format, va_list va);
+#endif // SWIG
+#ifndef SWIG
//--------------------------------------------------------------------------
// K E R N E L S E R V I C E S F O R U I
//--------------------------------------------------------------------------
@@ -1218,8 +1223,10 @@
{ return linearray_t_up(this); }
};
+#endif // SWIG
+#ifndef SWIG
//---------------------------------------------------------------------------
// D E B U G G I N G F U N C T I O N S
//---------------------------------------------------------------------------
@@ -1303,11 +1310,13 @@
vshow_hex_file(li, pos, count, fmt, va);
va_end(va);
}
+#endif // SWIG
//-------------------------------------------------------------------------
// U I S E R V I C E F U N C T I O N S
//-------------------------------------------------------------------------
+#ifndef SWIG
// Common function prototypes
// These functions are inlined for the kernel
// They are not inlined for the user-interfaces
@@ -1466,6 +1475,7 @@
sizer, getl, title, icon, deflt, del,
ins, update, edit, enter, destroy, popup_names, get_icon);
}
+#endif // SWIG
// Navigation band colorizer function
// ea - address to calculate the color of
@@ -1570,6 +1580,7 @@
// Get VCL global variables
+#ifndef SWIG
#if defined(__BORLANDC__)
namespace Forms
{
@@ -1590,6 +1601,7 @@
}
#endif // __BORLANDC__
+#endif // SWIG
#ifdef _WINDOWS_
namespace Forms
@@ -1807,6 +1819,7 @@
}
+#ifndef SWIG
// Pointer to idaview marker function.
// This pointer is initialized by callui(ui_get_marker)
@@ -1839,6 +1852,7 @@
if ( idaview_marker != NULL )
idaview_marker(get_screen_ea());
}
+#endif // SWIG
inline char *choose_idasgn(void)
@@ -1914,6 +1928,7 @@
return callui(ui_choose, chtype_struc, title).strptr;
}
+#ifndef SWIG
inline int choose_struc_path(const char *title, tid_t strid,
uval_t offset, adiff_t delta, bool appzero, tid_t *path)
{
@@ -1978,6 +1993,7 @@
widths, sizer, getl, title, icon, deflt, del, ins,
update, edit, enter, destroy, popup_names, get_icon).i32;
}
+#endif // SWIG
// Display a dialog box with "Please wait..."
@@ -2309,6 +2325,7 @@
return nbytes;
}
+#ifndef SWIG
inline int Message(help_t format,...)
{
va_list va;
@@ -2317,8 +2334,10 @@
va_end(va);
return nbytes;
}
+#endif // SWIG
+#ifndef SWIG
//----------------------------------------------------------------------
// F O R M S - C O M P L E X D I A L O G B O X E S
//----------------------------------------------------------------------
@@ -2534,6 +2553,7 @@
<Names pre~f~ix :A:15:15::>
*/
+#endif // SWIG
//---------------------------------------------------------------------------
// Y E S / N O D I A L O G B O X
@@ -2695,6 +2715,7 @@
#define HIST_TYPE 8 // type declarations
+#ifndef SWIG
// Display a dialog box and wait for the user to input multiline text
// size - maximum size of text in bytes
// answer - output buffer. if you specify NULL then the answer
@@ -2719,6 +2740,7 @@
va_end(va);
return result;
}
+#endif // SWIG
//---------------------------------------------------------------------------
@@ -2794,6 +2816,7 @@
idaman const char *ida_export strarray(const strarray_t *array, size_t array_size, int code);
+#ifndef SWIG
// Convert whitespace to tabulations
// This functin will stop the conversion as soon as a string or character constant
// is encountered
@@ -2986,6 +3009,7 @@
// match a string with a regular expression
// returns: 0-no match, 1-match, -1-error
idaman int ida_export regex_match(const char *str, const char *pattern, bool sense_case);
+#endif // SWIG
#pragma pack(pop)
diff -ur idasdk-versions/5.1/include/lines.hpp swigsdk-versions/5.1/include/lines.hpp
--- idasdk-versions/5.1/include/lines.hpp 2006-03-17 17:41:22.000000000 +0200
+++ swigsdk-versions/5.1/include/lines.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -614,12 +614,11 @@
ml_getnam_t *getnam,
ml_genxrf_t *genxrf,
ml_saver_t *saver,
- int flags
+ int flags);
#define MAKELINE_NONE 0x00
#define MAKELINE_BINPREF 0x01
#define MAKELINE_VOID 0x02
#define MAKELINE_STACK 0x04
- );
idaman bool ida_export save_line_in_array(const char *line); // a standard line saver()
idaman void ida_export init_lines_array(char *lnar[],int maxsize);// initialization function for it
Only in swigsdk-versions/5.1/include/: md5.h.new
diff -ur idasdk-versions/5.1/include/moves.hpp swigsdk-versions/5.1/include/moves.hpp
--- idasdk-versions/5.1/include/moves.hpp 2006-03-17 17:41:22.000000000 +0200
+++ swigsdk-versions/5.1/include/moves.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -26,6 +26,8 @@
{ return !(*this == r); }
};
+
+#ifndef SWIG
// Helper functions. Should not be called directly!
class curloc;
class location_t;
@@ -49,13 +51,16 @@
DEFINE_CURLOC_HELPERS(idaman)
DEFINE_LOCATION_HELPERS(idaman)
+#endif // SWIG
#define CURLOC_SISTACK_ITEMS 4
class curloc : public sistack_t
{
void push(void);
+#ifndef SWIG
DEFINE_CURLOC_HELPERS(friend)
+#endif // SWIG
void unhide_if_necessary(ea_t ea);
void hide_if_necessary(void);
protected:
@@ -120,7 +125,9 @@
class location_t : public curloc
{
typedef curloc inherited;
+#ifndef SWIG
DEFINE_LOCATION_HELPERS(friend)
+#endif // SWIG
public:
graph_location_info_t gli;
location_t(void) {}
diff -ur idasdk-versions/5.1/include/nalt.hpp swigsdk-versions/5.1/include/nalt.hpp
--- idasdk-versions/5.1/include/nalt.hpp 2007-01-29 22:06:46.000000000 +0200
+++ swigsdk-versions/5.1/include/nalt.hpp 2007-12-04 21:37:14.000000000 +0200
@@ -29,6 +29,7 @@
// in them. Look at netnode.hpp for the definition of netnodes.
//
+#ifndef SWIG
#include <netnode.hpp>
//--------------------------------------------------------------------------
@@ -231,6 +232,7 @@
// position of cursor in the window with cross-references to the address
// Used by the user-interface.
NALT_EA(get_xrefpos, set_xrefpos, del_xrefpos, NALT_XREFPOS)
+#endif // SWIG
// Additional flags for the location.
// All 32-bits of the main flags (see bytes.hpp) are used up.
@@ -285,6 +287,7 @@
#define AFL_USERTI 0x02000000L // the type information is definitive
// (comes from the user or type library)
+#ifndef SWIG
// The following macro is used to define 3 functions to work with a bit:
// int test(ea_t ea); - test if the bit is set
// void set(ea_t ea); - set bit
@@ -324,6 +327,7 @@
IMPL__IS_AFLAG_FUNCS(AFL_FIXEDSPD, fixed_spd)
IMPL__IS_AFLAG_FUNCS(AFL_ALIGNFLOW,align_flow)
IMPL__IS_AFLAG_FUNCS(AFL_USERTI, userti)
+#endif // SWIG
inline void set_visible_item(ea_t ea, bool visible)
{
@@ -341,11 +345,14 @@
// source line numbers (they are sometimes present in object files)
// Thes functions may be used if necessary.
+#ifndef SWIG
NALT_EA(get_linnum0,set_linnum0, del_linnum0, NALT_LINNUM)
+#endif // SWIG
idaman void ida_export set_source_linnum(ea_t ea, uval_t lnnum);
idaman uval_t ida_export get_source_linnum(ea_t ea); // returns BADADDR if no lnnum
idaman void ida_export del_source_linnum(ea_t ea);
+#ifndef SWIG
// absolute segment base address
// These functions may be used if necessary.
NALT_EA(get_absbase,set_absbase, del_absbase, NALT_ABSBASE)
@@ -366,6 +373,7 @@
// type of string
// Don't use, see: get_typeinfo()
NALT_ULONG(get_str_type,set_str_type,del_str_type,NALT_STRTYPE)
+#endif // SWIG
inline char idaapi get_str_type_code(uval_t strtype) { return char(strtype); }
@@ -402,16 +410,19 @@
}
+#ifndef SWIG
// alignment value (should be power of 2)
// These functions may be used if necessary.
NALT_ULONG(get_alignment,set_alignment,del_alignment,NALT_ALIGN)
// instruction/data background color
NALT_ULONG(_get_item_color,_set_item_color,_del_item_color,NALT_COLOR)
+#endif // SWIG
idaman void ida_export set_item_color(ea_t ea, bgcolor_t color);
idaman bgcolor_t ida_export get_item_color(ea_t ea); // returns DEFCOLOR if no color
idaman void ida_export del_item_color(ea_t ea);
+#ifndef SWIG
//----------------------------------------------------------------------
NSUP_STRING(nalt_cmt,NSUP_CMT) // regular comment (low level, don't use)
NSUP_STRING(nalt_rptcmt,NSUP_REPCMT) // repeatable comment (low level, don't use)
@@ -559,6 +570,7 @@
// Address which holds the switch info. Used at the jump targets.
NALT_EA(get_switch_parent,set_switch_parent,del_switch_parent, NALT_SWITCH)
+#endif // SWIG
//--------------------------------------------------------------------------
@@ -671,6 +683,7 @@
idaman void ida_export write_struc_path(netnode node, int idx, const tid_t *path, int plen, adiff_t delta);
idaman int ida_export read_struc_path(netnode node, int idx, tid_t *path, adiff_t *delta); // returns plen
+#ifndef SWIG
#define DEFINE_PATH_FUNCS(name, code) \
inline int N_PASTE(get_,name)(ea_t ea, tid_t *path, adiff_t *delta) \
{ return read_struc_path(netnode(ea), code, path, delta); } \
@@ -738,6 +751,7 @@
#define RIDX_ALT_CRC32 uval_t(-5) // input file crc32
#define RIDX_ALT_IMAGEBASE uval_t(-6) // image base
#define RIDX_ALT_IDSNODE uval_t(-7) // ids modnode id (for import_module)
+#endif // SWIG
//--------------------------------------------------------------------------
// Get full path of the input file
@@ -784,11 +798,13 @@
return get_input_file_path(buf, bufsize);
}
+#ifndef SWIG
#ifndef NO_OBSOLETE_FUNCS
#define SWI_SHIFT1 0x80 // use formula (element*2 + elbase)
// to find jump targets (obsolete)
NSUP_STRUCT(switch_info,NSUP_SWITCH)
#endif
+#endif // SWIG
#ifndef BYTES_SOURCE // undefined bit masks so no one can use them directly
#undef AFL_LINNUM
diff -ur idasdk-versions/5.1/include/pro.h swigsdk-versions/5.1/include/pro.h
--- idasdk-versions/5.1/include/pro.h 2007-02-17 21:04:34.000000000 +0200
+++ swigsdk-versions/5.1/include/pro.h 2007-09-30 06:56:51.000000000 +0300
@@ -63,6 +63,7 @@
#define __EA64__
#endif
+#ifndef SWIG
#ifdef __VC__
#define ENUM_SIZE(t) : t
#else
@@ -138,6 +139,7 @@
#define __KYLIX__
#endif
+#endif // SWIG
/*==================================================*/
#ifndef MAXSTR
#define MAXSTR 1024
@@ -178,7 +180,12 @@
/*==================================================*/
-#if defined(__IDP__) && defined(__NT__) // for modules
+#if defined(SWIG) // for SWIG
+#define idaapi
+#define idaman
+#define ida_export
+#define ida_export_data
+#elif defined(__IDP__) && defined(__NT__) // for modules
#define idaapi __stdcall
#define idaman EXTERNC
#define ida_export idaapi
@@ -237,7 +244,9 @@
typedef unsigned long ulong;
#endif
+#ifndef SWIG
#include <llong.hpp>
+#endif // SWIG
typedef char int8;
typedef signed char sint8;
@@ -295,6 +304,7 @@
typedef adiff_t sval_t; // signed value used by the processor
// for 32-bit ea_t, long
// for 64-bit ea_t, longlong
+#ifndef SWIG
#define BADADDR ea_t(-1) // this value is used for 'bad address'
// Windows64 declarations
@@ -618,7 +628,9 @@
idaman bool ida_export qisdir(const char *file);
/*==================================================*/
+#endif // SWIG
idaman void ida_export qexit(int code);
+#ifndef SWIG
idaman void ida_export qatexit(void (idaapi *func)(void));
/*==================================================*/
@@ -1286,6 +1298,7 @@
#define cwstr(dst, src, dstsize) qstrncpy(dst, src, dstsize)
#define wcstr(dst, src, dstsize) qstrncpy(dst, src, dstsize)
#endif
+#endif // SWIG
// Old Visual C++ compilers were not defining the following:
#ifdef __NT__
diff -ur idasdk-versions/5.1/include/ua.hpp swigsdk-versions/5.1/include/ua.hpp
--- idasdk-versions/5.1/include/ua.hpp 2006-10-24 23:19:54.000000000 +0300
+++ swigsdk-versions/5.1/include/ua.hpp 2007-09-30 06:56:51.000000000 +0300
@@ -42,10 +42,12 @@
// in 'cmd' structure. They should not access to bytes of instruction
// and decode it again - this should be done in the analysis step.
+#ifndef SWIG
#include <kernwin.hpp> // for btoa()
#include <lines.hpp> // for color_t
#include <xref.hpp> // add_cref()
#include <llong.hpp> // longlong
+#endif // SWIG
//--------------------------------------------------------------------------
// T Y P E O F O P E R A N D
@@ -223,13 +225,17 @@
// The following unions keep other information about the operand
+#ifndef SWIG
union
{
+#endif // SWIG
ushort reg; // number of register (o_reg)
ushort phrase; // number of register phrase (o_phrase,o_displ)
// you yourself define numbers of phrases
// as you like
+#ifndef SWIG
};
+#endif // SWIG
bool is_reg(int r) const { return type == o_reg && reg == r; }
@@ -238,7 +244,9 @@
// VALUE
+#ifndef SWIG
union {
+#endif // SWIG
uval_t value; // value of operand (o_imm)
// outer displacement (o_displ+OF_OUTER_DISP)
@@ -246,14 +254,18 @@
ushort low; // your convenience only
ushort high;
} value_shorts;
+#ifndef SWIG
};
+#endif // SWIG
bool is_imm(uval_t v) const { return type == o_imm && value == v; }
// VIRTUAL ADDRESS (OFFSET WITHIN THE SEGMENT)
+#ifndef SWIG
union {
+#endif // SWIG
ea_t addr; // virtual address pointed or used by the operand
// (o_mem,o_displ,o_far,o_near)
@@ -261,18 +273,25 @@
ushort low; // your convenience only
ushort high;
} addr_shorts;
+
+#ifndef SWIG
};
+#endif // SWIG
// IDP SPECIFIC INFORMATION
+#ifndef SWIG
union {
+#endif // SWIG
ea_t specval; // This field may be used as you want.
struct { // this structure is defined for your convenience only
ushort low; // IBM PC: segment register number (o_mem,o_far,o_near)
ushort high; // IBM PC: segment selector value (o_mem,o_far,o_near)
} specval_shorts;
+#ifndef SWIG
};
+#endif // SWIG
// The following fields are used only in idp modules
// You may use them as you want to store additional information about
@@ -336,15 +355,19 @@
// Additinal information about the instruction.
// You may use these field as you want.
+#ifndef SWIG
union
{
+#endif // SWIG
ushort auxpref; // processor dependent field
struct
{
uchar low;
uchar high;
} auxpref_chars;
+#ifndef SWIG
};
+#endif // SWIG
char segpref; // processor dependent field
char insnpref; // processor dependent field
@@ -374,6 +397,7 @@
// This structure is used to pass values of bytes to helper functions.
+#ifndef SWIG
union value_u
{
uchar v_char;
@@ -393,6 +417,7 @@
// returns: number of immediate values (0..2*UA_MAXOP)
idaman size_t ida_export get_operand_immvals(ea_t ea, int n, uval_t *v);
+#endif // SWIG
//--------------------------------------------------------------------------
@@ -405,6 +430,7 @@
idaman insn_t ida_export_data cmd; // current instruction
+#ifndef SWIG
// Undocumented variable. It is not used by the kernel.
// Its value may be specified in IDA.CFG:
// LOOKBACK = <number>
@@ -810,6 +836,7 @@
// Returns: the reference target address (the same as calc_reference_target)
idaman ea_t ida_export ua_add_off_drefs(const op_t &x, dref_t type);
+#endif // SWIG
// Get size and flags for op_t.dtyp field.
@@ -871,6 +898,7 @@
idaman const char *ida_export ua_mnem(ea_t ea, char *buf, size_t bufsize);
+#ifndef SWIG
//--------------------------------------------------------------------------
// Helper functions for the processor emulator/analyzer
//--------------------------------------------------------------------------
@@ -942,6 +970,7 @@
// Also converts to code, uses fixups, increases segments etc
// This function is only for the kernel
// Use ua_code() instead
+#endif // SWIG
#ifndef NO_OBSOLETE_FUNCS
idaman void ida_export ua_dodata(ea_t ea, int dtype);