From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 7F2593858C83 for ; Tue, 18 Oct 2022 11:15:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F2593858C83 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-wm1-f43.google.com with SMTP id y10so10489750wma.0 for ; Tue, 18 Oct 2022 04:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0cp6J2szjTpytwtd5JbHl59iD+Yyadq9xqHfQNDfm0w=; b=YcvvwgurQhkKO9yGrXz0yFAr8XYT8L5w9iZgHtxAXUSlSbUYHlf2HWsotkb5wenwNO msunF+AzoM133yaCY3l4oZT9P33ckWNtmWaTj5Lu+PbKZ71rx5sZWmElnQBUaoD5F/Vw eNqr1oZ0Zh0evhOd1uCpIYtVQGCIybuHS+0Or7VfHm33m3cUgyDCrxAwzxTNxUXt9u/Z m5gO66qhUaR/8Xpiq+wJBpFTaqN3sjEsB/hBjwUdYSHqvjDqhNI641d1xHqWYqfPYhIL PONKR0HgAREEQgNp0VG8wG249gMik/TRIPqh0BAgP9Qf5buDwhVjlF/+JjtwiSRWgQZj 3v8g== X-Gm-Message-State: ACrzQf25+whvnaKxip/8zskWQr9R7/d2B5zZfSOD39jmvPPlTh2M/cy/ 9ZGwKPes4H75jqh47aBStfZY0jc4c0L/xQ== X-Google-Smtp-Source: AMsMyM76eFFAYMqGNkx77nwSD66NOOAvGLKuLi59Pw9LbRDgs/UtQZp7U74ZRnHv/XxYCzww4BekMw== X-Received: by 2002:a05:600c:1f16:b0:3c7:cf:8e72 with SMTP id bd22-20020a05600c1f1600b003c700cf8e72mr364950wmb.88.1666091704897; Tue, 18 Oct 2022 04:15:04 -0700 (PDT) Received: from ?IPv6:2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653? ([2001:8a0:f93a:3b00:e038:5cdc:b8bf:4653]) by smtp.gmail.com with ESMTPSA id x17-20020adff0d1000000b00231ed902a4esm10919941wro.5.2022.10.18.04.15.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Oct 2022 04:15:03 -0700 (PDT) Subject: Re: [PATCH] internal_error: remove need to pass __FILE__/__LINE__ To: Simon Marchi , gdb-patches@sourceware.org References: <20221017185019.3233941-1-pedro@palves.net> <6e5b27a9-abd4-60f3-fc3a-d9f8fa9f6a64@simark.ca> <037dc77f-a3f9-34de-adcd-82d775c5d90f@palves.net> From: Pedro Alves Message-ID: <4be3b745-8011-717d-6cf5-796e9fbe849c@palves.net> Date: Tue, 18 Oct 2022 12:15:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 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 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 18 Oct 2022 11:15:09 -0000 On 2022-10-17 8:45 p.m., Simon Marchi wrote: > > > On 2022-10-17 15:37, Pedro Alves wrote: >> On 2022-10-17 8:27 p.m., Simon Marchi wrote: >> >>>> Most probably. I prefer keeping internal_error for it being more pervasive >>>> and older. gdb_assert_not_reached is a more recent addition. >>> >>> Fine with me. >>> >>>>> The only difference is that gdb_assert_not_reached includes the >>>>> function name, but I don't think it's an important difference. I think >>>>> we could switch to a single one that does include the function name. >>>> >>>> I don't think it needs to be in this patch, though? >>>> >>>> This one is just making internal_error more convenient to call. We can >>>> always look at doing something to its internals separately. >>> >>> Sure, it's just an idea for eventually. >> >> Cool, thanks. >> >> I guess I am not sure whether your earlier comment meant that you're OK >> with the patch itself (rather than the idea), though. :-) > > Heh, I forgot to look at the code. It all looks good, except black > reformats gdbarch.py for me here. Thanks. Ran black locally now. > With that fixed you can add my > Reviewed-By or Approved-By (not sure which one we use when someone who > can approve a patch reviews the patch of someone else who can approve). I'll just go with Approved-By. However, I don't know which of 3 email addresses you've been using would you like to be put in the tags. :-) I guess the one listed in gdb/MAINTAINERS should be canonical? Pedro Alves > > Another though for later: like gdb_assert_not_reached, we could move the > gettext translation call, `_(...)`, into the internal_error macro. That > would make the callers a bit simpler (although IMO these strings don't > really need translation, since they are meant for GDB developers). > > Simon >