aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.h
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2019-05-31 13:47:37 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2019-06-03 21:59:11 +0200
commit9303eb2fb1630678def10613c81215c2bd21d278 (patch)
treea2282608bb0422631678012ddfe7ee36c1c1fef4 /gdb/utils.h
parent79b377b3cf3a0e71e1e4710c4ee1e65e7a27a5d4 (diff)
downloadbinutils-9303eb2fb1630678def10613c81215c2bd21d278.zip
binutils-9303eb2fb1630678def10613c81215c2bd21d278.tar.gz
binutils-9303eb2fb1630678def10613c81215c2bd21d278.tar.bz2
Add highlight style, title style, fputs_highlighted. Improve 'show style'
Have 'show style' and its subcommands using a style to style its output. This allows the GDB user or developer to use 'show style' to visually see with one command how all the current styles look like. Add 2 new styles highlight style, title style and fputs_highlighted function. Highlight style is used by fputs_highlighted to highlight the parts of its char *STR argument that match a HIGHLIGHT regexp. This (and the title style) will be used in a following patch.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r--gdb/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h
index 76c1004..58b4a28 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -436,6 +436,12 @@ extern void fputs_styled (const char *linebuffer,
const ui_file_style &style,
struct ui_file *stream);
+/* Like fputs_styled, but uses highlight_style to highlight the
+ parts of STR that match HIGHLIGHT. */
+
+extern void fputs_highlighted (const char *str, const compiled_regex &highlight,
+ struct ui_file *stream);
+
/* Reset the terminal style to the default, if needed. */
extern void reset_terminal_style (struct ui_file *stream);