summaryrefslogtreecommitdiff
path: root/view
AgeCommit message (Collapse)Author
2025-07-28SharedCache: Fix a compile error w/ GCCkat
2025-07-28Improve and migrate to fmt logging functions in Mach-O/KernelCache/SharedCachekat
2025-07-23KernelCache: Fix double-click load dialog in symbol listkat
2025-07-22Fix an incorrect offset used in KernelCache header parsingkat
2025-07-21Fix MachO loading some settings too earlyGlenn Smith
Fixes #7117
2025-07-16Miscellaneous leak fixes in MachoView and ObjCProcessorMark Rowe
2025-07-16Mach-O/KernelCache warning cleanupkat
2025-07-15Added search placeholder for DSCView and KCView.Hongyu Chen
2025-07-15[KernelCache] Fix misc warningsMason Reed
2025-07-15Fix shared cache cmake artifact in kernel cacheMason Reed
2025-07-14Disable outlining in .gnu_debugdata to prevent incorrect symbol definitions.Brian Potchik
2025-07-14Revert "Update Objective-C Workflow to use the meta workflow."Brian Potchik
This reverts commit 5bafe5c7bdb0b56037a0b5c573236f9c6367353a.
2025-07-14Update Objective-C Workflow to use the meta workflow.Brian Potchik
2025-07-14[Mach-O] Handling for special library ordinals used in binding informationkat
2025-07-10[DSC] Performance improvements and clean-up in SymbolTableViewMark Rowe
Avoid copying the vector of symbols where possible. When no filter string is applied we no longer copy the entire vector symbols by having the symbols used for display be indirected via a pointer. It points either to the unfiltered symbols or the filtered symbols. Some unncessary copies have been removed by using `std::move` where appropriate. Filtering has been updated to avoid `std::vector::reserve` / `std::vector::shrink_to_fit` in favor of letting the filtered vector control its own growth and reuse its buffer. This avoids allocating a ~100MB buffer every time we update the filter only to later reallocate and move the contents into a smaller buffer. Instead the buffer grows via `std::vector`'s usual growth algorithm and it is preserved across filter calls to avoid unnecessarily reallocating it, and only shrink the buffer if it has shrunk significantly vs previous iterations.
2025-07-10[DSC] Use BNAllocStringWithLength when copying strings for the APIMark Rowe
We're copying `std::string` objects that know their length. There's no reason to force a call to `strlen`.
2025-07-10[DSC] Fix GetRegionAt / optimize GetRegionContainingMark Rowe
`GetRegionAt` was really providing the semantics of `GetRegionContaining` due to `m_regions` being an `AddressRangeMap` and using transparent comparators to allow `find` to work with any address in the range. `GetRegionAt` is updated to verify that the start address of the region that was found matches the requested address. `GetRegionContaining` is updated to use `AddressRangeMap::find` rather than doing a linear search over all regions.
2025-07-09[MachO] Treat a binary as containing Objective-C metadata if it has __objc_stubsMark Rowe
`__objc_stubs` is not technically Objective-C metadata, but binaries containing Objective-C stubs need the same processing. `MachoView` was previously only enabling the Objective-C workflow if it thinks there is type metadata. The same criteria was used to determine whether to process Objective-C metadata via `MachoObjCProcessor`. This meant binaries with `__objc_stubs` but no Objective-C type metadata were not running the Objective-C workflow, preventing stub functions from being inlined during analysis.
2025-07-08[MachO] Avoid leaking MachoObjCProcessorMark Rowe
This would leak if parsing of CFStrings was enabled while parsing of Objective-C metadata was disabled. It would also leak if exceptions were thrown or early returns were taken in the ~500 lines between where the object was allocated and it was deleted.
2025-07-08Parse sections containing Objective-C constantsMark Rowe
This adds support for the `__objc_arrayobj`, `_objc_dictobj`, `__objc_intobj`, `__objc_floatobj`, `__objc_doubleobj` and `__objc_dateobj` sections that contain Objective-C constants. These are emitted by Apple's versions of Clang for `const` literals, amongst other things.
2025-07-07[ObjC] Fix handling of relative method selectors with MSVCMark Rowe
The order that the operands to `+` are evaluated in is unspecified. Clang happens to evaluate them left to right and gives the expected answer. MSVC picks the opposite order and so the value it computes is off by 4. This was resulting in missing method names when arm64 binaries containing Objective-C are analyzed on Windows.
2025-07-07KernelCache rewritekat
2025-07-05Fix ELF loader image base calculation to include memory-only PT_LOAD segments.Brian Potchik
2025-07-04[SharedCache] Enqueue pointer sweep on image/region loadMason Reed
This is enabled as is, there might need to be some restrictions later on, does not seem to have an unreasonable impact analysis time
2025-07-03Expose Add/RemoveDataReference and ensure BinaryViews use this API instead ↵Peter LaFosse
of the _user_ variant
2025-07-02Added no export trie data detection.Hongyu Chen
2025-06-29[powerpc] Full merge of PowerPC disassembler PRs, including:Galen Williamson
* Remove dependency on capstone for PowerPC disassembly #6292 * Add support for PowerPC VLE instruction set #6740 * Add support for paired-single instructions #6821 * Various post-merge fixes and tweaks to disassembly and lifting * Removal of dependence on capstone for assembler's scoring mechanism (capstone currently disabled, but not removed from codebase yet)
2025-06-25Fix cxx20 build issue on Linux.Alexander Taylor
Apparently the compiler on macOS is less strict about this change?
2025-06-25Fix cxx20 compiler warnings.Alexander Taylor
2025-06-25Fix cxx20 compiler errors.Alexander Taylor
2025-06-25Update CXX_STANDARD to 20.Alexander Taylor
Also update minimum CMake version.
2025-06-25Remove implicit conversions from Confidence to underlying type, these can ↵Rusty Wagner
cause bugs and also issues with C++20
2025-06-25[view][elf] Fixed duplicate NOTE section loading in address space.Hongyu Chen
NOTE sections were being treated as loadable segments when they should be metadata-only. The NOTE section had the allocatable flag set. The program correctly checked for SHF_ALLOC but didn't exclude NOTE sections explicitly. NOTE sections consumed 0x50 bytes at the base address
2025-06-16Use heuristic confidence for ELF symbol auto-type inference.Brian Potchik
2025-06-06Objective-C Processor: Remove vestigial code tracking whether view was ↵kat
backed by a database
2025-06-04[MachO] Don't add symbols when processing bind fixupsMark Rowe
The target of the bind opcode has its symbol applied when the dynamic symbol table is parsed. This was previously adding a symbol at the fixed-up address with the name of the symbol being bound. This was resulting in dozens of `_OBJC_CLASS_$_NSObject`, `_OBJC_METACLASS_$_NSObject`, and `__objc_empty_cache` symbols being created: one for each `objc_class` that referenced those symbols.
2025-06-04Fix calls to BNFreeString in kernel cache APIAlexander Khosrowshahi
Amends calls to BNFreeString in kernel cache API that were causing `get_macho_header_for_address`, `get_macho_header_for_image`, `get_image_name_for_address`, and `get_name_for_address` to fail. Fixes https://github.com/Vector35/binaryninja-api/issues/6855
2025-06-03[MachoView] Add support of __init_offsetsObriv Mostov
2025-05-30Don't query the template simplifier setting while demangling symbolsPeter LaFosse
2025-05-30Misc shared cache improvementsMason Reed
- Removed last use of user object creation in objective-c - Fixed function type info being omitted from certain images loaded automatically - Add TODO about undo action in view init. This is not critical, just a non-actionable warning because of a design flaw I will restate this again for anyone in the future, until the undo action system is thread-safe avoid calling it from any thread other than the main thread, it is very easy to deadlock or cause other issues. That goes for basically all user analysis object creation.
2025-05-28Support for Linux x86-64 x32 ABIBrandon Miller
2025-05-21[SharedCache] Fix .dylddata sections failing to propagate constantsMason Reed
This occurred because prior to the change made in build `7484` we short-circuited when the pointer pointed to a read only segment, now that we consult the section the sections semantics were incorrect and failed, this fixes the dyld data sections to have correct semantics.
2025-05-13[CMake] Report compatibility with 3.15 to silence deprecation warningsGlenn Smith
2025-05-13Rework Export Trie parser to avoid recursion, improve error checkingkat
2025-05-06[SharedCache] Add activities to core.function.metaAnalysis rather than a new ↵Mark Rowe
named workflow Activities are registered with a `viewType` predicate to ensure they only run in shared cache views. Adding activities to `core.function.metaAnalysis` lets activities registered by plug-ins run in the shared cache without the plug-ins having to be aware of the shared cache. Work towards #6779.
2025-05-06[SharedCache]"Fix" possible deadlock when loading images from the UIMason Reed
This disables the filter for already added images, there is another check when we go to apply so that it fails early but the real issue is the fact this happened at all. Within the Objective-C processor there is a call to `BeginUndoActions` which calls `ExecuteOnMainThreadAndWait`, while the objective-c processor is holding the lock to the controller. To fix this we really need to make the undo action system not call `ExecuteOnMainThreadAndWait` which is deadlock city, to do that really the only solution is to make the `UndoBuffer` thread-safe and remove the calls to execute undo related stuff on the main thread, this will make it so that when a call to `BeginUndoActions` there is no requirement to wait on pending undo actions as they are all submitted immediately.
2025-05-03[SharedCache] Avoid reading header fields outside of the bounds of the headerDaniel Roethlisberger
Use mappingOffset as an upper bound for the header size, and avoid reading any header fields from beyond that offset. Co-authored-by: Mason Reed <mason@vector35.com>
2025-05-02[SharedCache] Have VirtualMemoryReader get the address size from the ↵Mark Rowe
underlying VirtualMemory
2025-05-02[SharedCache] Fix parsing of Objective-C metadataMark Rowe
8267ab475cb2ac82fd3724c009f21e8e30143f6b introduced a logic error in VirtualMemoryReader::ReadPointer that caused VirtualMemoryReader to attempt to read pointers from the wrong address, breaking parsing of Objective-C metadata.
2025-04-28[SharedCache] Support loading iOS shared caches older than 11Mason Reed
Still need to fix branch island images not being picked up