Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SharedCache] All proposed shared cache improvements #2

Open
wants to merge 37 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3429718
Linear View: Persist highlight during renames
CouleeApps Dec 20, 2024
fb31e0a
[SharedCache] Serialize `SharedCache::m_symbolInfos`
Nov 21, 2024
d67f08d
Update metadata version to prevent v2 loader incorrectly trying to lo…
0cyn Dec 23, 2024
ce76c08
Fix Shared Cache Plugin out-of-tree build
VisualEhrmanntraut Dec 24, 2024
08d91f1
[SharedCache] Remove unnecessary lock in `SharedCache` destructor
Nov 25, 2024
9341047
[SharedCache] Fix post-processing of Objective-C sections
Nov 21, 2024
2cce2ab
[SharedCache] Add the ability to skip Objective-C processing when loa…
Nov 25, 2024
a924534
[SharedCache] Add the ability to manually trigger Objective-C processing
Nov 26, 2024
6735403
Clean up langreps' opcode print switch
CouleeApps Dec 27, 2024
5716430
Make pseudo-c use the default type printer
CouleeApps Dec 27, 2024
2356259
One case of needing the type printer in pseudo rust
CouleeApps Dec 27, 2024
5922737
Add default implementations to Python TypePrinter to dual C++
CouleeApps Dec 27, 2024
7323628
Fix trying to construct a FunctionViewType from a FunctionViewType
CouleeApps Dec 27, 2024
80fee0a
add note to UI plugin bullet about the qt-build repo
psifertex Dec 30, 2024
958c87b
Move Changelog filtering to UI
emesare Dec 11, 2024
3c05103
Delete ViewNavigationMode
emesare Nov 25, 2024
8b65cc2
Bump UI ABI version due to previous commit.
fuzyll Jan 7, 2025
7a6b85b
Add information on the Portal to the Getting Started guide.
fosdickio Jan 7, 2025
4e32100
Verbiage change in Getting Started doc.
fosdickio Jan 7, 2025
cc763dc
Add setting to limit maximum recursion depth for computing an express…
negasora Jan 7, 2025
b34393c
Prevent crash when Mach-O view doesn't exist
negasora Jan 8, 2025
faac469
[SharedCache] Fix uninitialized `loaded` field for mappings returned …
Dec 29, 2024
f4cebd8
Deprecate `Segment.serialize` and `Section.serialize` in favor of des…
bpotchik Jan 9, 2025
7630dcd
Add BNAllocStringWithLength API.
bpotchik Jan 9, 2025
1dc9179
[SharedCache] Split view-specific state into a separate struct
bdash Nov 25, 2024
1f0be23
[SharedCache] Cache type libraries in the view-specific state
bdash Nov 25, 2024
a44b783
[SharedCache] Track whether non-image regions are data vs code
bdash Nov 25, 2024
aa408cf
[SharedCache] Fix handling of relative selectors in macOS shared caches
bdash Nov 25, 2024
49bafa9
[SharedCache] Avoid crashing the product whenever bugs occur in ser/d…
0cyn Dec 11, 2024
e95dc2c
MSVC RTTI: Fix crash due to function creation on invalid virtual func…
emesare Jan 11, 2025
768bf0d
Move all FeatureMap processing to the background.
bpotchik Jan 13, 2025
17158e9
Add 'ui.log.wordWrap' setting with a default of disabled.
bpotchik Jan 13, 2025
73a4c0e
[SharedCache] A collection of small optimizations
bdash Nov 15, 2024
c3f5d0a
Use persistent data structures courtesy of immer
bdash Nov 14, 2024
9021c2c
Merge remote-tracking branch 'bdash/dsc-persistent-data-structures' i…
bdash Dec 19, 2024
8c82c59
[SharedCache] Simplify MMappedFileAccessor::Read* methods
bdash Nov 23, 2024
ed4fc87
Merge remote-tracking branch 'bdash/dsc-vm-map-read-cleanup' into dsc…
bdash Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
[submodule "rust/examples/pdb-ng/pdb-0.8.0-patched"]
path = rust/examples/pdb-ng/pdb-0.8.0-patched
url = https://github.com/Vector35/pdb-rs.git
[submodule "vendor/immer"]
path = vendor/immer
url = https://github.com/arximboldi/immer.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cmake --build build -j8
In addition to the default build setup, you may want to:

- **Build examples.** To build the [API examples](#examples), pass `-DBN_API_BUILD_EXAMPLES=ON` to CMake when configuring the build. After the build succeeds, you can install the built plugins by running the `install` target. When using the "Unix Makefiles" build generator, this looks like: `make install`.
- **Build UI plugins.** You will need Qt 6.7.2 (as of writing) installed to build UI plugins.
- **Build UI plugins.** You will need Qt 6.7.2 installed to build UI plugins. We use a slightly modified [build configuration](https://github.com/Vector35/qt-build) internally that has some ABI-compatible fixes and changes to defaults, but a stock build can also work. Note that it is not recommended to use pre-built configurations from Homebrew. Either using the official installer or building from our repo is recommended.
- **Build headlessly.** If you are using a headless Binary Ninja distribution or you do not wish to build UI plugins, pass `-DHEADLESS=ON` to CMake when configuring the build.

### Troubleshooting
Expand Down
3 changes: 2 additions & 1 deletion binaryninjacore.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// Current ABI version for linking to the core. This is incremented any time
// there are changes to the API that affect linking, including new functions,
// new types, or modifications to existing functions or types.
#define BN_CURRENT_CORE_ABI_VERSION 86
#define BN_CURRENT_CORE_ABI_VERSION 87

// Minimum ABI version that is supported for loading of plugins. Plugins that
// are linked to an ABI version less than this will not be able to load and
Expand Down Expand Up @@ -3539,6 +3539,7 @@ extern "C"


BINARYNINJACOREAPI char* BNAllocString(const char* contents);
BINARYNINJACOREAPI char* BNAllocStringWithLength(const char* contents, size_t len);
BINARYNINJACOREAPI void BNFreeString(char* str);
BINARYNINJACOREAPI char** BNAllocStringList(const char** contents, size_t size);
BINARYNINJACOREAPI void BNFreeStringList(char** strs, size_t count);
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install on Windows, use the installer linked from the email you received afte

## License

When you first run Binary Ninja, it will prompt you for your license key. You should have received your license key via the same email that included your download links. If not, please contact [support](https://binary.ninja/support).
When you first run Binary Ninja, it will prompt you for your license key. You should have received your license key via the same email that included your download links. Additionally, you can manage your licenses in the [Binary Ninja Portal](https://portal.binary.ninja) or by contacting [support](https://binary.ninja/support).

## Opening Files

Expand Down
3 changes: 2 additions & 1 deletion docs/guide/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ All settings are uniquely identified with an identifier string. Identifiers are
|analysis|Initial Analysis Hold|When enabled, this setting pauses analysis upon opening the file, preventing all further analysis updates until the hold is manually cleared. It applies once per file load and must be set again for each new session, if needed.|`boolean`|`False`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.initialAnalysisHold'>analysis.initialAnalysisHold</a>|
|analysis|Keep Dead Code Branches|Keep unreachable code branches and associated basic blocks in HLIL.|`boolean`|`False`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.keepDeadCodeBranches'>analysis.keepDeadCodeBranches</a>|
|analysis|Advanced Analysis Cache Size|Controls the number of functions for which the most recent generated advanced analysis is cached. Large values may result in very high memory utilization.|`number`|`64`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.limits.cacheSize'>analysis.limits.cacheSize</a>|
|analysis|Maximum Recursion Depth for Expression Value Computation|Maximum depth to recurse when computing the value for an expression via mlil ssa.|`number`|`512`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.limits.expressionValueComputeMaxDepth'>analysis.limits.expressionValueComputeMaxDepth</a>|
|analysis|Max Function Analysis Time|Any functions that exceed this analysis time are deferred. A value of 0 disables this feature. The default value is 20 seconds. Time is specified in milliseconds.|`number`|`20000`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.limits.maxFunctionAnalysisTime'>analysis.limits.maxFunctionAnalysisTime</a>|
|analysis|Max Function Size|Any functions over this size will not be automatically analyzed. A value of 0 disables this feature. Size is specified in bytes.|`number`|`65536`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.limits.maxFunctionSize'>analysis.limits.maxFunctionSize</a>|
|analysis|Max Function Update Count|Any functions that exceed this incremental update count are deferred. A value of 0 disables this feature.|`number`|`100`|[`SettingsProjectScope`, `SettingsResourceScope`, `SettingsUserScope`]|<a id='analysis.limits.maxFunctionUpdateCount'>analysis.limits.maxFunctionUpdateCount</a>|
Expand Down Expand Up @@ -502,4 +503,4 @@ All settings are uniquely identified with an identifier string. Identifiers are
|updates|Show All Versions|Show all versions that are available for the current update channel in the UI.|`boolean`|`False`|[`SettingsUserScope`]|<a id='updates.showAllVersions'>updates.showAllVersions</a>|
|updates|Use Enterprise Server For Updates|Use the enterprise server to check for updates. (Ultimate Only)|`boolean`|`False`|[`SettingsUserScope`]|<a id='updates.useEnterpriseServer'>updates.useEnterpriseServer</a>|
|user|Email|The email that will be shown when collaborating with other users.|`string`| |[`SettingsUserScope`]|<a id='user.email'>user.email</a>|
|user|Name|The name that will be shown when collaborating with other users.|`string`| |[`SettingsUserScope`]|<a id='user.name'>user.name</a>|
|user|Name|The name that will be shown when collaborating with other users.|`string`| |[`SettingsUserScope`]|<a id='user.name'>user.name</a>|
168 changes: 16 additions & 152 deletions lang/c/pseudoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,28 +177,11 @@ BNSymbolDisplayResult PseudoCFunction::AppendPointerTextToken(const HighLevelILI

string PseudoCFunction::GetSizeToken(size_t size, bool isSigned)
{
char sizeStr[32];

switch (size)
{
case 0:
return {};
case 1:
return (isSigned ? "int8_t" : "uint8_t");
case 2:
return (isSigned ? "int16_t" : "uint16_t");
case 4:
return (isSigned ? "int32_t" : "uint32_t");
case 8:
return (isSigned ? "int64_t" : "uint64_t");
case 10:
return (isSigned ? "int80_t" : "uint80_t");
case 16:
return (isSigned ? "int128_t" : "uint128_t");
}

snprintf(sizeStr, sizeof(sizeStr), "%sint%" PRIuPTR "_t", isSigned ? "" : "u", size);
return {sizeStr};
return TypePrinter::GetDefault()->GetTypeString(
Type::IntegerType(size, isSigned),
nullptr,
QualifiedName()
);
}


Expand Down Expand Up @@ -538,7 +521,12 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
{
tokens.AppendOpenParen();
tokens.AppendOpenParen();
for (auto& token: instr.GetType()->GetTokens(GetArchitecture()->GetStandalonePlatform()))
auto typeTokens = TypePrinter::GetDefault()->GetTypeTokens(
instr.GetType(),
GetArchitecture()->GetStandalonePlatform(),
QualifiedName()
);
for (auto& token: typeTokens)
{
tokens.Append(token);
}
Expand All @@ -548,131 +536,7 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
if (settings && settings->IsOptionSet(ShowILOpcodes))
{
tokens.Append(OperationToken, "/*");
switch (instr.operation)
{
case HLIL_NOP: tokens.Append(OperationToken, "HLIL_NOP"); break;
case HLIL_BLOCK: tokens.Append(OperationToken, "HLIL_BLOCK"); break;
case HLIL_IF: tokens.Append(OperationToken, "HLIL_IF"); break;
case HLIL_WHILE: tokens.Append(OperationToken, "HLIL_WHILE"); break;
case HLIL_DO_WHILE: tokens.Append(OperationToken, "HLIL_DO_WHILE"); break;
case HLIL_FOR: tokens.Append(OperationToken, "HLIL_FOR"); break;
case HLIL_SWITCH: tokens.Append(OperationToken, "HLIL_SWITCH"); break;
case HLIL_CASE: tokens.Append(OperationToken, "HLIL_CASE"); break;
case HLIL_BREAK: tokens.Append(OperationToken, "HLIL_BREAK"); break;
case HLIL_CONTINUE: tokens.Append(OperationToken, "HLIL_CONTINUE"); break;
case HLIL_JUMP: tokens.Append(OperationToken, "HLIL_JUMP"); break;
case HLIL_RET: tokens.Append(OperationToken, "HLIL_RET"); break;
case HLIL_NORET: tokens.Append(OperationToken, "HLIL_NORET"); break;
case HLIL_GOTO: tokens.Append(OperationToken, "HLIL_GOTO"); break;
case HLIL_LABEL: tokens.Append(OperationToken, "HLIL_LABEL"); break;
case HLIL_VAR_DECLARE: tokens.Append(OperationToken, "HLIL_VAR_DECLARE"); break;
case HLIL_VAR_INIT: tokens.Append(OperationToken, "HLIL_VAR_INIT"); break;
case HLIL_ASSIGN: tokens.Append(OperationToken, "HLIL_ASSIGN"); break;
case HLIL_ASSIGN_UNPACK: tokens.Append(OperationToken, "HLIL_ASSIGN_UNPACK"); break;
case HLIL_VAR: tokens.Append(OperationToken, "HLIL_VAR"); break;
case HLIL_STRUCT_FIELD: tokens.Append(OperationToken, "HLIL_STRUCT_FIELD"); break;
case HLIL_ARRAY_INDEX: tokens.Append(OperationToken, "HLIL_ARRAY_INDEX"); break;
case HLIL_SPLIT: tokens.Append(OperationToken, "HLIL_SPLIT"); break;
case HLIL_DEREF: tokens.Append(OperationToken, "HLIL_DEREF"); break;
case HLIL_DEREF_FIELD: tokens.Append(OperationToken, "HLIL_DEREF_FIELD"); break;
case HLIL_ADDRESS_OF: tokens.Append(OperationToken, "HLIL_ADDRESS_OF"); break;
case HLIL_CONST: tokens.Append(OperationToken, "HLIL_CONST"); break;
case HLIL_CONST_DATA: tokens.Append(OperationToken, "HLIL_CONST_DATA"); break;
case HLIL_CONST_PTR: tokens.Append(OperationToken, "HLIL_CONST_PTR"); break;
case HLIL_EXTERN_PTR: tokens.Append(OperationToken, "HLIL_EXTERN_PTR"); break;
case HLIL_FLOAT_CONST: tokens.Append(OperationToken, "HLIL_FLOAT_CONST"); break;
case HLIL_IMPORT: tokens.Append(OperationToken, "HLIL_IMPORT"); break;
case HLIL_ADD: tokens.Append(OperationToken, "HLIL_ADD"); break;
case HLIL_ADC: tokens.Append(OperationToken, "HLIL_ADC"); break;
case HLIL_SUB: tokens.Append(OperationToken, "HLIL_SUB"); break;
case HLIL_SBB: tokens.Append(OperationToken, "HLIL_SBB"); break;
case HLIL_AND: tokens.Append(OperationToken, "HLIL_AND"); break;
case HLIL_OR: tokens.Append(OperationToken, "HLIL_OR"); break;
case HLIL_XOR: tokens.Append(OperationToken, "HLIL_XOR"); break;
case HLIL_LSL: tokens.Append(OperationToken, "HLIL_LSL"); break;
case HLIL_LSR: tokens.Append(OperationToken, "HLIL_LSR"); break;
case HLIL_ASR: tokens.Append(OperationToken, "HLIL_ASR"); break;
case HLIL_ROL: tokens.Append(OperationToken, "HLIL_ROL"); break;
case HLIL_RLC: tokens.Append(OperationToken, "HLIL_RLC"); break;
case HLIL_ROR: tokens.Append(OperationToken, "HLIL_ROR"); break;
case HLIL_RRC: tokens.Append(OperationToken, "HLIL_RRC"); break;
case HLIL_MUL: tokens.Append(OperationToken, "HLIL_MUL"); break;
case HLIL_MULU_DP: tokens.Append(OperationToken, "HLIL_MULU_DP"); break;
case HLIL_MULS_DP: tokens.Append(OperationToken, "HLIL_MULS_DP"); break;
case HLIL_DIVU: tokens.Append(OperationToken, "HLIL_DIVU"); break;
case HLIL_DIVU_DP: tokens.Append(OperationToken, "HLIL_DIVU_DP"); break;
case HLIL_DIVS: tokens.Append(OperationToken, "HLIL_DIVS"); break;
case HLIL_DIVS_DP: tokens.Append(OperationToken, "HLIL_DIVS_DP"); break;
case HLIL_MODU: tokens.Append(OperationToken, "HLIL_MODU"); break;
case HLIL_MODU_DP: tokens.Append(OperationToken, "HLIL_MODU_DP"); break;
case HLIL_MODS: tokens.Append(OperationToken, "HLIL_MODS"); break;
case HLIL_MODS_DP: tokens.Append(OperationToken, "HLIL_MODS_DP"); break;
case HLIL_NEG: tokens.Append(OperationToken, "HLIL_NEG"); break;
case HLIL_NOT: tokens.Append(OperationToken, "HLIL_NOT"); break;
case HLIL_SX: tokens.Append(OperationToken, "HLIL_SX"); break;
case HLIL_ZX: tokens.Append(OperationToken, "HLIL_ZX"); break;
case HLIL_LOW_PART: tokens.Append(OperationToken, "HLIL_LOW_PART"); break;
case HLIL_CALL: tokens.Append(OperationToken, "HLIL_CALL"); break;
case HLIL_CMP_E: tokens.Append(OperationToken, "HLIL_CMP_E"); break;
case HLIL_CMP_NE: tokens.Append(OperationToken, "HLIL_CMP_NE"); break;
case HLIL_CMP_SLT: tokens.Append(OperationToken, "HLIL_CMP_SLT"); break;
case HLIL_CMP_ULT: tokens.Append(OperationToken, "HLIL_CMP_ULT"); break;
case HLIL_CMP_SLE: tokens.Append(OperationToken, "HLIL_CMP_SLE"); break;
case HLIL_CMP_ULE: tokens.Append(OperationToken, "HLIL_CMP_ULE"); break;
case HLIL_CMP_SGE: tokens.Append(OperationToken, "HLIL_CMP_SGE"); break;
case HLIL_CMP_UGE: tokens.Append(OperationToken, "HLIL_CMP_UGE"); break;
case HLIL_CMP_SGT: tokens.Append(OperationToken, "HLIL_CMP_SGT"); break;
case HLIL_CMP_UGT: tokens.Append(OperationToken, "HLIL_CMP_UGT"); break;
case HLIL_TEST_BIT: tokens.Append(OperationToken, "HLIL_TEST_BIT"); break;
case HLIL_BOOL_TO_INT: tokens.Append(OperationToken, "HLIL_BOOL_TO_INT"); break;
case HLIL_ADD_OVERFLOW: tokens.Append(OperationToken, "HLIL_ADD_OVERFLOW"); break;
case HLIL_SYSCALL: tokens.Append(OperationToken, "HLIL_SYSCALL"); break;
case HLIL_TAILCALL: tokens.Append(OperationToken, "HLIL_TAILCALL"); break;
case HLIL_INTRINSIC: tokens.Append(OperationToken, "HLIL_INTRINSIC"); break;
case HLIL_BP: tokens.Append(OperationToken, "HLIL_BP"); break;
case HLIL_TRAP: tokens.Append(OperationToken, "HLIL_TRAP"); break;
case HLIL_UNDEF: tokens.Append(OperationToken, "HLIL_UNDEF"); break;
case HLIL_UNIMPL: tokens.Append(OperationToken, "HLIL_UNIMPL"); break;
case HLIL_UNIMPL_MEM: tokens.Append(OperationToken, "HLIL_UNIMPL_MEM"); break;
case HLIL_FADD: tokens.Append(OperationToken, "HLIL_FADD"); break;
case HLIL_FSUB: tokens.Append(OperationToken, "HLIL_FSUB"); break;
case HLIL_FMUL: tokens.Append(OperationToken, "HLIL_FMUL"); break;
case HLIL_FDIV: tokens.Append(OperationToken, "HLIL_FDIV"); break;
case HLIL_FSQRT: tokens.Append(OperationToken, "HLIL_FSQRT"); break;
case HLIL_FNEG: tokens.Append(OperationToken, "HLIL_FNEG"); break;
case HLIL_FABS: tokens.Append(OperationToken, "HLIL_FABS"); break;
case HLIL_FLOAT_TO_INT: tokens.Append(OperationToken, "HLIL_FLOAT_TO_INT"); break;
case HLIL_INT_TO_FLOAT: tokens.Append(OperationToken, "HLIL_INT_TO_FLOAT"); break;
case HLIL_FLOAT_CONV: tokens.Append(OperationToken, "HLIL_FLOAT_CONV"); break;
case HLIL_ROUND_TO_INT: tokens.Append(OperationToken, "HLIL_ROUND_TO_INT"); break;
case HLIL_FLOOR: tokens.Append(OperationToken, "HLIL_FLOOR"); break;
case HLIL_CEIL: tokens.Append(OperationToken, "HLIL_CEIL"); break;
case HLIL_FTRUNC: tokens.Append(OperationToken, "HLIL_FTRUNC"); break;
case HLIL_FCMP_E: tokens.Append(OperationToken, "HLIL_FCMP_E"); break;
case HLIL_FCMP_NE: tokens.Append(OperationToken, "HLIL_FCMP_NE"); break;
case HLIL_FCMP_LT: tokens.Append(OperationToken, "HLIL_FCMP_LT"); break;
case HLIL_FCMP_LE: tokens.Append(OperationToken, "HLIL_FCMP_LE"); break;
case HLIL_FCMP_GE: tokens.Append(OperationToken, "HLIL_FCMP_GE"); break;
case HLIL_FCMP_GT: tokens.Append(OperationToken, "HLIL_FCMP_GT"); break;
case HLIL_FCMP_O: tokens.Append(OperationToken, "HLIL_FCMP_O"); break;
case HLIL_FCMP_UO: tokens.Append(OperationToken, "HLIL_FCMP_UO"); break;
case HLIL_UNREACHABLE: tokens.Append(OperationToken, "HLIL_UNREACHABLE"); break;
case HLIL_WHILE_SSA: tokens.Append(OperationToken, "HLIL_WHILE_SSA"); break;
case HLIL_DO_WHILE_SSA: tokens.Append(OperationToken, "HLIL_DO_WHILE_SSA"); break;
case HLIL_FOR_SSA: tokens.Append(OperationToken, "HLIL_FOR_SSA"); break;
case HLIL_VAR_INIT_SSA: tokens.Append(OperationToken, "HLIL_VAR_INIT_SSA"); break;
case HLIL_ASSIGN_MEM_SSA: tokens.Append(OperationToken, "HLIL_ASSIGN_MEM_SSA"); break;
case HLIL_ASSIGN_UNPACK_MEM_SSA: tokens.Append(OperationToken, "HLIL_ASSIGN_UNPACK_MEM_SSA"); break;
case HLIL_VAR_SSA: tokens.Append(OperationToken, "HLIL_VAR_SSA"); break;
case HLIL_ARRAY_INDEX_SSA: tokens.Append(OperationToken, "HLIL_ARRAY_INDEX_SSA"); break;
case HLIL_DEREF_SSA: tokens.Append(OperationToken, "HLIL_DEREF_SSA"); break;
case HLIL_DEREF_FIELD_SSA: tokens.Append(OperationToken, "HLIL_DEREF_FIELD_SSA"); break;
case HLIL_CALL_SSA: tokens.Append(OperationToken, "HLIL_CALL_SSA"); break;
case HLIL_SYSCALL_SSA: tokens.Append(OperationToken, "HLIL_SYSCALL_SSA"); break;
case HLIL_INTRINSIC_SSA: tokens.Append(OperationToken, "HLIL_INTRINSIC_SSA"); break;
case HLIL_VAR_PHI: tokens.Append(OperationToken, "HLIL_VAR_PHI"); break;
case HLIL_MEM_PHI: tokens.Append(OperationToken, "HLIL_MEM_PHI"); break;
}
tokens.Append(OperationToken, fmt::format("{}", instr.operation));
tokens.Append(OperationToken, "*/");
tokens.Append(TextToken, " ");
}
Expand Down Expand Up @@ -1179,11 +1043,11 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
const auto platform = GetHighLevelILFunction()->GetFunction()->GetPlatform();
const auto prevTypeTokens =
variableType ?
variableType->GetTokensBeforeName(platform, variableType.GetConfidence()) :
TypePrinter::GetDefault()->GetTypeTokensBeforeName(variableType, platform, variableType.GetConfidence()) :
vector<InstructionTextToken>{};
const auto postTypeTokens =
variableType ?
variableType->GetTokensAfterName(platform, variableType.GetConfidence()) :
TypePrinter::GetDefault()->GetTypeTokensAfterName(variableType, platform, variableType.GetConfidence()) :
vector<InstructionTextToken>{};

// Check to see if the variable appears live
Expand Down Expand Up @@ -1245,11 +1109,11 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
const auto platform = GetHighLevelILFunction()->GetFunction()->GetPlatform();
const auto prevTypeTokens =
variableType ?
variableType->GetTokensBeforeName(platform, variableType.GetConfidence()) :
TypePrinter::GetDefault()->GetTypeTokensBeforeName(variableType, platform, variableType.GetConfidence()) :
vector<InstructionTextToken>{};
const auto postTypeTokens =
variableType ?
variableType->GetTokensAfterName(platform, variableType.GetConfidence()) :
TypePrinter::GetDefault()->GetTypeTokensAfterName(variableType, platform, variableType.GetConfidence()) :
vector<InstructionTextToken>{};

if (variableType)
Expand Down
Loading