diff options
| author | Mark Rowe <mark@vector35.com> | 2025-09-04 19:21:48 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-09-17 21:28:50 -0700 |
| commit | 4fccb2c8c9673247bfb9ba176021c9889ce680e8 (patch) | |
| tree | cd7900681d55ad235bddf3e05b8725abccf91fa1 /plugins/workflow_objc/src/error.rs | |
| parent | 5489c5b71773ac020f0c9dec134fe92310d4cb36 (diff) | |
[ObjC] Propagate type information from calls to `[super init]`
Calls to `objc_msgSendSuper2` with a selector in the `init` family are
detected and their arguments are analyzed to determine the receiver
class. A call type adjustment is added to update the return type.
This handles most calls to `[super init]` from Objective-C code as the
compiler generates a straightforward code sequence for these calls. Some
calls from Swift are handled, but the Swift compiler generates more varied
code so additional work is needed for complete coverage.
Diffstat (limited to 'plugins/workflow_objc/src/error.rs')
| -rw-r--r-- | plugins/workflow_objc/src/error.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/workflow_objc/src/error.rs b/plugins/workflow_objc/src/error.rs index 75328226..8353d015 100644 --- a/plugins/workflow_objc/src/error.rs +++ b/plugins/workflow_objc/src/error.rs @@ -11,13 +11,20 @@ impl From<()> for WorkflowRegistrationError { } } +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum ILLevel { + Low, + Medium, + High, +} + #[derive(Error, Debug)] pub enum Error { - #[error("Unable to retrieve low-level IL for function at {func_start:#x}")] - MissingLowLevelIL { func_start: u64 }, + #[error("Unable to retrieve {level:?} IL for function at {func_start:#x}")] + MissingIL { level: ILLevel, func_start: u64 }, - #[error("Unable to retrieve low-level SSA IL for function at {func_start:#x}")] - MissingSsaForm { func_start: u64 }, + #[error("Unable to retrieve {level:?} SSA IL for function at {func_start:#x}")] + MissingSsaForm { level: ILLevel, func_start: u64 }, #[error("Unexpected LLIL operation at address {address:#x} (expected {expected})")] UnexpectedLlilOperation { address: u64, expected: String }, |
