diff options
| author | Alexander Taylor <alex@vector35.com> | 2025-11-03 14:31:20 -0500 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-11-03 14:34:48 -0500 |
| commit | 0c55bf12f6148a8f3c4b1af66c950d73e371b351 (patch) | |
| tree | 18b067b2d5f81a15e726fa7c4c43911f8d774476 /function.cpp | |
| parent | 4bbf5434655da660322205b9db590c524bef4aa8 (diff) | |
Add helpers for whether a function is exported.
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/function.cpp b/function.cpp index df41b977..6a4564cd 100644 --- a/function.cpp +++ b/function.cpp @@ -202,6 +202,16 @@ Ref<Symbol> Function::GetSymbol() const return new Symbol(BNGetFunctionSymbol(m_object)); } +bool Function::IsExported() const +{ + Ref<Symbol> sym = GetSymbol(); + if (!sym) + return false; + + BNSymbolBinding binding = sym->GetBinding(); + return (binding == BNSymbolBinding::GlobalBinding) || (binding == BNSymbolBinding::WeakBinding); +} + bool Function::WasAutomaticallyDiscovered() const { |
