Skip to content

Representing structures in Pseudo C can sometimes have issues #4982

@op2786

Description

@op2786

Version and Platform (required):

  • Binary Ninja Version: 3.6.4802-dev, 87e27dc3
  • OS: Windows
  • OS Version: 11
  • CPU Architecture: x86_64

Steps To Reproduce:

  1. Create new binary data
  2. Paste the data below as raw hex
    1. ff0d84544000f6450801568bf1c7460cec324000c706b4324000740b6a1c56e8a002000083c4088bc65e5dc20400
  3. Create a x86 windows function at offset 0
  4. Press S on function sub_0s arg1 then press ENTER
  5. Split view with a Pseudo C
  6. See the bug

Expected Behavior:
I expect BN to provide a more meaningful representation instead of = 0x4032b4;. (Notice the lackness of variable name)

Screenshots:

Additional Information:
Initially, it's not immediately evident in the Pseudo C view that we can create structure members because there are no __offset(0xc).d-like renderings as seen in other views. However, pressing S reveals that it's possible. Adding an indicator similar to what we see in the HLIL view would be beneficial for users to better understand and utilize this functionality.

It seems this issue might be specific to referencing offset zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreIssue needs changes to the coreEffort: LowIssues require < 1 week of workImpact: MediumIssue is impactful with a bad, or no, workaroundLanguageRep: Pseudo-CIssue involves Pseudo-C

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions