Correct invalid assumptions made by (mostly) DWARF-2 tests
[deliverable/binutils-gdb.git] / gdb / extension-priv.h
index 25d086df7d25b907ac1feb3fd2895986a3a46220..9237273564c7ae242158ec684e43bd8acd5b3e72 100644 (file)
@@ -86,7 +86,10 @@ struct extension_language_defn
 
 /* The interface for loading scripts from external extension languages,
    as well as GDB's own scripting language.
-   All of these methods are required to be implemented.  */
+   All of these methods are required to be implemented.
+
+   By convention all of these functions take a pseudo-this parameter
+   as the first argument.  */
 
 struct extension_language_script_ops
 {
@@ -112,7 +115,10 @@ struct extension_language_script_ops
    makes no use of these.  There is no (current) intention to split
    extension_language_ops up any further.
    All of these methods are optional and may be NULL, except where
-   otherwise indicated.  */
+   otherwise indicated.
+
+   By convention all of these functions take a pseudo-this parameter
+   as the first argument.  */
 
 struct extension_language_ops
 {
@@ -250,6 +256,52 @@ struct extension_language_ops
      changed or an error occurs no further languages are called.  */
   enum ext_lang_rc (*before_prompt) (const struct extension_language_defn *,
                                     const char *current_gdb_prompt);
+
+  /* xmethod support:
+     clone_xmethod_worker_data, free_xmethod_worker_data,
+     get_matching_xmethod_workers, get_xmethod_arg_types,
+     invoke_xmethod.
+     These methods are optional and may be NULL, but if one of them is
+     implemented then they all must be.  */
+
+  /* Clone DATA and return a new but identical xmethod worker data
+     object for this extension language.  */
+  void * (*clone_xmethod_worker_data)
+    (const struct extension_language_defn *extlang, void *data);
+
+  /* Free the DATA object of this extension language.  */
+  void (*free_xmethod_worker_data)
+    (const struct extension_language_defn *extlang, void *data);
+
+  /* Return a vector of matching xmethod workers defined in this
+     extension language.  The workers service methods with name
+     METHOD_NAME on objects of type OBJ_TYPE.  The vector is returned
+     in DM_VEC.  */
+  enum ext_lang_rc (*get_matching_xmethod_workers)
+    (const struct extension_language_defn *extlang,
+     struct type *obj_type,
+     const char *method_name,
+     xmethod_worker_vec **dm_vec);
+
+  /* Given a WORKER servicing a particular method, return the types
+     of the arguments the method takes.  The number of arguments is
+     returned in NARGS, and their types are returned in the array
+     ARGTYPES.  */
+  enum ext_lang_rc (*get_xmethod_arg_types)
+    (const struct extension_language_defn *extlang,
+     struct xmethod_worker *worker,
+     int *nargs,
+     struct type ***arg_types);
+
+  /* Invoke the xmethod serviced by WORKER.  The xmethod is invoked
+     on OBJECT with arguments in the array ARGS.  NARGS is the length of
+     this array.  Returns the value returned by the xmethod.  */
+  struct value * (*invoke_xmethod)
+    (const struct extension_language_defn *extlang,
+     struct xmethod_worker *worker,
+     struct value *object,
+     struct value **args,
+     int nargs);
 };
 
 /* State necessary to restore a signal handler to its previous value.  */
@@ -264,7 +316,7 @@ struct signal_handler
 };
 
 /* State necessary to restore the currently active extension language
-   to is previous value.  */
+   to its previous value.  */
 
 struct active_ext_lang_state
 {
This page took 0.025448 seconds and 4 git commands to generate.