NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
52.21k stars 5.91k forks source link

How to Hide Automatic Function Prototype Comments #1047

Open ebfe2326 opened 5 years ago

ebfe2326 commented 5 years ago

All of the functions seem to have automatic repeatable comments set that display the function type signature. Is there a way to turn this off? I would still like to display comments, both EOL and repeatable, but i don't want the automatic function type signature comments displayed. I like seeing the comments for data variables, strings, etc. Pretty much everything but the function type signature. I've tried going through all the options that look relevant but can't find one to turn off these function type signature comments.

image

emteere commented 5 years ago

I would have thought there was an option for this under Edit->ToolOptions...->ListingFields->EOLComments. However, I don't see it. We can put this on the change list to add as an option in a future release.

ebfe2326 commented 5 years ago

Thanks. If it's not much more work, I would also recommend having a way to differentiate between the automatic function type signatures and other automatic comments such as the string contents, etc. Most of the automatic comments are helpful, but the function type signatures tend to be different in my opinion. They don't tend to add enough information that you won't have to review the function manually, the information it adds is trivial to see once you're inside the function, and they're also very long which tends to be cumbersome.

If there's not an easy way to differentiate, just having a way to enable / disable the automatic comments would be nice.

dragonmacher commented 5 years ago

We briefly looked into this and found:

  1. The auto comments are ignoring the Tool Options in some cases (this is a bug).
  2. We could (should) add more options for controlling what is displayed by the auto comments.