Provides access to segment-related operations in the IDA database.
More...
#include <segment.hpp>
|
| Segments (const Database &database) |
| Constructs a segments handler for the given database. More...
|
|
segment_t * | get_at (const ea_t ea) const |
| Retrieves the segment that contains the given address. More...
|
|
std::string | get_name (const segment_t *segment) const |
| Retrieves the name of the given segment. More...
|
|
bool | set_name (segment_t *segment, const std::string &name) const |
| Renames a segment. More...
|
|
Iterator | get_all () const |
| Retrieves an iterator over all segments in the database. More...
|
|
Provides access to segment-related operations in the IDA database.
◆ Segments()
Segments::Segments |
( |
const Database & |
database | ) |
|
|
inline |
Constructs a segments handler for the given database.
- Parameters
-
database | Reference to the active IDA database. |
◆ get_all()
Retrieves an iterator over all segments in the database.
- Returns
- A SegmentsIterator instance.
◆ get_at()
segment_t* Segments::get_at |
( |
const ea_t |
ea | ) |
const |
Retrieves the segment that contains the given address.
- Parameters
-
ea | The effective address to search. |
- Returns
- A pointer to the containing segment, or nullptr if none found.
◆ get_name()
std::string Segments::get_name |
( |
const segment_t * |
segment | ) |
const |
Retrieves the name of the given segment.
- Parameters
-
segment | Pointer to the segment. |
- Returns
- The segment name as a string, or an empty string if unavailable.
◆ set_name()
bool Segments::set_name |
( |
segment_t * |
segment, |
|
|
const std::string & |
name |
|
) |
| const |
Renames a segment.
- Parameters
-
segment | Pointer to the segment to rename. |
name | The new name to assign to the segment. |
- Returns
- True if the rename operation succeeded, false otherwise.
The documentation for this class was generated from the following file:
- /home/runner/work/ida-api-domain/ida-api-domain/include/entities/segment.hpp