aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 2b5d784..fdef835 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1165,9 +1165,22 @@ typedef struct value *(*internal_function_fn) (struct gdbarch *gdbarch,
int argc,
struct value **argv);
-void add_internal_function (const char *name, const char *doc,
- internal_function_fn handler,
- void *cookie);
+/* Add a new internal function. NAME is the name of the function; DOC
+ is a documentation string describing the function. HANDLER is
+ called when the function is invoked. COOKIE is an arbitrary
+ pointer which is passed to HANDLER and is intended for "user
+ data". */
+
+extern void add_internal_function (const char *name, const char *doc,
+ internal_function_fn handler,
+ void *cookie);
+
+/* This overload takes an allocated documentation string. */
+
+extern void add_internal_function (const char *name,
+ gdb::unique_xmalloc_ptr<char> &&doc,
+ internal_function_fn handler,
+ void *cookie);
struct value *call_internal_function (struct gdbarch *gdbarch,
const struct language_defn *language,