From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 432AF3858D39 for ; Wed, 2 Mar 2022 11:57:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 432AF3858D39 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-q3spWeFeOYuwYtStdqV7hg-1; Wed, 02 Mar 2022 06:57:41 -0500 X-MC-Unique: q3spWeFeOYuwYtStdqV7hg-1 Received: by mail-wm1-f69.google.com with SMTP id l31-20020a05600c1d1f00b00380e3425ba7so744143wms.9 for ; Wed, 02 Mar 2022 03:57:41 -0800 (PST) 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n3HckLN0o2EdYBQl38LP0pOmBXkUaqmj8krvAr3tTOw=; b=ie0tElEnaSJAhTOqZUN4e9SXoEFjTFHWEo0Y05GkhdWPDH4XB1qmwizYvmbZ2honhP b8bDvxjeCnaBGTntLyZLc4xVNEVinjSljNMX/eXv4p4IIIvFs8T682RwxAs+/LVPECZO 4LpDKxFEf6A1PPA6Mj+sZSoHP/HK4wN+Z68Zi0ijX/WlsOFWh6jTl/ddK5Xhy5ABizbu 3vCbTvPwUWWnMwgN1PkVUixg6URkUVAcg5Wu9OPz9YPylvnp2Dxq8c62L083P1X6QwZT D0VsIn4qAP+glPGV+Ikc1y9VqEizq7Mxf/mBErmfnluk6YXgiJDyC04A9WXxjKrYu5iR BRAA== X-Gm-Message-State: AOAM532GTBEWJk9Kmjno9oC9vUoTx4R5S6Hvn/bfHkJzB3xNtEIksQBl wkx/gdqebAIQ9ui+daAsjCb7t/9vJW/GSahcXkzAzWy8pzBKTohHv8XrT7+yqcdPob+diwv//UT /NAtjz/sodIh2eTxLBnxJU2K1Qv4ZGi8RxIj4VwtXr6GWO+v5q7RKFvlsuVYVrAuXGpZYDMH9aw == X-Received: by 2002:a5d:598f:0:b0:1e3:649:e6c3 with SMTP id n15-20020a5d598f000000b001e30649e6c3mr23080376wri.520.1646222260490; Wed, 02 Mar 2022 03:57:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbJSXc6h+jxrUEJlZpAd68iXYQghFeAaLm+2OKkft4wfx03CaSVzsnllYPY87NWZC6HfcSHw== X-Received: by 2002:a5d:598f:0:b0:1e3:649:e6c3 with SMTP id n15-20020a5d598f000000b001e30649e6c3mr23080356wri.520.1646222260231; Wed, 02 Mar 2022 03:57:40 -0800 (PST) Received: from localhost (host86-169-131-29.range86-169.btcentralplus.com. [86.169.131.29]) by smtp.gmail.com with ESMTPSA id u14-20020adfed4e000000b001e3323611e5sm16297693wro.26.2022.03.02.03.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:57:39 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 0/2] Fixing regression in mi -add-inferior command Date: Wed, 2 Mar 2022 11:57:34 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: 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-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 02 Mar 2022 11:57:44 -0000 Hi Muhammad, Thanks for working on this. I've taken your patch and incorporated it into the two patch series below, the first patch is still credited to you, but has some changes: - During testing I noticed that with your patch, after -add-inferior, the new inferior has become the selected inferior. I believe this was not the case before the original mutli-target patch, and isn't the case for the CLI command, so I fixed this, and extended the testing to cover this case. - I've moved the comment for switch_to_inferior_and_push_target into the .h file, and updated the .c file to match inline with the GDB style. - I tightened some of the pattern matching in the test case, for example, parsing the 'info inferiors' output to create an expected pattern for the connection name of the new inferior. - I tweaked the commit message to directly reference the commit that introduced the regression, I think this helps for anyone in the future trying to track down the history of a particular change. Then I added a second commit that adds the --no-connection option for the -add-inferior command. I felt that it was important that these two changes go in as a single series as, after the first commit, we effectively loose the ability to create a new inferior with no connection. I'd welcome your feedback on both patches. I think we just need to wait for a doc review on patch #2, then we can probably get this merged. Thanks, Andrew --- Andrew Burgess (1): gdb/mi: add --no-connection to MI -add-inferior command Muhammad Umair Sair via Gdb-patches (1): gdb/mi: fix regression in mi -add-inferior command gdb/doc/gdb.texinfo | 39 ++++++- gdb/inferior.c | 6 +- gdb/inferior.h | 7 ++ gdb/mi/mi-main.c | 47 +++++++- gdb/testsuite/gdb.mi/mi-add-inferior.exp | 130 +++++++++++++++++++++++ 5 files changed, 217 insertions(+), 12 deletions(-) create mode 100644 gdb/testsuite/gdb.mi/mi-add-inferior.exp -- 2.25.4