#include <dbg.hpp> // Loop through all trace events for (int i = 0; i < get_tev_qty(); i++) { tev_info_t tev; // Get the trace event information get_tev_info(i, &tev); // If it's an function return trace event... if (tev.type == tev_ret) { ea_t addr; if ((addr = get_ret_tev_return(i)) != BADADDR) msg("Function returned to %a\n", addr); } }