From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66363: gdb-control-commands-regexp issues Date: Thu, 05 Oct 2023 19:29:06 +0300 Message-ID: <83wmw12fu5.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31395"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66363@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 05 18:30:05 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qoREi-0007nY-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Oct 2023 18:30:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoREX-0002cy-Ty; Thu, 05 Oct 2023 12:29:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoREP-0002Mq-En for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 12:29:45 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoREO-0007cS-WE for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 12:29:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoREg-0005M8-8G for bug-gnu-emacs@gnu.org; Thu, 05 Oct 2023 12:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Oct 2023 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66363 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66363-submit@debbugs.gnu.org id=B66363.169652336420513 (code B ref 66363); Thu, 05 Oct 2023 16:30:02 +0000 Original-Received: (at 66363) by debbugs.gnu.org; 5 Oct 2023 16:29:24 +0000 Original-Received: from localhost ([127.0.0.1]:48363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoRE3-0005Km-NJ for submit@debbugs.gnu.org; Thu, 05 Oct 2023 12:29:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoRE1-0005KV-OV for 66363@debbugs.gnu.org; Thu, 05 Oct 2023 12:29:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoRDe-0007SL-0b; Thu, 05 Oct 2023 12:28:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UBfYer3NrUKY08M7roLHBEFZrfpyC0rMjP30WsWDJqA=; b=gQbXacHc+8JxNONFO+ED vuKttk38Gb4pY9H4I9wr3c9DyaY3WU2JvTdbWYVxZ4nJ43JZgCMYTrHltJ8oyhzTrkMgYiAJeQNHW GL4wS4oEf+fgmtMgawtZnnN4bnsR/fz+UW+J2r6yiEtn5cvSc6PfdvPLTdkCT1tyGRCmL8SDrU5Vz wfonSUrEIu0eb6BFzIpEbVO20RKRQyBGJ4w3/oPPI2UwfN+ixW6S0/xNju+v/EHHrPS+zuYnRKmJO XHHHNtrQIwQITe4Yy+BDl2j1jZbzzsUBYDwOu6cIvZTwV84MlBt5vLgCnu0h+4oa2Wlm13JFH7ljc 1RdqcH/dfll6Ag==; In-Reply-To: (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Thu, 5 Oct 2023 17:07:22 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271891 Archived-At: > From: Mattias EngdegÄrd > Date: Thu, 5 Oct 2023 17:07:22 +0200 > > The variable `gdb-control-commands-regexp` in gdb-mi.el cannot work as currently defined and used. Only group 3 is of interest, but that group hasn't referred to anything useful for several years. > > Group 3 probably refers to a part of the regex's tail where the command argument is matched: > > "\\([[:blank:]]+\\([^[:blank:]]*\\)\\)*$" > > However, this seems to be broken as well, because all groups here are inside repetitions. This part of the regexp is also exponential in form if not in practice but we'd better simplify it anyway. > > Attached is a suggested patch which makes explicit the command abbreviations matched, and leaves only a single submatch. It also changes the tail to assuming that the command argument doesn't contain non-newlines (or the final eol anchor wouldn't make sense) but that it can contain spaces (which seems reasonable). However, right now the argument is only checked for being non-empty or not. > > I don't have a working gdb setup at the moment so if someone would be kind to test it, I would be very grateful for it. I'd appreciate a few examples of using this that don't work correctly (or not at all), as it is otherwise not easy to understand the problem, and much less the proposed solution and how to test it. TIA