jasonmolenda wrote:

For lldb-server/debugserver, we might want to distinguish if the connecting 
lldb is old-lldb (only knows the lldb x) or new-lldb (knows lldb x and gdb x).  
I think in `GDBRemoteCommunicationClient::GetRemoteQSupported` lldb should add 
`binary-upload+` to the `features` list it sends to debugserver/lldb-server, 
and lldb-server/debugserver should reply with `binary-upload+` in its response. 
 Then lldb-server/debugserver knows to send a gdb-style x, and lldb knows to 
expect that response.

For right now, lldb-server and debugserver will default to lldb-x behavior, 
unless it was requested (`binary-upload+`) to use gdb-x behavior.  We will 
switch that default behavior after a short while, when we are comfortable that 
old-lldb's will not be connecting to current-debugserver/lldb-servers.

When lldb is sniffing the capability of the remote stub, `x0,0 -> OK` means 
lldb-x unambiguously.  `x0,0 -> b` and `x0,0 -> Exx` are gdb-x unambiguously.  
Any other response (e.g. empty-packet response, indicating an unknown packet) 
will make lldb fall back to using the asciihex `m` packet to read memory.

Does this seem like a good approach for compatibility?

https://github.com/llvm/llvm-project/pull/124733
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to