From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WDNvLKkokWJjvAgAWB0awg (envelope-from ) for ; Fri, 27 May 2022 15:38:17 -0400 Received: by simark.ca (Postfix, from userid 112) id A53651E221; Fri, 27 May 2022 15:38:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,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 0D5711E01D for ; Fri, 27 May 2022 15:38:17 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A65B38387C2 for ; Fri, 27 May 2022 19:38:16 +0000 (GMT) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by sourceware.org (Postfix) with ESMTPS id 884E7383B7A2 for ; Fri, 27 May 2022 19:38:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 884E7383B7A2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id t6so7153335wra.4 for ; Fri, 27 May 2022 12:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=1mSoX9kw/zih8sSwsQs+xp1vkIX+tKJk5R3kyVWdKXA=; b=qiOhMM/mD4Avj5rSd0Xh81fVR+2hAUebpvAyzEjzP5ajPQOMPglg6DRG06QKZ2XEkT +mZakczqGfBNc2TE/AdntEm8GuDiBlrSEU3wmvqJjS/idY2BB9Nx2C3Jekia56++c5t5 RZQqd48MDo+t9LYC0dk+fsIfttjL5J6a8/OnvvzaKnVEn3/mhCakdcKOCgKOKPrIgJuR AeeNejVpQcRUyjHMP/Pg42JDmkMIFA+XDqiZ9vQfyeq5n7PU8LeUv9vtKnJv0Np7zXJd zsETSMjTV6heJd4aVEsypFZDcZ/ELzMUM4/KBd2TNMkYKVb+tBCuZtSJlYBNiXYWkHz6 UNjQ== X-Gm-Message-State: AOAM5307Hnb4NJxie6buuq/pQB8Q70sYYTTf/DYW/Hn2YAw68hKzWYfG 7IBa6HCr+G3vucnXXU/ZZ9ErooKWRdo= X-Google-Smtp-Source: ABdhPJybM/fE6FwBRmkuL5jZRnLV/fFBSJSIBEvd7kQRBUhatB/XGREO6KIBAEnAUutFtvvEZYItGg== X-Received: by 2002:a5d:5092:0:b0:210:60d:882d with SMTP id a18-20020a5d5092000000b00210060d882dmr1169893wrt.138.1653680283476; Fri, 27 May 2022 12:38:03 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id i11-20020a5d584b000000b0020d106c0386sm2395362wrf.89.2022.05.27.12.38.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 May 2022 12:38:02 -0700 (PDT) Message-ID: <565c5b81-03e1-94be-c87c-b3ebad95a383@palves.net> Date: Fri, 27 May 2022 20:38:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v4] gdb/manual: Introduce location specs Content-Language: en-US To: Eli Zaretskii 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> <83sfounaqw.fsf@gnu.org> <02a46873-35dc-0d9c-1890-292b807d9484@palves.net> <83pmjyn8as.fsf@gnu.org> <113bd07c-3bfe-0780-50a9-4c41c84942e9@palves.net> <83o7zin6ua.fsf@gnu.org> <977cfe4d-d9d8-98e8-fffb-40c3f9920897@palves.net> <83leumn5yw.fsf@gnu.org> <83k0a6n51q.fsf@gnu.org> From: Pedro Alves In-Reply-To: <83k0a6n51q.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-05-27 20:34, Eli Zaretskii wrote: >> Date: Fri, 27 May 2022 20:17:21 +0100 >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> >>>> You start with e.g., just one attribute, like "-function func". This >>>> makes GDB iterate over all the functions is knows about, finding the >>>> ones that are called "func". This matches "func(int)", "A::func()", >>>> "func(long)", etc. GDB collects the PC and source file and line number of >>>> those functions too along the wa. If you did "break -function func", then >>>> you end up with a breakpoint with multiple code locations, one >>>> for each function matched. >>>> >>>> Or you start with "a/file.c:100". This makes GDB iterate over all source >>>> files it knows about, and then for each that has a file name that ends >>>> with "a/file.c", like e.g., "src/program/a/file.c" and "somelib/a/file.c" >>>> it searches for line 100, collecting the PC and function name of the >>>> location. If you did "break a/file.c:100", you end up with a breakpoint with >>>> multiple locations, one per resolved location. If you did >>>> "list a/file.c:100", GDB lists the source for around each of the locations. >>>> Etc. >>>> >>>> Or you start with "*0x1000". Conceptually it's the same. GDB finds the code >>>> locations that match that, resolves that to a location with >>>> PC/function/source/line, and then the command does what it wants with it. >>> >>> Is this supposed to confirm my understanding, or to refute it? I >>> think it confirms it. >> >> I didn't understand what you meant by "attribute can be filled in >> more than one way", so I explained how it works. If you start with my example >> for "-function func" example from above, what does "attribute is filled in more >> than one way" mean in that example? > > It means that each of the following attributes of code location can > have more than one value that satisfies the location spec: > > . function prototype > . possibly file name > . line number > . code address OK.