Skip to content

Conversation

@tarterp
Copy link

@tarterp tarterp commented Apr 2, 2025

ida_typeinf.tinfo_t(new_type, None, ida_typeinf.PT_SIL) throws an exception with various versions of IDA.

new_tinfo_t expected at most 1 arguments, got 3
Additional information:
Wrong number or type of arguments for overloaded function 'new_tinfo_t'.
  Possible C/C++ prototypes are:
    tinfo_t::tinfo_t()
    tinfo_t::tinfo_t(type_t)
    tinfo_t::tinfo_t(tinfo_t const &)

I believe this was fixed in IDA 9.0 SP1. Below is a table of versions I was able to test on.

8.40 8.50 9.00 9.0 SP1 9.10
win32
linux

A workaround is to create an empty type with ida_typeinf.tinfo_t() and then create the type with ida_typeinf.parse_decl(). This requires adding a semicolon to the type or it will fail.

@mrexodia
Copy link
Owner

mrexodia commented Apr 2, 2025

Awesome, thanks for your contribution!

@mrexodia mrexodia merged commit 551d742 into mrexodia:main Apr 2, 2025
can1357 pushed a commit to can1357/ida-pro-mcp that referenced this pull request Dec 19, 2025
handle tinfo_t() exception when ctor not supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants