Skip to content

PDB Can create DataVariable to types which don't exist #4235

Description

@NeoQuix

Version and Platform (required):

  • Binary Ninja Version: 3.4.4231-dev
  • OS: Arch Linux
  • OS Version: -
  • CPU Architecture: x64

Bug Description:
Can't access value property of an DataVariable because of ValueError: Couldn't find target for type.
Type is enum HRTType.

Steps To Reproduce:
With a python shell:

Python 3.10.10 (main, Mar  5 2023, 22:26:53) [GCC 12.2.1 20230201] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from binaryninja import BinaryViewType
>>> bv = BinaryViewType.get_view_of_file("esentutl.exe")
>>> dv = bv.get_data_var_at(0x140056c08)
>>> dv.value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../BinaryNinja/python/binaryninja/binaryview.py", line 9228, in value
    return self._accessor.value
  File "/.../BinaryNinja/python/binaryninja/binaryview.py", line 9081, in value
    return self._value_helper(self.type, self.view.read(self.address, len(self.type)))
  File "/.../BinaryNinja/python/binaryninja/binaryview.py", line 9121, in _value_helper
    raise ValueError("Couldn't find target for type")
ValueError: Couldn't find target for type

Expected Behavior:
Access value of DataVariable

Additional Information:
Binary which produces errror: esentutl.tar.gz

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: DebugInfoIssue requires changes to the DebugInfo APIDebugInfo: PDBRelated to parsing PDB filesEffort: LowIssues require < 1 week of workImpact: MediumIssue is impactful with a bad, or no, workaround

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions