X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fdoc%2Fgdb.texinfo;h=3c3915b332ce13c79077f5138a415bbe8f51cb69;hb=20813a0b7b0ccbeaa64aa83d92cd69e16a30cceb;hp=efd6dffb1e5d18ebd2cb1bfb488740732d9f69a9;hpb=74792ff782431ec6113b9a8a8e85b95f46094c7f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index efd6dffb1e..3c3915b332 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -3873,6 +3873,13 @@ breakpoints are set, they are treated just like the breakpoints set with the @code{break} command. You can delete them, disable them, or make them conditional the same way as any other breakpoint. +In programs using different languages, @value{GDBN} chooses the syntax +to print the list of all breakpoints it sets according to the +@samp{set language} value: using @samp{set language auto} +(see @ref{Automatically, ,Set Language Automatically}) means to use the +language of the breakpoint's function, other values mean to use +the manually specified language (see @ref{Manually, ,Set Language Manually}). + The syntax of the regular expression is the standard one used with tools like @file{grep}. Note that this is different from the syntax used by shells, so for instance @code{foo*} matches all functions that include @@ -7830,15 +7837,75 @@ same as for the @command{frame} command (@pxref{Selection, ,Selecting a Frame}). The selected frame remains unchanged by this command. @kindex info args -@item info args +@item info args [-q] Print the arguments of the selected frame, each on a separate line. -@item info locals +The optional flag @samp{-q}, which stands for @samp{quiet}, disables +printing header information and messages explaining why no argument +have been printed. + +@item info args [-q] [-t @var{type_regexp}] [@var{regexp}] +Like @kbd{info args}, but only print the arguments selected +with the provided regexp(s). + +If @var{regexp} is provided, print only the arguments whose names +match the regular expression @var{regexp}. + +If @var{type_regexp} is provided, print only the arguments whose +types, as printed by the @code{whatis} command, match +the regular expression @var{type_regexp}. +If @var{type_regexp} contains space(s), it should be enclosed in +quote characters. If needed, use backslash to escape the meaning +of special characters or quotes. + +If both @var{regexp} and @var{type_regexp} are provided, an argument +is printed only if its name matches @var{regexp} and its type matches +@var{type_regexp}. + +@item info locals [-q] @kindex info locals Print the local variables of the selected frame, each on a separate line. These are all variables (declared either static or automatic) accessible at the point of execution of the selected frame. +The optional flag @samp{-q}, which stands for @samp{quiet}, disables +printing header information and messages explaining why no local variables +have been printed. + +@item info locals [-q] [-t @var{type_regexp}] [@var{regexp}] +Like @kbd{info locals}, but only print the local variables selected +with the provided regexp(s). + +If @var{regexp} is provided, print only the local variables whose names +match the regular expression @var{regexp}. + +If @var{type_regexp} is provided, print only the local variables whose +types, as printed by the @code{whatis} command, match +the regular expression @var{type_regexp}. +If @var{type_regexp} contains space(s), it should be enclosed in +quote characters. If needed, use backslash to escape the meaning +of special characters or quotes. + +If both @var{regexp} and @var{type_regexp} are provided, a local variable +is printed only if its name matches @var{regexp} and its type matches +@var{type_regexp}. + +The command @kbd{info locals -q -t @var{type_regexp}} can usefully be +combined with the commands @kbd{frame apply} and @kbd{thread apply}. +For example, your program might use Resource Acquisition Is +Initialization types (RAII) such as @code{lock_something_t}: each +local variable of type @code{lock_something_t} automatically places a +lock that is destroyed when the variable goes out of scope. You can +then list all acquired locks in your program by doing +@smallexample +thread apply all -s frame apply all -s info locals -q -t lock_something_t +@end smallexample +@noindent +or the equivalent shorter form +@smallexample +tfaas i lo -q -t lock_something_t +@end smallexample + @end table @node Frame Apply @@ -17101,7 +17168,8 @@ the following example: (@value{GDBP}) info task 2 Ada Task: 0x807c468 Name: task_1 -Thread: 0x807f378 +Thread: 0 +LWP: 0x1fac Parent: 1 (main_task) Base Priority: 15 State: Runnable @@ -17842,6 +17910,13 @@ types in your program whose names include the string @code{value}, but @samp{i type ^value$} gives information only on types whose complete name is @code{value}. +In programs using different languages, @value{GDBN} chooses the syntax +to print the type description according to the +@samp{set language} value: using @samp{set language auto} +(see @ref{Automatically, ,Set Language Automatically}) means to use the +language of the type, other values mean to use +the manually specified language (see @ref{Manually, ,Set Language Manually}). + This command differs from @code{ptype} in two ways: first, like @code{whatis}, it does not print a detailed description; second, it lists all source files and line numbers where a type is defined. @@ -17920,32 +17995,87 @@ debugging information, organized into two lists: files whose symbols have already been read, and files whose symbols will be read when needed. @kindex info functions -@item info functions +@item info functions [-q] Print the names and data types of all defined functions. Similarly to @samp{info types}, this command groups its output by source files and annotates each function definition with its source line number. -@item info functions @var{regexp} -Like @samp{info functions}, but only print the names and data types of -functions whose names contain a match for regular expression -@var{regexp}. Thus, @samp{info fun step} finds all functions whose +In programs using different languages, @value{GDBN} chooses the syntax +to print the function name and type according to the +@samp{set language} value: using @samp{set language auto} +(see @ref{Automatically, ,Set Language Automatically}) means to use the +language of the function, other values mean to use +the manually specified language (see @ref{Manually, ,Set Language Manually}). + +The optional flag @samp{-q}, which stands for @samp{quiet}, disables +printing header information and messages explaining why no functions +have been printed. + +@item info functions [-q] [-t @var{type_regexp}] [@var{regexp}] +Like @samp{info functions}, but only print the names and data types +of the functions selected with the provided regexp(s). + +If @var{regexp} is provided, print only the functions whose names +match the regular expression @var{regexp}. +Thus, @samp{info fun step} finds all functions whose names include @code{step}; @samp{info fun ^step} finds those whose names start with @code{step}. If a function name contains characters that conflict with the regular expression language (e.g.@: @samp{operator*()}), they may be quoted with a backslash. +If @var{type_regexp} is provided, print only the functions whose +types, as printed by the @code{whatis} command, match +the regular expression @var{type_regexp}. +If @var{type_regexp} contains space(s), it should be enclosed in +quote characters. If needed, use backslash to escape the meaning +of special characters or quotes. +Thus, @samp{info fun -t '^int ('} finds the functions that return +an integer; @samp{info fun -t '(.*int.*'} finds the functions that +have an argument type containing int; @samp{info fun -t '^int (' ^step} +finds the functions whose names start with @code{step} and that return +int. + +If both @var{regexp} and @var{type_regexp} are provided, a function +is printed only if its name matches @var{regexp} and its type matches +@var{type_regexp}. + + @kindex info variables -@item info variables +@item info variables [-q] Print the names and data types of all variables that are defined outside of functions (i.e.@: excluding local variables). The printed variables are grouped by source files and annotated with their respective source line numbers. -@item info variables @var{regexp} -Like @kbd{info variables}, but only print the names and data types of -non-local variables whose names contain a match for regular expression -@var{regexp}. +In programs using different languages, @value{GDBN} chooses the syntax +to print the variable name and type according to the +@samp{set language} value: using @samp{set language auto} +(see @ref{Automatically, ,Set Language Automatically}) means to use the +language of the variable, other values mean to use +the manually specified language (see @ref{Manually, ,Set Language Manually}). + +The optional flag @samp{-q}, which stands for @samp{quiet}, disables +printing header information and messages explaining why no variables +have been printed. + +@item info variables [-q] [-t @var{type_regexp}] [@var{regexp}] +Like @kbd{info variables}, but only print the variables selected +with the provided regexp(s). + +If @var{regexp} is provided, print only the variables whose names +match the regular expression @var{regexp}. + +If @var{type_regexp} is provided, print only the variables whose +types, as printed by the @code{whatis} command, match +the regular expression @var{type_regexp}. +If @var{type_regexp} contains space(s), it should be enclosed in +quote characters. If needed, use backslash to escape the meaning +of special characters or quotes. + +If both @var{regexp} and @var{type_regexp} are provided, an argument +is printed only if its name matches @var{regexp} and its type matches +@var{type_regexp}. @kindex info classes @cindex Objective-C, classes and selectors @@ -23565,6 +23695,7 @@ all uses of @value{GDBN} with the architecture, both native and cross. * PowerPC:: * Nios II:: * Sparc64:: +* S12Z:: @end menu @node AArch64 @@ -24037,6 +24168,21 @@ variable "shmaddr": @end table +@node S12Z +@subsection S12Z +@cindex S12Z support + +When @value{GDBN} is debugging the S12Z architecture, +it provides the following special command: + +@table @code +@item maint info bdccsr +@kindex maint info bdccsr@r{, S12Z} +This command displays the current value of the microprocessor's +BDCCSR register. +@end table + + @node Controlling GDB @chapter Controlling @value{GDBN} @@ -26779,12 +26925,6 @@ lines. Positive counts increase the height, while negative counts decrease it. The @var{name} parameter can be one of @code{src} (the source window), @code{cmd} (the command window), @code{asm} (the disassembly window), or @code{regs} (the register display window). - -@item tabset @var{nchars} -@kindex tabset -Set the width of tab stops to be @var{nchars} characters. This -setting affects the display of TAB characters in the source and -assembly windows. @end table @node TUI Configuration @@ -26838,6 +26978,13 @@ Use extra bright or bold mode. @item bold-standout Use extra bright or bold and standout mode. @end table + +@item set tui tab-width @var{nchars} +@kindex set tui tab-width +@kindex tabset +Set the width of tab stops to be @var{nchars} characters. This +setting affects the display of TAB characters in the source and +assembly windows. @end table @node Emacs @@ -35771,12 +35918,13 @@ to the compiler, which will fail the compilation if the compiler outputs any warning messages. @item --enable-ubsan -Enable the GCC undefined behavior sanitizer. By default this is -disabled in @value{GDBN} releases, but enabled, when available, when -building from git. The undefined behavior sanitizer checks for -C@t{++} undefined behavior. It has a performance cost, so if you are -looking at @value{GDBN}'s performance, you should disable it. The -undefined behavior sanitizer was first introduced in GCC 4.9. +Enable the GCC undefined behavior sanitizer. This is disabled by +default, but passing @code{--enable-ubsan=yes} or +@code{--enable-ubsan=auto} to @code{configure} will enable it. The +undefined behavior sanitizer checks for C@t{++} undefined behavior. +It has a performance cost, so if you are looking at @value{GDBN}'s +performance, you should disable it. The undefined behavior sanitizer +was first introduced in GCC 4.9. @end table @node System-wide configuration @@ -43110,11 +43258,13 @@ contain registers @samp{vr0} through @samp{vr31}, @samp{vscr}, and @samp{vrsave}. The @samp{org.gnu.gdb.power.vsx} feature is optional. It should -contain registers @samp{vs0h} through @samp{vs31h}. @value{GDBN} -will combine these registers with the floating point registers -(@samp{f0} through @samp{f31}) and the altivec registers (@samp{vr0} -through @samp{vr31}) to present the 128-bit wide registers @samp{vs0} -through @samp{vs63}, the set of vector registers for POWER7. +contain registers @samp{vs0h} through @samp{vs31h}. @value{GDBN} will +combine these registers with the floating point registers (@samp{f0} +through @samp{f31}) and the altivec registers (@samp{vr0} through +@samp{vr31}) to present the 128-bit wide registers @samp{vs0} through +@samp{vs63}, the set of vector-scalar registers for POWER7. +Therefore, this feature requires both @samp{org.gnu.gdb.power.fpu} and +@samp{org.gnu.gdb.power.altivec}. The @samp{org.gnu.gdb.power.spe} feature is optional. It should contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and @@ -43124,6 +43274,66 @@ contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and these to present registers @samp{ev0} through @samp{ev31} to the user. +The @samp{org.gnu.gdb.power.ppr} feature is optional. It should +contain the 64-bit register @samp{ppr}. + +The @samp{org.gnu.gdb.power.dscr} feature is optional. It should +contain the 64-bit register @samp{dscr}. + +The @samp{org.gnu.gdb.power.tar} feature is optional. It should +contain the 64-bit register @samp{tar}. + +The @samp{org.gnu.gdb.power.ebb} feature is optional. It should +contain registers @samp{bescr}, @samp{ebbhr} and @samp{ebbrr}, all +64-bit wide. + +The @samp{org.gnu.gdb.power.linux.pmu} feature is optional. It should +contain registers @samp{mmcr0}, @samp{mmcr2}, @samp{siar}, @samp{sdar} +and @samp{sier}, all 64-bit wide. This is the subset of the isa 2.07 +server PMU registers provided by @sc{gnu}/Linux. + +The @samp{org.gnu.gdb.power.htm.spr} feature is optional. It should +contain registers @samp{tfhar}, @samp{texasr} and @samp{tfiar}, all +64-bit wide. + +The @samp{org.gnu.gdb.power.htm.core} feature is optional. It should +contain the checkpointed general-purpose registers @samp{cr0} through +@samp{cr31}, as well as the checkpointed registers @samp{clr} and +@samp{cctr}. These registers may all be either 32-bit or 64-bit +depending on the target. It should also contain the checkpointed +registers @samp{ccr} and @samp{cxer}, which should both be 32-bit +wide. + +The @samp{org.gnu.gdb.power.htm.fpu} feature is optional. It should +contain the checkpointed 64-bit floating-point registers @samp{cf0} +through @samp{cf31}, as well as the checkpointed 64-bit register +@samp{cfpscr}. + +The @samp{org.gnu.gdb.power.htm.altivec} feature is optional. It +should contain the checkpointed altivec registers @samp{cvr0} through +@samp{cvr31}, all 128-bit wide. It should also contain the +checkpointed registers @samp{cvscr} and @samp{cvrsave}, both 32-bit +wide. + +The @samp{org.gnu.gdb.power.htm.vsx} feature is optional. It should +contain registers @samp{cvs0h} through @samp{cvs31h}. @value{GDBN} +will combine these registers with the checkpointed floating point +registers (@samp{cf0} through @samp{cf31}) and the checkpointed +altivec registers (@samp{cvr0} through @samp{cvr31}) to present the +128-bit wide checkpointed vector-scalar registers @samp{cvs0} through +@samp{cvs63}. Therefore, this feature requires both +@samp{org.gnu.gdb.power.htm.altivec} and +@samp{org.gnu.gdb.power.htm.fpu}. + +The @samp{org.gnu.gdb.power.htm.ppr} feature is optional. It should +contain the 64-bit checkpointed register @samp{cppr}. + +The @samp{org.gnu.gdb.power.htm.dscr} feature is optional. It should +contain the 64-bit checkpointed register @samp{cdscr}. + +The @samp{org.gnu.gdb.power.htm.tar} feature is optional. It should +contain the 64-bit checkpointed register @samp{ctar}. + @node S/390 and System z Features @subsection S/390 and System z Features @cindex target descriptions, S/390 features @@ -43956,7 +44166,7 @@ Usage (host side): @end ifset You need an unstripped copy of the target program on your host system, since -@value{GDBN} needs to examine it's symbol tables and such. Start up @value{GDBN} as you normally +@value{GDBN} needs to examine its symbol tables and such. Start up @value{GDBN} as you normally would, with the target program as the first argument. (You may need to use the @option{--baud} option if the serial line is running at anything except 9600 baud.) That is @code{gdb TARGET-PROG}, or @code{gdb --baud BAUD TARGET-PROG}. After that, the only