Header menu logo B2R2

IBinStructure Type

Represents the structural view of a binary file, such as its sections and functions.

Instance members

Instance member Description

this.CodeSectionPointer

Full Usage: this.CodeSectionPointer

Returns: BinFilePointer
Modifiers: abstract

Returns a binary file pointer that points to the beginning of the code section, e.g., ".text" section of ELF.

Returns: BinFilePointer

this.FunctionAddresses

Full Usage: this.FunctionAddresses

Returns: Addr[] An array of function addresses.
Modifiers: abstract

Returns an array of local function addresses (excluding external functions) from a given BinFile. This function only considers addresses that are certain. We do not include the entry point address (e.g., _start) in the result, because it is not necessarily a function address in general.

Returns: Addr[]

An array of function addresses.

this.GetSectionPointer

Full Usage: this.GetSectionPointer

Parameters:
    name : string

Returns: BinFilePointer
Modifiers: abstract

Returns a binary file pointer of the given section whose name is given as an argument. The resulting pointer will point to the beginning of the section. If the address is not in any section, then this function returns a null pointer.

name : string
Returns: BinFilePointer

this.Sections

Full Usage: this.Sections

Returns: BinSection[]
Modifiers: abstract

Returns an array of binary sections in the associated binary file.

Returns: BinSection[]

this.TryFindSectionByAddr

Full Usage: this.TryFindSectionByAddr

Parameters:
Returns: Result<BinSection, ErrorCase>
Modifiers: abstract

Finds the section that contains the given address. If the address is not in any section, then this function returns an error.

addr : Addr
Returns: Result<BinSection, ErrorCase>

this.TryFindSectionByName

Full Usage: this.TryFindSectionByName

Parameters:
    name : string

Returns: Result<BinSection, ErrorCase>
Modifiers: abstract

Finds the section whose name matches the given name. If no such section exists, then this function returns an error.

name : string
Returns: Result<BinSection, ErrorCase>

this.TryFindSectionByOffset

Full Usage: this.TryFindSectionByOffset

Parameters:
    offset : uint32

Returns: Result<BinSection, ErrorCase>
Modifiers: abstract

Finds the section that contains the given file offset. Sections without file-backed contents are not considered. If the offset is not in any section, then this function returns an error.

offset : uint32
Returns: Result<BinSection, ErrorCase>

this.TryFindSectionNameByAddr

Full Usage: this.TryFindSectionNameByAddr

Parameters:
Returns: Result<string, ErrorCase>
Modifiers: abstract

Returns the name of the section that contains the given address. If the address is not in any section, then this function returns an error. This is a lightweight name-only query that does not require creating a section record.

addr : Addr
Returns: Result<string, ErrorCase>

this.TryFindSectionNameByOffset

Full Usage: this.TryFindSectionNameByOffset

Parameters:
    offset : uint32

Returns: Result<string, ErrorCase>
Modifiers: abstract

Returns the name of the section that contains the given file offset. If the offset is not in any section, then this function returns an error. This is a lightweight name-only query that does not require creating a section record.

offset : uint32
Returns: Result<string, ErrorCase>

Type something to start searching.