New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor types: extract API for ttc
and tt
##refactor
#659
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #659 +/- ##
==========================================
- Coverage 42.80% 42.78% -0.02%
==========================================
Files 869 869
Lines 316401 316410 +9
==========================================
- Hits 135421 135366 -55
- Misses 180980 181044 +64
Continue to review full report at Codecov.
|
Don't we have tests for those? Could you please add a couple? Will be helpful for the future RzTypes refactor as well. |
librz/core/cmd_type.c
Outdated
} else if (rz_str_startswith(type, "func")) { | ||
rz_core_cmdf(core, "tfc %s", name); | ||
printFunctionTypeC(core, input + 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name here as well?
Added tests for |
Actually, I just realized that |
Please mark it as "ready to review" when we can have a look ;) |
…nitions accordingly
* Stop passing TDB, use core->analysis->sdb_types instead * Changed the name of the argument to typedef_name * Clean the `RZ_OUTPUT_MODE_JSON` case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One failing test:
[XX] db/cmd/types tt
RZ_NOPLUGINS=1 rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -N -Qc 'td typedef char FILE_NAME;
tt FILE_NAME
"td typedef bool FLAG;"
tt FLAG
' -
-- stdout
It's because |
Your checklist for this pull request
Detailed description
This PR refactors a handful of places in
cmd_type.c
to use the API.I've added two new RZ_APIs for the commands
tt
andttc
.And they are:
Also added tests for
ttj
Test plan
Firstly, we need to,
I'm not sure whether I've made
tc
working fine. I am currently looking into that.But anyway, all of them have written unit tests, so if the CI succeeds, we can say that they're working fine.
Closing issues
None.