diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-05-06 10:13:06 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2021-05-06 10:46:40 +0200 |
commit | 79aabb7308cd572fff21da5c93952a1bb0dc5b26 (patch) | |
tree | 9d210659cd58e30967e664791578974a06c64625 /gdb/breakpoint.h | |
parent | 10e578d7e00d74033ded0443422ffc509390a912 (diff) | |
download | gdb-79aabb7308cd572fff21da5c93952a1bb0dc5b26.zip gdb-79aabb7308cd572fff21da5c93952a1bb0dc5b26.tar.gz gdb-79aabb7308cd572fff21da5c93952a1bb0dc5b26.tar.bz2 |
gdb/mi: add a '--force' flag to the '-break-condition' command
Add a '--force' flag to the '-break-condition' command to be
able to force conditions.
gdb/ChangeLog:
2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* mi/mi-cmd-break.c (mi_cmd_break_condition): New function.
* mi/mi-cmds.c: Change the binding of "-break-condition" to
mi_cmd_break_condition.
* mi/mi-cmds.h (mi_cmd_break_condition): Declare.
* breakpoint.h (set_breakpoint_condition): Declare a new
overload.
* breakpoint.c (set_breakpoint_condition): New overloaded function
extracted out from ...
(condition_command): ... this.
* NEWS: Mention the change.
gdb/testsuite/ChangeLog:
2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.mi/mi-break.exp (test_forced_conditions): Add a test
for the -break-condition command's "--force" flag.
gdb/doc/ChangeLog:
2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.texinfo (GDB/MI Breakpoint Commands): Mention the
'--force' flag of the '-break-condition' command.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 3447e25..54c5e42 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1656,6 +1656,14 @@ extern void breakpoint_retire_moribund (void); extern void set_breakpoint_condition (struct breakpoint *b, const char *exp, int from_tty, bool force); +/* Set break condition for the breakpoint with number BPNUM to EXP. + Raise an error if no breakpoint with the given number is found. + Also raise an error if the breakpoint already has stop conditions. + If FORCE, define the condition even if it is invalid in + all of the breakpoint locations. */ +extern void set_breakpoint_condition (int bpnum, const char *exp, + int from_tty, bool force); + /* Checks if we are catching syscalls or not. Returns 0 if not, greater than 0 if we are. */ extern int catch_syscall_enabled (void); |