hoyori / idapython

Automatically exported from code.google.com/p/idapython
Other
1 stars 1 forks source link

Problem with AddStrucMember when member is a reference and implementation #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create some structure
2. Invoke AddStrucMember with FF_DWRD | offflag() in the "flag" param. I
tried using FF_DWRD | FF_0OFF | FF_1OFF with the same result.
3. Convert some data to this structure

What is the expected output? What do you see instead?

The field flagged as offset should be treated as such, but appears just as
simple DWORD.

What version of the product are you using? On what operating system?

Using IDA 5.1 on Windows XP SP2

Please provide any additional information below.

The problem is related to the implementation of AddStrucMember in
IDAPython, which does not initialize correctly the typeinfo structure
before invoking add_struc_member. There is a diff file attached to solve
this problem.

The diff also provides the implementation of SetType function, which was
not implemented.

For more information contact me at: plusvic@yahoo.com

Congratulations for the good job! IDAPython is a very useful tool.

Original issue reported on code.google.com by plus...@gmail.com on 28 Nov 2007 at 4:52

Attachments:

GoogleCodeExporter commented 9 years ago
The ri.target omission was already fixed in 0.9.54. Supporting 16-bit offsets 
is nice so that changes is now in.
SetType() patch was also applied at the same go.

Thank you for the patches!

Original comment by gergely.erdelyi on 4 Dec 2007 at 6:08

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 4 Dec 2007 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 4 Dec 2007 at 6:10