From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ktJHNvAKkWJXtwgAWB0awg (envelope-from ) for ; Fri, 27 May 2022 13:31:28 -0400 Received: by simark.ca (Postfix, from userid 112) id C60151E221; Fri, 27 May 2022 13:31:28 -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=Sov06j3W; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 462FE1E01D for ; Fri, 27 May 2022 13:31:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8250D3836673 for ; Fri, 27 May 2022 17:31:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8250D3836673 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653672687; bh=f+/w9XN3hJRuamPMUTrxrXKj6Q09kIhOXk6uU2Rv9nA=; 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=Sov06j3WK9cMiFZADEU670ZswviJjxgXRUgoxB7h0e7wB4HNn7glePZaSdoL2aQRv G+UYwUBVA2QJGscuJEVjI4Ks6/O5T2gDgiCuo5M1rnwN8jhJxlxR1yzguFVqsYOYZW 4DGBfzMVIKv3gLOvCwHT2NqzkzBnB+AMRE93p0ZE= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 26BB938485AD for ; Fri, 27 May 2022 17:31:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 26BB938485AD Received: from fencepost.gnu.org ([2001:470:142:3::e]:35904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nudnn-0004d4-Qq; Fri, 27 May 2022 13:31:08 -0400 Received: from [87.69.77.57] (port=2595 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 1nudnn-0007uk-AU; Fri, 27 May 2022 13:31:07 -0400 Date: Fri, 27 May 2022 20:31:03 +0300 Message-Id: <83sfounaqw.fsf@gnu.org> To: Pedro Alves In-Reply-To: <2bc9b5c9-879a-2848-16f4-6cfd796563a8@palves.net> (message from Pedro Alves on Fri, 27 May 2022 18:11:04 +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> <83wne7m0ri.fsf@gnu.org> <2bc9b5c9-879a-2848-16f4-6cfd796563a8@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 18:11:04 +0100 > Cc: gdb-patches@sourceware.org > From: Pedro Alves > > > . absolute file name of the source > > . line number in the source file > > . fully-qualified and prototyped function > > . address > > . inferior number > > Yes. Well, except "absolute" in the file name. The file names in the > debug info aren't always absolute, they can be something like ../a/b/c/foo.c, > and we may not be able to find the source file in the filesystem, so the > path the debug info tells us is all we get. Then the directory should also be part of the attributes, no? > >> 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? > > When you specify a function name, you can't specify an address > at the same time, for example. There's no format that allows that. > So if you specify a function, you end up with code location that has > an address, but you didn't specify the address. Conversely, when you > specify an address, gdb finds the source/line for the address if available, > as well as the function. That's understood, and it not important for what I have in mind. The important point is that the user can potentially specify every attribute of a code location, even if some combinations cannot be used. > And then GDB knows more about the code locations than that set of attributes, > of course. GDB knows the architecture of the instruction the location points > at, for example. Is that exposed to the user somewhere? I'm only interested in what is shown to the user and/or what has user-level consequences. Internal attributes that the user doesn't have to know about are out of scope of this issue. Thanks.