joxeankoret / pigaios

A tool for matching and diffing source codes directly against binaries.
GNU General Public License v3.0
634 stars 67 forks source link

using inline mode meet an error: ('Error:', 'table functions has no column named callees') #33

Closed island255 closed 3 years ago

island255 commented 3 years ago

When I try to execute srcbindiff.py -export by setting inline as 1, an error is printed: ('Error:', 'table functions has no column named callees').

As I look into the code, it may be caused by base_support.py at line 471:

sql = """insert into functions(
           ea, name, prototype, prototype2, conditions,
           constants, constants_json, loops, switchs,
           switchs_json, calls, externals, filename,
           callees, source, recursive, indirect, globals,
           inlined, static, basename)
         select (select count(ea)+1 from functions),
           name || '_with_inlines', prototype, prototype2, conditions,
           constants, constants_json, loops, switchs,
           switchs_json, calls, externals, filename,
           callees, source, recursive, indirect, globals,
           inlined, static, basename
           from functions
          where id = ?"""

callees doesn't exist in the table. And after I change it to _calleesjson, the problem was solved.

But I want to make sure that's the reason for this error and hope it can be corrected.

joxeankoret commented 3 years ago

The inlines support wasn't updated so, yes, that's the culprit. Thanks for reporting, I will fix it asap!