From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by sourceware.org (Postfix) with ESMTPS id 36C083845199 for ; Fri, 7 Jul 2023 12:08:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 36C083845199 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-lf1-f44.google.com with SMTP id 2adb3069b0e04-4fb41682472so2610414e87.2 for ; Fri, 07 Jul 2023 05:08:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688731726; x=1691323726; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dCb+f8lh+j/YiRk3jTwElxaYBcVyaVsEcV1GIce1i4U=; b=Jhm6VeFoK2jKg2dt/qTr7FOKzMTuXZuw/0uV37Fh1/6KAiYwmvjl1J+maLs0CIGOn4 f+VRR4qleDBIQWhFtFAjVmCAojHlAOsoMwtSRtQhwEOIBmtDR6guTE3EH7RPXQeDKmXk sWam+w/wTye6WqsGNmMCioKyNOK0eg4QdgfxdRxAKubndmGFZMxFGzOuedhhxGozpnZb LxkPkZ/OU+rf7oyhpEVooc2PAaZzfD9mun9a9bzMHs7Kkkiyq+E+R59sFXb5jr9gTzD+ Z/gcyZ7dpXAvYO0Q7mEzuRF4xH1mihu8Za7ckDnsHgfxmyOjy+JyhdWUzqxZ5ZTkyIs9 r+1A== X-Gm-Message-State: ABy/qLbLc1oOEbmLkWYD14zA1kgB8QW7A2PFKYMZF11ybowytII98480 JftubPuEZ68AN2/LdWG6TQoMJDGE5hY= X-Google-Smtp-Source: APBJJlH2zPyr3w+Vcb8xaSFwlRK0H3I3Jo0fjUs7hTuumoaZLJMOrxSR73jknxsZ1964BnqrpDBB+g== X-Received: by 2002:a05:6512:3e08:b0:4f9:5781:8628 with SMTP id i8-20020a0565123e0800b004f957818628mr5980585lfv.24.1688731725451; Fri, 07 Jul 2023 05:08:45 -0700 (PDT) Received: from ?IPV6:2001:8a0:f91d:bc00:1b6e:208c:60cc:dcc? ([2001:8a0:f91d:bc00:1b6e:208c:60cc:dcc]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc30c000000b003fba92fad35sm2276721wmj.26.2023.07.07.05.08.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jul 2023 05:08:44 -0700 (PDT) Message-ID: <3012ae0b-ac62-1b19-e56a-00129205393b@palves.net> Date: Fri, 7 Jul 2023 13:08:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCHv5 01/11] gdb: include breakpoint number in testing condition error message To: Andrew Burgess , gdb-patches@sourceware.org References: <24b51a1fbfc6f8b8cc52e3f90d4f36c1d44aaa6b.1678987897.git.aburgess@redhat.com> Content-Language: en-US From: Pedro Alves In-Reply-To: <24b51a1fbfc6f8b8cc52e3f90d4f36c1d44aaa6b.1678987897.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On 2023-03-16 17:36, Andrew Burgess via Gdb-patches wrote: > So, in this commit, in preparation for the later commits, I propose to > change the 'Error in testing breakpoint condition:' line to this: > > Error in testing condition for breakpoint NUMBER: > > where NUMBER will be filled in as appropriate. Here's the first > example with the updated error: > > (gdb) break foo if (*(int *) 0) == 0 > Breakpoint 1 at 0x40111e: file bpcond.c, line 11. > (gdb) r > Starting program: /tmp/bpcond > Error in testing condition for breakpoint 1: > Cannot access memory at address 0x0 > > Breakpoint 1, foo () at bpcond.c:11 > 11 int a = 32; > (gdb) > Reading this, I was thinking that we should print the breakpoint location number as well. We do print it when presenting breakpoint stops nowadays, like: (top-gdb) b printf Breakpoint 3 at 0xee680 (2 locations) (top-gdb) r ... Breakpoint 3.1, ui_file::printf ... ... Did you consider that and decided against? I didn't find any mention of it in previous discussions.