-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Support Remote File I/O #32
Comments
I hadn't seen this project before but it looks very cool! My crate has never gotten to a true working state, so if you have a more full-featured implementation feel free to take anything you think is useful from mine! My original goal was to see if I could write a tool that could be run against minidump files so developers could use gdb/lldb to debug minidumps from Firefox crash reports the same way that Microsoft's debuggers natively support postmortem debugging of minidumps. Given that I left Mozilla a while ago I'm not terribly invested in that anymore, although I still think it would be useful. I did cheat a bit and nerd-snipe @tromey (an actual GDB developer) into contributing, though. :) |
Hey @luser, thanks for the heads up! Glad to know that when the time comes, Yeah, I started working on |
Hi! I recently did a very brief internship at Solana where I was trying see how to attach GDB to a eBPF VM, which Solana uses as an execution environment for smart contracts. I was able to use this crate (it's awesome btw) to do basic debugging operations without any DWARF symbols, but I ended up running into a lot of linker issues surrounding relocations that don't entirely make sense in the context of the manner in which we are using eBPF, which isn't really its intended use case (see the linked issue if you're curious). Anyhow, if it's alright with you, I'm interested in attempting to implement Host I/O and File I/O packets as our VM has a dynamic loader that does perform relocations and it would make things much simpler if GDB could simply read executables after they have been loaded by the VM. I should mention that I'm still rather new to open source contribution, so if I have bad etiquette or something please feel free to criticize me so that I can improve. |
@Sladuca Go for it! Any and all contributions are always welcome. If you ever need any guidance on how to structure the feature and/or how to tackle certain problems, feel free to open a draft PR with the work you've got. Alternatively, if you're more of a rapid-iteration kind of person, you can also reach me on Discord at And remember - Unrelated to the specific issue of of Remote File I/O:
|
See https://sourceware.org/gdb/onlinedocs/gdb/File_002dI_002fO-Overview.html#File_002dI_002fO-Overview
Additionally, it would also be nice to implement Host I/O Packets at the same time (See https://sourceware.org/gdb/onlinedocs/gdb/Host-I_002fO-Packets.html#Host-I_002fO-Packets)This has been implemented in #66. See update below...
Skimming through the spec, it looks like implementing these extensions can be done in a totally backwards-compatible manner, simply by adding some new extension traits to
Target
, and shouldn't require any breaking API changes.There's also some prior art from luser/rust-gdb-remote-protocol#60, which could be a good source of inspiration.
Update 8/20/2021: #66 has been merged, adding support for Host I/O packets!
In hindsight, this issue should probably have been split into two separate ones, as while there is some overlap between File I/O and Host I/O, the two are actually very different features.
The text was updated successfully, but these errors were encountered: