]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/guile/scm-breakpoint.c
gdb/guile: improve the errors when creating breakpoints
[thirdparty/binutils-gdb.git] / gdb / guile / scm-breakpoint.c
index 4ff197e48a45374b0a070cb5e62689bf047e69b1..346b00629b0aedf290fcaab01f3584c7ff9d951a 100644 (file)
@@ -387,8 +387,19 @@ gdbscm_make_breakpoint (SCM location_scm, SCM rest)
                                     _("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"));
     }