I have found a bug in IDAToolbag, and I'm not sure how to fix it. When I try to start up Toolbag on a 64-bit binary, I receive the following traceback:
[] There are 3978 funtions to process
Traceback (most recent call last):
File "", line 1, in
File "/Users/user/.idapro/toolbag/init.py", line 94, in
toolbag = ToolBag(options)
File "/Users/user/.idapro/toolbag/init.py", line 60, in init
self.db = DB(options, create=True)
File "/Users/user/.idapro/toolbag/db.py", line 226, in init
collecta.go(ea)
File "/Users/user/.idapro/toolbag/db.py", line 113, in go
self.analyzer.enter(startEA, self.options)
File "/Users/user/.idapro/toolbag/db.py", line 42, in enter
options['database'].address(pc)['name'] = database.name(pc)
File "/Users/user/.idapro/misc/store/init.py", line 90, in setitem
return self.set( *{key:value} )
File "/Users/user/.idapro/misc/store/init.py", line 139, in set
return self.store.driver.ctx_update(self.store.session, self.id, attrs)
File "/Users/user/.idapro/misc/store/driver/sqlite.py", line 135, in ctx_update
return session.database.executemany(q, result).rowcount
OverflowError: long too big to convert
What I've noticed is if the binary is based to 0x0000000000000000, then everything works nicely. If you rebase the binary to something like 0xFFFFFF8000000000, then everything dies.
The issue seems to be in the sqlite3 implementation of "INTEGER" and "BIGINT," as they are both 32-bit.