gdb(4): Support empty qSupported queries
Technically a client may send a qSupported query without specifying any client features. We should respond with our supported list in that case instead of bailing with error. Reported by: rlibby Reviewed by: emaste, rlibby, vangyzen Sponsored by: Isilon Differential Revision: https://reviews.freebsd.org/D26115
This commit is contained in:
parent
80bd2aad68
commit
5af88677de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364358
@ -204,8 +204,14 @@ gdb_do_qsupported(uint32_t *feat)
|
||||
|
||||
/* Parse supported host features */
|
||||
*feat = 0;
|
||||
if (gdb_rx_char() != ':')
|
||||
switch (gdb_rx_char()) {
|
||||
case ':':
|
||||
break;
|
||||
case EOF:
|
||||
goto nofeatures;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
|
||||
while (gdb_rxsz > 0) {
|
||||
tok = gdb_rxp;
|
||||
@ -250,6 +256,7 @@ gdb_do_qsupported(uint32_t *feat)
|
||||
*feat |= BIT(i);
|
||||
}
|
||||
|
||||
nofeatures:
|
||||
/* Send a supported feature list back */
|
||||
gdb_tx_begin(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user