#include #include #include #include #include #include #include #include #include /* print_fti prints the function name and argument type info */ int print_fti() { int nfuncs = get_func_qty(); msg("nfuncs: %i\n",nfuncs); for(int i = 0; i < nfuncs;i++) { func_t * pfn = getn_func(i); ea_t ea = pfn->startEA; type_t type[MAXSTR]; p_list fields[MAXSTR]; if (! get_ti(ea,type,sizeof(type),fields,sizeof(fields) ) ) continue; uint32 arglocs [MAX_FUNC_ARGS]; type_t * types [MAX_FUNC_ARGS]; char * names[MAX_FUNC_ARGS]; char fname[MAXNAMELEN]; int n = build_funcarg_arrays(type, fields, arglocs, types, names, MAX_FUNC_ARGS, false); get_func_name(ea,fname,sizeof(fname)); msg("%a %s, %i",ea,fname); for( int j = 0 ; j < n ; j++){ char text[MAXSTR]; int code = print_type_to_one_line(text,sizeof(text), idati, types[j], names[j], NULL, NULL); if ( code != T_NORMAL) continue; msg(" | %i: %s", j, text); } msg("\n"); free_funcarg_arrays(types,names,n); } } int idaapi init(void) { return PLUGIN_OK; } void idaapi run(int arg) { print_fti(); } plugin_t PLUGIN = { IDP_INTERFACE_VERSION, PLUGIN_UNL, // plugin flags init, // initialize NULL, // terminate. this pointer may be NULL. run, // invoke plugin NULL, // long comment about the plugin // it could appear in the status line // or as a hint NULL, // multiline help about the plugin "TYPES Plugin", // the preferred short name of the plugin "ALT-F8" // the preferred hotkey to run the plugin };