Thread: ida makestruct
View Single Post
  #2  
Old 06-19-2004, 23:42
Polaris's Avatar
Polaris Polaris is offline
Friend
 
Join Date: Feb 2002
Location: Invincible Cyclones Of FrostWinds
Posts: 97
Rept. Given: 3
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 2 Times in 2 Posts
Polaris Reputation: 0
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.
Reply With Quote