angr.go.type_parser

Parse canonical Go type strings (see angr.go.signature) into Go SimTypes.

exception angr.go.type_parser.GoTypeParseError

Bases: ValueError

A malformed Go type string.

class angr.go.type_parser.GoTypeParser

Bases: object

Recursive-descent parser for Go type strings. resolver maps a qualified type name to its GoNamedType record (from a signature database or DWARF); unknown names become opaque structs.

__init__(arch, resolver=None)
Parameters:

resolver (Callable[[str], GoNamedType | None] | None)

parse(s)
Return type:

SimType

Parameters:

s (str)

parse_signature(params, results, arg_names=None)

Build a function type from parameter and result type strings.

Parameters:
ITAB_NAMES = ('internal/abi.ITab', 'runtime.itab')
TYPE_NAMES = ('internal/abi.Type', 'runtime._type')
resolve_named(name)
Return type:

SimType

Parameters:

name (str)

itab_type()

The runtime’s itab struct as the binary describes it, or None.

Return type:

SimType | None

type_descriptor_type()

The runtime’s type descriptor struct as the binary describes it, or None.

Return type:

SimType | None