binaryninja-api
binaryninja-api copied to clipboard
Default database name should include file extension too
Some applications have a DLL which named same as it's main executable. Let's say I've a two file named a.exe and a.dll respectively. When I analyze a.exe and save a database for it, BN saves a database named a.bndb. Then when I try to open a.dll for analysis, BN asks me if I want to load database from disk for obvious reasons. I think this behaviour is prone to some annoying results.
This also affects Existing Database Detection, too. If you have a.exe and a.bndb and go to open a.dll, it will (by default) prompt you to open a.bndb, which is not what you want. So, this is a really good suggestion. We just need to make sure that, when we make this change, we also change the Existing Database Detection codepath to match.
There also may be some backwards-compatibility concerns here, but I can't think of any off the top of my head that are show-stoppers. If anyone else can, please toss that in here, too.
fwiw, this is not entirely accurate: the Existing Database Detection looks for basename.ext.bndb as well as basename.bndb, though it does prefer basename.bndb first.
Note that if they both exist, it will ask about both of them if the user clicks No on the first prompt.
Fixed in 3.5.4373-dev