mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
gdbserver: Fix vAttach response when attaching is not supported
handle_v_attach calls attach_inferior, which says: "return -1 if attaching is unsupported, 0 if it succeeded, and call error() otherwise." So if attach_inferior return != 0, we have the unsupported case, meaning we should return the empty packet instead of an error. In practice, this shouldn't trigger, as vAttach support is supposed to be reported via qSupported. But it doesn't hurt to be pedantic here. Change-Id: I99cce6fa678f2370571e6bca0657451300956127 Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
f1fc8dc2dc
commit
ef27d39dd2
@ -3318,7 +3318,10 @@ handle_v_attach (char *own_buf)
|
||||
prepare_resume_reply (own_buf, cs.last_ptid, cs.last_status);
|
||||
}
|
||||
else
|
||||
write_enn (own_buf);
|
||||
{
|
||||
/* Not supported. */
|
||||
own_buf[0] = 0;
|
||||
}
|
||||
}
|
||||
catch (const gdb_exception_error &exception)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user