Adds stub for tc_declare_call_symbol().
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 9 Mar 2011 22:57:17 +0000 (17:57 -0500)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 9 Mar 2011 22:57:17 +0000 (17:57 -0500)
src/tracecut.c
src/tracecut.h

index d44d8172fb0b28a76f612da0010a65010faecc87..73ee1598a71e229c605921e16f6f502e6da2fa2b 100644 (file)
@@ -417,6 +417,49 @@ tc_bind_to_return_value (struct tc_tracecut *tc, const char *param_name,
   return add_call_symbol_binding (tc, param_name, symbol_name, -1);
 }
 
+/**
+ * Create a function call symbol along with its bindings in one
+ * statement.  The declaration is a string containing the function
+ * name and all the bindings in a special format.  To bind the first
+ * and second call parameters, use the format:
+ *
+ * <code>"func_name(param1, param2)"</code>
+ *
+ * Use <code>?</code> to skip a call parameter.  To bind only the
+ * second call parameter, for example:
+ *
+ * <code>"func_name(?, param)"</code>
+ *
+ * To bind the return value:
+ *
+ * <code>"(param)func_name()"</code>
+ *
+ * \param tc The tracecut to add the symbol to.
+ * \param name The name used to reference this symbol.
+ * \param declaration A string declaring the name of the function that
+ * should trigger this symbol's event, as well as which param bindings
+ * to add.
+ * \param location Specifies whether the the symbol event should
+ * trigger before or after the specified function is called.
+ * \return #TC_SUCCESS or
+ * - #TC_BAD_CONTEXT, when called after compilation has already
+ *      started;
+ * - #TC_INVAL, when the declaration is invalid because of syntax
+      errors;
+ * - #TC_DUPLICATE, if there already exists a symbol with the
+ *    specified name;
+ * - #TC_NOENT, if one of the parameters in the declaration does not
+      exist;
+ * - #TC_NOMEM, if memory runs out.
+ */
+enum tc_error
+tc_declare_call_symbol (struct tc_tracecut *tc, const char *name,
+                       const char *declaration,
+                       enum aop_insert_location location)
+{
+  return return_error (tc, TC_SUCCESS);
+}
+
 /**
  * Add a rule to a tracecut, specified as a regular expression.  A
  * tracecut regular expression can include any of the tracecut's
index 64f017d8038e1ebb187b2f3f22202d6f1c81a333..c04e33fa4447799a53f7f04d2b3e06dc58e1f324 100644 (file)
@@ -99,6 +99,10 @@ extern enum tc_error tc_bind_to_return_value (struct tc_tracecut *tc,
                                              const char *param_name,
                                              const char *symbol_name);
 
+enum tc_error tc_declare_call_symbol (struct tc_tracecut *tc, const char *name,
+                                     const char *declaration,
+                                     enum aop_insert_location location);
+
 extern enum tc_error tc_add_rule (struct tc_tracecut *tc,
                                  const char *specification);