BinHandle is the front-end entry point for most B2R2 scripts. It owns the
loaded binary, exposes file metadata, provides architecture-specific register
lookup, and creates lifting units for parsing and LowUIR lifting.
hdl.File exposes binary-format metadata through IBinFile and related
interfaces. Tutorial scripts use this to find executable address ranges before
filtering recovered functions.
API
Meaning
hdl.File.EntryPoint
Optional binary entry address.
hdl.File.ISA
ISA detected or supplied for the binary.
hdl.File.IsValidAddr addr
True when addr belongs to a valid loaded range.
hdl.File.IsValidRange range
True when the whole address range is valid.
hdl.File.GetTextSectionPointer()
Return a BinFilePointer for the text/code section.
BinFilePointer represents an inclusive address and file-offset range.
Field or member
Meaning
Addr / MaxAddr
First and last virtual address covered by the pointer.
Offset / MaxOffset
First and last file offset covered by the pointer.
IsValid
True when both address and offset ranges are usable.
IsNull
True for the null pointer value.
IsVirtual
True when the range is mapped in memory but not backed by file bytes.