GDB remote protocol does not specify length of g packet for register read. It depends on remote to include all or exclude certain registers from g packet. In case a register or set of registers is not included as part of g packet then we should fall back to p packet for reading all registers excluded from g packet by remote. This patch adds support for above feature and adds a test-case for the same.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Seems reasonable. I think the names like m_read_all_at_once and ReadAllRegisters will now be somewhat confusing. Maybe it would be worth (in a separate patch) renaming them to something which does not include "all" in the name.
Maybe we could use m_use_g_packet_for_reading/writing instead of m_read/write_all_at_once. I'm not sure what would be a good name for ReadAllRegisters... Gdb docs describe the g packet as "Read general registers" so maybe just ReadGeneralRegisters with some comment that this may in fact include all of them?