Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Move code from gdb_init to default_gdb_init
Date: Thu, 18 Jun 2020 11:56:58 +0100	[thread overview]
Message-ID: <3881fbfb-a6d4-847d-6676-617daf173e14@redhat.com> (raw)
In-Reply-To: <2dd9aa3e-3dcf-6fb1-bcc8-89312f107d11@suse.de>

On 6/18/20 11:16 AM, Tom de Vries wrote:
> [ was: Re: [PATCH][gdb/testsuite] Don't abort testrun for invalid
> command in test-case ]
> On 6/17/20 4:19 PM, Pedro Alves wrote:
>> On 6/17/20 3:14 PM, Tom de Vries wrote:
>>> On 6/16/20 2:47 PM, Pedro Alves wrote:
>>>> On 6/11/20 11:55 PM, Tom de Vries wrote:
>>>>
>>>>> Hmm, what is the distinction between gdb_init and default_gdb_init?
>>>>>
>>>>> All the other uses in gdb.exp of pattern foo/default_foo have an
>>>>> implementation:
>>>>> ...
>>>>> proc foo {} {
>>>>>   [default_foo]
>>>>> }
>>>>> ...
>>>>> but gdb_init is much more than that. Why is that different?
>>>>>
>>>>
>>>> I don't know.  I guess it shouldn't.  I guess people (including me) added to
>>>> gdb_init over time without realizing they were breaking the pattern.  Maybe nobody
>>>> notices it because whatever is overriding gdb_init renames the original one and
>>>> then calls it.
>>>
>>> Hmm, thanks for the explanation.  I feel we need to improve this
>>> situation somehow, but I'm not sure yet how.
>>
>> Move stuff in gdb_init to default_gdb_init, and add a comment to these
>> functions to not add stuff in there?  That seems like the obvious.
>> I'm not sure why we have that pattern in the first place though, given
>> that you can rename/override functions in tcl anyhow.  This all predates me.
> 
> How about this patch then?

LGTM.

(Comments should spell "GDB" instead of "Gdb" though.)

Thanks,
Pedro Alves



  reply	other threads:[~2020-06-18 10:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 14:35 [PATCH][gdb/testsuite] Don't abort testrun for invalid command in test-case Tom de Vries
2020-06-11 15:31 ` Pedro Alves
2020-06-11 16:25   ` Tom de Vries
2020-06-11 16:56     ` Pedro Alves
2020-06-11 22:55       ` Tom de Vries
2020-06-16 12:47         ` Pedro Alves
2020-06-17 14:14           ` Tom de Vries
2020-06-17 14:19             ` Pedro Alves
2020-06-18 10:16               ` [PATCH][gdb/testsuite] Move code from gdb_init to default_gdb_init Tom de Vries
2020-06-18 10:56                 ` Pedro Alves [this message]
2020-06-12  7:47       ` [PATCH][gdb/testsuite] Don't abort testrun for invalid command in test-case Tom de Vries
2020-06-12  8:37       ` Tom de Vries

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=3881fbfb-a6d4-847d-6676-617daf173e14@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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