+2021-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * guile/scm-breakpoint.c (gdbscm_make_breakpoint): Split the error
+ for invalid breakpoint numbers, and unsupported breakpoint
+ numbers.
+
2021-06-25 Tom Tromey <tom@tromey.com>
* dwarf2/index-write.c (struct addrmap_index_data): Add
_("invalid watchpoint class"));
}
break;
+ case bp_none:
+ case bp_hardware_watchpoint:
+ case bp_read_watchpoint:
+ case bp_access_watchpoint:
+ {
+ const char *type_name = bpscm_type_to_string (type);
+ gdbscm_misc_error (FUNC_NAME, type_arg_pos,
+ gdbscm_scm_from_c_string (type_name),
+ _("unsupported breakpoint type"));
+ }
+ break;
default:
- gdbscm_out_of_range_error (FUNC_NAME, access_type_arg_pos,
+ gdbscm_out_of_range_error (FUNC_NAME, type_arg_pos,
scm_from_int (type),
_("invalid breakpoint type"));
}
+2021-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.guile/scm-breakpoint.exp (test_watchpoints): Add new tests.
+
gdb/testsuite/ChangeLog
2021-06-25 Carl Love <cel@us.ibm.com>
gdb_test "continue" \
".*\[Ww\]atchpoint.*result.*Old value = 0.*New value = 25.*main.*" \
"test watchpoint write"
+
+ gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type 999))" \
+ "ERROR: In procedure gdbscm_make_breakpoint: Out of range: invalid breakpoint type in position 5: 999\r\n.*" \
+ "create a breakpoint with an invalid type number"
+ gdb_test "guile (define wp2 (make-breakpoint \"result\" #:wp-class WP_WRITE #:type BP_NONE))" \
+ "ERROR: In procedure gdbscm_make_breakpoint: unsupported breakpoint type in position 5: \"BP_NONE\"\r\n.*" \
+ "create a breakpoint with an unsupported type"
}
proc_with_prefix test_bkpt_internal { } {