We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Symbol::ordinal
1 parent 10eb2df commit a86862eCopy full SHA for a86862e
1 file changed
rust/src/symbol.rs
@@ -267,6 +267,16 @@ impl Symbol {
267
unsafe { BNGetSymbolAddress(self.handle) }
268
}
269
270
+ /// Get the symbols ordinal, this will return `None` if the symbol ordinal is `0`.
271
+ pub fn ordinal(&self) -> Option<u64> {
272
+ let ordinal = unsafe { BNGetSymbolOrdinal(self.handle) };
273
+ if ordinal == u64::MIN {
274
+ None
275
+ } else {
276
+ Some(ordinal)
277
+ }
278
279
+
280
pub fn auto_defined(&self) -> bool {
281
unsafe { BNIsSymbolAutoDefined(self.handle) }
282
0 commit comments