Sources synced up to 0.9.55

This commit is contained in:
gergely.erdelyi 2008-02-26 19:53:27 +00:00
parent 7157ef2b3a
commit bb83731275
7 changed files with 77 additions and 28 deletions

View File

@ -193,7 +193,7 @@ class GCCBuilder(BuilderBase):
self.include_delimiter = "-I" self.include_delimiter = "-I"
self.macro_delimiter = "-D" self.macro_delimiter = "-D"
self.libpath_delimiter = "-L" self.libpath_delimiter = "-L"
self.compiler_parameters = "" self.compiler_parameters = "-fpermissive"
self.linker_parameters = "-shared" self.linker_parameters = "-shared"
self.basemacros = [ ] self.basemacros = [ ]
self.compiler = "g++" self.compiler = "g++"
@ -404,5 +404,5 @@ if __name__ == "__main__":
cleanlist = [] cleanlist = []
cleanlist.extend(BUILD_TEMPFILES) cleanlist.extend(BUILD_TEMPFILES)
cleanlist.append(plugin_name) cleanlist.append(plugin_name)
clean(cleanlist) # clean(cleanlist)

View File

@ -2605,10 +2605,8 @@ def Refresh():
def RefreshLists(): def RefreshLists():
""" """
Refresh all list views (names, functions, etc) Refresh all list views (names, functions, etc)
FIXME: unimplemented
""" """
raise NotImplementedError idaapi.refresh_lists()
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -5665,11 +5663,9 @@ def GetType(ea):
@param ea: the address of the object @param ea: the address of the object
@return: type string, 0 - failed @return: type string or None if failed
FIXME: unimplemented
""" """
raise NotImplementedError return idaapi.idc_get_type(ea)
def GuessType(ea): def GuessType(ea):
@ -5678,12 +5674,10 @@ def GuessType(ea):
@param ea: the address of the object, can be the structure member id too @param ea: the address of the object, can be the structure member id too
@return: type string, 0 - failed @return: type string or None if failed
FIXME: unimplemented
""" """
raise NotImplementedError return idaapi.idc_guess_type(ea)
def SetType(ea, type): def SetType(ea, type):
""" """
@ -5708,10 +5702,8 @@ def ParseTypes(input, flags):
@param flags: combination of PT_... constants or 0 @param flags: combination of PT_... constants or 0
@return: number of errors @return: number of errors
FIXME: unimplemented
""" """
raise NotImplementedError return idaapi.idc_parse_types(input, flags)
PT_FILE = 0x0001 # input if a file name (otherwise contains type declarations) PT_FILE = 0x0001 # input if a file name (otherwise contains type declarations)
@ -5921,9 +5913,15 @@ def SetBptCnd(ea, cnd):
@param cnd: breakpoint condition @param cnd: breakpoint condition
@return: success @return: success
FIXME: unimplemented
""" """
raise NotImplementedError bpt = idaapi.bpt_t()
if not idaapi.get_bpt(ea, bpt):
return False
bpt.condition = cnd
return idaapi.update_bpt(bpt)
def AddBptEx(ea, size, bpttype): def AddBptEx(ea, size, bpttype):

View File

@ -67,7 +67,9 @@ typedef long long longlong;
%array_class(uchar, ucharArray); %array_class(uchar, ucharArray);
%array_class(tid_t, tidArray); %array_class(tid_t, tidArray);
%array_class(ea_t, eaArray);
%pointer_class(int, int_pointer); %pointer_class(int, int_pointer);
%pointer_class(ea_t, ea_pointer);
%include "ida.i" %include "ida.i"
%include "idd.hpp" %include "idd.hpp"

View File

@ -9,6 +9,13 @@
%apply unsigned long *INOUT { sel_t *sel }; %apply unsigned long *INOUT { sel_t *sel };
%rename (_askseg) askseg; %rename (_askseg) askseg;
%inline %{
void refresh_lists(void)
{
callui(ui_list);
}
%}
%pythoncode %{ %pythoncode %{
def asklong(defval, format): def asklong(defval, format):
res, val = _idaapi._asklong(defval, format) res, val = _idaapi._asklong(defval, format)

View File

@ -1,6 +1,3 @@
%ignore NALT_EA; %ignore NALT_EA;
%ignore NALT_ULONG;
#define NALT_EA() %include "nalt.hpp"
%include "nalt.hpp"

View File

@ -3,16 +3,14 @@
%cstring_bounded_output(char *dstname, MAXSTR); %cstring_bounded_output(char *dstname, MAXSTR);
%cstring_bounded_output(char *buf, MAXSTR); %cstring_bounded_output(char *buf, MAXSTR);
// This is for get_name_value's output value
%apply unsigned long *OUTPUT { uval_t *value };
// FIXME: These should be fixed // FIXME: These should be fixed
%ignore get_name_value;
%ignore append_struct_fields; %ignore append_struct_fields;
%ignore get_struct_operand; %ignore get_struct_operand;
%ignore debug_name_how_t;
%ignore set_debug_names; %ignore set_debug_names;
%ignore set_debug_name;
%ignore get_debug_name; %ignore get_debug_name;
%ignore del_debug_names;
%ignore get_debug_name_ea;
%ignore nameVa; %ignore nameVa;
// Unexported & kernel-only // Unexported & kernel-only

View File

@ -171,4 +171,51 @@ til_t * load_til_header_wrap(const char *tildir, const char *name)
} }
%} %}
%inline %{
/* Parse types from a string or file. See ParseTypes() in idc.py */
int idc_parse_types(const char *input, int flags)
{
int hti = ((flags >> 4) & 7) << HTI_PAK_SHIFT;
if ( (flags & 1) != 0 )
{
hti |= HTI_FIL;
}
return parse_types2(input, (flags & 2) == 0 ? msg : NULL, hti);
}
char *idc_get_type(ea_t ea, char *buf, size_t bufsize)
{
type_t type[MAXSTR];
p_list fnames[MAXSTR];
if (get_ti(ea, type, sizeof(type), fnames, sizeof(fnames)))
{
int code = print_type_to_one_line(buf, bufsize, idati, type,
NULL, NULL, fnames);
if ( code == T_NORMAL )
{
return buf;
}
} \
return NULL;
}
char *idc_guess_type(ea_t ea, char *buf, size_t bufsize)
{
type_t type[MAXSTR];
p_list fnames[MAXSTR];
if (guess_type(ea, type, sizeof(type), fnames, sizeof(fnames)))
{
int code = print_type_to_one_line(buf, bufsize, idati, type,
NULL, NULL, fnames);
if ( code == T_NORMAL )
{
return buf;
}
} \
return NULL;
}
%}