summaryrefslogtreecommitdiff
path: root/view
AgeCommit message (Collapse)Author
2025-12-10[Rust] Move architecture module code into more reasonable filesMason Reed
To keep backwards compatibility for commonly referenced code we re-export them within the architecture module. Also does some light refactoring of some newly added APIs to keep them more consistent with other parts of the codebase.
2025-12-08[KernelCache] Wrap section creation within BeginBulkAddSegments / ↵Mark Rowe
EndBulkAddSegments This defers rebuilding of the section map until after all sections for an image have been added, rather than having the section map be rebuilt after adding each section.
2025-12-08[DSC] Wrap section creation within BeginBulkAddSegments / EndBulkAddSegmentsMark Rowe
This defers rebuilding of the section map until after all sections for an image have been added, rather than having the section map be rebuilt after adding each section.
2025-12-08Introduce an RAII type for managing bulk symbol modificationsMark Rowe
Fixes https://github.com/Vector35/binaryninja-api/issues/7666. Correctly managing the state of bulk symbol modifications via `BeginBulkModifySymbols` / `EndBulkModifySymbols` is error-prone in the face of exceptions and early returns. Leaking a bulk symbol modification can leave the view in a state where no further changes to symbols will be applied. All users of the C++ API are encouraged to move from `BeginBulkModifySymbols` / `EndBulkModifySymbols` to the new `BulkSymbolModification` class.
2025-12-04[DSC] Fix unhandled exception when opening secondary cache file with ↵Mason Reed
unbacked regions Fixes https://github.com/Vector35/binaryninja-api/issues/7724
2025-11-26[DSC] Place synthetic sections after the cache's address rangeMark Rowe
This ensures they do not overlap with any images that may later be loaded from the shared cache.
2025-11-26[KernelCache] Place synthetic sections after the cache's address rangeMark Rowe
This ensures they do not overlap with any images that may later be loaded from the kernel cache. Fixes https://github.com/Vector35/binaryninja-api/issues/7634.
2025-11-25Update to Qt 6.10.1Rusty Wagner
2025-11-17Fix some compiler warningsRusty Wagner
2025-11-11[KernelCache] Remove 'Load Selected Image and Dependencies'Mark Rowe
Fixes https://github.com/Vector35/binaryninja-api/issues/7615. The dependency loading for kernel cache images was copied from the shared cache code, and looks for `LC_LOAD_DYLIB` load commands to determine the direct dependencies of an image. Images in kernel caches don't use `LC_LOAD_DYLIB` load commands so no dependencies were ever loaded. It could, however, result in a crash.
2025-11-04[MachO] Set display name of memory regions to match the segment names they ↵Mark Rowe
correspond to
2025-11-04Update FilterEdit and FilterTarget to preserve existing selectionsMark Rowe
The down and enter keys now preserve an existing selection in the associated list or table views, rather than unconditionally selecting or activating the first item.
2025-11-04Fix whitespace. (skip-ci)Brian Potchik
2025-10-23[KernelCache] Set segment permissions based on how XNU initially maps themMark Rowe
XNU maps kernel cache segments in with different permissions than the load commands indicate. For instance, `__DATA_CONST` is initially mapped as read-write before later being re-mapped as read-only. Treating it as read-only results in analysis falsely assuming that global variables cannot change. To work around this we maintain a mapping from segment name to initial permissions (i.e., most lax permissions) and favor them over permissions derived from the segment load command. Section semantics are also derived from the segment's permissions when the segment is present in the mapping. The mapping is based on the initial permissions established by `arm_vm_prot_init` within the XNU source.
2025-10-22[MachO] Fix GCC buildMark Rowe
Clang, MSVC and GCC all have different opinions about what's permissible with initialization from a braced initializer list.
2025-10-22[MachO] Fix Windows buildMark Rowe
2025-10-22[Mach-O] Refactor fixup chain parsingMark Rowe
The parsing of fix-up chains is moved out of `MachoView` and into its own class. It deals purely in terms of offsets into the Mach-O slice. `MachoView` translates those offsets to mapped addresses when needed. This is primarily aimed at fixing incorrect handling of pointer formats that use offsets where in some cases the relocations would be applied at incorrect addresses due to confusion between file offsets, Mach-O slice offsets, and VM offsets. It incidentally fixes addends from bind operations not being respected. These show up most frequently in C++ RTTI information.
2025-10-21better validation for malformed PE RSRC records and cleanup (fixes an ↵Jordan Wiens
infinite loop)
2025-10-21fix pe section debug loggingJordan Wiens
2025-10-18Add DecodeWithContext to LZFSETransform.Brian Potchik
2025-10-14Fix issue #7247WeiN76LQh
See https://github.com/Vector35/binaryninja-api/issues/7247#issuecomment-3392192797 for details.
2025-10-11Fix demo ifdefsJosh Ferrell
2025-10-10Add password prompting for encrypted containers in Container Browser.Brian Potchik
2025-10-07Remove old banners from DSC and KC pluginsMason Reed
Extra noise in the CMake configure step, much of the value from these has been removed after the refactor(s), e.g. metadata version is no longer used
2025-10-03Add zero-copy data pointer access for BinaryData objects for API-side ↵Brian Potchik
container transforms.
2025-10-03Update IMG4 transform to use DecodeWithContext and synthesize a filename for ↵Brian Potchik
the payload.
2025-10-02[MachO] Tweak handling of LC_FUNCTION_STARTSMark Rowe
`LC_FUNCTION_STARTS` includes both functions and jump tables. We want to avoid calling `AddFunctionForAnalysis` on jump tables since it can result in a function being created at the jump table's location with a bogus body. We already skip adding functions for entries in `LC_FUNCTION_STARTS` if the lifting of their first few bytes end up including `LLIL_UNDEF`. However, arm64 intentionally lifts `udf` instructions (i.e., opcodes in the Permanently Undefined range) to `LLIL_TRAP` in order to preserve the immediate portion of the instruction. To address this, `MachoView::IsValidFunctionStart` now returns false if the first lifted instruction is `LLIL_TRAP` in addition to when the lifting contains `LLIL_UNDEF`.
2025-10-01Cleanup for some container format handling.Brian Potchik
2025-09-30Initial support for opening container formats.Brian Potchik
2025-09-29Treat .got.plt as read-only for HexagonBrandon Miller
This allows types to propagate to thunks in cases where there are GOT entries for internal functions
2025-09-29Apply platform types on Hexagon statically linked binariesBrandon Miller
2025-09-25Sort table views in the shared cache / kernel cache triage views by address ↵Mark Rowe
by default The table views previously visually suggested they were being sorted by address, but in practice they were not sorted until the user set an explicit sort order by clicking on a column header.
2025-09-17[DSC] Ignore .a2s files when loading a shared cacheMark Rowe
These files are present alongside iOS 26 shared caches. Explicitly ignoring them avoids an error being logged to the console.
2025-09-17[DSC] Rework handling of .symbols files to be compatible with iOS 15Mark Rowe
In some iOS 15 caches, the .symbols file's mapping has an address of 0. This would cause it to be returned by `SharedCache::GetEntryContaining` and loaded into the view. The .symbols file contains the local symbol tables for images in the shared cache. It is not intended to be mapped into the same address space as the rest of the shared cache. `SharedCache` now tracks the symbols cache entry separately from other entries. A dedicated `VirtualMemory` region is used when accessing the data it contains. This could be a `FileAccessor`, but that would require additional changes within `SharedCacheMachOHeader`. `SharedCacheMachOProcessor` now directly accesses the local symbols cache entry rather than needing to search for it.
2025-09-17[DSC] Support relative direct selectors in older shared cache versionsMark Rowe
Prior to macOS 13 / iOS 16, the base offset to use for relative direct selector references within Objective-C message lists was stored within the `__TEXT,__objc_opt_ro` section of /usr/lib/libobjc.A.dylib.
2025-09-17[MachO] Populate external links with library imports for files in projectsMark Rowe
A mapping from imported symbol names to libraries is added to metadata. This is used to populate external links for files within projects, following the lead of `PEView`.
2025-09-05[KernelCache] Pass the correct flags when adding an image's segmentsMark Rowe
Fixes https://github.com/Vector35/binaryninja-api/issues/7354.
2025-09-02[SharedCache] Move plugin_rpath calls into BN_INTERNAL_BUILD blocksMark Rowe
These calls set the rpaths used for release builds of the dylibs using a macro that isn't available in the API repository. They are not necessary when building the shared cache plug-in outside of the context of the app.
2025-08-27Rewrite Obj-C workflow in RustMark Rowe
This is functionally equivalent to the previous workflow_objc, with the following changes: 1. It mutates the `core.function.metaAnalysis` workflow rather than registering a new named workflow. The activities now all check for the presence of the Objective-C metadata added by `ObjCProcessor` to determine whether they should do work, rather than relying on `MachoView` to override the function workflow when Objective-C metadata is present. This fixes https://github.com/Vector35/binaryninja-api/issues/6779. 2. The auto-inlining of `objc_msgSend` selector stub functions is performed in a separate activity from the processing of `objc_msgSend` call sites. The selector stub inlining activity is configured so that it does not run in `DSCView` as the shared cache needs different behavior for stub functions more generally that `SharedCacheWorkflow` already provides. 3. The way that types like `id` and `SEL` are referenced is fixed so that they show up as `id` rather than `objc_struct*`. This also replaces the Objective-C portion of the shared cache's workflow, and incorporates several bug fixes that had been applied to it but not the standalone Objective-C workflow.
2025-08-20Deprecate Workflow::Instance in favor of Workflow::Get and Workflow::GetOrCreateMark Rowe
Calls to `Workflow::Instance` that were looking up a built-in workflow name are updated to use `Workflow::Get`. Others use `Workflow::GetOrCreate`.
2025-08-20Fix memory leak in LZFSE transform along with some other fixes.Brian Potchik
2025-08-14[Mac] Consistently specify rpaths for plug-insMark Rowe
C++ plug-ins now consistently use the `plugin_rpath` or `ui_plugin_rpath` macros to ensure they have `SKIP_BUILD_RPATH` set when building on Mac (i.e., no `LC_RPATH` is added). Rust plug-ins have their build.rs updated to only specify `-Wl,-rpath` when building for Linux. It is not needed on macOS. On macOS we instead explicitly specify an `@rpath`-relative install name. This doesn't change any behavior, but avoids leaving an absolute path as the library's install name and is consistent with CMake's behavior for C++ plug-ins.
2025-08-14ELFView performance fix: avoid calling GetSectionsAt in the innerloopPeter LaFosse
When the section list gets large GetSectionsAt becomes quite slow instead the the whole list of sections outside the loop and just encour that hit once. It could probably be made even faster if we used an interval tree but then we have to pay the cost of building the tree which may be more nauanced
2025-08-14Ensure ELFView only add segments in a Begin/EndBulkAddSegments contextPeter LaFosse
2025-08-13[DSC] Add support for DriverKit shared cachesMark Rowe
2025-08-05[ELF] Fix a memory leak when parsing .gnu_debugdataMark Rowe
2025-08-01Add LogForException APIs to pass stack trace information separate from the ↵Rusty Wagner
message
2025-07-30Add dependency tracking to the Python code generationMark Rowe
This ensures that the Python source files are only generated and copied into the output directory if inputs have changed, rather than being done unconditionally.
2025-07-30[CMake] Specify CONFIGURE_DEPENDS for all file(GLOB ..)Mark Rowe
This ensures that CMake detects when files that match the glob are added or removed.
2025-07-29Added check for sharedobject without program header section start address.Hongyu Chen