From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id B191E3858D37 for ; Sat, 26 Aug 2023 06:54:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B191E3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZnBa-0000kF-4N; Sat, 26 Aug 2023 02:54:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qwVoHNz8kxVUMEajsfHBhcdjz4qbq1ZGaILuYicaqIc=; b=P7aJGEkMFSN6 HNoXNYmTp0bh1I8rT95hexct3JuNWm1ysgfV5RnDJR2/wflwz8ZWjvJfqdJ9ZGN/5OG5G6MFz0att +rzlM8jidkyNArKYW0orUHIT5tDOjw/67ZooFrGCpdJI7uDNdwJmrBrK+GvFD+Q/LtdA9IAObT18R HCC4OsyFTTv/2aAcKW+y1b1nXLAURGFKx0omDKk3xC+ZjNEFUuF3PMwBta4jbvV9zjcL8zs8MKL/L QQJjOJonZVtLypUlsVVYiQb0UIpBzgFfd6mXWahpSkZLpFEGJdRRSvsOM9se3KFLZVOU5dETdF7tE h1rglGQpFh76QODt9/Qgcg==; Date: Sat, 26 Aug 2023 09:54:47 +0300 Message-Id: <83edjqmgy0.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <050e4522564ed979d49880203cd7ac7b9af6ec48.1692977354.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Fri, 25 Aug 2023 16:34:40 +0100) Subject: Re: [PATCHv2 07/10] gdb: add qMachineId packet References: <050e4522564ed979d49880203cd7ac7b9af6ec48.1692977354.git.aburgess@redhat.com> X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Cc: Andrew Burgess > Date: Fri, 25 Aug 2023 16:34:40 +0100 > From: Andrew Burgess via Gdb-patches > > gdb/Makefile.in | 3 + > gdb/NEWS | 5 ++ > gdb/configure.nat | 2 +- > gdb/doc/gdb.texinfo | 126 +++++++++++++++++++++++++++ > gdb/linux-nat.c | 42 +++++++++ > gdb/nat/linux-machine-id.c | 85 +++++++++++++++++++ > gdb/nat/linux-machine-id.h | 75 ++++++++++++++++ > gdb/nat/linux-namespaces.c | 13 +++ > gdb/nat/linux-namespaces.h | 14 +++ > gdb/remote-machine-id.c | 69 +++++++++++++++ > gdb/remote-machine-id.h | 108 ++++++++++++++++++++++++ > gdb/remote.c | 169 +++++++++++++++++++++++++++++++++++++ > gdbserver/Makefile.in | 1 + > gdbserver/configure.srv | 2 +- > gdbserver/linux-low.cc | 24 ++++++ > gdbserver/linux-low.h | 2 + > gdbserver/server.cc | 12 +++ > gdbserver/target.cc | 8 ++ > gdbserver/target.h | 9 ++ > 19 files changed, 767 insertions(+), 2 deletions(-) > create mode 100644 gdb/nat/linux-machine-id.c > create mode 100644 gdb/nat/linux-machine-id.h > create mode 100644 gdb/remote-machine-id.c > create mode 100644 gdb/remote-machine-id.h Thanks. > diff --git a/gdb/NEWS b/gdb/NEWS > index d78929c1398..2b1f265f5b8 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -293,6 +293,11 @@ qDefaultExecAndArgs > which the server was started. If no such information was given to > the server then this is reflected in the reply. > > +qMachineId > + This packet returns an identifier that allows GDB to determine if > + the remote server and GDB are running on the same host, and can see > + the same filesystem. > + > *** Changes in GDB 13 This part is OK. > +The @var{mnt-id} and @var{user-id} are either the character @samp{-} > +if the particular namespace is not support on this host, or is the ^^^^^^^ "supported" > +When matching a machine-id @value{GDBN} first checks the reply for a > +master key that it understands. If a suitable key is found > +@value{GDBN} checks that the value for the master key matches its > +value for the master key. If the master key value matches, then > +@value{GDBN} checks all the remaining @var{key}/@var{value} pairs; > +each @var{key} must be known secondary key associated with the ^^^^^^^^^^^^^^^^^^^^^^^^^^^ "must be a known secondary key" Reviewed-By: Eli Zaretskii