diff options
| author | Mason Reed <mason@vector35.com> | 2025-07-13 19:09:58 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-07-15 12:34:43 -0400 |
| commit | 41213e0c959b4b11e3059b60ec5248b31024d236 (patch) | |
| tree | d47fd4caee967233f2f9ae3b5403aba333de29a6 /lang | |
| parent | bd1b6b8a1a75df296da5c7afa8107ba301c9cd8e (diff) | |
Expose analysis' system call type and name retrieval
Previously we only really had a way to access the platform system call information, this was missing the system call information found in type libraries
Fixes https://github.com/Vector35/binaryninja-api/issues/7089
Diffstat (limited to 'lang')
| -rw-r--r-- | lang/c/pseudoc.cpp | 5 | ||||
| -rw-r--r-- | lang/rust/pseudorust.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp index 4d585966..74fcedcc 100644 --- a/lang/c/pseudoc.cpp +++ b/lang/c/pseudoc.cpp @@ -2705,13 +2705,14 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H if (GetFunction() && (operandList.size() > 0) && (operandList[0].operation == HLIL_CONST)) { const auto platform = GetFunction()->GetPlatform(); + const auto view = GetFunction()->GetView(); if (platform) { const auto syscall = (uint32_t)operandList[0].GetConstant<HLIL_CONST>(); - const auto syscallName = platform->GetSystemCallName(syscall); + const auto syscallName = view->GetSystemCallName(platform, syscall); if (settings && settings->GetCallParameterHints() != NeverShowParameterHints) { - const auto functionType = platform->GetSystemCallType(syscall); + const auto functionType = view->GetSystemCallType(platform, syscall); if (functionType && (functionType->GetClass() == FunctionTypeClass)) namedParams = functionType->GetParameters(); } diff --git a/lang/rust/pseudorust.cpp b/lang/rust/pseudorust.cpp index 429def51..0acb10cd 100644 --- a/lang/rust/pseudorust.cpp +++ b/lang/rust/pseudorust.cpp @@ -2723,13 +2723,14 @@ void PseudoRustFunction::GetExprText(const HighLevelILInstruction& instr, HighLe if (GetFunction() && (operandList.size() > 0) && (operandList[0].operation == HLIL_CONST)) { const auto platform = GetFunction()->GetPlatform(); + const auto view = GetFunction()->GetView(); if (platform) { const auto syscall = (uint32_t)operandList[0].GetConstant<HLIL_CONST>(); - const auto syscallName = platform->GetSystemCallName(syscall); + const auto syscallName = view->GetSystemCallName(platform, syscall); if (settings && settings->GetCallParameterHints() != NeverShowParameterHints) { - const auto functionType = platform->GetSystemCallType(syscall); + const auto functionType = view->GetSystemCallType(platform, syscall); if (functionType && (functionType->GetClass() == FunctionTypeClass)) namedParams = functionType->GetParameters(); } |
