Is your feature request related to a problem? Please describe.
Currently, if Cutter (r2) faces an analysis issue, there is no good way for the user to know what happened. For example, when trying to define a function at some address, I couldn't understand why it fails. Only when enabled e anal.verbose I saw that it fails because it can't set functions on non-executable sections.
Describe the solution you'd like
Add an option to the preferences widget to enable verbose analysis (anal.verbose)
@ITAYC0HEN shouldn't this be in analysis options dialog too during open file? Also, where should it be added in preferences exactly as I don't see any analysis specific section?
Hey :) It can be on Initial Analysis dialog, but it will create a lot of verbose and msgs during the analysis so I won't encourage users to use it.
Regarding the section, I'd add a new Analysis section for this.
Something like this issue can also be part of this section: https://github.com/radareorg/cutter/issues/875
Probably, more options from e??~anal can be there as well (options that are relevant to change after the initial analysis). But this stuff can be decided later on :)
I'd like to work on this issue. Do you have more suggestions for other analysis options besides anal.verbose?
This is a good question :)
I opened this for a list in which we can select the options we like to put in there
https://hackmd.io/@Megabeets/H1jBD3Hxv/edit
Hi everyone,
I'm sharing with you a first version of the "Analysis" section. Since this is my first contribution to Cutter, I think it's a good idea to first share the code before creating the PR. If you think that it makes sense, I can then create the PR for a proper code review. Of course, if you prefer that I create the PR directly, this is perfectly fine with me.
You'll be able to see the changes with respect to master here.
Some considerations I have taken into account:
Core()->getConfigb method directly instead of Config()->getConfig to avoid having to modify this one.AnalTask to handle the analysis. As a consequence, the title of the async task dialog is "Initial Analysis" and you can see the message "Loading the file...", which is not quite accurate:
cog_light.svg, since it seemed that a cog is a good representation for "Analysis" and it was already there. Let me know if that's OK, or what other icon would you think fits better. Also, I took into account that for the light theme the color of the icon changes, so added the corresponding image too. Let me know your thoughts on it! Thanks!
Hey yo @ocastejon! Great comment, very thorough :+1:
I would love to seed it as a PR and then we can comment on some of the things you mentioned.
Using the Analysis Task for the inital analysis is a wise decision, but it will have to get some tweaks (as you mentioned, the logs aren't correct).
The icon is quite fine :) Can't think of any better one from the top of my head
Hi @ITAYC0HEN! Thank you! I just created the pull request #2332. Looking forward to your feedback! :)
Most helpful comment
Hi everyone,
I'm sharing with you a first version of the "Analysis" section. Since this is my first contribution to Cutter, I think it's a good idea to first share the code before creating the PR. If you think that it makes sense, I can then create the PR for a proper code review. Of course, if you prefer that I create the PR directly, this is perfectly fine with me.
You'll be able to see the changes with respect to master here.
Some considerations I have taken into account:
Core()->getConfigbmethod directly instead ofConfig()->getConfigto avoid having to modify this one.AnalTaskto handle the analysis. As a consequence, the title of the async task dialog is "Initial Analysis" and you can see the message "Loading the file...", which is not quite accurate:However, I thought it was OK, for now at least.
cog_light.svg, since it seemed that a cog is a good representation for "Analysis" and it was already there. Let me know if that's OK, or what other icon would you think fits better. Also, I took into account that for the light theme the color of the icon changes, so added the corresponding image too.Let me know your thoughts on it! Thanks!