#include <kernwin.hpp> // For get_screen_ea() definition #include <funcs.hpp> // Get the address of the user's cursor ea_t addr = get_screen_ea(); func_t *func = get_func(addr); if (func != NULL) msg("Current function starts at %a\n", func->startEA); else msg("Not inside a function!\n");