Is there any way to change the calling convention programmatically? I found some C++ code in this repo but wasn't able to successfully update it to 6.8.
static bool idaapi convert_to_usercall(void *ud)
{
vdui_t &vu = *(vdui_t *)ud;
if (!vu.cfunc)
return false;
if ( vu.cfunc->entry_ea == BADADDR )
return false;
tinfo_t type;
qtype fields;
if (!vu.cfunc->get_func_type(type, fields))
return false;
func_type_info_t fti;
int a = build_funcarg_info(idati, type.c_str(), fields.c_str(), &fti, 0);
if (!convert_cc_to_special(fti))
return false;
fields.clear();
type.clear();
build_func_type(&type, &fields, fti);
if ( !apply_tinfo(idati, vu.cfunc->entry_ea, type.c_str(), fields.c_str(), 1) )
return false;
vu.refresh_view(true);
return true;
}
The code seems to use apis that are now deprecated or changed up. Does anybody know a way to fix up this code or some other approach.
Any help would be appreciated, whether it is C++ or Python.