Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2021, 20:16
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 387
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 65 Times in 34 Posts
jonwil Reputation: 21
IDA/HexRays and bitfields...

Are there any ways (plugins etc) that will allow me to see the actual field being accessed in the HexRays decompilation output when its accessing a structure containing bitfields?

Or any other way to more easily figure out what field its actually accessing?
Reply With Quote
  #2  
Old 04-14-2021, 20:44
aijundi aijundi is offline
Friend
 
Join Date: Jul 2019
Posts: 33
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 2
Thanks Rcvd at 30 Times in 16 Posts
aijundi Reputation: 0
I think this might be what you are looking for.
Reply With Quote
  #3  
Old 04-14-2021, 21:13
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 387
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 65 Times in 34 Posts
jonwil Reputation: 21
No that's not it.

I have a structure that looks like this
struct PATHEVENT {
unsigned int queued;
unsigned int expiry;
unsigned int lastact;
unsigned int eventID : 24;
unsigned int numactions : 8;
unsigned int currentaction : 8;
unsigned int voices : 4;
int priority : 4;
unsigned int bumplower : 1;
unsigned int beingFiltered : 1;
int project : 3;
int unused : 11;
};
I want to get IDA/HexRays to show the correct fields when its doing an access to one of those fields.
Reply With Quote
  #4  
Old 04-14-2021, 22:24
deepzero's Avatar
deepzero deepzero is offline
VIP
 
Join Date: Mar 2010
Location: Germany
Posts: 300
Rept. Given: 111
Rept. Rcvd 64 Times in 42 Posts
Thanks Given: 178
Thanks Rcvd at 215 Times in 92 Posts
deepzero Reputation: 64
Are you sure hexrays is smart enough to decompile bitfields?
Reply With Quote
  #5  
Old 04-14-2021, 23:43
Stingered Stingered is offline
Friend
 
Join Date: Dec 2017
Posts: 256
Rept. Given: 0
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 296
Thanks Rcvd at 179 Times in 89 Posts
Stingered Reputation: 2
Per Igor Skochinsky (Hex-Rays)

You can add a struct with bitfields to the Local Types list (Shift-F1, Ins) but they are not currently supported by the decompiler or on the disassembly level.
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
STL and IDA Pro/HexRays? jonwil General Discussion 2 10-17-2020 04:07


All times are GMT +8. The time now is 17:47.


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