diff options
| author | Peter LaFosse <peter@vector35.com> | 2023-11-10 09:42:20 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2023-11-10 11:29:24 -0500 |
| commit | 97fdc533b6ba68820652d9e8c2da36a92706dacf (patch) | |
| tree | ce7b300f394200da0075fc455ab3da72496d7250 /binaryninjaapi.h | |
| parent | f5c2cb477ddc76785336b269f6fb89f8473b726b (diff) | |
Update documentation for APIs that return IL Labels, fix GetLabelForAddress parameter
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 5585dc20..c04c903d 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -10210,6 +10210,13 @@ namespace BinaryNinja { void PrepareToCopyFunction(LowLevelILFunction* func); void PrepareToCopyBlock(BasicBlock* block); + + /*! Get the LowLevelILLabel for a given source instruction. The returned pointer is to an internal object with + the same lifetime as the containing LowLevelILFunction. + + \param i The source instruction index + \return The LowLevelILLabel for the source instruction + */ BNLowLevelILLabel* GetLabelForSourceInstruction(size_t i); /*! Get the current IL address. @@ -11485,8 +11492,16 @@ namespace BinaryNinja { void ReplaceExpr(size_t expr, size_t newExpr); void SetExprAttributes(size_t expr, uint32_t attributes); - void AddLabelForAddress(Architecture* arch, ExprId addr); - BNLowLevelILLabel* GetLabelForAddress(Architecture* arch, ExprId addr); + void AddLabelForAddress(Architecture* arch, uint64_t addr); + + /*! Get the LowLevelILLabel for a given address. The returned pointer is to an internal object with + the same lifetime as the containing LowLevelILFunction. + + \param[in] arch Architecture for the address + \param[in] addr Address to get the label for + \return The LowLevelILLabel for the address + */ + BNLowLevelILLabel* GetLabelForAddress(Architecture* arch, uint64_t addr); /*! Ends the function and computes the list of basic blocks. */ @@ -11614,6 +11629,13 @@ namespace BinaryNinja { void PrepareToCopyFunction(MediumLevelILFunction* func); void PrepareToCopyBlock(BasicBlock* block); + + /*! Get the MediumLevelILLabel for a given source instruction. The returned pointer is to an internal object with + the same lifetime as the containing MediumLevelILFunction. + + \param i Index of the source instruction + \return The MediumLevelILLabel for the source instruction + */ BNMediumLevelILLabel* GetLabelForSourceInstruction(size_t i); ExprId AddExpr(BNMediumLevelILOperation operation, size_t size, ExprId a = 0, ExprId b = 0, ExprId c = 0, |
