Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit 06f0ff1

Browse files
author
elias.bachaalany@gmail.com
committed
bugfixes:
- op_t.is_reg() was buggy - build.py: build.py was putting duplicate files into the .zip - added backed wrapped version of get_ascii_contents() - misc changes...
1 parent 930d7cb commit 06f0ff1

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Please see http://code.google.com/p/idapython/source/list for a detailed list of
33

44
Changes from version 1.5.2 to 1.5.3
55
------------------------------------
6+
- IDA Pro 6.2 support
67
- added set_idc_func_ex(): it is now possible to add new IDC functions using Python
78
- added visit_patched_bytes() (see ex_patch.py)
89
- added support for the multiline text input control in the Form class
@@ -13,7 +14,7 @@ Changes from version 1.5.2 to 1.5.3
1314
- added register_timer()/unregister_timer(). Check ex_timer.py
1415
- added the IDC (Arrays) netnode manipulation layer into idc.py
1516
- added idautils.Structs() and StructMembers() generator functions
16-
- removed the "Run Python Statment" menu item. IDA now has a unified dialog.
17+
- removed the "Run Python Statement" menu item. IDA now has a unified dialog.
1718
Use RunPlugin("python", 0) to invoke it manually.
1819
- better error messages for script plugins, loaders and processor modules
1920
- bugfix: Dbg_Hooks.dbg_run_to() was receiving wrong input

build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ def build_binary_package(ea64, nukeold):
418418
binmanifest = []
419419
if nukeold:
420420
binmanifest.extend(BINDIST_MANIFEST)
421-
binmanifest.extend([(x, "python") for x in "python/init.py", "python/idc.py", "python/idautils.py", "idaapi.py"])
421+
if not ea64 or nukeold:
422+
binmanifest.extend([(x, "python") for x in "python/init.py", "python/idc.py", "python/idautils.py", "idaapi.py"])
422423
binmanifest.append((plugin_name, "plugins"))
423424
build_distribution(binmanifest, BINDISTDIR, ea64, nukeold)
424425

swig/bytes.i

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
%rename (unregister_custom_data_type) py_unregister_custom_data_type;
9898
%rename (register_custom_data_type) py_register_custom_data_type;
9999
%rename (get_many_bytes) py_get_many_bytes;
100+
%rename (get_ascii_contents) py_get_ascii_contents;
100101
%rename (get_ascii_contents2) py_get_ascii_contents2;
101102
%{
102103
//<code(py_bytes)>
@@ -800,6 +801,30 @@ static PyObject *py_get_ascii_contents2(
800801
qfree(buf);
801802
return py_buf;
802803
}
804+
//---------------------------------------------------------------------------
805+
/*
806+
#<pydoc>
807+
def get_ascii_contents(ea, len, type):
808+
"""
809+
Get contents of ascii string
810+
This function returns the displayed part of the string
811+
It works even if the string has not been created in the database yet.
812+
813+
@param ea: linear address of the string
814+
@param len: length of the string in bytes (including terminating 0)
815+
@param type: type of the string
816+
@return: string contents (not including terminating 0) or None
817+
"""
818+
pass
819+
#</pydoc>
820+
*/
821+
static PyObject *py_get_ascii_contents(
822+
ea_t ea,
823+
size_t len,
824+
int32 type)
825+
{
826+
return py_get_ascii_contents2(ea, len, type);
827+
}
803828

804829

805830

swig/typeinf.i

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152

153153
%ignore append_type_name;
154154
%ignore for_all_types_ex;
155+
%ignore fix_idb_type;
155156
%ignore pdb2ti;
156157

157158
%include "typeinf.hpp"

swig/ua.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ class op_t(py_clinked_object_t):
858858

859859
def is_reg(self, r):
860860
"""Checks if the register operand is the given processor register"""
861-
return self.type == _idaapi.o_reg and self == r
861+
return self.type == o_reg and self.reg == r
862862

863863
def has_reg(self, r):
864864
"""Checks if the operand accesses the given processor register"""

0 commit comments

Comments
 (0)