gas thunderx support
[deliverable/binutils-gdb.git] / gdb / dtrace-probe.c
index b24444926cb324b142ff60a24255f7112bbcf88a..3f2548ddc4c2796c2e898ceb80639b94c1ed378f 100644 (file)
@@ -43,7 +43,7 @@
 
 /* Forward declaration.  */
 
-static const struct probe_ops dtrace_probe_ops;
+extern const struct probe_ops dtrace_probe_ops;
 
 /* The following structure represents a single argument for the
    probe.  */
@@ -413,7 +413,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
       for (j = 0; j < ret->probe_argc; j++)
        {
          struct dtrace_probe_arg arg;
-         struct expression *expr;
+         struct expression *expr = NULL;
 
          /* Set arg.expr to ensure all fields in expr are initialized and
             the compiler will not warn when arg is used.  */
@@ -427,8 +427,18 @@ dtrace_process_dof_probe (struct objfile *objfile,
             this does not work then we set the type to `long
             int'.  */
           arg.type = builtin_type (gdbarch)->builtin_long;
-         expr = parse_expression (arg.type_str);
-         if (expr->elts[0].opcode == OP_TYPE)
+
+         TRY
+           {
+             expr = parse_expression_with_language (arg.type_str, language_c);
+           }
+         CATCH (ex, RETURN_MASK_ERROR)
+           {
+             expr = NULL;
+           }
+         END_CATCH
+
+         if (expr != NULL && expr->elts[0].opcode == OP_TYPE)
            arg.type = expr->elts[1].type;
 
          VEC_safe_push (dtrace_probe_arg_s, ret->args, &arg);
@@ -865,7 +875,7 @@ dtrace_disable_probe (struct probe *probe)
 
 /* DTrace probe_ops.  */
 
-static const struct probe_ops dtrace_probe_ops =
+const struct probe_ops dtrace_probe_ops =
 {
   dtrace_probe_is_linespec,
   dtrace_get_probes,
This page took 0.024746 seconds and 4 git commands to generate.