public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/25702] New: GDB may send qSupported packet which larger than possible packet size of stub.
@ 2020-03-19 20:22 sergey.belyashov at gmail dot com
2020-08-09 20:40 ` [Bug remote/25702] " tromey at sourceware dot org
0 siblings, 1 reply; 2+ messages in thread
From: sergey.belyashov at gmail dot com @ 2020-03-19 20:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25702
Bug ID: 25702
Summary: GDB may send qSupported packet which larger than
possible packet size of stub.
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: remote
Assignee: unassigned at sourceware dot org
Reporter: sergey.belyashov at gmail dot com
Target Milestone: ---
Quote from
https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#qSupported
:
> The remote stub can accept packets up to at least bytes in length. GDB will
> send packets up to this size for bulk transfers, and will never send larger
> packets. This is a limit on the data characters in the packet, including the
> frame and checksum. There is no trailing NUL byte in a remote protocol packet;
> if the stub stores packets in a NUL-terminated format, it should allow an extra
> byte in its buffer for the NUL. If this stub feature is not supported, GDB
> guesses based on the size of the ‘g’ packet response.
For example, Z80 (GDB support is developing) CPU has 13 16-bit register pairs,
so 26 bytes total. It is 52 hex digits. Plus '$', 'G', '#' and CSUM. Total 56
bytes. But first request from gdb looks like:
$qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df
It is naked by stub. GDB totally request 4 times with same result.
I suggest to initially send qSupported with maximum packet size not larger than
G command request for particular target. And after receiving answer resend full
size (if needed).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug remote/25702] GDB may send qSupported packet which larger than possible packet size of stub.
2020-03-19 20:22 [Bug remote/25702] New: GDB may send qSupported packet which larger than possible packet size of stub sergey.belyashov at gmail dot com
@ 2020-08-09 20:40 ` tromey at sourceware dot org
0 siblings, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2020-08-09 20:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=25702
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-08-09
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-09 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 20:22 [Bug remote/25702] New: GDB may send qSupported packet which larger than possible packet size of stub sergey.belyashov at gmail dot com
2020-08-09 20:40 ` [Bug remote/25702] " tromey at sourceware dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).