IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- File List
- File Members

Functions
entry.hpp File Reference

## Detailed Description

Functions that deal with entry points.

Exported functions are considered as entry points as well.

IDA maintains list of entry points to the program. Each entry point:

- has an address
- has a name
- may have an ordinal number

## Functions
idaman size_t ida_export | get_entry_qty (void)
| Get number of entry points.
idaman bool ida_export | add_entry (uval_t ord, ea_t ea, const char *name, bool makecode)
| Add an entry point to the list of entry points. More...
idaman uval_t ida_export | get_entry_ordinal (size_t idx)
| Get ordinal number of an entry point. More...
idaman ea_t ida_export | get_entry (uval_t ord)
| Get entry point address by its ordinal. More...
idaman ssize_t ida_export | get_entry_name (uval_t ord, char *buf, size_t bufsize)
| Get name of the entry point by its ordinal. More...
idaman bool ida_export | rename_entry (uval_t ord, const char *name)
| Rename entry point. More...
idaman bool ida_export | set_entry_forwarder (uval_t ord, const char *name)
| Set forwarder name for ordinal. More...
idaman ssize_t ida_export | get_entry_forwarder (uval_t ord, char *buf, size_t bufsize)
| Get forwarder name for the entry point by its ordinal. More...

## Function Documentation

idaman bool ida_export add_entry | ( | uval_t | ord,
|  | ea_t | ea,
|  | const char * | name,
|  | bool | makecode
| ) |  |

Add an entry point to the list of entry points.

Parameters

  ord | ordinal number if ordinal number is equal to 'ea' then ordinal is not used
  ea | linear address
  name | name of entry point. If the specified location already has a name, the old name will be appended to the regular comment. If name == NULL, then the old name will be retained.
  makecode | should the kernel convert bytes at the entry point to instruction(s)

Returns
  success (currently always true)

idaman uval_t ida_export get_entry_ordinal | ( | size_t | idx | ) |

Get ordinal number of an entry point.

Parameters

  idx | internal number of entry point. Should be in the range 0..get_entry_qty()-1

Returns
  ordinal number or 0.

idaman ea_t ida_export get_entry | ( | uval_t | ord | ) |

Get entry point address by its ordinal.

Parameters

  ord | ordinal number of entry point

Returns
  address or BADADDR

idaman ssize_t ida_export get_entry_name | ( | uval_t | ord,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Get name of the entry point by its ordinal.

Parameters

  ord | ordinal number of entry point
  buf | output buffer, may be NULL
  bufsize | output buffer size

Returns
  size of entry name or -1

idaman bool ida_export rename_entry | ( | uval_t | ord,
|  | const char * | name
| ) |  |

Rename entry point.

Parameters

  ord | ordinal number of the entry point
  name | name of entry point. If the specified location already has a name, the old name will be appended to a repeatable comment.

Returns
  success

idaman bool ida_export set_entry_forwarder | ( | uval_t | ord,
|  | const char * | name
| ) |  |

Set forwarder name for ordinal.

Parameters

  ord | ordinal number of the entry point
  name | forwarder name for entry point.

Returns
  success

idaman ssize_t ida_export get_entry_forwarder | ( | uval_t | ord,
|  | char * | buf,
|  | size_t | bufsize
| ) |  |

Get forwarder name for the entry point by its ordinal.

Parameters

  ord | ordinal number of entry point
  buf | output buffer, may be NULL
  bufsize | output buffer size

Returns
  size of entry forwarder name or -1