-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
flag_register_to_human
is not implemented on RISC-V architecture
#1076
Conversation
Proper solution is to just implement that method for the arch. Would you be able to do that instead? |
Hi @yuk1i
I've gone through the code of GEF, and RISC-V is the only architecture for which it's not implemented. All the others are:
As @Grazfather mentioned, your PR in this form is therefore unlikely to get merged. A more useful contribution would be to implement this function for RISC-V instead, since you seem to have easy access to a RISC-V environment to test it. This is pretty easy, and if so, feel free to ask for help on the Discord if needed. If you don't wish to implement it yourself, then you can close this PR and open an issue instead (linking this PR). Thanks |
flag_register_to_human
is not implemented on RISC-V architecture
If I remember correctly, RISC-V does not have the flags register like x86's EFLAGS and ARM's NZCV. According to the existing code that uses this function's returned value in a print command, I think it's better to leave other archs' code as is, and simply short cut this function for risc-v. |
Correct, we've already added a note in the code about that. This doesn't change the fact the function will be called regardless of the architecture. So to re-iterate:
Here the contribution I mentioned would simply add a definition that function to the |
When I search the The "flags" command shows the flag register, and it checks arch's So simply do the same thing in the "context" command.
|
flag_register_to_human
is not implemented in all architectures, such as RISCV.This issue will crash
context
command.This issue is confirmed in gef dfd3868.
Note: The backend is an openocd instance and VisionFive2 board over Jlink debugger.
However, I am convinced this issue is unrelated to the specific backend configuration.
Log
.gdbinit
Checklist