aboutsummaryrefslogtreecommitdiff
path: root/gdb/extension.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/extension.h')
-rw-r--r--gdb/extension.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/extension.h b/gdb/extension.h
index 5da0602..ca3fc14 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -22,6 +22,7 @@
#include "mi/mi-cmds.h" /* For PRINT_NO_VALUES, etc. */
#include "gdbsupport/array-view.h"
+#include "gdbsupport/gdb_optional.h"
struct breakpoint;
struct command_line;
@@ -309,4 +310,12 @@ extern void get_matching_xmethod_workers
(struct type *type, const char *method_name,
std::vector<xmethod_worker_up> *workers);
+/* Try to colorize some source code. FILENAME is the name of the file
+ holding the code. CONTENTS is the source code itself. This will
+ either a colorized (using ANSI terminal escapes) version of the
+ source code, or an empty value if colorizing could not be done. */
+
+extern gdb::optional<std::string> ext_lang_colorize
+ (const std::string &filename, const std::string &contents);
+
#endif /* EXTENSION_H */