Message ID | cover.1680608960.git.aburgess@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98FAE385B51F for <patchwork@sourceware.org>; Tue, 4 Apr 2023 12:46:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98FAE385B51F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680612364; bh=9IrVLRK04EZOzRTrgKb4AhN47QaNzvrJe7lVUhH27Sc=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=IWF16GtZBgMSAZ680HjhQAq5kQixeZ4TzFuIbgR3O0jzy4C5U3ifr2a+iguXmWmRl PoknZJW8J7HqIaHPi5q5nHlgSO6xs+3+DgB+51Yz7iLLB+yyMv7doqou/gvGlUrTbz 512cjtZGVkwy496sLBD8obC4j63tbQZwzqCMr7BQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 32A3D3858D1E for <gdb-patches@sourceware.org>; Tue, 4 Apr 2023 12:45:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 32A3D3858D1E Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-301-fbiI4U-ROieocy9z59rhog-1; Tue, 04 Apr 2023 08:45:38 -0400 X-MC-Unique: fbiI4U-ROieocy9z59rhog-1 Received: by mail-qv1-f72.google.com with SMTP id pe26-20020a056214495a00b005df3eac4c0bso11441137qvb.1 for <gdb-patches@sourceware.org>; Tue, 04 Apr 2023 05:45:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680612338; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9IrVLRK04EZOzRTrgKb4AhN47QaNzvrJe7lVUhH27Sc=; b=xNAszzOAbFWfPTJx1kEcscasRBpW7TiBX6k83h7XI0hJk+uL6pnD6rxy9zuHNOADKy AUqlEKjbQY/mYAfahu7/9biglPl4H7U9tP5z2WDbkDT5J20qramJRt7obmephV68/nWC 7sfDNIGbqEatCpmPVlP/MXD/wZLPb7X7rIWl2zTEvvoF5nEoa5rdRPimeNdCeXlfQlcP 10K0IKwmVqkaubgFyRJSNYgoK2bTDQ9MK/YASUZRVJ1f3XWxm/QpnCPngMfuBHsx372n A1v/Q9G1xtBxMK8pXZKMXC5ED6IJU/zZiyTS9dziEVn/76vOpcn3fkEJ41Ltmmmkp1f7 MRAg== X-Gm-Message-State: AAQBX9e2XeliW0jYmMAL9VMwN1fJcUSt/INojVUMtMu2CcxuEgJKn4eg 0HtBdblyLKpt74ZhlSMSev+6Q15pfdC5hIqHwAaMOO7lVJlqNU5axFGnOmIT1F2eLhkAtlC3aBu QLukLdnz++JnJ4wWu6IBQR8S5+MW0b8Ado4WRyJU/FmONAtMbn7qeahICStS0CLBdkCacXd6OVk /xYpNxlg== X-Received: by 2002:a05:622a:181a:b0:3b8:6d3a:5ec7 with SMTP id t26-20020a05622a181a00b003b86d3a5ec7mr3195601qtc.22.1680612338035; Tue, 04 Apr 2023 05:45:38 -0700 (PDT) X-Google-Smtp-Source: AKy350YWWLwSWx+tbPkIfUKJJ2KhUhgECygQHVNzhn9bn1qEjI8ruDUAezZvR9vZjYK/475vNikKpg== X-Received: by 2002:a05:622a:181a:b0:3b8:6d3a:5ec7 with SMTP id t26-20020a05622a181a00b003b86d3a5ec7mr3195574qtc.22.1680612337749; Tue, 04 Apr 2023 05:45:37 -0700 (PDT) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id c6-20020ac86606000000b003e4f07d58b3sm3208712qtp.19.2023.04.04.05.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 05:45:37 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCH 0/5] Fixes for per-inferior settings and $_gdb_setting_str() Date: Tue, 4 Apr 2023 13:45:26 +0100 Message-Id: <cover.1680608960.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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 <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Andrew Burgess <aburgess@redhat.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Fixes for per-inferior settings and $_gdb_setting_str()
|
|
Message
Andrew Burgess
April 4, 2023, 12:45 p.m. UTC
While working on another patch I spotted that $_gdb_setting_str("args") wasn't working correctly. Turns out args, cwd, and inferior-tty all have the same problems. This series resolves these issues. Thanks, Andrew --- Andrew Burgess (5): gdb: cleanup command creation in infcmd.c gdb: make set/show args work with $_gdb_setting_str gdb: make set/show cwd work with $_gdb_setting_str gdb: make set/show inferior-tty work with $_gdb_setting_str gdb: make deprecated_show_value_hack static gdb/cli/cli-setshow.c | 2 +- gdb/command.h | 7 +- gdb/infcmd.c | 127 ++++++++++------------ gdb/testsuite/gdb.base/inferior-clone.exp | 9 ++ gdb/testsuite/gdb.multi/gdb-settings.c | 22 ++++ gdb/testsuite/gdb.multi/gdb-settings.exp | 121 +++++++++++++++++++++ 6 files changed, 213 insertions(+), 75 deletions(-) create mode 100644 gdb/testsuite/gdb.multi/gdb-settings.c create mode 100644 gdb/testsuite/gdb.multi/gdb-settings.exp base-commit: 60a13bbcdfb0ce008a77563cea0c34c830d7b170
Comments
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes: Andrew> While working on another patch I spotted that Andrew> $_gdb_setting_str("args") wasn't working correctly. Turns out args, Andrew> cwd, and inferior-tty all have the same problems. This series Andrew> resolves these issues. I sent a minor comment but nothing really worth a repost. Reviewed-By: Tom Tromey <tom@tromey.com> thank you, Tom
On 4/4/23 08:45, Andrew Burgess via Gdb-patches wrote: > While working on another patch I spotted that > $_gdb_setting_str("args") wasn't working correctly. Turns out args, > cwd, and inferior-tty all have the same problems. This series > resolves these issues. That rang a bell, it's because I have fixed some of these downstream in ROCgdb, and haven't sent it upstream yet. The downstream commit is here: https://github.com/ROCm-Developer-Tools/ROCgdb/commit/54d0a79614071fd62df5e2dfe793ff26cc7e31e6 I'll take a look at your patches, I presume that they will do mostly the same thing. And if my patch does more (according to the commit message, it fixes "remote exec-file" and "tdesc filename"), I can send what remains after. Simon
On 4/17/23 14:09, Simon Marchi via Gdb-patches wrote: > On 4/4/23 08:45, Andrew Burgess via Gdb-patches wrote: >> While working on another patch I spotted that >> $_gdb_setting_str("args") wasn't working correctly. Turns out args, >> cwd, and inferior-tty all have the same problems. This series >> resolves these issues. > > That rang a bell, it's because I have fixed some of these downstream in > ROCgdb, and haven't sent it upstream yet. The downstream commit is > here: > > https://github.com/ROCm-Developer-Tools/ROCgdb/commit/54d0a79614071fd62df5e2dfe793ff26cc7e31e6 > > I'll take a look at your patches, I presume that they will do mostly the > same thing. And if my patch does more (according to the commit message, > it fixes "remote exec-file" and "tdesc filename"), I can send what > remains after. So, my patch adds some tests for gdb.parameter (Python), MI and the with command. However, they are sprinkled in different files. I like that you have a test file specifically to exercise the settings that are per-inferior. Your test could probably be augmented to exercise all these ways to get a setting. You series looks good to me, up to you if you want to merge it as-is or improve it based on what I had. Simon
Simon Marchi <simark@simark.ca> writes: > On 4/4/23 08:45, Andrew Burgess via Gdb-patches wrote: >> While working on another patch I spotted that >> $_gdb_setting_str("args") wasn't working correctly. Turns out args, >> cwd, and inferior-tty all have the same problems. This series >> resolves these issues. > > That rang a bell, it's because I have fixed some of these downstream in > ROCgdb, and haven't sent it upstream yet. The downstream commit is > here: > > https://github.com/ROCm-Developer-Tools/ROCgdb/commit/54d0a79614071fd62df5e2dfe793ff26cc7e31e6 In case I miss this patch when you upstream it, the removal of show_remote_exec_file should be dropped. The generic code doesn't handle internationalisation, and though show_remote_exec_file itself also doesn't do internationalisation, the correct (IMHO) thing would be to fix show_remote_exec_file, not remove it. > > I'll take a look at your patches, I presume that they will do mostly the > same thing. And if my patch does more (according to the commit message, > it fixes "remote exec-file" and "tdesc filename"), I can send what > remains after. I'll take a look at the testing in your patch and see if I can extend the tests in my patch a little. Thanks, Andrew
Simon Marchi <simark@simark.ca> writes: > On 4/17/23 14:09, Simon Marchi via Gdb-patches wrote: >> On 4/4/23 08:45, Andrew Burgess via Gdb-patches wrote: >>> While working on another patch I spotted that >>> $_gdb_setting_str("args") wasn't working correctly. Turns out args, >>> cwd, and inferior-tty all have the same problems. This series >>> resolves these issues. >> >> That rang a bell, it's because I have fixed some of these downstream in >> ROCgdb, and haven't sent it upstream yet. The downstream commit is >> here: >> >> https://github.com/ROCm-Developer-Tools/ROCgdb/commit/54d0a79614071fd62df5e2dfe793ff26cc7e31e6 >> >> I'll take a look at your patches, I presume that they will do mostly the >> same thing. And if my patch does more (according to the commit message, >> it fixes "remote exec-file" and "tdesc filename"), I can send what >> remains after. > > So, my patch adds some tests for gdb.parameter (Python), MI and the with > command. However, they are sprinkled in different files. I like that > you have a test file specifically to exercise the settings that are > per-inferior. Your test could probably be augmented to exercise all > these ways to get a setting. > > You series looks good to me, up to you if you want to merge it as-is or > improve it based on what I had. I reworked the tests taking onboard some of the ideas from your tests, and pushed this series. Do you plan to upstream your patch anytime soon? I had been planning to look at other per-inferior settings once this series was merged, but I don't want to tread on your toes any more than I already have... Thanks, Andrew