diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-13 16:50:18 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-29 16:14:30 -0600 |
commit | 16922ea6adfe975e42aa2c6bf4a464069754496f (patch) | |
tree | a102df18762bbb73f619428f14b2c2e8efa0c08e | |
parent | 4e9e993a7e7e741703474f0ae4e311657cec4a60 (diff) | |
download | gdb-16922ea6adfe975e42aa2c6bf4a464069754496f.zip gdb-16922ea6adfe975e42aa2c6bf4a464069754496f.tar.gz gdb-16922ea6adfe975e42aa2c6bf4a464069754496f.tar.bz2 |
Add an assertion to clone_momentary_breakpoint
This adds an assertion to clone_momentary_breakpoint. This will
eventually be removed, but in the meantime is is useful for helping
convince oneself that momentary breakpoints will always use
momentary_breakpoint_ops. This understanding will help when cleaning
up the code later.
-rw-r--r-- | gdb/breakpoint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 683b24b..4864bc7 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -7959,6 +7959,7 @@ clone_momentary_breakpoint (struct breakpoint *orig) if (orig == NULL) return NULL; + gdb_assert (orig->ops == &momentary_breakpoint_ops); return momentary_breakpoint_from_master (orig, orig->type, orig->ops, 0); } |