#include <dbg.hpp> // Loop through all trace events for (int i = 0; i < get_tev_qty(); i++) { regval_t esp; tev_info_t tev; // Get the trace event information get_tev_info(i, &tev); // If it's an function call trace event... if (tev.type == tev_call) { ea_t addr; // Get ESP, store into &esp if ((addr = get_call_tev_callee(i)) != BADADDR) msg("Function at %a was called\n", addr); } }