30#if defined (__MSDOS__)
158 for (
int i = 0; i < ARRAY_SIZE (
cli_colors); ++i)
163 gdb_assert_not_reached (
"color not found");
246 const char *prefix_doc,
260 _(
"Set the foreground color for this property."),
261 _(
"Show the foreground color for this property."),
272 _(
"Set the background color for this property."),
273 _(
"Show the background color for this property."),
286 _(
"Set the display intensity for this property."),
287 _(
"Show the display intensity for this property."),
322 gdb_printf (file, _(
"CLI output styling is enabled.\n"));
324 gdb_printf (file, _(
"CLI output styling is disabled.\n"));
332 gdb_printf (file, _(
"Source code styling is enabled.\n"));
334 gdb_printf (file, _(
"Source code styling is disabled.\n"));
344 gdb_printf (file, _(
"Disassembler output styling is enabled.\n"));
346 gdb_printf (file, _(
"Disassembler output styling is disabled.\n"));
355Style-specific settings.\n\
356Configure various style-related variables, such as colors"),
358Style-specific settings.\n\
359Configure various style-related variables, such as colors"),
364Set whether CLI styling is enabled."), _(
"\
365Show whether CLI is enabled."), _(
"\
366If enabled, output to the terminal is styled."),
371Set whether source code styling is enabled."), _(
"\
372Show whether source code styling is enabled."), _(
"\
373If enabled, source code is styled.\n"
374#ifdef HAVE_SOURCE_HIGHLIGHT
375"Note that source styling only works if styling in general is enabled,\n\
376see \"show style enabled\"."
378"Source highlighting may be disabled in this installation of gdb, because\n\
379it was not linked against GNU Source Highlight. However, it might still be\n\
380available if the appropriate extension is available at runtime."
387Style-specific settings for the disassembler.\n\
388Configure various disassembler style-related variables."),
390Style-specific settings for the disassembler.\n\
391Configure various disassembler style-related variables."),
396Set whether disassembler output styling is enabled."), _(
"\
397Show whether disassembler output styling is enabled."), _(
"\
398If enabled, disassembler output is styled. Disassembler highlighting\n\
399requires the Python Pygments library, if this library is not available\n\
400then disassembler highlighting will not be possible."
405Filename display styling.\n\
406Configure filename colors and display intensity."),
412Function name display styling.\n\
413Configure function name colors and display intensity"),
419Variable name display styling.\n\
420Configure variable name colors and display intensity"),
426Address display styling.\n\
427Configure address colors and display intensity"),
432Title display styling.\n\
433Configure title colors and display intensity\n\
434Some commands (such as \"apropos -v REGEXP\") use the title style to improve\n\
440Highlight display styling.\n\
441Configure highlight colors and display intensity\n\
442Some commands use the highlight style to draw the attention to a part\n\
448Metadata display styling.\n\
449Configure metadata colors and display intensity\n\
450The \"metadata\" style is used when GDB displays information about\n\
451your data, for example \"<unavailable>\""),
456TUI border display styling.\n\
457Configure TUI border colors\n\
458The \"tui-border\" style is used when GDB displays the border of a\n\
459TUI window that does not have the focus."),
464TUI active border display styling.\n\
465Configure TUI active border colors\n\
466The \"tui-active-border\" style is used when GDB displays the border of a\n\
467TUI window that does have the focus."),
473Version string display styling.\n\
474Configure colors used to display the GDB version string."),
479Disassembler mnemonic display styling.\n\
480Configure the colors and display intensity for instruction mnemonics\n\
481in the disassembler output. The \"disassembler mnemonic\" style is\n\
482used to display instruction mnemonics as well as any assembler\n\
483directives, e.g. \".byte\", \".word\", etc.\n\
485This style will only be used for targets that support libopcodes based\n\
486disassembler styling. When Python Pygments based styling is used\n\
487then this style has no effect."),
493Disassembler register display styling.\n\
494Configure the colors and display intensity for registers in the\n\
495disassembler output.\n\
497This style will only be used for targets that support libopcodes based\n\
498disassembler styling. When Python Pygments based styling is used\n\
499then this style has no effect."),
505Disassembler immediate display styling.\n\
506Configure the colors and display intensity for immediates in the\n\
507disassembler output. The \"disassembler immediate\" style is used for\n\
508any number that is not an address, this includes constants in arithmetic\n\
509instructions, as well as address offsets in memory access instructions.\n\
511This style will only be used for targets that support libopcodes based\n\
512disassembler styling. When Python Pygments based styling is used\n\
513then this style has no effect."),
519Disassembler comment display styling.\n\
520Configure the colors and display intensity for comments in the\n\
521disassembler output. The \"disassembler comment\" style is used for\n\
522the comment character, and everything after the comment character up to\n\
523the end of the line. The comment style overrides any other styling,\n\
524e.g. a register name in a comment will use the comment styling.\n\
526This style will only be used for targets that support libopcodes based\n\
527disassembler styling. When Python Pygments based styling is used\n\
528then this style has no effect."),
static void do_show_intensity(struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value)
gdb::observers::observable changed
ui_file_style style() const
struct cmd_list_element * m_set_list
set_show_commands add_setshow_commands(enum command_class theclass, const char *prefix_doc, struct cmd_list_element **set_list, struct cmd_list_element **show_list, bool skip_intensity)
struct cmd_list_element * set_list()
struct cmd_list_element * m_show_list
static void do_show_background(struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value)
static void do_set_value(const char *ignore, int from_tty, struct cmd_list_element *cmd)
static void do_show_foreground(struct ui_file *file, int from_tty, struct cmd_list_element *cmd, const char *value)
const char * m_background
cli_style_option(const char *name, ui_file_style::basic_color fg, ui_file_style::intensity=ui_file_style::NORMAL)
const char * m_foreground
struct cmd_list_element * show_list()
struct cmd_list_element * showlist
struct cmd_list_element * setlist
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
set_show_commands add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
cmd_list_element * style_show_list
cmd_list_element * style_set_list
static void show_style_enabled(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void show_style_sources(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
bool disassembler_styling
static const char *const cli_intensities[]
static int color_number(const char *color)
static const char *const cli_colors[]
void _initialize_cli_style()
static cmd_list_element * style_disasm_show_list
static void show_style_disassembler(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_style_enabled(const char *args, int from_tty, struct cmd_list_element *c)
static void do_show(const char *what, struct ui_file *file, struct cmd_list_element *cmd, const char *value)
static cmd_list_element * style_disasm_set_list
cli_style_option address_style
cli_style_option tui_active_border_style
cli_style_option highlight_style
cli_style_option function_name_style
cli_style_option disasm_mnemonic_style
cli_style_option disasm_register_style
cli_style_option variable_name_style
cli_style_option title_style
cli_style_option tui_border_style
cli_style_option file_name_style
cli_style_option metadata_style
cli_style_option disasm_immediate_style
cli_style_option disasm_comment_style
cli_style_option version_style
observable styling_changed
source_cache g_source_cache
void set_context(void *context)
void fprintf_styled(struct ui_file *stream, const ui_file_style &style, const char *format,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_puts(const char *linebuffer, struct ui_file *stream)