-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Labels
Component: Type ParserIssue needs changes to Clang/CoreTypeParserIssue needs changes to Clang/CoreTypeParserEffort: TrivialIssues require < 1 day of workIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaroundIssue is a papercut or has a good, supported workaround
Description
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:
Screen.Recording.2025-11-25.at.3.53.02.PM.mov
For now if user runs into it they should adjust the type parser arguments in the platform like in windows:
binaryninja-api/platform/windows/platform_windows.cpp
Lines 64 to 82 in 0317c1a
| virtual void AdjustTypeParserInput( | |
| Ref<TypeParser> parser, | |
| std::vector<std::string>& arguments, | |
| std::vector<std::pair<std::string, std::string>>& sourceFiles | |
| ) override | |
| { | |
| if (parser->GetName() != "ClangTypeParser") | |
| { | |
| return; | |
| } | |
| for (auto& arg: arguments) | |
| { | |
| if (arg.find("--target=") == 0 && arg.find("-unknown-") != std::string::npos) | |
| { | |
| arg = "--target=i386-pc-windows-msvc"; | |
| } | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
Component: Type ParserIssue needs changes to Clang/CoreTypeParserIssue needs changes to Clang/CoreTypeParserEffort: TrivialIssues require < 1 day of workIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaroundIssue is a papercut or has a good, supported workaround