아래 내용을 영어에서 한글로 번역해주세요. Next: Numbers, Previous: Screen Size, Up: Controlling GDB…
- User
아래 내용을 영어에서 한글로 번역해주세요.
Next: Numbers, Previous: Screen Size, Up: Controlling GDB [Contents][Index]
22.5 Output Styling
GDB can style its output on a capable terminal. This is enabled by default on most systems, but disabled by default when in batch mode (see Mode Options). Various style settings are available; and styles can also be disabled entirely.
set style enabled ‘on|off’ Enable or disable all styling. The default is host-dependent, with most hosts defaulting to ‘on’.
If the NO_COLOR environment variable is set to a non-empty value, then GDB will change this to ‘off’ at startup.
show style enabled Show the current state of styling.
set style sources ‘on|off’ Enable or disable source code styling. This affects whether source code, such as the output of the list command, is styled. The default is ‘on’. Note that source styling only works if styling in general is enabled, and if a source highlighting library is available to GDB.
There are two ways that highlighting can be done. First, if GDB was linked with the GNU Source Highlight library, then it is used. Otherwise, if GDB was configured with Python scripting support, and if the Python Pygments package is available, then it will be used.
show style sources Show the current state of source code styling.
set style tui-current-position ‘on|off’ Enable or disable styling of the source and assembly code highlighted by the TUI’s current position indicator. The default is ‘off’. See GDB Text User Interface.
show style tui-current-position Show whether the source and assembly code highlighted by the TUI’s current position indicator is styled.
set style disassembler enabled ‘on|off’ Enable or disable disassembler styling. This affects whether disassembler output, such as the output of the disassemble command, is styled. Disassembler styling only works if styling in general is enabled (with set style enabled on), and if a source highlighting library is available to GDB.
The two source highlighting libraries that GDB could use to style disassembler output are; GDB’s builtin disassembler, or the Python Pygments package.
GDB’s first choice will be to use the builtin disassembler for styling, this usually provides better results, being able to style different types of instruction operands differently. However, the builtin disassembler is not able to style all architectures.
For architectures that the builtin disassembler is unable to style, GDB will fall back to use the Python Pygments package where possible. In order to use the Python Pygments package, GDB must be built with Python support, and the Pygments package must be installed.
If neither of these options are available then GDB will produce unstyled disassembler output, even when this setting is ‘on’.
To discover if the current architecture supports styling using the builtin disassembler library see maint show libopcodes-styling enabled.
- Assistant