Add Segment
add_segmentAdd a memory segment to an IDA Pro database (IDB) by setting its start address, size, name, permissions, bitness, and class.
Instructions
Add a new memory segment to the IDB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Segment name (e.g. '.text', 'my_seg') | |
| perm | No | Permission string: combination of r/w/x (e.g. 'rwx', 'r-x') | rw- |
| size | Yes | Segment size in bytes | |
| bitness | No | Address size: 16, 32, or 64 | |
| timeout | No | Timeout in seconds | |
| start_ea | Yes | Segment start address (hex string, e.g. '0x401000') | |
| seg_class | No | Segment class (e.g. 'CODE', 'DATA', 'BSS') | DATA |
| instance_id | No | Instance id override |