Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2004, 08:45
nino nino is offline
Friend
 
Join Date: Jan 2002
Posts: 58
Rept. Given: 0
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
nino Reputation: 2
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?
Reply With Quote
  #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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 07:02.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX
( 1998 - 2021 )