-
Notifications
You must be signed in to change notification settings - Fork 855
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
Draft: RISC-V support #829
Conversation
There are currently some bugs in Capstone / the Python bindings. See: |
This post has been moved to a separate pull request #830. |
@TobiasFaller there seem to be a conflict; can u fix it soo we can merge it? :) |
Yeah, sure. As this is still a WIP I have not rebased it yet. |
Updates: capstone-engine/capstone#1690 has now been merged too. |
Update: There has not been a release of aquynh/capstone with RISC-V support yet. Maybe it is time to move to a more active project / fork? |
Is there actually a fork that is more active or/and supports RISC-V? |
1c0455f
to
bab21a4
Compare
Hi |
Yes, but the first release candidates seem to have been released ten days ago which means it's probably not long before a stable release will be done. Please keep in mind that this RISC-V extension's code has not been fully tested yet and can only be considered a prototype. |
@TobiasFaller ping :) |
Still waiting for a stable capstone 5.0 release. |
It's been a long time. Can we support RISC-V without capstone? How about make a simple disassembler by calling instr = gdb.execute("x/i %#x" % address, to_string=True) |
base on pwndbg#829 by Tobias Faller <faller@endiio.com>
base on pwndbg#829 by Tobias Faller <faller@endiio.com>
base on pwndbg#829 by Tobias Faller <faller@endiio.com>
* add riscv:rv64 registers base on #829 by Tobias Faller <faller@endiio.com> * disassemble without capstone to support other architectures * ignore gdb.error on context_backtrace
Really want this feature. Encounter some difficulty when debugging on riscv64 hardware without pwndbg. Thanks everyone working on this issue in advance. Update: I'll try the one in master branch. |
@FantasqueX pls let me know if and how the dev/latest version works for u! |
@TobiasFaller fwiw we could potentially use the release candidate version too. I'm rather okay with it, as long as we give a choice to users to switch between the current solution and capstone based one. |
@disconnect3d Okay, I'll see what I can do and how to make the release candidate version usable. I'll need to validate and rebase the current implementation though, so it will take time. |
Hi. How is it going? Is there anything I can do to help? I'm very interested in this work. |
@Xeonacid Hi! Sure, you can help :) We added some basic support for riscv:rv64 in #1588. To work with RISC-V further we need to:
Generally, I think we should close this draft since it is conflicted and not worked upon anyway, but one can base upon this and extend Pwndbg further. |
Thanks for the information! I will work on this. |
Great! If you have any questions, you can also ask on our Discord: https://discord.gg/9rrbG3yt |
I am closing this PR for now |
This is a resurrection of pwndbg#829 Co-authored-by: Tobias Faller <faller@endiio.com>
This is a resurrection of pwndbg#829 Co-authored-by: Tobias Faller <faller@endiio.com>
This is a resurrection of pwndbg#829 Co-authored-by: Tobias Faller <faller@endiio.com>
This is a resurrection of pwndbg#829 Co-authored-by: Tobias Faller <faller@endiio.com>
This is a resurrection of pwndbg#829 Co-authored-by: Tobias Faller <faller@endiio.com>
* Improve RISCV support This is a resurrection of #829 Co-authored-by: Tobias Faller <faller@endiio.com> * Silence bogus vermin warning * Fix relative backwards jump calculations The target address wouldn't be truncated to the pointer size. * Add basic qemu-user test * Run qemu-user tests in CI * Make shfmt happy * Fix pwntools < 4.11.0 support * Support RISCV32 for pwntools < 4.11.0 as well --------- Co-authored-by: Tobias Faller <faller@endiio.com>
This will be my attempt to implement RISC-V support (#735) for Pwndbg.
Capstone has RISC-V support only in the
next
branch, so this pull request will stay open until the new release version 5.0.0 is released.Feel free to give feedback.