From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /Fg6BPsld2jIHDYAWB0awg (envelope-from ) for ; Wed, 16 Jul 2025 00:09:31 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VUpHsTUC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0460D1E0C2; Wed, 16 Jul 2025 00:09:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 28A4E1E0C2 for ; Wed, 16 Jul 2025 00:09:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F2053858D37 for ; Wed, 16 Jul 2025 04:09:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F2053858D37 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VUpHsTUC Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 2A83B3858406 for ; Wed, 16 Jul 2025 04:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A83B3858406 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2A83B3858406 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752638934; cv=none; b=Fq2Vf74k/BpEmBml0rTrbaACs4zdZsKNgHyG1iR0GLl31VBklO9Err+SBurwVJHaRBBrHqpKQLMOk9fwMyKKUkBEEoU7/paIlVS7sZQq6YEvb4jdQTrwo4d51fCZeaNSTImbyVkLMk0cKX7y9WGD2FCGShau5aD9zwBPeQM65+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752638934; c=relaxed/simple; bh=962605VVIXV73HCmJjmsHteuxSflifduA1AoSARuRUU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QcaegrY7k5G66+kbasGtsN0IIPzWJNI1S9uvwyt5g42hooed7smX72QizAxdoifAjcgNBf8A2MtY4m0TXMAHBG8ANLgIIo8FGMfT9Ic3nq63e/kbNSHJ5ZfPsQIAn8H46nM4BYBuax0PnU04ozuTLPnLJErJLjEzMjNbHFgJ0Fk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A83B3858406 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-41cfa50c73dso193272b6e.0 for ; Tue, 15 Jul 2025 21:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752638933; x=1753243733; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=oAdcD3l/pKEO9RAj11QMMBsPwzm1ALXyl6FLfU3G5EU=; b=VUpHsTUCT1qWfTw32ppBYUDxWKgussJt8hJjl0FZ+FwUB9FXJm2i8Kc2wtO0p4tyHv 81wjmh3hT4ppwmNLfStdwSnXrzqs2gzjwTHrhf/L0PnFYJR/71FsGIp6MPygFXy98wYd DFyP8CN1qSSoNxWFpkUcLdvGopjq8GjpW0rLnQW5J4f1Oc4v4uwHzsZmIqeP74u2cBsJ Bqzmi/3nU9r9g4nXyU4D4R73Ln9cd4vC+ii71GlKrbXcMmwed9T7lVDY4dpe4Kzaist+ ubWFteQ/wp62FTILwgKO8mlJzdCFkP4/o2AMKB2pY7+3AowmyIW8zppaFyW7FHeUJ0HF 4AsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752638933; x=1753243733; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=oAdcD3l/pKEO9RAj11QMMBsPwzm1ALXyl6FLfU3G5EU=; b=Jbr+Ps8qgSI+QnlWXDrGAy+S8PYenxhnQCMBelY8eMP/W3I6e34f3mFMAA/OgdddBp JGc46s/BLpbgxSrHeI2kxNkWO8skuvVfqhMd/c68U0PTaE8osqvKoMzX0teY9Eh4+jhe LlDMp4TiTZ+IK39feqrCfqJFs1jnczj5zYAghZQ2MobtO08fErZpW+kvLpy3ZExMvjiS JCW3X6tqQ1ljtE1s/MxgGVTOw0bdZCh455e3ZPQUX/sKUXX6IxYpfz+QcPSfeA0w/pEX EsN9tSv8PVpNdJ5KvnR18toCGg2MkjK3jtcrp9Px4+Au//h540xfKjmaHl3sBHpzDDAi AnSg== X-Gm-Message-State: AOJu0YyPyZ7mJoFTVX4AFBjnFwmVgpFUzEsAAaar78GVBFEeIMCrNqgR EHTgAu7swKiR+hqffK0LT5e6XYdkHuOr4hAoBfCAZ0sGbXNG19TAulCQnhhFBDr+VYw= X-Gm-Gg: ASbGnctPtRItFcJbmKfW1ke++oX0YQzUbonIvqoYgIUefv4SYY21n+vkJQJ43HvwFtp Iw2NxRhvvpMwTef0vPw2xLoj4k4Sv/kB5g/Vu8Cv0MheXnuu1IPskiXThBf3B6KR5SnPOE0fGnL mFzf1fmUIQQJCGsDH2zXimNil2PcxSmnxEzpCrD+PH3XBYm0j5yl/0zEYK4HBHIXJoCp54KHcH6 rr4VJJ9cpNKLLMfRTnxELQmdW7wpHqV2hyobVKn5QVHM6hhcgUvQLhZlR1MeQnAcND81ozJiEkD weRTDzrj41vuKbsywqIuRPRmns9b45+CcDfbxKjE0rw00MbyvYgzQW7MzEQStmPKt5sKkFkj92M kL1IQyHb9yKt2eV2ETTT9AO0ywGm30dza X-Google-Smtp-Source: AGHT+IGFfkKNlGa7MMnNSrIZeg1ikGYesoxh7BMaicJog1wcOGfPN2aE73NhHVssn0nxJdCMDQVWyA== X-Received: by 2002:a05:6808:148a:b0:41c:31f:fdec with SMTP id 5614622812f47-41cede868edmr1093560b6e.5.1752638933269; Tue, 15 Jul 2025 21:08:53 -0700 (PDT) Received: from localhost ([2804:14d:7e39:88d6:11ec:ba5d:316b:779f]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-73cf108a6ebsm2705535a34.15.2025.07.15.21.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jul 2025 21:08:52 -0700 (PDT) From: Thiago Jung Bauermann To: Tankut Baris Aktemur Cc: gdb-patches@sourceware.org, Markus Metzger Subject: Re: [PATCH v2 10/47] gdb, gdbserver, ze: in-memory libraries In-Reply-To: <20241213-upstream-intelgt-mvp-v2-10-5c4caeb7b33d@intel.com> (Tankut Baris Aktemur's message of "Fri, 13 Dec 2024 16:59:27 +0100") References: <20241213-upstream-intelgt-mvp-v2-0-5c4caeb7b33d@intel.com> <20241213-upstream-intelgt-mvp-v2-10-5c4caeb7b33d@intel.com> User-Agent: mu4e 1.12.11; emacs 30.1 Date: Wed, 16 Jul 2025 01:08:50 -0300 Message-ID: <87ms94eq0d.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hello again, I just noticed a couple of things I missed in my review: Tankut Baris Aktemur writes: > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index ddd414659fcc554813fc2a12a79e581ad7a188b9..c84a8372c223e724e3042322a8bee07b12423050 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -48026,9 +48026,10 @@ queries the target's operating system and reports which libraries > are loaded. > > The @samp{qXfer:libraries:read} packet returns an XML document which > -lists loaded libraries and their offsets. Each library has an > -associated name and one or more segment or section base addresses, > -which report where the library was loaded in memory. > +lists loaded libraries and their offsets. Each library has either an > +associated name or begin and end addresses and one or more segment or > +section base addresses, which report where the library was loaded in > +memory. > > For the common case of libraries that are fully linked binaries, the > library should have a list of segments. If the target supports > @@ -48040,6 +48041,10 @@ depend on the library's link-time base addresses. > @value{GDBN} must be linked with the Expat library to support XML > library lists. @xref{Expat}. > > +@value{GDBN} indicates support for in-memory library elements by > +supplying the @code{qXfer:libraries:read:in-memory-library+} > +@samp{qSupported} feature (@pxref{qSupported}). This feature should be added to the list in the qSupported documentation entry. > A simple memory map, with one loaded library relocated by a single > offset, looks like this: > diff --git a/gdb/remote.c b/gdb/remote.c > index f41129915683194237d1bba56d17df61ae89c063..7d074a5df322d68ded8f96c4832bc8c247435a4f 100644 > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -5956,6 +5956,9 @@ remote_target::remote_query_supported () > != AUTO_BOOLEAN_FALSE) > remote_query_supported_append (&q, "memory-tagging+"); > > + remote_query_supported_append > + (&q, "qXfer:libraries:read:in-memory-library+"); This is the only feature in this function that isn't guarded by a "set remote foo-packet" command state. Shouldn't it? > /* Keep this one last to work around a gdbserver <= 7.10 bug in > the qSupported:xmlRegisters=i386 handling. */ > if (remote_support_xml != NULL -- Thiago