public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] internal_error: remove need to pass __FILE__/__LINE__
Date: Mon, 17 Oct 2022 15:45:13 -0400	[thread overview]
Message-ID: <c33d95b6-de39-963d-b52a-afe3db65e525@simark.ca> (raw)
In-Reply-To: <037dc77f-a3f9-34de-adcd-82d775c5d90f@palves.net>



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.  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).

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

  reply	other threads:[~2022-10-17 19:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 18:50 Pedro Alves
2022-10-17 18:59 ` Simon Marchi
2022-10-17 19:26   ` Pedro Alves
2022-10-17 19:27     ` Simon Marchi
2022-10-17 19:37       ` Pedro Alves
2022-10-17 19:45         ` Simon Marchi [this message]
2022-10-18 11:15           ` Pedro Alves
2022-10-18 14:53             ` Simon Marchi
2022-10-19 14:47               ` Pedro Alves
2022-10-18 12:34           ` Bruno Larsen
2022-10-18 14:55             ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c33d95b6-de39-963d-b52a-afe3db65e525@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).