binutils-gdb/gdb/mi
Tankut Baris Aktemur b6c4205149 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 (79aabb7308 "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 79aabb7308
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
2021-07-26 08:46:02 +02:00
..
ChangeLog-1999-2003
mi-cmd-break.c gdb/mi: handle no condition argument case for -break-condition 2021-07-26 08:46:02 +02:00
mi-cmd-break.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-cmd-catch.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-cmd-disas.c gdb: fix tab after space indentation issues 2021-05-27 15:18:49 -04:00
mi-cmd-env.c gdb: make inferior::m_terminal an std::string 2021-07-23 15:38:54 -04:00
mi-cmd-file.c gdb/mi: add new --group-by-objfile flag for -file-list-exec-source-files 2021-06-25 20:54:29 +01:00
mi-cmd-info.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-cmd-stack.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-cmd-target.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-cmd-var.c gdb: fix tab after space indentation issues 2021-05-27 15:18:49 -04:00
mi-cmds.c gdb/mi: add a '--force' flag to the '-break-condition' command 2021-05-06 10:46:40 +02:00
mi-cmds.h gdb/mi: add a '--force' flag to the '-break-condition' command 2021-05-06 10:46:40 +02:00
mi-common.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-common.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-console.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-console.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-getopt.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-getopt.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-interp.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
mi-interp.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-main.c gdb: disable commit-resumed on -exec-interrupt --thread-group 2021-07-13 09:16:15 -04:00
mi-main.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-out.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-out.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-parse.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-parse.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-symbol-cmds.c gdb: fix some indentation issues 2021-05-27 15:01:28 -04:00