From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id A2457385829D for ; Wed, 22 Jun 2022 19:50:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A2457385829D Received: by mail-il1-x136.google.com with SMTP id i17so2162313ils.12 for ; Wed, 22 Jun 2022 12:50:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=w7J4qORboVGvKfGnTlQYWzMvio/QTd6dzKh0225lB3s=; b=mH0mmhibHFgap+wmgQ0ZrK7LXR2ETYJvHElOtXS6JGD2ZZ4suJToyyt5l6WkfJD4+y y88ODtGdhERnvoq3wiJXiezDXNpSzXmLDg5U7Oy/hXIMuQWp4hQaVWLMW33QPOu5CRSe yOPhssyasBP2tIfjlQD0jbkLgY1oa1wkCEUMBjQqOJPPKUtHoroMPSqiU9URcdZjTMPj /xc+wUZtOktAVIpzKGUI/JPQtOjkx7shvIZHmN1d9JRMjU4vbnvH9NbSo0EpoOiMg6mM 3tjnqFs5G7+4lOVoBUIUFkq8qdl08NBXf2h3PAAo6fpyBtM3k8OAHT6y2H3+mtskhbl+ jaIw== X-Gm-Message-State: AJIora/L9cORsfJvUlucHdgSzrKIfVF0Eu3kYqDY0hAFtcH+F7OoUrDS DR+YvofDU7nkfHV/4IPjUdUrjA== X-Google-Smtp-Source: AGRyM1ug97r9sdUmEjC9egF+JcKsQfTjhCwMXzD2wnzqudDbBKc0BZ27DVqtruqxCvFcIdXYNytTuA== X-Received: by 2002:a05:6e02:511:b0:2d9:2f04:6ea8 with SMTP id d17-20020a056e02051100b002d92f046ea8mr3056076ils.183.1655927434907; Wed, 22 Jun 2022 12:50:34 -0700 (PDT) Received: from murgatroyd (71-211-187-180.hlrn.qwest.net. [71.211.187.180]) by smtp.gmail.com with ESMTPSA id r135-20020a6b8f8d000000b00657b1ff6556sm9479750iod.2.2022.06.22.12.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 12:50:34 -0700 (PDT) From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey via Gdb-patches , Tom Tromey Subject: Re: [PATCH 3/3] Use std::string for interpreter_p References: <20220620134650.2664575-1-tromey@adacore.com> <20220620134650.2664575-4-tromey@adacore.com> <87iloucj26.fsf@redhat.com> X-Attribution: Tom Date: Wed, 22 Jun 2022 13:50:33 -0600 In-Reply-To: <87iloucj26.fsf@redhat.com> (Andrew Burgess's message of "Tue, 21 Jun 2022 13:11:45 +0100") Message-ID: <87czf0wk8m.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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: Wed, 22 Jun 2022 19:50:37 -0000 >>>>> "Andrew" == Andrew Burgess writes: Andrew> Tom Tromey via Gdb-patches writes: >> The global interpreter_p is a manually-managed 'char *'. This patch >> changes it to be a std::string instead, and removes some erroneous >> comments. Andrew> I took a look through this series, and it all looks good to me. Thanks. Andrew> I don't like the name interpreter_p - the _p says "predicate" to me, but Andrew> I that's not your fault, so can be fixed some other day. Yeah. I think maybe it means "pointer"? Not sure. I looked at removing this entirely, and it's almost possible except for the hacks in tui-interp.c: interp_factory_register (INTERP_TUI, tui_interp_factory); if (interpreter_p == INTERP_TUI) tui_start_enabled = true; if (interpreter_p == INTERP_CONSOLE) interpreter_p = INTERP_TUI; I don't really understand why the TUI is considered a distinct interpreter at all. That seems weird to me. For one thing, I found it doesn't work properly with "new-ui" (I filed a bug about this). Tom