Skip to content

Commit 6293afc

Browse files
committed
Clarify the documentation on how multiple symbols at the same address are handled
1 parent eb09898 commit 6293afc

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

binaryninjaapi.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6689,16 +6689,20 @@ namespace BinaryNinja {
66896689

66906690
/*! Adds a symbol to the internal list of automatically discovered Symbol objects in a given namespace
66916691

6692-
\warning If multiple symbols for the same address are defined, only the most recent symbol will ever be used.
6692+
\warning If multiple symbols for the same address are defined, the most recently added symbol
6693+
with the highest confidence and lowest `BNSymbolType` value will be used.
66936694

66946695
\param sym Symbol to define
66956696
*/
66966697
void DefineAutoSymbol(Ref<Symbol> sym);
66976698

66986699
/*! Defines an "Auto" symbol, and a Variable/Function alongside it
66996700

6701+
\warning If multiple symbols for the same address are defined, the most recently added symbol
6702+
with the highest confidence and lowest `BNSymbolType` value will be used.
6703+
67006704
\param platform Platform for the Type being defined
6701-
\param sym Symbol being definedd
6705+
\param sym Symbol being defined
67026706
\param type Type being defined
67036707
\return The defined symbol
67046708
*/
@@ -6712,6 +6716,9 @@ namespace BinaryNinja {
67126716

67136717
/*! Define a user symbol
67146718

6719+
\warning If multiple symbols for the same address are defined, the most recently added symbol
6720+
with the highest confidence and lowest `BNSymbolType` value will be used.
6721+
67156722
\param sym Symbol to define
67166723
*/
67176724
void DefineUserSymbol(Ref<Symbol> sym);

python/binaryview.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6410,7 +6410,8 @@ def define_auto_symbol(self, sym: '_types.CoreSymbol') -> None:
64106410
``define_auto_symbol`` adds a symbol to the internal list of automatically discovered Symbol objects in a given
64116411
namespace.
64126412
6413-
.. warning:: If multiple symbols for the same address are defined, only the most recent symbol will ever be used.
6413+
.. warning:: If multiple symbols for the same address are defined, only the most recently added symbol with the
6414+
highest confidence and lowest SymbolType value will ever be used.
64146415
64156416
:param sym: the symbol to define
64166417
:rtype: None
@@ -6423,7 +6424,8 @@ def define_auto_symbol_and_var_or_function(
64236424
"""
64246425
``define_auto_symbol_and_var_or_function`` Defines an "Auto" symbol, and a Variable/Function alongside it.
64256426
6426-
.. warning:: If multiple symbols for the same address are defined, only the most recent symbol will ever be used.
6427+
.. warning:: If multiple symbols for the same address are defined, only the most recently added symbol with the
6428+
highest confidence and lowest SymbolType value will ever be used.
64276429
64286430
:param sym: Symbol to define
64296431
:param type: Type for the function/variable being defined (can be None)
@@ -6465,7 +6467,8 @@ def define_user_symbol(self, sym: '_types.CoreSymbol') -> None:
64656467
"""
64666468
``define_user_symbol`` adds a symbol to the internal list of user added Symbol objects.
64676469
6468-
.. warning:: If multiple symbols for the same address are defined, only the most recent symbol will ever be used.
6470+
.. warning:: If multiple symbols for the same address are defined, only the most recently added symbol with the
6471+
highest confidence and lowest SymbolType value will ever be used.
64696472
64706473
:param Symbol sym: the symbol to define
64716474
:rtype: None

0 commit comments

Comments
 (0)