public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI
@ 2021-07-11 18:51 jonah at kichwacoders dot com
  2021-07-11 18:57 ` [Bug mi/28076] " jonah at kichwacoders dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jonah at kichwacoders dot com @ 2021-07-11 18:51 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

            Bug ID: 28076
           Summary: [regression] Cannot remove condition from breakpoint
                    from MI
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: jonah at kichwacoders dot com
  Target Milestone: ---

This is a regression in the current GDB main branch and GDB 11.1 pre-release
caused by commit 79aabb7308cd572fff21da5c93952a1bb0dc5b26

breakpoint conditions were (until GDB 10) removable with MI by having an empty
expression to -break-condition (e.g. "-break-condition 1")

With the change above, the MI code returns the error "Missing the <number>
and/or <expr> argument"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
@ 2021-07-11 18:57 ` jonah at kichwacoders dot com
  2021-07-12  0:22 ` simark at simark dot ca
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jonah at kichwacoders dot com @ 2021-07-11 18:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

Jonah Graham <jonah at kichwacoders dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |11.1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
  2021-07-11 18:57 ` [Bug mi/28076] " jonah at kichwacoders dot com
@ 2021-07-12  0:22 ` simark at simark dot ca
  2021-07-12  5:54 ` tankut.baris.aktemur at intel dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: simark at simark dot ca @ 2021-07-12  0:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.1
                 CC|                            |simark at simark dot ca

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
  2021-07-11 18:57 ` [Bug mi/28076] " jonah at kichwacoders dot com
  2021-07-12  0:22 ` simark at simark dot ca
@ 2021-07-12  5:54 ` tankut.baris.aktemur at intel dot com
  2021-07-17 18:48 ` brobecker at gnat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tankut.baris.aktemur at intel dot com @ 2021-07-12  5:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

Baris Aktemur <tankut.baris.aktemur at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tankut.baris.aktemur@intel.
                   |                            |com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
                   ` (2 preceding siblings ...)
  2021-07-12  5:54 ` tankut.baris.aktemur at intel dot com
@ 2021-07-17 18:48 ` brobecker at gnat dot com
  2021-07-26  6:36 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: brobecker at gnat dot com @ 2021-07-17 18:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

Joel Brobecker <brobecker at gnat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |tankut.baris.aktemur@intel.
                   |                            |com
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-07-17
                 CC|                            |brobecker at gnat dot com
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Joel Brobecker <brobecker at gnat dot com> ---
Tankut posted a patch there:
https://sourceware.org/pipermail/gdb-patches/2021-July/180818.html

Looks like all we need, now, is documentation approval.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
                   ` (3 preceding siblings ...)
  2021-07-17 18:48 ` brobecker at gnat dot com
@ 2021-07-26  6:36 ` cvs-commit at gcc dot gnu.org
  2021-07-26  6:49 ` cvs-commit at gcc dot gnu.org
  2021-07-28 18:17 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-26  6:36 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-11-branch branch has been updated by Tankut Baris Aktemur
<aktemur@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=86271cfa326990fc05b5abada2831da161c0bf4b

commit 86271cfa326990fc05b5abada2831da161c0bf4b
Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Date:   Mon Jul 26 08:25:03 2021 +0200

    gdb/mi: handle no condition argument case for -break-condition

    As reported in PR gdb/28076 [1], passing no condition argument to the
    -break-condition command (e.g.: "-break-condition 2") should clear the
    condition for breakpoint 2, just like CLI's "condition 2", but instead
    an error message is returned:

      ^error,msg="-break-condition: Missing the <number> and/or <expr>
argument"

    The current implementation of the -break-condition command's argument
    handling (79aabb7308c "gdb/mi: add a '--force' flag to the
    '-break-condition' command") was done according to the documentation,
    where the condition argument seemed mandatory.  However, the
    -break-condition command originally (i.e. before the 79aabb7308c
    patch) used the CLI's "cond" command, and back then not passing a
    condition argument was clearing out the condition.  So, this is a
    regression in terms of the behavior.

    Fix the argument handling of the -break-condition command to allow not
    having a condition argument, and also update the document to make the
    behavior clear.  Also add test cases to test the scenarios which were
    previously not covered.

    [1] https://sourceware.org/bugzilla/show_bug.cgi?id=28076

    gdb/ChangeLog:
    2021-07-26  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

            PR gdb/28076
            * mi/mi-cmd-break.c (mi_cmd_break_condition): Handle the case
            of having no condition argument.

    gdb/doc/ChangeLog:
    2021-07-26  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

            PR gdb/28076
            * gdb.texinfo (GDB/MI Breakpoint Commands): Mention clearing
            the condition in the -break-condition command.

    gdb/testsuite/ChangeLog:
    2021-07-26  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

            PR gdb/28076
            * gdb.mi/mi-break.exp: Add more tests to check clearing the
            breakpoint condition.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
                   ` (4 preceding siblings ...)
  2021-07-26  6:36 ` cvs-commit at gcc dot gnu.org
@ 2021-07-26  6:49 ` cvs-commit at gcc dot gnu.org
  2021-07-28 18:17 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-26  6:49 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tankut Baris Aktemur
<aktemur@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b6c4205149824bfc3e5ab9e12819dcc0fc2af29d

commit b6c4205149824bfc3e5ab9e12819dcc0fc2af29d
Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Date:   Mon Jul 26 08:25:03 2021 +0200

    gdb/mi: handle no condition argument case for -break-condition

    As reported in PR gdb/28076 [1], passing no condition argument to the
    -break-condition command (e.g.: "-break-condition 2") should clear the
    condition for breakpoint 2, just like CLI's "condition 2", but instead
    an error message is returned:

      ^error,msg="-break-condition: Missing the <number> and/or <expr>
argument"

    The current implementation of the -break-condition command's argument
    handling (79aabb7308c "gdb/mi: add a '--force' flag to the
    '-break-condition' command") was done according to the documentation,
    where the condition argument seemed mandatory.  However, the
    -break-condition command originally (i.e. before the 79aabb7308c
    patch) used the CLI's "cond" command, and back then not passing a
    condition argument was clearing out the condition.  So, this is a
    regression in terms of the behavior.

    Fix the argument handling of the -break-condition command to allow not
    having a condition argument, and also update the document to make the
    behavior clear.  Also add test cases to test the scenarios which were
    previously not covered.

    [1] https://sourceware.org/bugzilla/show_bug.cgi?id=28076

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug mi/28076] [regression] Cannot remove condition from breakpoint from MI
  2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
                   ` (5 preceding siblings ...)
  2021-07-26  6:49 ` cvs-commit at gcc dot gnu.org
@ 2021-07-28 18:17 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2021-07-28 18:17 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28076

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |tromey at sourceware dot org
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
I think this was fixed, so I'm closing it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-28 18:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11 18:51 [Bug mi/28076] New: [regression] Cannot remove condition from breakpoint from MI jonah at kichwacoders dot com
2021-07-11 18:57 ` [Bug mi/28076] " jonah at kichwacoders dot com
2021-07-12  0:22 ` simark at simark dot ca
2021-07-12  5:54 ` tankut.baris.aktemur at intel dot com
2021-07-17 18:48 ` brobecker at gnat dot com
2021-07-26  6:36 ` cvs-commit at gcc dot gnu.org
2021-07-26  6:49 ` cvs-commit at gcc dot gnu.org
2021-07-28 18:17 ` tromey at sourceware dot org

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).