Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
917 stars 207 forks source link

Better union support #1013

Open joshwatson opened 6 years ago

joshwatson commented 6 years ago

Given the following C code:

union MyUnion
{
    int test;
    char c;
    struct {
        int field0;
        int field4;
    } st;
};

int main()
{
    union MyUnion u;

    u.c = 4;

    if (u.st.field0 == 3)
    {
        return u.test;
    }

    return 1;
}

and defining the following in the Types view: image

I get the following results when applying the type in MLIL: image

There does not currently seem to be a way to change which union member MLIL uses. This makes union types mostly impossible to use as it stands.

xusheng6 commented 2 years ago

This might be solved in a similar way to #1216

nwroot commented 2 months ago

Any workarounds?

psifertex commented 2 months ago

None for now but this is actively being worked on for the next release so you should see progress within the next few months.

BlasterXiao commented 3 weeks ago

None for now but this is actively being worked on for the next release so you should see progress within the next few months.

A problem from 2018, and you've dragged it out until the end of 2024. Even the free Ghidra can solve this issue, so why can't your paid service resolve such basic functionality? I'm using the dev version, and I've noticed that you always focus on solving flashy, unimportant problems while neglecting to properly maintain and address the real, fundamental issues. I don't understand your thinking.

psifertex commented 3 weeks ago

I'd be happy to have a more detailed discussion on our roadmap, priorities and how certain things take longer in a GitHub discussion but please keep this issue focused on technical feedback only.