fkie-cad / dewolf

A research decompiler implemented as a Binary Ninja plugin.
GNU Lesser General Public License v2.1
172 stars 9 forks source link

Revive: Fix Hungarian Notation #416

Closed NeoQuix closed 3 months ago

NeoQuix commented 3 months ago

Fix correct branch base.

NeoQuix commented 3 months ago

Code looks good at first glance. Will check the tests and corner cases (tmp variables) etc. tomorrow.

NeoQuix commented 3 months ago

Code looks good, passes almost all tests/corner cases.

  1. Not so sure about L.78/79 with the different types. Possibly a future issue.
  2. If we have two arrays with the same base type but different sizes, they get assigned the same name. The problem is, that they technically have a different type (char [x] vs char[y]), but the _hungarian_prefix will return the same prefix for both of them, because the prefix is only based on the type and not the size. => Add prefix based on size or strip var_type size before adding to the counter in Z.83