| Age | Commit message (Collapse) | Author |
|
The `ExportsTreeView` now asks the model to pause / resume updates when
its visibility changes. When paused, all notifications from the view are
ignored. When resumed, notifications set a flag to indicate that an
update is needed and resume the update timer if it is not already
active. The timer is stopped after an update is processed.
There's some extra complexity here to avoid emitting a signal for every
`BinaryView` notification that is processed. These notifications are
typically generated on background threads. The overhead of emitting a
signal and it being routed to the main thread adds up given the number
of notifications involved when loading a large binary.
|
|
|
|
|
|
on references
|
|
|
|
|
|
|
|
|
|
`__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.
|
|
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.
|
|
`SymbolQueue`'s lifetime was being managed via `new` / `delete`. This
was error-prone in the face of code that can a) throw exceptions, or b)
return early. Typically the solution would be to move to
`std::unique_ptr` and call it a day, but nothing is ever easy.
The `SymbolQueue`s created by `ObjCProcessor` are intended to live for
the duration of `ProcessObjCData` and `ProcessCFStrings` methods. Since
they are used multiple levels down the call tree, the active
`SymbolQueue` is stored as a member variable on `ObjCProcessor`.
Switching to `std::unique_ptr` would ensure that the `SymbolQueue` is
destroyed, but would leave a dangling pointer in the member variable.
To address this I'm introducing a `ScopedSingleton` class that provides
a thread-local singleton whose lifetime is controlled by a guard object.
`ProcessObjCData` / `ProcessCFStrings` call `ScopedSymbolQueue::Make`
and store the returned guard object in a local. Code that accesses the
symbol queue uses `ScopedSymbolQueue::Get` to retrieve the current
instance. The guard object ensures the `SymbolQueue` is deleted and the
`current` pointer is cleared no matter how the scope is exited.
A better longer-term design is to introduce a class for processing the
Objective-C runtime metadata and a class for processing constants such
as `CFString`s. These could directly own the symbol queue so it would be
accessible to any member functions that define symbols. This is a more
involved refactoring than I have time for right now.
|
|
|
|
When clicking outside the command palette, focus is now properly
transferred to the clicked widget instead of being restored to
the previously focused widget. Escape key still restores focus
as expected.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Need this for WARP, see next commit
|
|
To allow for creating reports outside the context of a view
|
|
|
|
|
|
Discovered when poking at variable values in WARP
|
|
|
|
|
|
appended for a given instruction
|
|
This fixes an issue with certain shared cache binaries where a VFT was placed at the tail of the const data section
|
|
This is enabled as is, there might need to be some restrictions later on, does not seem to have an unreasonable impact analysis time
|
|
|
|
The clippy complaint was a real issue: the doc comment intended for
the commented-out `unresolved_indirect_branches` was being interpreted as
the start of the doc comment for the following function.
|
|
|
|
|
|
low level IL expressions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
duplicating work
|
|
* Generates IL for cross references only when visible instead of all at once.
* Releases memory for IL after the cross references retrieves the
tokens.
* Much faster algorithm for updating IL when functions change.
* Don't refresh cross references at all if the widget isn't visible.
Retreiving the new set of cross references is deferred until the
widget becomes visible again.
* Don't redo the query for the list of cross references when anything in
the entire UI changes, even the window layout. Only recompute the list
when an event for a new cross reference selection comes in.
|
|
of the _user_ variant
|
|
|
|
|
|
|
|
Another set of bugs caused by undo and main thread actions, when will it end
|