gdb/
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index eaac24f5287200f3defb711f202652b3962ba1f0..57bd0840fe694498787acf1428db26370beacb42 100644 (file)
@@ -3052,9 +3052,8 @@ C@t{++}, a function name may refer to more than one possible place to break.
 that situation.
 
 It is also possible to insert a breakpoint that will stop the program
-only if a specific thread or a specific task hits that breakpoint.
-@xref{Thread-Specific Breakpoints} and @ref{Ada Tasks} for more
-information about this feature.
+only if a specific thread (@pxref{Thread-Specific Breakpoints})
+or a specific task (@pxref{Ada Tasks}) hits that breakpoint.
 
 @item break
 When called without any arguments, @code{break} sets a breakpoint at
@@ -5179,7 +5178,7 @@ Here is an example of a backtrace.  It was made with the command
 @group
 #0  m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8)
     at builtin.c:993
-#1  0x6e38 in expand_macro (sym=0x2b600) at macro.c:242
+#1  0x6e38 in expand_macro (sym=0x2b600, data=...) at macro.c:242
 #2  0x6840 in expand_token (obs=0x0, t=177664, td=0xf7fffb08)
     at macro.c:71
 (More stack frames follow...)
@@ -5191,6 +5190,13 @@ The display for frame zero does not begin with a program counter
 value, indicating that your program has stopped at the beginning of the
 code for line @code{993} of @code{builtin.c}.
 
+@noindent
+The value of parameter @code{data} in frame 1 has been replaced by
+@code{@dots{}}.  By default, @value{GDBN} prints the value of a parameter
+only if it is a scalar (integer, pointer, enumeration, etc).  See command
+@kbd{set print frame-arguments} in @ref{Print Settings} for more details
+on how to configure the way function parameter values are printed.
+
 @cindex value optimized out, in backtrace
 @cindex function call arguments, optimized out
 If your program was compiled with optimizations, some compilers will
@@ -5803,6 +5809,19 @@ for any reason a source file that is not relevant to your executable is
 located at the original location, a substitution rule is the only
 method available to point @value{GDBN} at the new location.
 
+@cindex @samp{--with-relocated-sources}
+@cindex default source path substitution
+You can configure a default source path substitution rule by
+configuring @value{GDBN} with the
+@samp{--with-relocated-sources=@var{dir}} option.  The @var{dir}
+should be the name of a directory under @value{GDBN}'s configured
+prefix (set with @samp{--prefix} or @samp{--exec-prefix}), and
+directory names in debug information under @var{dir} will be adjusted
+automatically if the installed @value{GDBN} is moved to a new
+location.  This is useful if @value{GDBN}, libraries or executables
+with debug information and corresponding source code are being moved
+together.
+
 @table @code
 @item directory @var{dirname} @dots{}
 @item dir @var{dirname} @dots{}
@@ -6052,12 +6071,21 @@ Show the current setting of the disassembly flavor.
 @kindex show disassemble-next-line
 @item set disassemble-next-line
 @itemx show disassemble-next-line
-Control whether or not @value{GDBN} will disassemble next source line
-when execution stops.  If ON, GDB will display disassembly of the next
-source line when execution of the program being debugged stops.
-If AUTO (which is the default), or there's no line info to determine
-the source line of the next instruction, display disassembly of next
-instruction instead.
+Control whether or not @value{GDBN} will disassemble the next source
+line or instruction when execution stops.  If ON, @value{GDBN} will
+display disassembly of the next source line when execution of the
+program being debugged stops.  This is @emph{in addition} to
+displaying the source line itself, which @value{GDBN} always does if
+possible.  If the next source line cannot be displayed for some reason
+(e.g., if @value{GDBN} cannot find the source file, or there's no line
+info in the debug info), @value{GDBN} will display disassembly of the
+next @emph{instruction} instead of showing the next source line.  If
+AUTO, @value{GDBN} will display disassembly of next instruction only
+if the source line cannot be displayed.  This setting causes
+@value{GDBN} to display some feedback when you step through a function
+with no line info or whose source file is unavailable.  The default is
+OFF, which means never display the disassembly of the next line or
+instruction.
 @end table
 
 
@@ -6984,12 +7012,13 @@ values are:
 
 @table @code
 @item all
-The values of all arguments are printed.  This is the default.
+The values of all arguments are printed.
 
 @item scalars
 Print the value of an argument only if it is a scalar.  The value of more
 complex arguments such as arrays, structures, unions, etc, is replaced
-by @code{@dots{}}.  Here is an example where only scalar arguments are shown:
+by @code{@dots{}}.  This is the default.  Here is an example where
+only scalar arguments are shown:
 
 @smallexample
 #1  0x08048361 in call_me (i=3, s=@dots{}, ss=0xbf8d508c, u=@dots{}, e=green)
@@ -7006,14 +7035,16 @@ is replaced by @code{@dots{}}.  In this case, the example above now becomes:
 @end smallexample
 @end table
 
-By default, all argument values are always printed.  But this command
-can be useful in several cases.  For instance, it can be used to reduce
-the amount of information printed in each frame, making the backtrace
-more readable.  Also, this command can be used to improve performance
-when displaying Ada frames, because the computation of large arguments
-can sometimes be CPU-intensive, especiallly in large applications.
-Setting @code{print frame-arguments} to @code{scalars} or @code{none}
-avoids this computation, thus speeding up the display of each Ada frame.
+By default, only scalar arguments are printed.  This command can be used
+to configure the debugger to print the value of all arguments, regardless
+of their type.  However, it is often advantageous to not print the value
+of more complex parameters.  For instance, it reduces the amount of
+information printed in each frame, making the backtrace more readable.
+Also, it improves performance when displaying Ada frames, because
+the computation of large arguments can sometimes be CPU-intensive,
+especially in large applications.  Setting @code{print frame-arguments}
+to @code{scalars} (the default) or @code{none} avoids this computation,
+thus speeding up the display of each Ada frame.
 
 @item show print frame-arguments
 Show how the value of arguments should be displayed when printing a frame.
@@ -7989,7 +8020,9 @@ Set the current host character set to @var{charset}.
 
 By default, @value{GDBN} uses a host character set appropriate to the
 system it is running on; you can override that default using the
-@code{set host-charset} command.
+@code{set host-charset} command.  On some systems, @value{GDBN} cannot
+automatically determine the appropriate host character set.  In this
+case, @value{GDBN} uses @samp{UTF-8}.
 
 @value{GDBN} can only use certain character sets as its host character
 set.  If you type @kbd{@w{set target-charset @key{TAB}@key{TAB}}},
@@ -8349,7 +8382,7 @@ can be any string of tokens.
 @cindex definition, showing a macro's
 @item info macro @var{macro}
 Show the definition of the macro named @var{macro}, and describe the
-source location where that definition was established.
+source location or compiler command-line where that definition was established.
 
 @kindex macro define
 @cindex user-defined macros
@@ -8514,6 +8547,18 @@ $2 = 0
 (@value{GDBP})
 @end smallexample
 
+In addition to source files, macros can be defined on the compilation command
+line using the @option{-D@var{name}=@var{value}} syntax.  For macros defined in
+such a way, @value{GDBN} displays the location of their definition as line zero
+of the source file submitted to the compiler.
+
+@smallexample
+(@value{GDBP}) info macro __STDC__
+Defined at /home/jimb/gdb/macros/play/sample.c:0
+-D__STDC__=1
+(@value{GDBP})
+@end smallexample
+
 
 @node Tracepoints
 @chapter Tracepoints
@@ -12711,6 +12756,7 @@ program.  To debug a core dump of a previous run, you must also tell
 * Files::                       Commands to specify files
 * Separate Debug Files::        Debugging information in separate files
 * Symbol Errors::               Errors reading symbol files
+* Data Files::                  GDB data files
 @end menu
 
 @node Files
@@ -13545,6 +13591,36 @@ it.
 
 @end table
 
+@node Data Files
+@section GDB Data Files
+
+@cindex prefix for data files
+@value{GDBN} will sometimes read an auxiliary data file.  These files
+are kept in a directory known as the @dfn{data directory}.
+
+You can set the data directory's name, and view the name @value{GDBN}
+is currently using.
+
+@table @code
+@kindex set data-directory
+@item set data-directory @var{directory}
+Set the directory which @value{GDBN} searches for auxiliary data files
+to @var{directory}.
+
+@kindex show data-directory
+@item show data-directory
+Show the directory @value{GDBN} searches for auxiliary data files.
+@end table
+
+@cindex default data directory
+@cindex @samp{--with-gdb-datadir}
+You can set the default data directory by using the configure-time
+@samp{--with-gdb-datadir} option.  If the data directory is inside
+@value{GDBN}'s configured binary prefix (set with @samp{--prefix} or
+@samp{--exec-prefix}), then the default data directory will be updated
+automatically if the installed @value{GDBN} is moved to a new
+location.
+
 @node Targets
 @chapter Specifying a Debugging Target
 
@@ -21373,6 +21449,31 @@ fullname="/home/foo/bar/try.c",line="13"@}
 (gdb)
 @end smallexample
 
+@subheading The @code{-exec-jump} Command
+@findex -exec-jump
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-jump @var{location}
+@end smallexample
+
+Resumes execution of the inferior program at the location specified by
+parameter.  @xref{Specify Location}, for a description of the
+different forms of @var{location}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{jump}.
+
+@subsubheading Example
+
+@smallexample
+-exec-jump foo.c:10
+*running,thread-id="all"
+^running
+@end smallexample
+
 
 @subheading The @code{-exec-next} Command
 @findex -exec-next
@@ -25706,9 +25807,9 @@ Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
 compiled with the @samp{-pg} compiler option.
 
 @kindex maint show-debug-regs
-@cindex x86 hardware debug registers
+@cindex hardware debug registers
 @item maint show-debug-regs
-Control whether to show variables that mirror the x86 hardware debug
+Control whether to show variables that mirror the hardware debug
 registers.  Use @code{ON} to enable, @code{OFF} to disable.  If
 enabled, the debug registers values are shown when @value{GDBN} inserts or
 removes a hardware breakpoint or watchpoint, and when the inferior
This page took 0.051272 seconds and 4 git commands to generate.