-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add anal.cc & anal.syscc and remove the hardcoded conventions in debug ##anal #17960
Conversation
@@ -5978,7 +5979,7 @@ static void r_anal_aefa(RCore *core, const char *arg) { | |||
int i; | |||
eprintf ("NARGS %d (%s)\n", nargs, key); | |||
for (i = 0; i < nargs; i++) { | |||
ut64 v = r_debug_arg_get (core->dbg, R_ANAL_CC_TYPE_STDCALL, i); | |||
ut64 v = r_debug_arg_get (core->dbg, "reg", i); |
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.
not sure about stdcall.. maybe just using cc
is fine
Then you have to kill |
No. The functions take the calling convention defined by default. But you can specify a different one on every function. So afc shouldnt die. But the problem is that befofe the cc had no way to specify which was the default. Also with this im allowing to define different convwntions for syscalls and userland code |
See |
And |
Well in case of |
Is there a way for storing known os-arch-bits to syscall cc mapping so that for combinations with known syscall numbers which r2 currently defines in syscall/d/*.sdb.txt files, so that it isn't necessary to manually set |
afc= is suposed to set the calling convention for the given function. anal.cc should be the default if none specified. so.. if afc= is just doing the same that must be fixed i guess. anyway what do you think about this change? adding this new variable makes sense to me, what about you? |
Codecov Report
@@ Coverage Diff @@
## master #17960 +/- ##
==========================================
- Coverage 40.53% 40.52% -0.01%
==========================================
Files 1140 1140
Lines 360693 360738 +45
==========================================
+ Hits 146193 146199 +6
- Misses 214500 214539 +39
Continue to review full report at Codecov.
|
|
Your checklist for this pull request
Detailed description
This PR introduces two new eval variables:
those are used to set the sdb keys default.cc and default.syscc, which is used tod efine the default calling convention for analysing functions and syscalls. This change also lets the #17954 to allow to write tests for it
Test plan
Fix/review all the tests that are failing and make CI green.
Expect #17954 to add a test after rebasing
Closing issues
not sure if there's one, but the src had comments about it, and it was planned to kill all the hardcoded calling conventions. so i did it.