Module ida_tryblks
Architecture independent exception handling info.
Try blocks have the following general properties:
- A try block specifies a possibly fragmented guarded code region.
- Each try block has always at least one catch/except block description
- Each catch block contains its boundaries and a filter.
- Additionally a catch block can hold sp adjustment and the offset to the exception object offset (C++).
- Try blocks can be nested. Nesting is automatically calculated at the retrieval time.
- There may be (nested) multiple try blocks starting at the same address.
See examples in tests/input/src/eh_tests.
Global variables
var TBEA_ANY
-
TBEA_ANY = 31
var TBEA_CATCH
-
TBEA_CATCH = 2
var TBEA_FALLTHRU
-
TBEA_FALLTHRU = 32
var TBEA_SEHFILT
-
TBEA_SEHFILT = 16
var TBEA_SEHLPAD
-
TBEA_SEHLPAD = 8
var TBEA_SEHTRY
-
TBEA_SEHTRY = 4
var TBEA_TRY
-
TBEA_TRY = 1
var TBERR_EMPTY
-
empty try block
var TBERR_END
-
bad end address
var TBERR_INTERSECT
-
range would intersect inner tryblk
var TBERR_KIND
-
illegal try block kind
var TBERR_NO_CATCHES
-
no catch blocks at all
var TBERR_OK
-
ok
var TBERR_ORDER
-
bad address order
var TBERR_START
-
bad start address
Functions
def add_tryblk(*args) ‑> int
-
add_tryblk(tb) -> intAdd one try block information.tb: (C++: const tryblk_t &) try block to add.return: error code; 0 means good
def del_tryblks(*args) ‑> void
-
del_tryblks(range)Delete try block information in the specified range.range: (C++: const range_t &) the range to be cleared
def find_syseh(*args) ‑> ea_t
-
find_syseh(ea) -> ea_tFind the start address of the system eh region including the argument.ea: (C++: ea_t) search addressreturn: start address of surrounding tryblk, otherwise BADADDR
def get_tryblks(*args) ‑> size_t
-
get_tryblks(tbv, range) -> size_tRetrieve try block information from the specified address range. Try blocks are sorted by starting address and their nest levels calculated.tbv: (C++: tryblks_t *) output buffer; may be nullptrrange: (C++: const range_t &) address range to changereturn: number of found try blocks
def is_ea_tryblks(*args) ‑> bool
-
is_ea_tryblks(ea, flags) -> boolCheck if the given address ea is part of tryblks description.ea: (C++: ea_t) address to checkflags: (C++: uint32) combination of flags for is_ea_tryblks()
Classes
class catch_t (*args)
-
Proxy of C++ catch_t class.__init__(self) -> catch_t
Ancestors
Instance variables
var obj
-
obj
var type_id
-
type_id
Inherited members
class catchvec_t (*args)
-
Proxy of C++ qvector< catch_t > class.__init__(self) -> catchvec_t__init__(self, x) -> catchvec_tx: qvector< catch_t > const &
Methods
def add_unique(self, *args) ‑> bool
-
add_unique(self, x) -> boolx: catch_t const &
def at(self, *args) ‑> catch_t const &
-
at(self, _idx) -> catch_t_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< catch_t >::const_iterator
-
begin(self) -> catch_t
def capacity(self, *args) ‑> size_t
-
capacity(self) -> size_t
def clear(self, *args) ‑> void
-
clear(self)
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def end(self, *args) ‑> qvector< catch_t >::const_iterator
-
end(self) -> catch_t
def erase(self, *args) ‑> qvector< catch_t >::iterator
-
erase(self, it) -> catch_tit: qvector< catch_t >::iteratorerase(self, first, last) -> catch_tfirst: qvector< catch_t >::iteratorlast: qvector< catch_t >::iterator
def extract(self, *args) ‑> catch_t *
-
extract(self) -> catch_t
def find(self, *args) ‑> qvector< catch_t >::const_iterator
-
find(self, x) -> catch_tx: catch_t const &
def front(self)
def grow(self, *args) ‑> void
-
grow(self, x=catch_t())x: catch_t const &
def has(self, *args) ‑> bool
-
has(self, x) -> boolx: catch_t const &
def inject(self, *args) ‑> void
-
inject(self, s, len)s: catch_t *len: size_t
def insert(self, *args) ‑> qvector< catch_t >::iterator
-
insert(self, it, x) -> catch_tit: qvector< catch_t >::iteratorx: catch_t const &
def pop_back(self, *args) ‑> void
-
pop_back(self)
def push_back(self, *args) ‑> catch_t &
-
push_back(self, x)x: catch_t const &push_back(self) -> catch_t
def qclear(self, *args) ‑> void
-
qclear(self)
def reserve(self, *args) ‑> void
-
reserve(self, cnt)cnt: size_t
def resize(self, *args) ‑> void
-
resize(self, _newsize, x)_newsize: size_tx: catch_t const &resize(self, _newsize)_newsize: size_t
def size(self, *args) ‑> size_t
-
size(self) -> size_t
def swap(self, *args) ‑> void
-
swap(self, r)r: qvector< catch_t > &
def truncate(self, *args) ‑> void
-
truncate(self)
class seh_t (*args)
-
Proxy of C++ seh_t class.__init__(self) -> seh_t
Ancestors
Instance variables
var filter
-
filter
var seh_code
-
seh_code
Inherited members
class try_handler_t (*args)
-
Proxy of C++ try_handler_t class.__init__(self) -> try_handler_t
Ancestors
Subclasses
Instance variables
var disp
-
disp
var fpreg
-
fpreg
Inherited members
class tryblk_t (*args)
-
Proxy of C++ tryblk_t class.__init__(self) -> tryblk_t__init__(self, r) -> tryblk_tr: tryblk_t const &
Ancestors
Instance variables
var level
-
level
Methods
def cpp(self, *args) ‑> catchvec_t &
-
cpp(self) -> catchvec_t
def get_kind(self, *args) ‑> uchar
-
get_kind(self) -> uchar
def is_cpp(self, *args) ‑> bool
-
is_cpp(self) -> bool
def is_seh(self, *args) ‑> bool
-
is_seh(self) -> bool
def seh(self, *args) ‑> seh_t &
-
seh(self) -> seh_t
def set_cpp(self, *args) ‑> catchvec_t &
-
set_cpp(self) -> catchvec_t
def set_seh(self, *args) ‑> seh_t &
-
set_seh(self) -> seh_t
Inherited members
class tryblks_t (*args)
-
Proxy of C++ qvector< tryblk_t > class.__init__(self) -> tryblks_t__init__(self, x) -> tryblks_tx: qvector< tryblk_t > const &
Methods
def add_unique(self, *args) ‑> bool
-
add_unique(self, x) -> boolx: tryblk_t const &
def at(self, *args) ‑> tryblk_t const &
-
at(self, _idx) -> tryblk_t_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< tryblk_t >::const_iterator
-
begin(self) -> tryblk_t
def capacity(self, *args) ‑> size_t
-
capacity(self) -> size_t
def clear(self, *args) ‑> void
-
clear(self)
def empty(self, *args) ‑> bool
-
empty(self) -> bool
def end(self, *args) ‑> qvector< tryblk_t >::const_iterator
-
end(self) -> tryblk_t
def erase(self, *args) ‑> qvector< tryblk_t >::iterator
-
erase(self, it) -> tryblk_tit: qvector< tryblk_t >::iteratorerase(self, first, last) -> tryblk_tfirst: qvector< tryblk_t >::iteratorlast: qvector< tryblk_t >::iterator
def extract(self, *args) ‑> tryblk_t *
-
extract(self) -> tryblk_t
def find(self, *args) ‑> qvector< tryblk_t >::const_iterator
-
find(self, x) -> tryblk_tx: tryblk_t const &
def front(self)
def grow(self, *args) ‑> void
-
grow(self, x=tryblk_t())x: tryblk_t const &
def has(self, *args) ‑> bool
-
has(self, x) -> boolx: tryblk_t const &
def inject(self, *args) ‑> void
-
inject(self, s, len)s: tryblk_t *len: size_t
def insert(self, *args) ‑> qvector< tryblk_t >::iterator
-
insert(self, it, x) -> tryblk_tit: qvector< tryblk_t >::iteratorx: tryblk_t const &
def pop_back(self, *args) ‑> void
-
pop_back(self)
def push_back(self, *args) ‑> tryblk_t &
-
push_back(self, x)x: tryblk_t const &push_back(self) -> tryblk_t
def qclear(self, *args) ‑> void
-
qclear(self)
def reserve(self, *args) ‑> void
-
reserve(self, cnt)cnt: size_t
def resize(self, *args) ‑> void
-
resize(self, _newsize, x)_newsize: size_tx: tryblk_t const &resize(self, _newsize)_newsize: size_t
def size(self, *args) ‑> size_t
-
size(self) -> size_t
def swap(self, *args) ‑> void
-
swap(self, r)r: qvector< tryblk_t > &
def truncate(self, *args) ‑> void
-
truncate(self)