chaoticgd / ghidra-emotionengine-reloaded

An extension for Ghidra that adds support for the PlayStation 2.
Apache License 2.0
118 stars 11 forks source link

stabs: Implement support for bit fields #48

Closed abelbriggs1 closed 8 months ago

abelbriggs1 commented 8 months ago

Currently, bit fields are not imported into Ghidra even if they exist in the STABS data.

struct _hierhead { // 0x4
    /* 0x0:0 */ unsigned int opcode : 6;
    /* 0x0:6 */ unsigned int isRelocated : 1;
    /* 0x0:7 */ unsigned int id2 : 11;
    /* 0x2:2 */ unsigned int id1 : 14;
};

image

This PR implements support for bit fields to be imported.

image

chaoticgd commented 8 months ago

Looks good. Works fine with all the games I've just tested it on.