Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   ida makestruct (https://forum.exetools.com/showthread.php?t=4462)

nino 06-17-2004 08:45

ida makestruct
 
Hi,
I wonder if someone has a solution for this strange behavior in ida. When you use MakeStruct to create an instance of a structure which contains a string as a last member (zero-length of course since string is not known beforehand), the string field is never included in the structure. If it's already a string MakeStruct fails and if it's undefined it's left out. But if you use IDA toolbar for declaring a structure field it's created ok. Shouldn't it use MakeStruct internally?

Polaris 06-19-2004 23:42

Quote:

Originally Posted by nino
Hi,
I wonder if someone has a solution for this strange behavior in ida. When you use MakeStruct to create an instance of a structure which contains a string as a last member (zero-length of course since string is not known beforehand), the string field is never included in the structure. If it's already a string MakeStruct fails and if it's undefined it's left out. But if you use IDA toolbar for declaring a structure field it's created ok. Shouldn't it use MakeStruct internally?

IDA Pro's internals have nothing to do with IDC. If you wanna work exactly in the way IDA works then you have to write plugins (they are extremely more powerful and really easy to use). In plugins you have to use the add_struc function.

Also, I see that there's no IDC function named "MakeStruct" BUT there is a "MakeStructEx" (hxxp://www.datarescue.com/idadoc/209.htm). So maybe that is a behaviour of an older version of IDA.

My suggestion is to jump over IDC and write directly plugins.


All times are GMT +8. The time now is 14:27.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX