diff options
| author | Mark Rowe <mark@vector35.com> | 2025-08-20 11:51:43 -0400 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-08-27 14:04:10 -0700 |
| commit | 0ef2fc2645b3b3e212d21c406fd79602a7e29990 (patch) | |
| tree | 91121a9385e3896324f652d8d4ce1520a4053b80 /binaryninjaapi.h | |
| parent | a086e7731c4761175f9280e952a9f500d6cdf997 (diff) | |
Revise the documentation on how multiple symbols at the same address are handled
To avoid non-determinism and provide consistent behavior in all cases,
now only confidence, symbol type, and name are considered when
disambiguating multiple symbols at the same address.
The previously documented behavior was not what was implemented. While
recency was considered in some cases for disambiguating symbols at the
same address, respecting it consistetly results in non-deterministic
behavior when symbols are being added concurrently by multiple sources.
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 589556f1..de8d7094 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -6689,7 +6689,8 @@ namespace BinaryNinja { /*! Adds a symbol to the internal list of automatically discovered Symbol objects in a given namespace - \warning If multiple symbols for the same address are defined, only the most recent symbol will ever be used. + \warning If multiple symbols for the same address are defined, the symbol with the highest confidence + and lowest `BNSymbolType` value will be used. Ties are broken by symbol name. \param sym Symbol to define */ @@ -6697,8 +6698,11 @@ namespace BinaryNinja { /*! Defines an "Auto" symbol, and a Variable/Function alongside it + \warning If multiple symbols for the same address are defined, the symbol with the highest confidence + and lowest `BNSymbolType` value will be used. Ties are broken by symbol name. + \param platform Platform for the Type being defined - \param sym Symbol being definedd + \param sym Symbol being defined \param type Type being defined \return The defined symbol */ @@ -6712,6 +6716,9 @@ namespace BinaryNinja { /*! Define a user symbol + \warning If multiple symbols for the same address are defined, the symbol with the highest confidence + and lowest `BNSymbolType` value will be used. Ties are broken by symbol name. + \param sym Symbol to define */ void DefineUserSymbol(Ref<Symbol> sym); |
