Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 867 Bytes

File metadata and controls

45 lines (35 loc) · 867 Bytes

First-Time User Tutorial Path

Step 1: Open database and wait analysis

ida::database::init(argc, argv);
ida::database::open(input_path, true);
ida::analysis::wait();

Step 2: Navigate program structure

for (auto seg : ida::segment::all()) {
  // inspect seg.name(), seg.start(), seg.end()
}
for (auto fn : ida::function::all()) {
  // inspect fn.name(), fn.start(), fn.end()
}

Step 3: Inspect and annotate

auto ea = ida::name::resolve("main");
if (ea) {
  ida::comment::set(*ea, "tutorial marker");
  auto insn = ida::instruction::decode(*ea);
}

Step 4: Search and cross-reference

ida::search::TextOptions opts;
opts.regex = true;
auto hit = ida::search::text("main", ida::database::min_address().value(), opts);

Step 5: Save and close

ida::database::save();
ida::database::close(true);