reverse-finish: turn internal error into normal error
[deliverable/binutils-gdb.git] / gdb / probe.c
index 623f65cb05176d129a09c7b3156c206019ce9193..859e6e7191dea848cb11b8b93af27723d223cd5b 100644 (file)
@@ -59,7 +59,8 @@ parse_probes (char **argptr, struct linespec_result *canonical)
 
   cs = *argptr;
   probe_ops = probe_linespec_to_ops (&cs);
-  gdb_assert (probe_ops != NULL);
+  if (probe_ops == NULL)
+    error (_("'%s' is not a probe linespec"), arg_start);
 
   arg = (char *) cs;
   arg = skip_spaces (arg);
@@ -485,7 +486,8 @@ get_number_extra_fields (const struct probe_ops *pops)
 /* See comment in probe.h.  */
 
 void
-info_probes_for_ops (char *arg, int from_tty, const struct probe_ops *pops)
+info_probes_for_ops (const char *arg, int from_tty,
+                    const struct probe_ops *pops)
 {
   char *provider, *probe_name = NULL, *objname = NULL;
   struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
@@ -500,17 +502,17 @@ info_probes_for_ops (char *arg, int from_tty, const struct probe_ops *pops)
   struct gdbarch *gdbarch = get_current_arch ();
 
   /* Do we have a `provider:probe:objfile' style of linespec?  */
-  provider = extract_arg (&arg);
+  provider = extract_arg_const (&arg);
   if (provider)
     {
       make_cleanup (xfree, provider);
 
-      probe_name = extract_arg (&arg);
+      probe_name = extract_arg_const (&arg);
       if (probe_name)
        {
          make_cleanup (xfree, probe_name);
 
-         objname = extract_arg (&arg);
+         objname = extract_arg_const (&arg);
          if (objname)
            make_cleanup (xfree, objname);
        }
This page took 0.024562 seconds and 4 git commands to generate.