aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo81
-rw-r--r--gdb/doc/guile.texi3
-rw-r--r--gdb/doc/python.texi28
3 files changed, 100 insertions, 12 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 48b193b..b9fc160 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4090,6 +4090,56 @@ When @samp{on} @value{GDBN} will print additional messages when
threads are created and deleted.
@end table
+@cindex thread local storage
+@cindex @acronym{TLS}
+For some debugging targets, @value{GDBN} has support for accessing
+variables that reside in Thread Local Storage (@acronym{TLS}).
+@acronym{TLS} variables are similar to global variables, except that
+each thread has its own copy of the variable. While often used in
+multi-threaded programs, @acronym{TLS} variables can also be used in
+programs without threads. The C library variable @var{errno} is,
+perhaps, the most prominent example of a @acronym{TLS} variable that
+is frequently used in non-threaded programs. For targets where
+@value{GDBN} does not have good @acronym{TLS} support, printing or
+changing the value of @var{errno} might not be directly possible.
+
+@sc{gnu}/Linux and FreeBSD targets have support for accessing
+@acronym{TLS} variables. On @sc{gnu}/Linux, the helper library,
+@code{libthread_db}, is used to help resolve the addresses of
+@acronym{TLS} variables. Some FreeBSD and some @sc{gnu}/Linux targets
+also have @value{GDBN}-internal @acronym{TLS} resolution code.
+@sc{gnu}/Linux targets will attempt to use the @acronym{TLS} address
+lookup functionality provided by @code{libthread_db}, but will fall
+back to using its internal @acronym{TLS} support when
+@code{libthread_db} is not available. This can happen in
+cross-debugging scenarios or when debugging programs that are linked
+in such a way that @code{libthread_db} support is unavailable -- this
+includes statically linked programs, linking against @acronym{GLIBC}
+versions earlier than 2.34, but not with @code{libpthread}, and use of
+other (non-@acronym{GLIBC}) C libraries.
+
+@table @code
+@kindex maint set force-internal-tls-address-lookup
+@kindex maint show force-internal-tls-address-lookup
+@cindex internal @acronym{TLS} address lookup
+@item maint set force-internal-tls-address-lookup
+@itemx maint show force-internal-tls-address-lookup
+Turns on or off forced use of @value{GDBN}-internal @acronym{TLS}
+address lookup code. Use @code{on} to enable and @code{off} to
+disable. The default for this setting is @code{off}.
+
+When disabled, @value{GDBN} will attempt to use a helper
+@code{libthread_db} library if possible, but will fall back to use of
+its own internal @acronym{TLS} address lookup mechanisms if necessary.
+
+When enabled, @value{GDBN} will only use @value{GDBN}'s internal
+@acronym{TLS} address lookup mechanisms, if they exist.
+
+This command is only available for @sc{gnu}/Linux targets. Its
+primary use is for testing -- certain tests in the @value{GDBN} test
+suite use this command to force use of internal TLS address lookup.
+@end table
+
@node Forks
@section Debugging Forks
@@ -27924,6 +27974,19 @@ value, then @value{GDBN} will change this to @samp{off} at startup.
@item show style enabled
Show the current state of styling.
+@item set style emoji @samp{auto|on|off}
+Enable or disable the use of emoji. On most hosts, the default is
+@samp{auto}, meaning that emoji will only be used if the host
+character set is @samp{UTF-8}; however, on Windows the default is
+@samp{off} when using the console. Note that disabling styling as a
+whole will also prevent emoji display.
+
+Currently, emoji are printed whenever @value{GDBN} reports an error or
+a warning.
+
+@item show style emoji
+Show the current state of emoji output.
+
@item set style sources @samp{on|off}
Enable or disable source code styling. This affects whether source
code, such as the output of the @code{list} command, is styled. The
@@ -27937,6 +28000,17 @@ is used. Otherwise, if @value{GDBN} was configured with Python
scripting support, and if the Python Pygments package is available,
then it will be used.
+@item set style warning-prefix
+@itemx show style warning-prefix
+@itemx set style error-prefix
+@itemx show style error-prefix
+
+These commands control the prefix that is printed before warnings and
+errors, respectively. This functionality is intended for use with
+emoji display, and so the prefixes are only displayed if emoji styling
+is enabled. The defaults are the warning sign emoji for warnings, and
+and the cross mark emoji for errors.
+
@item show style sources
Show the current state of source code styling.
@@ -41582,6 +41656,13 @@ into remote agent bytecodes and display them as a disassembled list.
This command is useful for debugging the agent version of dynamic
printf (@pxref{Dynamic Printf}).
+@kindex maint canonicalize
+@item maint canonicalize @var{name}
+Print the canonical form of @var{name}, a C@t{++} name. Because a
+C@t{++} name may have multiple possible spellings, @value{GDBN}
+computes a canonical form of a name for internal use. For example,
+@code{short int} and @code{short} are two ways to name the same type.
+
@kindex maint info breakpoints
@anchor{maint info breakpoints}
@item maint info breakpoints
diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi
index c6808ef..c6d889f 100644
--- a/gdb/doc/guile.texi
+++ b/gdb/doc/guile.texi
@@ -3899,6 +3899,9 @@ Return string to change terminal's color to this.
If @var{is_foreground} is @code{#t}, then the returned sequence will change
foreground color. Otherwise, the returned sequence will change background
color.
+
+If styling is currently disabled (@pxref{Output Styling,,@kbd{set style
+enabled}}), then this procedure will return an empty string.
@end deffn
When color is initialized, its color space must be specified. The
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 45f5f70..7bb6503 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -257,7 +257,7 @@ Python code must not override these, or even change the options using
signals, @value{GDBN} will most likely stop working correctly. Note
that it is unfortunately common for GUI toolkits to install a
@code{SIGCHLD} handler. When creating a new Python thread, you can
-use @code{gdb.block_signals} or @code{gdb.Thread} to handle this
+use @code{gdb.blocked_signals} or @code{gdb.Thread} to handle this
correctly; see @ref{Threading in GDB}.
@item
@@ -654,22 +654,22 @@ threads, you must be careful to only call @value{GDBN}-specific
functions in the @value{GDBN} thread. @value{GDBN} provides some
functions to help with this.
-@defun gdb.block_signals ()
+@defun gdb.blocked_signals ()
As mentioned earlier (@pxref{Basic Python}), certain signals must be
-delivered to the @value{GDBN} main thread. The @code{block_signals}
+delivered to the @value{GDBN} main thread. The @code{blocked_signals}
function returns a context manager that will block these signals on
entry. This can be used when starting a new thread to ensure that the
signals are blocked there, like:
@smallexample
-with gdb.block_signals():
+with gdb.blocked_signals():
start_new_thread()
@end smallexample
@end defun
@deftp {class} gdb.Thread
This is a subclass of Python's @code{threading.Thread} class. It
-overrides the @code{start} method to call @code{block_signals}, making
+overrides the @code{start} method to call @code{blocked_signals}, making
this an easy-to-use drop-in replacement for creating threads that will
work well in @value{GDBN}.
@end deftp
@@ -7049,13 +7049,13 @@ writable.
@cindex colors in python
@tindex gdb.Color
-You can assign instance of @code{Color} to the @code{value} of
+You can assign instance of @code{gdb.Color} to the @code{value} of
a @code{Parameter} instance created with @code{PARAM_COLOR}.
-@code{Color} may refer to an index from color palette or contain components
-of a color from some colorspace.
+@code{gdb.Color} may refer to an index from a color palette or contain
+components of a color from some color space.
-@defun Color.__init__ (@r{[}@var{value} @r{[}, @var{color-space}@r{]}@r{]})
+@defun Color.__init__ (@r{[}value @r{[}, color_space@r{]}@r{]})
@var{value} is @code{None} (meaning the terminal's default color),
an integer index of a color in palette, tuple with color components
@@ -7065,8 +7065,9 @@ or one of the following color names:
@samp{green}, @samp{yellow}, @samp{blue}, @samp{magenta}, @samp{cyan},
or @samp{white}.
-@var{color-space} should be one of the @samp{COLORSPACE_} constants. This
-argument tells @value{GDBN} which color space @var{value} belongs.
+@var{color_space} should be one of the @samp{COLORSPACE_} constants
+listed below. This argument tells @value{GDBN} which color space
+@var{value} belongs.
@end defun
@defvar Color.is_none
@@ -7094,12 +7095,15 @@ This attribute exist if @code{is_direct} is @code{True}. Its value is tuple
with integer components of a color.
@end defvar
-@defun Color.escape_sequence (@var{self}, @var{is_foreground})
+@defun Color.escape_sequence (is_foreground)
Returns string to change terminal's color to this.
If @var{is_foreground} is @code{True}, then the returned sequence will change
foreground color. Otherwise, the returned sequence will change background
color.
+
+If styling is currently disabled (@pxref{Output Styling,,@kbd{set style
+enabled}}), then this method will return an empty string.
@end defun
When color is initialized, its color space must be specified. The