Jaimie Kelley

13 papers A 1B 1Journal 2Unranked 9
YearRankTypeTitle / Venue / Authors
2021 conf
AIIoT
Henri Hegemier, Jaimie Kelley
2020 conf
UEMCON
Jaimie Kelley, Caileigh Marshall
2019 conf
UEMCON
Caileigh Marshall, Jaimie Kelley, Cynthia Turnbull
2019 conf
INFOCOM Workshops
Jaimie Kelley, Nathaniel Morris
2018 A conf
EuroSys
Nathaniel Morris, Christopher Stewart, Lydia Y. Chen, Robert Birke, Jaimie Kelley
2017 conf
SoCC
Nathaniel Morris, Christopher Stewart, Robert Birke, Lydia Y. Chen, Jaimie Kelley
2017 J jnl
ACM Trans. Model. Perform. Evaluation Comput. Syst.
Jaimie Kelley, Christopher Stewart, Nathaniel Morris, Devesh Tiwari, Yuxiong He, Sameh Elnikety
2016 conf
ICAC
Jaimie Kelley, Christopher Stewart, Devesh Tiwari, Saurabh Gupta
2015 conf
ICAC
Jaimie Kelley, Christopher Stewart, Nathaniel Morris, Devesh Tiwari, Yuxiong He, Sameh Elnikety
2015 J jnl
CoRR
Jaimie Kelley, Christopher Stewart, Nathaniel Morris, Devesh Tiwari, Yuxiong He, Sameh Elnikety
2014 B conf
IC2E
Sundeep Kambhampati, Jaimie Kelley, Christopher Stewart, William C. L. Stewart, Rajiv Ramnath
2013 conf
ICDCS Workshops
Jaimie Kelley, Christopher Stewart
2012 conf
ICAC
Nan Deng, Christopher Stewart, Daniel Gmach, Martin F. Arlitt, Jaimie Kelley
redb/extractors/decompiler/bninja/function_type.py
← Index redb/extractors/decompiler/bninja/function_type.py python
from enum import Enum

import binaryninja


class FunctionType(Enum):
    USER = "USER"
    LIBRARY = "LIBRARY"
    EXTERNAL = "EXTERNAL"
    THUNK = "THUNK"
    UNKNOWN = "UNKNOWN"


class FunctionTypeAnalysis:
    """Get the function kind based on the symbol type associated to this function"""

    def __init__(self, function):
        """Sets the function type dependent on the symbol type associated to this function. If
        any errors occur, then returns UNKNOWN
        """
        self.func_type = FunctionType.USER

        try:
            symbol_type = function.symbol.type
            # Check if it's an external function (there should not be, already skipping these)
            if symbol_type == binaryninja.enums.SymbolType.ImportedFunctionSymbol:
                self.func_type = FunctionType.EXTERNAL

            # Library functions detected by Binary Ninja
            if symbol_type == binaryninja.enums.SymbolType.LibraryFunctionSymbol:
                self.func_type = FunctionType.LIBRARY

            # Check if it's a thunk function
            if function.is_thunk:
                self.func_type = FunctionType.THUNK

        except Exception as _:
            self.func_type = FunctionType.UNKNOWN

    def get_function_type(self):
        return self.func_type