GNU bug report logs - #66363
gdb-control-commands-regexp issues

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Thu, 5 Oct 2023 15:08:01 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#66363: closed (gdb-control-commands-regexp issues)
Date: Sun, 29 Oct 2023 16:36:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 29 Oct 2023 17:34:48 +0100
with message-id <0082FBBE-56E6-4E4F-A802-8A890A1E41B0 <at> gmail.com>
and subject line Re: bug#66363: gdb-control-commands-regexp issues
has caused the debbugs.gnu.org bug report #66363,
regarding gdb-control-commands-regexp issues
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
66363: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66363
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Emacs Bug Report <bug-gnu-emacs <at> gnu.org>
Subject: gdb-control-commands-regexp issues
Date: Thu, 5 Oct 2023 17:07:22 +0200
[Message part 3 (text/plain, inline)]
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.

[gdb-control-commands-regexp.diff (application/octet-stream, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66363-done <at> debbugs.gnu.org
Subject: Re: bug#66363: gdb-control-commands-regexp issues
Date: Sun, 29 Oct 2023 17:34:48 +0100
Pushed to master after finally finding a machine with gdb on it.



This bug report was last modified 1 year and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.