public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] replace PBUFSIZ with a target op
@ 2023-09-19  5:45 Klaus Gerlicher
  2023-09-19  5:45 ` [PATCH 1/1] gdb, gdbserver: " Klaus Gerlicher
  0 siblings, 1 reply; 9+ messages in thread
From: Klaus Gerlicher @ 2023-09-19  5:45 UTC (permalink / raw)
  To: gdb-patches

From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>

Hi all,

this is my first contribution.

PBUFSIZ is meant to define the size of the packet buffer for communication with a target. It needs to be at
least 2 * tdesc->registers_size + overhead.

This #define has been increased constantly to accomodate for targets with ever increasing register sizes and
this could therefore become a target-related setting.

The accompanying patch solves this by making this a target op that will be queried from the client on
startup. It will return the current PBUFSIZ as a default for targets not yet using the new target op. Going
forward it would be a good idea to upgrade each supported target with this mechanism, so constantly changing
the global PBUFSIZ define becomes unnecessary.

The patch was tested with the testsuite on Linux x86 and x86_64.

Regards
Klaus


Gerlicher, Klaus (1):
  gdb, gdbserver: replace PBUFSIZ with a target op

 gdb/remote.h             |  8 +++---
 gdb/target-delegates.c   | 31 +++++++++++++++++++++--
 gdb/target.h             |  7 ++++++
 gdbserver/hostio.cc      | 54 ++++++++++++++++++++++++----------------
 gdbserver/notif.cc       |  8 +++---
 gdbserver/server.cc      | 26 +++++++++++--------
 gdbserver/server.h       | 31 ++++++++++++++++-------
 gdbserver/target.cc      |  9 +++++++
 gdbserver/target.h       |  9 +++++++
 gdbserver/tdesc.cc       | 11 +++++---
 gdbserver/tracepoint.cc  |  4 +--
 gdbsupport/common-defs.h |  5 ++++
 12 files changed, 146 insertions(+), 57 deletions(-)

-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-21 14:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19  5:45 [PATCH 0/1] replace PBUFSIZ with a target op Klaus Gerlicher
2023-09-19  5:45 ` [PATCH 1/1] gdb, gdbserver: " Klaus Gerlicher
2023-09-19 14:07   ` Simon Marchi
2023-09-20  6:21     ` Gerlicher, Klaus
2023-09-20 12:59       ` Andrew Burgess
2023-09-20 16:32         ` Pedro Alves
2023-09-21  6:02           ` Gerlicher, Klaus
2023-09-21 14:02             ` Andrew Burgess
2023-09-21 14:07             ` Pedro Alves

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).