In his answer to a question, Rolf pointed me to the Edit -> Other -> Reset decompiler information functionality, suggesting that "All caches" will force the decompiler to pick up immediately on changes I made to the disassembly.

Reset decompiler information dialog

This sounds like a sensible idea. However, he cautions that the resetting will also mean that the decompiler has more work to do on subsequent decompilations. Makes sense.

Now the question I have is: when I use the Mark as decompiled menu item on the pseudo code and only then use the Reset decompiler information functionality, will the functions marked decompiled be exempt from the clearing of caches?

Mark as decompiled menu item


They are not exempt from the caches being cleared; marking something as decompiled simply changes the color of the function in the func_t, and does not affect the caches in any way. However, this is not a big deal. The "caches" referred to by that menu item simply mean the saved cfunc_t and mba_t data structures for that function, which Hex-Rays uses to accelerate subsequent decompilations of functions you've already looked at. You won't lose any annotations (names, comments, types, having marked a function as decompiled, etc.) by clearing the caches. I clear the caches multiple times a day on databases that are important to me; don't worry about losing your work. If you're really paranoid, save your database or create a snapshot first before giving it a try; you'll see that you don't lose any of your work.

The only negative effect is the slowdown on re-decompiling unrelated functions that you otherwise have no interest in clearing the cache entries for. If you don't like that slowdown, an IDAPython one-liner ida_hexrays.mark_cfunc_dirty(funcEa) will clear the cfunc_t cache entry for the function at address funcEa (though I'm not sure if it will also purge the mba_t cache entry, which is likely necessary to trigger the changes stemming from the disassembly listing).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.