From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /9PGC7rzkGLCtAgAWB0awg (envelope-from ) for ; Fri, 27 May 2022 11:52:26 -0400 Received: by simark.ca (Postfix, from userid 112) id 1E3751E221; Fri, 27 May 2022 11:52:26 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=RFeRxvon; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4716E1E01D for ; Fri, 27 May 2022 11:52:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE25F3AA901F for ; Fri, 27 May 2022 15:52:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE25F3AA901F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653666744; bh=zXOV+W+u4AtVnjPSHgmaeyMZ9sD8QNxiwIreLe/r32g=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=RFeRxvondV5ZYWRCdW3jiPRBymLjZ+L3FTmm3+kO6fdeje7TRfLOUybQTabYgjqlC it19faRI9aUGTg82BVM+VUoXecx4GRVCnrOn31L2Qeg4f+RhXM3+v6vjSwCJExLKnY NiOiXhVGc0mEaoaLk5GGWKIJnf4uZKlPv37KzwNk= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 286BA3814FFA for ; Fri, 27 May 2022 15:52:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 286BA3814FFA Received: from fencepost.gnu.org ([2001:470:142:3::e]:59290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nucFx-0005YZ-Ld; Fri, 27 May 2022 11:52:05 -0400 Received: from [87.69.77.57] (port=4457 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nucFx-0001Ac-4S; Fri, 27 May 2022 11:52:05 -0400 Date: Fri, 27 May 2022 18:52:01 +0300 Message-Id: <83wne7m0ri.fsf@gnu.org> To: Pedro Alves In-Reply-To: <956e1fbd-5f03-c021-c390-82e1cf3493b5@palves.net> (message from Pedro Alves on Fri, 27 May 2022 16:04:32 +0100) Subject: Re: [PATCH v4] gdb/manual: Introduce location specs References: <20220526194250.2310460-1-pedro@palves.net> <8335gvnjrw.fsf@gnu.org> <956e1fbd-5f03-c021-c390-82e1cf3493b5@palves.net> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Fri, 27 May 2022 16:04:32 +0100 > Cc: gdb-patches@sourceware.org > From: Pedro Alves > > > > +A concrete code location in your program is uniquely identifiable by a > > > +set of logical attributes. Typically, a line number, the source file > > > +the line belongs to, the fully-qualified and prototyped function it is > > > +defined in, and an instruction address. Because each inferior has its > > > +own address space, also an inferior number. > > > > The "typically" part and the overall style seem to say that this is > > not the exhaustive list of all the attributes of a code location, just > > a general idea. Can you please present a full exhaustive list of the > > attributes of a code location? > > I meant to remove the "typically", and forgot it, sorry. It is not > supposed to be there. OK, so I take it the full list is: . absolute file name of the source . line number in the source file . fully-qualified and prototyped function . address . inferior number > > And another question: does the process of resolving a location spec to > > obtain the corresponding code locations involve only filling in of the > > attributes that were omitted from the spec, or does it also produce > > attributes that can _never_ be part of the location spec? IOW, can > > the user type a location spec which will yield a code location that is > > 100% identical to the input spec? > > Currently there's no way to explicitly specify the inferior with > any format of location specifications. So if you do "b func", and you > have multiple inferiors, GDB will find code locations for "func" in all > the inferiors. All the other attributes you can explicitly specify. > Not sure whether that answers your question. I think it does, but: > I am not sure what you > mean by "100% identical". A spec can never the identical to the actual > thing, the same way a cake recipe can never be identical to a cake, for > they are things of different nature. It can only be that the actual > thing complies with or follows the spec. I thought you just explained above that, when there's only one inferior, the user can give a location spec which will resolve to a code location that has exactly the same attributes as the spec? IOW, in this case the "resolution" of the spec produces a "thing" that to the user looks exactly the same as the input spec?