binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Improved clang type parser target tuple validation

Open emesare opened this issue 3 months ago • 0 comments

When a user registers the architecture "xtensa" we will attempt to guess the target tuple as "xtensa-unknown-unknown-unknown" which is invalid for our clang build, resulting in any clang parser input failing with:

SyntaxError: error: <unknown>: Unknown error occurred in parsing source.

You can verify this with the type parser:

https://github.com/user-attachments/assets/10c7a2bd-eaa8-476c-af9d-9db6b5b96f4c

For now if user runs into it they should adjust the type parser arguments in the platform like in windows: https://github.com/Vector35/binaryninja-api/blob/0317c1a5c51e623a00249ecdefa0c5dd582e0eb1/platform/windows/platform_windows.cpp#L64-L82

emesare avatar Nov 25 '25 20:11 emesare