Lines Matching full:debugging
11 This is the Ninth Edition, of `Debugging with GDB: the GNU
34 Debugging with GDB
56 * Tracepoints:: Debugging remote targets non-intrusively
57 * Overlays:: Debugging programs that use overlays
64 * Targets:: Specifying a debugging target
65 * Remote Debugging:: Debugging remote programs
119 Debugging Pascal programs which use sets, subranges, file variables,
298 contributed Convex support (and Fortran debugging). Jonathan Stone
313 develop remote debugging. Intel Corporation, Wind River Systems, AMD,
314 and ARM contributed remote debugging modules for the i960, VxWorks,
650 specify more of your debugging environment at the outset.
913 interface used by GDB for remote debugging.
917 remote debugging.
978 and another, specific to the program you are debugging, in the
1041 you can release it with the `detach' command (*note Debugging an
1050 If you need to execute occasional shell commands during your debugging
1257 features for C++: Debugging C plus plus.
1412 When you run a program under GDB, you must first generate debugging
1416 your choice. If you are doing native debugging, you may redirect your
1422 * Compilation:: Compiling for debugging
1429 * Attach:: Debugging an already-running process
1432 * Threads:: Debugging programs with multiple threads
1433 * Processes:: Debugging programs with multiple processes
1439 4.1 Compiling for debugging
1442 In order to debug a program effectively, you need to generate debugging
1443 information when you compile it. This debugging information is stored
1448 To request debugging information, specify the `-g' option when you
1455 debugging information.
1473 more information about debugging optimized code.
1476 `-gg' for debugging information. GDB no longer supports this format;
1481 preprocessor macros in the debugging information if you specify the
1485 debugging information in the Dwarf 2 format, and the latter requests
1545 pipes to pass the output of the program you are debugging to
1547 debugging the wrong program.
1635 When debugging, it can be useful to try running your program with a
1779 4.7 Debugging an already-running process
1813 When you have finished debugging the attached process, you can use
1855 4.9 Debugging programs with multiple threads
1866 GDB provides these facilities for debugging multi-thread programs:
1890 The GDB thread debugging facility allows you to observe all threads
1892 particular is always the focus of debugging. This thread is called the
1893 "current thread". Debugging commands show program information from the
1908 For debugging purposes, GDB associates its own thread number--always
1934 For debugging purposes, GDB associates its own thread number--a
2019 4.10 Debugging programs with multiple processes
2022 On most systems, GDB has no special support for debugging programs
2036 debugging the parent process) to attach to the child process (*note
2040 On some systems, GDB provides support for debugging programs that
2107 To quit debugging one of the forked processes, you can either detach
2161 To use the `checkpoint'/`restart' method of debugging:
2169 List the checkpoints that have been saved in the current debugging
2213 program to a previously saved point in time, and begin debugging it
2384 breakpoints in parts of your program which do not have debugging
2425 debugging, so you can set a breakpoint at an instruction without
2466 When debugging C++ programs, `rbreak' is useful for setting
3309 within a function that was compiled without debugging
3311 function that does have debugging information. Likewise, it
3313 debugging information. To step through functions without
3314 debugging information, use the `stepi' command, described
3320 stop if a function that has debugging information is called within
3328 debugging information about the routine.
3394 example, in the following excerpt from a debugging session, the `f'
3576 When your program has multiple threads (*note Debugging programs with
3644 Since thread scheduling is up to your debugging target's operating
3670 debugging.
4048 GDB can print parts of your program's source, since the debugging
4263 your debugging session. GDB has a list of directories to search for
4303 directory between compilation and debugging. A rule is made of two
4555 * Character Sets:: Debugging programs that use a different
4697 Options for Debugging Your Program or GNU CC: (gcc.info)Debugging
4698 Options. *Note Debugging C++: C, for more info about debug info formats
4941 When you are debugging a program running on a remote target machine
5050 These settings are useful for debugging programs in any language:
5275 These settings are of interest when debugging C++ programs:
5318 allow debugging `cfront'-generated executables. GDB would
5897 primary use is post-mortem debugging of a program that crashed while it
5900 Files::, for information on invoking GDB in the post-mortem debugging
5904 are debugging in order to preserve a snapshot of its state. GDB has a
5923 If the program you are debugging uses a different character set to
5931 protocol (*note Remote Debugging: Remote.) to debug a program running
6139 state (dirty, bad, ok, etc.). This command is useful for debugging
6156 macros in their debugging information, even when you compile with the
6247 information about preprocessor macros in the debugging information.
6677 behave as if we were currently debugging the program state as it was
6704 Stop debugging trace snapshots, resume _live_ debugging.
6742 from line to line in a _live_ debugging session.
6860 in a later debugging session. To read the saved tracepoint
6903 11 Debugging Programs That Use Overlays
6908 GDB provides some support for debugging programs that use overlays.
6914 * Automatic Overlay Debugging:: GDB can find out which overlays are
7037 File: gdb.info, Node: Overlay Commands, Next: Automatic Overlay Debugging, Prev: How Overlays Work, Up: Overlays
7059 Enable "manual" overlay debugging. In this mode, GDB relies on
7081 Enable "automatic" overlay debugging. In this mode, GDB consults
7084 Overlay Debugging::.
7092 when using automatic overlay debugging.
7105 When overlay debugging is enabled, GDB recognizes code in unmapped
7123 When overlay debugging is enabled, GDB can find the correct address
7139 File: gdb.info, Node: Automatic Overlay Debugging, Next: Overlay Sample Program, Prev: Overlay Commands, Up: Overlays
7141 11.3 Automatic Overlay Debugging
7146 inferior. If you enable automatic overlay debugging with the `overlay
7152 GDB's automatic overlay debugging:
7194 File: gdb.info, Node: Overlay Sample Program, Prev: Automatic Overlay Debugging, Up: Overlays
7360 interpreted the same way in your debugging session and your program.
7631 The C++ debugging facilities are jointly implemented by the C++
7636 For best results when using GNU C++, use the DWARF 2 debugging
7637 format; if it doesn't work on your system, try the stabs+ debugging
7640 Debugging Your Program or GNU CC: (gcc.info)Debugging Options.
7649 * Debugging C:: GDB and C
7650 * Debugging C plus plus:: GDB features for C++
7751 For debugging C++, GDB implements a use of `&' beyond what is
7856 * Debugging C::
7868 when debugging C++ code that is compiled with GCC 2.95.3 or with
7900 Debugging C plus plus.
7924 reference to source files, in both C and C++ debugging (*note
7950 File: gdb.info, Node: C Checks, Next: Debugging C, Prev: C Defaults, Up: C
7971 File: gdb.info, Node: Debugging C, Next: Debugging C plus plus, Prev: C Checks, Up: C
7980 The `@' operator aids in the debugging of dynamic arrays, formed
7986 * Debugging C plus plus::
7989 File: gdb.info, Node: Debugging C plus plus, Prev: Debugging C, Up: C
8070 options that are useful for debugging Objective-C code. See also *Note
8222 Debugging Pascal programs which use sets, subranges, file variables, or
8668 debugging. (In standard Modula-2, the actual address contained in
8741 Some GDB commands have little use when debugging Modula-2 programs.
8749 the debugging of "dynamic arrays", which cannot be created in Modula-2
8774 * Stopping Before Main Program:: Debugging the program during elaboration.
8935 However, there are occasional uses when debugging programs in
8936 which certain debugging information has been optimized away.
9076 should allow most simple operations to be performed while debugging an
9100 object files as debugging symbols, but GDB would ordinarily parse a
9244 * whether the executable includes debugging information for
9248 * whether the debugging information includes information about
9253 there is debugging information, organized into two lists: files
9335 Write a dump of debugging symbol data into the file FILENAME.
9337 symbols with debugging data are included. If you use `maint print
9356 debugging this one to examine a particular structure in more
9663 to turn on internal debugging flags, or even to make emergency repairs.
9693 * Separate Debug Files:: Debugging information in separate files
9708 to use. Or you are debugging a remote target via `gdbserver' (*note
9759 understands debugging information in whatever format is the
9763 using `gcc' you can generate debugging information for optimized
9890 current target (*note Specifying a Debugging Target: Targets.),
9961 debugging performance.
9983 to a function in a shared library, however--unless you are debugging a
10051 Shared libraries are also supported in many cross or remote debugging
10057 For remote debugging, you need to tell GDB where the target
10092 15.2 Debugging Information in Separate Files
10095 GDB allows you to put a program's debugging information in a file
10097 and load the debugging information automatically. Since debugging
10099 code itself -- some systems distribute debugging information for their
10103 If an executable's debugging information has been extracted to a
10105 name of the debugging information file (with no directory components),
10110 the debugging information file in three places:
10123 GDB checks under each of these names for a debugging information
10125 debugging information from the first one it finds.
10133 You can set the global debugging info directory's name, and view the
10137 Set the directory which GDB searches for separate debugging
10141 Show the directory GDB searches for separate debugging information
10156 debugging information file's full contents by the function given
10163 The debugging information file itself should be an ordinary
10165 debugging information. The sections of the debugging information file
10171 separated executable / debugging information file pairs. Ulrich
10174 foo.debug' removes the debugging information from the executable file
10260 debugging compilers. If you are interested in seeing information about
10315 feel like debugging it, you can debug `gdb' with itself, breakpoint
10332 File: gdb.info, Node: Targets, Next: Remote Debugging, Prev: GDB Files, Up: Top
10334 16 Specifying a Debugging Target
10340 that case, the debugging target is specified as a side effect when you
10370 * Remote:: Remote debugging
10403 `attach' command (*note Debugging an already-running process: Attach.).
10413 A target is typically a protocol for talking to debugging
10465 over MEDIUM for debugging. *Note Remote Debugging::.
10521 Depending on what remote debugging facilities are configured into
10523 meant to make FILENAME (an executable) available for debugging on
10575 16.4 Remote debugging
10579 run GDB in the usual way, it is often useful to use remote debugging.
10580 For example, you might use remote debugging on an operating system
10585 to make this work with particular debugging targets. In addition, GDB
10601 Debugging, Next: Configurations, Prev: Targets, Up: Top
10603 17 Debugging remote programs
10614 File: gdb.info, Node: Connecting, Next: Server, Up: Remote Debugging
10620 program, since GDB needs symobl and debugging information. Start up
10626 for debugging your program; only the medium carrying the debugging
10667 When using a UDP connection for remote debugging, you should keep
10670 havoc with your debugging session.
10678 that speaks the remote debugging protocol, to make net connections
10697 Give up (and stop debugging it)? (y or n)
10699 If you type `y', GDB abandons the remote debugging session. (If you
10704 When you have finished debugging the remote program, you can use
10713 instance or another one) to connect and continue debugging. After
10725 File: gdb.info, Node: Server, Next: Remote configuration, Prev: Connecting, Up: Remote Debugging
10732 without linking in the usual debugging stub.
10734 `gdbserver' is not a complete replacement for the debugging stubs,
10745 make a similar choice for debugging.
10824 File: gdb.info, Node: Remote configuration, Next: remote stub, Prev: Server, Up: Remote Debugging
10830 debugging remote programs. For the options related to the File I/O
10845 is used to set the speed of the serial port used for debugging
10904 debugging stub. If you need to override the autodetection, you can use
10912 If you do, that may be a bug in your remote debugging stub, or a bug in
10937 File: gdb.info, Node: remote stub, Prev: Remote configuration, Up: Remote Debugging
10950 To debug a program running on another machine (the debugging
10975 (*note Specifying a Debugging Target: Targets.).
10980 containing these subroutines is called a "debugging stub".
10986 The debugging stub is specific to the architecture of the remote
11023 The debugging stub for your architecture supplies these three
11061 start of your debugging session.
11069 The debugging stubs that come with GDB are set up for a particular chip
11071 debugging target machine.
11093 Getting the debugging target to return the proper status to GDB
11173 4. Compile and link together: your program, the GDB debugging stub for
11187 File: gdb.info, Node: Configurations, Next: Controlling GDB, Prev: Remote Debugging, Up: Top
11221 * BSD libkvm Interface:: Debugging BSD kernel memory images
11249 debugging target. For debugging a live system, load the currently
11254 For debugging crash dumps, provide the file name of the crash dump
11353 18.1.4 Features for Debugging DJGPP Programs
11361 GDB supports native debugging of DJGPP programs, and defines a few
11471 In addition to native debugging, the DJGPP port supports remote
11472 debugging via a serial data link. The following commands are specific
11473 to remote serial debugging in the DJGPP port of GDB.
11500 18.1.5 Features for Debugging MS Windows PE executables
11503 GDB supports native debugging of MS Windows programs, including DLLs
11504 with and without symbolic debugging information. There are various
11507 that have no debugging symbols.
11532 primarily for debugging the Cygwin DLL itself; the default value
11560 loading and unloading, console interrupts, and debugging messages
11585 * Non-debug DLL symbols:: Support for DLLs without debugging symbols
11590 18.1.5.1 Support for DLLs without debugging symbols
11594 not include symbolic debugging information (for example,
11595 `kernel32.dll'). When GDB doesn't recognize any debugging symbols in a
11607 with no debugging information will cause the symbol names to be
11614 In keeping with the naming conventions used by the Microsoft debugging
11619 the executable itself includes full debugging symbols) necessitating
11633 Non-debugging symbols:
11640 Non-debugging symbols:
11701 debugging.
11841 When set to on, enables debugging messages specific to the QNX
11853 This section describes configurations involving the debugging of
11883 name `vxgdb', to distinguish it from a GDB for debugging programs on
11898 include the remote debugging interface routines in the VxWorks library
11901 kernel contains `rdb.a', and spawns the source debugging task
12099 Toggle whether to display ARM-specific debugging messages from the
12103 Show whether ARM-specific debugging messages are enabled.
12158 When you select remote debugging to a Renesas SH, H8/300, or H8/500
12166 1. that you want to use `target hms', the remote debugging interface
12234 `(gdb)'. Use two special commands to begin your debugging session:
12235 `target hms' to specify cross-debugging to the Renesas board, and the
12300 The following special commands are available when debugging with the
12404 Instructs the remote that M32R/Chaos debugging is to be used.
12455 GDB can use the MIPS remote debugging protocol to talk to a MIPS board
12768 When compiling for debugging, include the options `-g' to get debug
12793 * Sparclet Execution:: Running and debugging
12862 18.3.11.4 Running and debugging
12865 You can now begin debugging the task using GDB's execution control
12905 to establish it as your debugging environment. DEV is normally the
12913 standalone operation. GDB reads debugging information (such as
12914 symbols) from a separate, debugging version of the program available on
12937 When configured for debugging Zilog Z8000 targets, GDB includes a Z8000
12978 When configured for debugging the Atmel AVR, GDB supports the following
12991 When configured for debugging CRIS, GDB provides the following
13003 Set the usage of DWARF-2 CFI for CRIS debugging. The default is
13012 debugging in guru mode, in which case it should be set to `guru'
13058 debugging over a network.
13145 command when debugging a stripped executable.
13151 debugging programs on Alpha or MIPS processors.
13153 Several MIPS-specific commands are available when debugging MIPS
13229 This command turns on and off debugging messages for the
13233 Show the current setting of MIPS debugging messages.
13241 When GDB is debugging te HP PA architecture, it provides the following
13246 debugging messages are to be displayed.
13249 Show whether HPPA debugging messages are displayed.
13275 * Debugging Output:: Optional messages about internal happenings
13286 debugging GDB with GDB, it is useful to change the prompt in one of the
13309 and a storage and recall of command history across debugging sessions.
13334 GDB can keep track of the commands you type during your debugging
13521 system targets, either via remote debugging or native emulation. GDB
13524 where this is useful is in debugging of binaries which use an alternate
13583 File: gdb.info, Node: Messages/Warnings, Next: Debugging Output, Prev: ABI, Up: Controlling GDB
13607 file, it is silent; but if you are debugging a compiler, you may find
13657 File: gdb.info, Node: Debugging Output, Prev: Messages/Warnings, Up: Controlling GDB
13662 GDB has commands that enable optional debugging messages from various
13677 Turns on or off display of gdbarch debugging info. The default is
13681 Displays the current state of displaying gdbarch debugging info.
13684 Display debugging messages about inner workings of the AIX thread
13688 Show the current state of AIX thread debugging info display.
13691 Turns on or off display of GDB event debugging info. The default
13695 Displays the current state of displaying GDB event debugging info.
13698 Turns on or off display of debugging info about GDB expression
13702 Displays the current state of displaying debugging info about GDB
13706 Turns on or off display of GDB frame debugging info. The default
13710 Displays the current state of displaying GDB frame debugging info.
13713 Turns on or off display of GDB debugging info for running the
13719 Displays the current state of GDB inferior debugging.
13722 Turns on or off debugging messages from the Linux LWP debug
13726 Show the current state of Linux LWP debugging messages.
13729 Turns on or off display of GDB observer debugging. This includes
13733 Displays the current state of observer debugging.
13736 Turns on or off display of GDB C++ overload debugging info. This
13742 debugging info.
13753 Turns on or off display of GDB serial debugging info. The default
13757 Displays the current state of displaying GDB serial debugging info.
13760 Turns on or off debugging messages for FR-V shared-library code.
13763 Display the current state of FR-V shared-library code debugging
13767 Turns on or off display of GDB target debugging info. This info
13775 Displays the current state of displaying GDB target debugging info.
13778 Turns on or off display of GDB variable object debugging info. The
13783 debugging info.
14271 Indicates the current gdb target (*note Specifying a Debugging
14550 source files for the program you are debugging with GDB.
14563 and output done by the program you are debugging.
14792 * We want easy access to the existing CLI syntax (for debugging).
15040 The log stream contains debugging messages being produced by GDB's
18724 (Note that if you're cross debugging, the problem may also be
18732 * If you are an experienced user of debugging tools, your suggestions
18805 you are debugging--e.g. "gcc-2.8.1", or "HP92453-01 A.10.32.03 HP
20584 one machine--the "host"--while debugging programs that run on another
20585 machine--the "target"). You specify a cross-debugging target by giving
20691 Configure GDB for cross-debugging programs running on the specified
20716 reference. (For commands that turn on debugging messages, see *Note
20717 Debugging Output::.)
20721 command is useful for debugging the Agent Expression mechanism
20796 debugging may prove unreliable.
20797 Quit this debugging session? (y or n) n
21017 The host (GDB) sends COMMANDs, and the target (the debugging stub
22547 either another `read(0, ...)' is requested by the target, or debugging
23450 When GDB is debugging a remote target, the GDB "agent" code running
23467 determine, making it suitable for use by the debugging agent in
23529 expressions are only used for unobtrusive debugging, not for patching
23863 Here is a sketch of a full non-stop debugging cycle, showing how agent
23875 the GDB agent, running on the debugging target.
24122 unaligned addresses whenever the executable's debugging
25303 * AIX threads: Debugging Output. (line 28)
25319 * architecture debugging info: Debugging Output. (line 18)
25339 * automatic overlay debugging: Automatic Overlay Debugging.
25374 * break in overloaded functions: Debugging C plus plus.
25422 * C++ exception handling: Debugging C plus plus.
25424 * C++ overload debugging info: Debugging Output. (line 80)
25427 * C++ symbol display: Debugging C plus plus.
25493 * command scripts, debugging: Messages/Warnings. (line 65)
25497 * commands for C++: Debugging C plus plus.
25533 * control C, and remote debugging: Bootstrapping. (line 25)
25564 * Cygwin DLL, debugging: Cygwin Native. (line 30)
25578 * debug remote protocol: Debugging Output. (line 86)
25581 * debugging C++ programs: C plus plus expressions.
25583 * debugging information directory, global: Separate Debug Files.
25585 * debugging information in separate files: Separate Debug Files.
25587 * debugging multiple processes: Processes. (line 52)
25588 * debugging multithreaded programs (on HP-UX): Threads. (line 82)
25589 * debugging optimized code: Compilation. (line 26)
25590 * debugging stub, example: remote stub. (line 6)
25591 * debugging target: Targets. (line 6)
25592 * debugging the Cygwin DLL: Cygwin Native. (line 30)
25650 * display remote packets: Debugging Output. (line 86)
25651 * DJGPP debugging: DJGPP Native. (line 6)
25653 * DLLs with no debugging symbols: Non-debug DLL symbols.
25663 * DOS serial data link, remote debugging: DJGPP Native. (line 121)
25730 * event debugging info: Debugging Output. (line 35)
25755 * expression debugging info: Debugging Output. (line 42)
25799 * focus of debugging: Threads. (line 38)
25802 * fork, debugging programs which call: Processes. (line 6)
25815 * FR-V shared-library debugging: Debugging Output. (line 104)
25816 * frame debugging info: Debugging Output. (line 50)
25869 * gdbarch debugging info: Debugging Output. (line 18)
25879 * global debugging information directory: Separate Debug Files.
25883 * GNU Hurd debugging: Hurd Native. (line 6)
25884 * GNU/Linux LWP debug messages: Debugging Output. (line 66)
25944 * inferior debugging info: Debugging Output. (line 57)
26020 * inheritance: Debugging C plus plus.
26102 * Linux lightweight processes: Debugging Output. (line 66)
26134 * M32R/Chaos debugging: M32R/D. (line 50)
26146 * macros, example of debugging with: Macros. (line 80)
26220 * manual overlay debugging: Overlay Commands. (line 23)
26281 * MS Windows debugging
26294 * native Cygwin debugging: Cygwin Native. (line 6)
26295 * native DJGPP debugging: DJGPP Native. (line 6)
26329 * observer debugging info: Debugging Output. (line 73)
26338 * optimized code, debugging: Compilation. (line 26)
26340 * optional debugging messages: Debugging Output. (line 6)
26364 * overloaded functions, overload resolution: Debugging C plus plus.
26367 * overloading in C++: Debugging C plus plus.
26375 * packets, reporting on stdout: Debugging Output. (line 86)
26552 * remote debugging: Remote. (line 6)
26558 * remote protocol debugging: Debugging Output. (line 86)
26563 * remote serial debugging summary: Debug Session. (line 6)
26564 * remote serial debugging, overview: remote stub. (line 14)
26589 * response time, MIPS debugging: MIPS. (line 10)
26615 * running and debugging Sparclet programs: Sparclet Execution.
26653 * separate debugging information files: Separate Debug Files.
26656 * serial connections, debugging: Debugging Output. (line 86)
26695 * set debug: Debugging Output. (line 18)
26714 * set exec-done-display: Debugging Output. (line 11)
26746 * set overload-resolution: Debugging C plus plus.
26849 * show debug: Debugging Output. (line 22)
26862 * show exec-done-display: Debugging Output. (line 14)
26888 * show overload-resolution: Debugging C plus plus.
27032 * stub example, remote debugging: remote stub. (line 6)
27070 * target debugging info: Debugging Output. (line 111)
27233 * variable object debugging info: Debugging Output. (line 122)
27416 Node: Automatic Overlay Debugging289489
27434 Node: Debugging C321378
27435 Node: Debugging C plus plus321898
27478 Node: Remote Debugging425913
27545 Node: Debugging Output538196