This is an archive of the discontinued LLVM Phabricator instance.

[lldb-server] Verify 'g' is supported before relying on them
Needs ReviewPublic

Authored by guiandrade on Nov 21 2019, 3:50 PM.

Details

Summary

This ensures that 'g' packets are only used if the config
plugin.process.gdb-remote.use-g-packet-for-reading = true and
we get a normal packet in response to a 'g' packet.

Event Timeline

guiandrade created this revision.Nov 21 2019, 3:50 PM

Hi, sorry I haven't had time to get back to this one. I wanted to look into the m_avoid_g_packets ivar in GDBRemoteCommunicationClient and GDBRemoteCommunicationClient::AvoidGPackets. It looks like it was written to specifically avoid the g packet with arm64 devices, and I think it's trying to avoid the g packet for older debugservers.

The last time we enabled this, the macos bots immediately started getting failures -- I suspect there is a bug with debugserver's g packet right now, which we hadn't noticed because we don't use the g packet on this platform (we pre-seed all of the GPR values so it's not a perf problem). I need to spend a little time looking into what's going on there --- but we'll probably need to make sure GDBRemoteCommunicationClient::AvoidGPackets is called / used, and that it is updated to avoid some more debugservers. :)