From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: 66363@debbugs.gnu.org
Subject: bug#66363: gdb-control-commands-regexp issues
Date: Thu, 05 Oct 2023 19:29:06 +0300 [thread overview]
Message-ID: <83wmw12fu5.fsf@gnu.org> (raw)
In-Reply-To: <D1062357-DF1B-4AA4-92C8-F844F1355CDB@gmail.com> (message from Mattias Engdegård on Thu, 5 Oct 2023 17:07:22 +0200)
> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> 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
next prev parent reply other threads:[~2023-10-05 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 15:07 bug#66363: gdb-control-commands-regexp issues Mattias Engdegård
2023-10-05 16:29 ` Eli Zaretskii [this message]
2023-10-05 17:16 ` Mattias Engdegård
2023-10-05 17:43 ` Eli Zaretskii
2023-10-05 18:11 ` Mattias Engdegård
2023-10-05 18:52 ` Eli Zaretskii
2023-10-06 12:09 ` Mattias Engdegård
2023-10-29 16:34 ` Mattias Engdegård
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wmw12fu5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=66363@debbugs.gnu.org \
--cc=mattias.engdegard@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).