Skip to content

Entries

entries

Classes:

  • Entries

    Provides access to entries in the IDA database.

  • EntryInfo

    Represents a program entry point.

  • ForwarderInfo

    Represents information about an entry point forwarder.

Entries

Entries(database)

Provides access to entries in the IDA database.

Methods:

add

add(
    address: ea_t,
    name: str,
    ordinal: Optional[int] = None,
    make_code: bool = True,
) -> bool

Add a new entry point.

Args: address: Linear address of the entry point name: Name for the entry point ordinal: Ordinal number (if None, uses address as ordinal) make_code: Whether to convert bytes to instructions

Returns: bool: True if successful

exists

exists(ordinal: int) -> bool

Check if an entry point with the given ordinal exists.

Args: ordinal: Ordinal number to check

Returns: bool: True if entry point exists

get_addresses

get_addresses() -> Iterator[ea_t]

Get all entry point addresses.

Yields: int: Each entry point address

get_all

get_all() -> Iterator[EntryInfo]

Get all entry points.

Yields: Entry: Each entry point in the program

get_at_index

get_at_index(index: int) -> EntryInfo

Get entry point by its index in the entry table.

Args: index: Internal index (0 to get_count()-1)

Returns: Entry: The entry point at the specified index

Raises: IndexError: If index is out of range

get_by_address

get_by_address(address: ea_t) -> EntryInfo | None

Get entry point by its address.

Args: address: Linear address to search for

Returns: Entry: The entry point at the specified address, or None if not found

get_by_name

get_by_name(name: str) -> EntryInfo | None

Find entry point by name.

Args: name: Name to search for

Returns: Entry: The entry point with the specified name, or None if not found

get_by_ordinal

get_by_ordinal(ordinal: int) -> EntryInfo | None

Get entry point by its ordinal number.

Args: ordinal: Ordinal number of the entry point

Returns: Entry: The entry point with the specified ordinal, or None if not found

get_count

get_count() -> int

Get the total number of entry points.

Returns: int: Number of entry points in the program

get_forwarders

get_forwarders() -> Iterator[ForwarderInfo]

Get all entry points that have forwarders.

Yields: ForwarderInfo: Information about each entry with a forwarder

get_names

get_names() -> Iterator[str]

Get all entry point names.

Yields: str: Each entry point name

get_ordinals

get_ordinals() -> Iterator[int]

Get all ordinal numbers.

Yields: int: Each ordinal number

rename

rename(ordinal: int, new_name: str) -> bool

Rename an existing entry point.

Args: ordinal: Ordinal number of the entry point new_name: New name for the entry point

Returns: bool: True if successful

set_forwarder

set_forwarder(ordinal: int, forwarder_name: str) -> bool

Set forwarder name for an entry point.

Args: ordinal: Ordinal number of the entry point forwarder_name: Forwarder name to set

Returns: bool: True if successful

EntryInfo dataclass

EntryInfo(
    ordinal: int,
    address: ea_t,
    name: str,
    forwarder_name: Optional[str] = None,
)

Represents a program entry point. Exported functions are considered entry points as well.

Methods:

Attributes:

address instance-attribute

address: ea_t

forwarder_name class-attribute instance-attribute

forwarder_name: Optional[str] = None

name instance-attribute

name: str

ordinal instance-attribute

ordinal: int

has_forwarder

has_forwarder() -> bool

Check if this entry point has a forwarder.

ForwarderInfo dataclass

ForwarderInfo(ordinal: int, name: str)

Represents information about an entry point forwarder.

Attributes:

name instance-attribute

name: str

ordinal instance-attribute

ordinal: int