OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [doc/] [gdb.info-9] - Blame information for rev 1782

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
2
 
3
INFO-DIR-SECTION Programming & development tools.
4
START-INFO-DIR-ENTRY
5
* Gdb: (gdb).                     The GNU debugger.
6
END-INFO-DIR-ENTRY
7
 
8
   This file documents the GNU debugger GDB.
9
 
10
   This is the Ninth Edition, April 2001, of `Debugging with GDB: the
11
GNU Source-Level Debugger' for GDB Version 20010707.
12
 
13
   Copyright (C)
14
1988,1989,1990,1991,1992,1993,1994,1995,1996,1998,1999,2000,2001
15
Free Software Foundation, Inc.
16
 
17
   Permission is granted to copy, distribute and/or modify this document
18
under the terms of the GNU Free Documentation License, Version 1.1 or
19
any later version published by the Free Software Foundation; with the
20
Invariant Sections being "A Sample GDB Session" and "Free Software",
21
with the Front-Cover texts being "A GNU Manual," and with the
22
Back-Cover Texts as in (a) below.
23
 
24
   (a) The FSF's Back-Cover Text is: "You have freedom to copy and
25
modify this GNU Manual, like GNU software.  Copies published by the Free
26
Software Foundation raise funds for GNU development."
27
 
28

29
File: gdb.info,  Node: A29K Embedded,  Next: ARM,  Up: Embedded Processors
30
 
31
AMD A29K Embedded
32
-----------------
33
 
34
* Menu:
35
 
36
* A29K UDI::
37
* A29K EB29K::
38
* Comms (EB29K)::               Communications setup
39
* gdb-EB29K::                   EB29K cross-debugging
40
* Remote Log::                  Remote log
41
 
42
`target adapt DEV'
43
     Adapt monitor for A29K.
44
 
45
`target amd-eb DEV SPEED PROG'
46
     Remote PC-resident AMD EB29K board, attached over serial lines.
47
     DEV is the serial device, as for `target remote'; SPEED allows you
48
     to specify the linespeed; and PROG is the name of the program to
49
     be debugged, as it appears to DOS on the PC.  *Note EBMON protocol
50
     for AMD29K: A29K EB29K.
51
 
52

53
File: gdb.info,  Node: A29K UDI,  Next: A29K EB29K,  Up: A29K Embedded
54
 
55
A29K UDI
56
........
57
 
58
   GDB supports AMD's UDI ("Universal Debugger Interface") protocol for
59
debugging the a29k processor family.  To use this configuration with
60
AMD targets running the MiniMON monitor, you need the program `MONTIP',
61
available from AMD at no charge.  You can also use GDB with the
62
UDI-conformant a29k simulator program `ISSTIP', also available from AMD.
63
 
64
`target udi KEYWORD'
65
     Select the UDI interface to a remote a29k board or simulator, where
66
     KEYWORD is an entry in the AMD configuration file `udi_soc'.  This
67
     file contains keyword entries which specify parameters used to
68
     connect to a29k targets.  If the `udi_soc' file is not in your
69
     working directory, you must set the environment variable `UDICONF'
70
     to its pathname.
71
 
72

73
File: gdb.info,  Node: A29K EB29K,  Next: Comms (EB29K),  Prev: A29K UDI,  Up: A29K Embedded
74
 
75
EBMON protocol for AMD29K
76
.........................
77
 
78
   AMD distributes a 29K development board meant to fit in a PC,
79
together with a DOS-hosted monitor program called `EBMON'.  As a
80
shorthand term, this development system is called the "EB29K".  To use
81
GDB from a Unix system to run programs on the EB29K board, you must
82
first connect a serial cable between the PC (which hosts the EB29K
83
board) and a serial port on the Unix system.  In the following, we
84
assume you've hooked the cable between the PC's `COM1' port and
85
`/dev/ttya' on the Unix system.
86
 
87

88
File: gdb.info,  Node: Comms (EB29K),  Next: gdb-EB29K,  Prev: A29K EB29K,  Up: A29K Embedded
89
 
90
Communications setup
91
....................
92
 
93
   The next step is to set up the PC's port, by doing something like
94
this in DOS on the PC:
95
 
96
     C:\> MODE com1:9600,n,8,1,none
97
 
98
This example--run on an MS DOS 4.0 system--sets the PC port to 9600
99
bps, no parity, eight data bits, one stop bit, and no "retry" action;
100
you must match the communications parameters when establishing the Unix
101
end of the connection as well.
102
 
103
   To give control of the PC to the Unix side of the serial line, type
104
the following at the DOS console:
105
 
106
     C:\> CTTY com1
107
 
108
(Later, if you wish to return control to the DOS console, you can use
109
the command `CTTY con'--but you must send it over the device that had
110
control, in our example over the `COM1' serial line.)
111
 
112
   From the Unix host, use a communications program such as `tip' or
113
`cu' to communicate with the PC; for example,
114
 
115
     cu -s 9600 -l /dev/ttya
116
 
117
The `cu' options shown specify, respectively, the linespeed and the
118
serial port to use.  If you use `tip' instead, your command line may
119
look something like the following:
120
 
121
     tip -9600 /dev/ttya
122
 
123
Your system may require a different name where we show `/dev/ttya' as
124
the argument to `tip'.  The communications parameters, including which
125
port to use, are associated with the `tip' argument in the "remote"
126
descriptions file--normally the system table `/etc/remote'.
127
 
128
   Using the `tip' or `cu' connection, change the DOS working directory
129
to the directory containing a copy of your 29K program, then start the
130
PC program `EBMON' (an EB29K control program supplied with your board
131
by AMD).  You should see an initial display from `EBMON' similar to the
132
one that follows, ending with the `EBMON' prompt `#'--
133
 
134
     C:\> G:
135
 
136
     G:\> CD \usr\joe\work29k
137
 
138
     G:\USR\JOE\WORK29K> EBMON
139
     Am29000 PC Coprocessor Board Monitor, version 3.0-18
140
     Copyright 1990 Advanced Micro Devices, Inc.
141
     Written by Gibbons and Associates, Inc.
142
 
143
     Enter '?' or 'H' for help
144
 
145
     PC Coprocessor Type   = EB29K
146
     I/O Base              = 0x208
147
     Memory Base           = 0xd0000
148
 
149
     Data Memory Size      = 2048KB
150
     Available I-RAM Range = 0x8000 to 0x1fffff
151
     Available D-RAM Range = 0x80002000 to 0x801fffff
152
 
153
     PageSize              = 0x400
154
     Register Stack Size   = 0x800
155
     Memory Stack Size     = 0x1800
156
 
157
     CPU PRL               = 0x3
158
     Am29027 Available     = No
159
     Byte Write Available  = Yes
160
 
161
     # ~.
162
 
163
   Then exit the `cu' or `tip' program (done in the example by typing
164
`~.' at the `EBMON' prompt).  `EBMON' keeps running, ready for GDB to
165
take over.
166
 
167
   For this example, we've assumed what is probably the most convenient
168
way to make sure the same 29K program is on both the PC and the Unix
169
system: a PC/NFS connection that establishes "drive `G:'" on the PC as
170
a file system on the Unix host.  If you do not have PC/NFS or something
171
similar connecting the two systems, you must arrange some other
172
way--perhaps floppy-disk transfer--of getting the 29K program from the
173
Unix system to the PC; GDB does _not_ download it over the serial line.
174
 
175

176
File: gdb.info,  Node: gdb-EB29K,  Next: Remote Log,  Prev: Comms (EB29K),  Up: A29K Embedded
177
 
178
EB29K cross-debugging
179
.....................
180
 
181
   Finally, `cd' to the directory containing an image of your 29K
182
program on the Unix system, and start GDB--specifying as argument the
183
name of your 29K program:
184
 
185
     cd /usr/joe/work29k
186
     gdb myfoo
187
 
188
   Now you can use the `target' command:
189
 
190
     target amd-eb /dev/ttya 9600 MYFOO
191
 
192
In this example, we've assumed your program is in a file called
193
`myfoo'.  Note that the filename given as the last argument to `target
194
amd-eb' should be the name of the program as it appears to DOS.  In our
195
example this is simply `MYFOO', but in general it can include a DOS
196
path, and depending on your transfer mechanism may not resemble the
197
name on the Unix side.
198
 
199
   At this point, you can set any breakpoints you wish; when you are
200
ready to see your program run on the 29K board, use the GDB command
201
`run'.
202
 
203
   To stop debugging the remote program, use the GDB `detach' command.
204
 
205
   To return control of the PC to its console, use `tip' or `cu' once
206
again, after your GDB session has concluded, to attach to `EBMON'.  You
207
can then type the command `q' to shut down `EBMON', returning control
208
to the DOS command-line interpreter.  Type `CTTY con' to return command
209
input to the main DOS console, and type `~.' to leave `tip' or `cu'.
210
 
211

212
File: gdb.info,  Node: Remote Log,  Prev: gdb-EB29K,  Up: A29K Embedded
213
 
214
Remote log
215
..........
216
 
217
   The `target amd-eb' command creates a file `eb.log' in the current
218
working directory, to help debug problems with the connection.
219
`eb.log' records all the output from `EBMON', including echoes of the
220
commands sent to it.  Running `tail -f' on this file in another window
221
often helps to understand trouble with `EBMON', or unexpected events on
222
the PC side of the connection.
223
 
224

225
File: gdb.info,  Node: ARM,  Next: H8/300,  Prev: A29K Embedded,  Up: Embedded Processors
226
 
227
ARM
228
---
229
 
230
`target rdi DEV'
231
     ARM Angel monitor, via RDI library interface to ADP protocol.  You
232
     may use this target to communicate with both boards running the
233
     Angel monitor, or with the EmbeddedICE JTAG debug device.
234
 
235
`target rdp DEV'
236
     ARM Demon monitor.
237
 
238

239
File: gdb.info,  Node: H8/300,  Next: H8/500,  Prev: ARM,  Up: Embedded Processors
240
 
241
Hitachi H8/300
242
--------------
243
 
244
`target hms DEV'
245
     A Hitachi SH, H8/300, or H8/500 board, attached via serial line to
246
     your host.  Use special commands `device' and `speed' to control
247
     the serial line and the communications speed used.
248
 
249
`target e7000 DEV'
250
     E7000 emulator for Hitachi H8 and SH.
251
 
252
`target sh3 DEV'
253
`target sh3e DEV'
254
     Hitachi SH-3 and SH-3E target systems.
255
 
256
   When you select remote debugging to a Hitachi SH, H8/300, or H8/500
257
board, the `load' command downloads your program to the Hitachi board
258
and also opens it as the current executable target for GDB on your host
259
(like the `file' command).
260
 
261
   GDB needs to know these things to talk to your Hitachi SH, H8/300,
262
or H8/500:
263
 
264
  1. that you want to use `target hms', the remote debugging interface
265
     for Hitachi microprocessors, or `target e7000', the in-circuit
266
     emulator for the Hitachi SH and the Hitachi 300H.  (`target hms' is
267
     the default when GDB is configured specifically for the Hitachi SH,
268
     H8/300, or H8/500.)
269
 
270
  2. what serial device connects your host to your Hitachi board (the
271
     first serial device available on your host is the default).
272
 
273
  3. what speed to use over the serial device.
274
 
275
* Menu:
276
 
277
* Hitachi Boards::      Connecting to Hitachi boards.
278
* Hitachi ICE::         Using the E7000 In-Circuit Emulator.
279
* Hitachi Special::     Special GDB commands for Hitachi micros.
280
 
281

282
File: gdb.info,  Node: Hitachi Boards,  Next: Hitachi ICE,  Up: H8/300
283
 
284
Connecting to Hitachi boards
285
............................
286
 
287
   Use the special `GDB' command `device PORT' if you need to
288
explicitly set the serial device.  The default PORT is the first
289
available port on your host.  This is only necessary on Unix hosts,
290
where it is typically something like `/dev/ttya'.
291
 
292
   `GDB' has another special command to set the communications speed:
293
`speed BPS'.  This command also is only used from Unix hosts; on DOS
294
hosts, set the line speed as usual from outside GDB with the DOS `mode'
295
command (for instance, `mode com2:9600,n,8,1,p' for a 9600bps
296
connection).
297
 
298
   The `device' and `speed' commands are available only when you use a
299
Unix host to debug your Hitachi microprocessor programs.  If you use a
300
DOS host, GDB depends on an auxiliary terminate-and-stay-resident
301
program called `asynctsr' to communicate with the development board
302
through a PC serial port.  You must also use the DOS `mode' command to
303
set up the serial port on the DOS side.
304
 
305
   The following sample session illustrates the steps needed to start a
306
program under GDB control on an H8/300.  The example uses a sample
307
H8/300 program called `t.x'.  The procedure is the same for the Hitachi
308
SH and the H8/500.
309
 
310
   First hook up your development board.  In this example, we use a
311
board attached to serial port `COM2'; if you use a different serial
312
port, substitute its name in the argument of the `mode' command.  When
313
you call `asynctsr', the auxiliary comms program used by the debugger,
314
you give it just the numeric part of the serial port's name; for
315
example, `asyncstr 2' below runs `asyncstr' on `COM2'.
316
 
317
     C:\H8300\TEST> asynctsr 2
318
     C:\H8300\TEST> mode com2:9600,n,8,1,p
319
 
320
     Resident portion of MODE loaded
321
 
322
     COM2: 9600, n, 8, 1, p
323
 
324
     _Warning:_ We have noticed a bug in PC-NFS that conflicts with
325
     `asynctsr'.  If you also run PC-NFS on your DOS host, you may need
326
     to disable it, or even boot without it, to use `asynctsr' to
327
     control your development board.
328
 
329
   Now that serial communications are set up, and the development board
330
is connected, you can start up GDB.  Call `gdb' with the name of your
331
program as the argument.  `GDB' prompts you, as usual, with the prompt
332
`(gdb)'.  Use two special commands to begin your debugging session:
333
`target hms' to specify cross-debugging to the Hitachi board, and the
334
`load' command to download your program to the board.  `load' displays
335
the names of the program's sections, and a `*' for each 2K of data
336
downloaded.  (If you want to refresh GDB data on symbols or on the
337
executable file without downloading, use the GDB commands `file' or
338
`symbol-file'.  These commands, and `load' itself, are described in
339
*Note Commands to specify files: Files.)
340
 
341
     (eg-C:\H8300\TEST) gdb t.x
342
     GDB is free software and you are welcome to distribute copies
343
      of it under certain conditions; type "show copying" to see
344
      the conditions.
345
     There is absolutely no warranty for GDB; type "show warranty"
346
     for details.
347
     GDB 20010707, Copyright 1992 Free Software Foundation, Inc...
348
     (gdb) target hms
349
     Connected to remote H8/300 HMS system.
350
     (gdb) load t.x
351
     .text   : 0x8000 .. 0xabde ***********
352
     .data   : 0xabde .. 0xad30 *
353
     .stack  : 0xf000 .. 0xf014 *
354
 
355
   At this point, you're ready to run or debug your program.  From here
356
on, you can use all the usual GDB commands.  The `break' command sets
357
breakpoints; the `run' command starts your program; `print' or `x'
358
display data; the `continue' command resumes execution after stopping
359
at a breakpoint.  You can use the `help' command at any time to find
360
out more about GDB commands.
361
 
362
   Remember, however, that _operating system_ facilities aren't
363
available on your development board; for example, if your program hangs,
364
you can't send an interrupt--but you can press the RESET switch!
365
 
366
   Use the RESET button on the development board
367
   * to interrupt your program (don't use `ctl-C' on the DOS host--it
368
     has no way to pass an interrupt signal to the development board);
369
     and
370
 
371
   * to return to the GDB command prompt after your program finishes
372
     normally.  The communications protocol provides no other way for
373
     GDB to detect program completion.
374
 
375
   In either case, GDB sees the effect of a RESET on the development
376
board as a "normal exit" of your program.
377
 
378

379
File: gdb.info,  Node: Hitachi ICE,  Next: Hitachi Special,  Prev: Hitachi Boards,  Up: H8/300
380
 
381
Using the E7000 in-circuit emulator
382
...................................
383
 
384
   You can use the E7000 in-circuit emulator to develop code for either
385
the Hitachi SH or the H8/300H.  Use one of these forms of the `target
386
e7000' command to connect GDB to your E7000:
387
 
388
`target e7000 PORT SPEED'
389
     Use this form if your E7000 is connected to a serial port.  The
390
     PORT argument identifies what serial port to use (for example,
391
     `com2').  The third argument is the line speed in bits per second
392
     (for example, `9600').
393
 
394
`target e7000 HOSTNAME'
395
     If your E7000 is installed as a host on a TCP/IP network, you can
396
     just specify its hostname; GDB uses `telnet' to connect.
397
 
398

399
File: gdb.info,  Node: Hitachi Special,  Prev: Hitachi ICE,  Up: H8/300
400
 
401
Special GDB commands for Hitachi micros
402
.......................................
403
 
404
   Some GDB commands are available only for the H8/300:
405
 
406
`set machine h8300'
407
`set machine h8300h'
408
     Condition GDB for one of the two variants of the H8/300
409
     architecture with `set machine'.  You can use `show machine' to
410
     check which variant is currently in effect.
411
 
412

413
File: gdb.info,  Node: H8/500,  Next: i960,  Prev: H8/300,  Up: Embedded Processors
414
 
415
H8/500
416
------
417
 
418
`set memory MOD'
419
`show memory'
420
     Specify which H8/500 memory model (MOD) you are using with `set
421
     memory'; check which memory model is in effect with `show memory'.
422
     The accepted values for MOD are `small', `big', `medium', and
423
     `compact'.
424
 
425

426
File: gdb.info,  Node: i960,  Next: M32R/D,  Prev: H8/500,  Up: Embedded Processors
427
 
428
Intel i960
429
----------
430
 
431
`target mon960 DEV'
432
     MON960 monitor for Intel i960.
433
 
434
`target nindy DEVICENAME'
435
     An Intel 960 board controlled by a Nindy Monitor.  DEVICENAME is
436
     the name of the serial device to use for the connection, e.g.
437
     `/dev/ttya'.
438
 
439
   "Nindy" is a ROM Monitor program for Intel 960 target systems.  When
440
GDB is configured to control a remote Intel 960 using Nindy, you can
441
tell GDB how to connect to the 960 in several ways:
442
 
443
   * Through command line options specifying serial port, version of the
444
     Nindy protocol, and communications speed;
445
 
446
   * By responding to a prompt on startup;
447
 
448
   * By using the `target' command at any point during your GDB
449
     session.  *Note Commands for managing targets: Target Commands.
450
 
451
 
452
   With the Nindy interface to an Intel 960 board, `load' downloads
453
FILENAME to the 960 as well as adding its symbols in GDB.
454
 
455
* Menu:
456
 
457
* Nindy Startup::               Startup with Nindy
458
* Nindy Options::               Options for Nindy
459
* Nindy Reset::                 Nindy reset command
460
 
461

462
File: gdb.info,  Node: Nindy Startup,  Next: Nindy Options,  Up: i960
463
 
464
Startup with Nindy
465
..................
466
 
467
   If you simply start `gdb' without using any command-line options,
468
you are prompted for what serial port to use, _before_ you reach the
469
ordinary GDB prompt:
470
 
471
     Attach /dev/ttyNN -- specify NN, or "quit" to quit:
472
 
473
Respond to the prompt with whatever suffix (after `/dev/tty')
474
identifies the serial port you want to use.  You can, if you choose,
475
simply start up with no Nindy connection by responding to the prompt
476
with an empty line.  If you do this and later wish to attach to Nindy,
477
use `target' (*note Commands for managing targets: Target Commands.).
478
 
479

480
File: gdb.info,  Node: Nindy Options,  Next: Nindy Reset,  Prev: Nindy Startup,  Up: i960
481
 
482
Options for Nindy
483
.................
484
 
485
   These are the startup options for beginning your GDB session with a
486
Nindy-960 board attached:
487
 
488
`-r PORT'
489
     Specify the serial port name of a serial interface to be used to
490
     connect to the target system.  This option is only available when
491
     GDB is configured for the Intel 960 target architecture.  You may
492
     specify PORT as any of: a full pathname (e.g. `-r /dev/ttya'), a
493
     device name in `/dev' (e.g. `-r ttya'), or simply the unique
494
     suffix for a specific `tty' (e.g. `-r a').
495
 
496
`-O'
497
     (An uppercase letter "O", not a zero.)  Specify that GDB should use
498
     the "old" Nindy monitor protocol to connect to the target system.
499
     This option is only available when GDB is configured for the Intel
500
     960 target architecture.
501
 
502
          _Warning:_ if you specify `-O', but are actually trying to
503
          connect to a target system that expects the newer protocol,
504
          the connection fails, appearing to be a speed mismatch.  GDB
505
          repeatedly attempts to reconnect at several different line
506
          speeds.  You can abort this process with an interrupt.
507
 
508
`-brk'
509
     Specify that GDB should first send a `BREAK' signal to the target
510
     system, in an attempt to reset it, before connecting to a Nindy
511
     target.
512
 
513
          _Warning:_ Many target systems do not have the hardware that
514
          this requires; it only works with a few boards.
515
 
516
   The standard `-b' option controls the line speed used on the serial
517
port.
518
 
519

520
File: gdb.info,  Node: Nindy Reset,  Prev: Nindy Options,  Up: i960
521
 
522
Nindy reset command
523
...................
524
 
525
`reset'
526
     For a Nindy target, this command sends a "break" to the remote
527
     target system; this is only useful if the target has been equipped
528
     with a circuit to perform a hard reset (or some other interesting
529
     action) when a break is detected.
530
 
531

532
File: gdb.info,  Node: M32R/D,  Next: M68K,  Prev: i960,  Up: Embedded Processors
533
 
534
Mitsubishi M32R/D
535
-----------------
536
 
537
`target m32r DEV'
538
     Mitsubishi M32R/D ROM monitor.
539
 
540

541
File: gdb.info,  Node: M68K,  Next: M88K,  Prev: M32R/D,  Up: Embedded Processors
542
 
543
M68k
544
----
545
 
546
   The Motorola m68k configuration includes ColdFire support, and
547
target command for the following ROM monitors.
548
 
549
`target abug DEV'
550
     ABug ROM monitor for M68K.
551
 
552
`target cpu32bug DEV'
553
     CPU32BUG monitor, running on a CPU32 (M68K) board.
554
 
555
`target dbug DEV'
556
     dBUG ROM monitor for Motorola ColdFire.
557
 
558
`target est DEV'
559
     EST-300 ICE monitor, running on a CPU32 (M68K) board.
560
 
561
`target rom68k DEV'
562
     ROM 68K monitor, running on an M68K IDP board.
563
 
564
   If GDB is configured with `m68*-ericsson-*', it will instead have
565
only a single special target command:
566
 
567
`target es1800 DEV'
568
     ES-1800 emulator for M68K.
569
 
570
   [context?]
571
 
572
`target rombug DEV'
573
     ROMBUG ROM monitor for OS/9000.
574
 
575

576
File: gdb.info,  Node: M88K,  Next: MIPS Embedded,  Prev: M68K,  Up: Embedded Processors
577
 
578
M88K
579
----
580
 
581
`target bug DEV'
582
     BUG monitor, running on a MVME187 (m88k) board.
583
 
584

585
File: gdb.info,  Node: MIPS Embedded,  Next: PA,  Prev: M88K,  Up: Embedded Processors
586
 
587
MIPS Embedded
588
-------------
589
 
590
   GDB can use the MIPS remote debugging protocol to talk to a MIPS
591
board attached to a serial line.  This is available when you configure
592
GDB with `--target=mips-idt-ecoff'.
593
 
594
   Use these GDB commands to specify the connection to your target
595
board:
596
 
597
`target mips PORT'
598
     To run a program on the board, start up `gdb' with the name of
599
     your program as the argument.  To connect to the board, use the
600
     command `target mips PORT', where PORT is the name of the serial
601
     port connected to the board.  If the program has not already been
602
     downloaded to the board, you may use the `load' command to
603
     download it.  You can then use all the usual GDB commands.
604
 
605
     For example, this sequence connects to the target board through a
606
     serial port, and loads and runs a program called PROG through the
607
     debugger:
608
 
609
          host$ gdb PROG
610
          GDB is free software and ...
611
          (gdb) target mips /dev/ttyb
612
          (gdb) load PROG
613
          (gdb) run
614
 
615
`target mips HOSTNAME:PORTNUMBER'
616
     On some GDB host configurations, you can specify a TCP connection
617
     (for instance, to a serial line managed by a terminal
618
     concentrator) instead of a serial port, using the syntax
619
     `HOSTNAME:PORTNUMBER'.
620
 
621
`target pmon PORT'
622
     PMON ROM monitor.
623
 
624
`target ddb PORT'
625
     NEC's DDB variant of PMON for Vr4300.
626
 
627
`target lsi PORT'
628
     LSI variant of PMON.
629
 
630
`target r3900 DEV'
631
     Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
632
 
633
`target array DEV'
634
     Array Tech LSI33K RAID controller board.
635
 
636
GDB also supports these special commands for MIPS targets:
637
 
638
`set processor ARGS'
639
`show processor'
640
     Use the `set processor' command to set the type of MIPS processor
641
     when you want to access processor-type-specific registers.  For
642
     example, `set processor R3041' tells GDB to use the CPU registers
643
     appropriate for the 3041 chip.  Use the `show processor' command
644
     to see what MIPS processor GDB is using.  Use the `info reg'
645
     command to see what registers GDB is using.
646
 
647
`set mipsfpu double'
648
`set mipsfpu single'
649
`set mipsfpu none'
650
`show mipsfpu'
651
     If your target board does not support the MIPS floating point
652
     coprocessor, you should use the command `set mipsfpu none' (if you
653
     need this, you may wish to put the command in your GDB init file).
654
     This tells GDB how to find the return value of functions which
655
     return floating point values.  It also allows GDB to avoid saving
656
     the floating point registers when calling functions on the board.
657
     If you are using a floating point coprocessor with only single
658
     precision floating point support, as on the R4650 processor, use
659
     the command `set mipsfpu single'.  The default double precision
660
     floating point coprocessor may be selected using `set mipsfpu
661
     double'.
662
 
663
     In previous versions the only choices were double precision or no
664
     floating point, so `set mipsfpu on' will select double precision
665
     and `set mipsfpu off' will select no floating point.
666
 
667
     As usual, you can inquire about the `mipsfpu' variable with `show
668
     mipsfpu'.
669
 
670
`set remotedebug N'
671
`show remotedebug'
672
     You can see some debugging information about communications with
673
     the board by setting the `remotedebug' variable.  If you set it to
674
     `1' using `set remotedebug 1', every packet is displayed.  If you
675
     set it to `2', every character is displayed.  You can check the
676
     current value at any time with the command `show remotedebug'.
677
 
678
`set timeout SECONDS'
679
`set retransmit-timeout SECONDS'
680
`show timeout'
681
`show retransmit-timeout'
682
     You can control the timeout used while waiting for a packet, in
683
     the MIPS remote protocol, with the `set timeout SECONDS' command.
684
     The default is 5 seconds.  Similarly, you can control the timeout
685
     used while waiting for an acknowledgement of a packet with the `set
686
     retransmit-timeout SECONDS' command.  The default is 3 seconds.
687
     You can inspect both values with `show timeout' and `show
688
     retransmit-timeout'.  (These commands are _only_ available when
689
     GDB is configured for `--target=mips-idt-ecoff'.)
690
 
691
     The timeout set by `set timeout' does not apply when GDB is
692
     waiting for your program to stop.  In that case, GDB waits forever
693
     because it has no way of knowing how long the program is going to
694
     run before stopping.
695
 
696

697
File: gdb.info,  Node: PowerPC,  Next: SH,  Prev: PA,  Up: Embedded Processors
698
 
699
PowerPC
700
-------
701
 
702
`target dink32 DEV'
703
     DINK32 ROM monitor.
704
 
705
`target ppcbug DEV'
706
 
707
`target ppcbug1 DEV'
708
     PPCBUG ROM monitor for PowerPC.
709
 
710
`target sds DEV'
711
     SDS monitor, running on a PowerPC board (such as Motorola's ADS).
712
 
713

714
File: gdb.info,  Node: PA,  Next: PowerPC,  Prev: MIPS Embedded,  Up: Embedded Processors
715
 
716
HP PA Embedded
717
--------------
718
 
719
`target op50n DEV'
720
     OP50N monitor, running on an OKI HPPA board.
721
 
722
`target w89k DEV'
723
     W89K monitor, running on a Winbond HPPA board.
724
 
725

726
File: gdb.info,  Node: SH,  Next: Sparclet,  Prev: PowerPC,  Up: Embedded Processors
727
 
728
Hitachi SH
729
----------
730
 
731
`target hms DEV'
732
     A Hitachi SH board attached via serial line to your host.  Use
733
     special commands `device' and `speed' to control the serial line
734
     and the communications speed used.
735
 
736
`target e7000 DEV'
737
     E7000 emulator for Hitachi SH.
738
 
739
`target sh3 DEV'
740
 
741
`target sh3e DEV'
742
     Hitachi SH-3 and SH-3E target systems.
743
 
744

745
File: gdb.info,  Node: Sparclet,  Next: Sparclite,  Prev: SH,  Up: Embedded Processors
746
 
747
Tsqware Sparclet
748
----------------
749
 
750
   GDB enables developers to debug tasks running on Sparclet targets
751
from a Unix host.  GDB uses code that runs on both the Unix host and on
752
the Sparclet target.  The program `gdb' is installed and executed on
753
the Unix host.
754
 
755
`remotetimeout ARGS'
756
     GDB supports the option `remotetimeout'.  This option is set by
757
     the user, and  ARGS represents the number of seconds GDB waits for
758
     responses.
759
 
760
   When compiling for debugging, include the options `-g' to get debug
761
information and `-Ttext' to relocate the program to where you wish to
762
load it on the target.  You may also want to add the options `-n' or
763
`-N' in order to reduce the size of the sections.  Example:
764
 
765
     sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
766
 
767
   You can use `objdump' to verify that the addresses are what you
768
intended:
769
 
770
     sparclet-aout-objdump --headers --syms prog
771
 
772
   Once you have set your Unix execution search path to find GDB, you
773
are ready to run GDB.  From your Unix host, run `gdb' (or
774
`sparclet-aout-gdb', depending on your installation).
775
 
776
   GDB comes up showing the prompt:
777
 
778
     (gdbslet)
779
 
780
* Menu:
781
 
782
* Sparclet File::                Setting the file to debug
783
* Sparclet Connection::          Connecting to Sparclet
784
* Sparclet Download::            Sparclet download
785
* Sparclet Execution::           Running and debugging
786
 
787

788
File: gdb.info,  Node: Sparclet File,  Next: Sparclet Connection,  Up: Sparclet
789
 
790
Setting file to debug
791
.....................
792
 
793
   The GDB command `file' lets you choose with program to debug.
794
 
795
     (gdbslet) file prog
796
 
797
   GDB then attempts to read the symbol table of `prog'.  GDB locates
798
the file by searching the directories listed in the command search path.
799
If the file was compiled with debug information (option "-g"), source
800
files will be searched as well.  GDB locates the source files by
801
searching the directories listed in the directory search path (*note
802
Your program's environment: Environment.).  If it fails to find a file,
803
it displays a message such as:
804
 
805
     prog: No such file or directory.
806
 
807
   When this happens, add the appropriate directories to the search
808
paths with the GDB commands `path' and `dir', and execute the `target'
809
command again.
810
 
811

812
File: gdb.info,  Node: Sparclet Connection,  Next: Sparclet Download,  Prev: Sparclet File,  Up: Sparclet
813
 
814
Connecting to Sparclet
815
......................
816
 
817
   The GDB command `target' lets you connect to a Sparclet target.  To
818
connect to a target on serial port "`ttya'", type:
819
 
820
     (gdbslet) target sparclet /dev/ttya
821
     Remote target sparclet connected to /dev/ttya
822
     main () at ../prog.c:3
823
 
824
   GDB displays messages like these:
825
 
826
     Connected to ttya.
827
 
828

829
File: gdb.info,  Node: Sparclet Download,  Next: Sparclet Execution,  Prev: Sparclet Connection,  Up: Sparclet
830
 
831
Sparclet download
832
.................
833
 
834
   Once connected to the Sparclet target, you can use the GDB `load'
835
command to download the file from the host to the target.  The file
836
name and load offset should be given as arguments to the `load' command.
837
Since the file format is aout, the program must be loaded to the
838
starting address.  You can use `objdump' to find out what this value
839
is.  The load offset is an offset which is added to the VMA (virtual
840
memory address) of each of the file's sections.  For instance, if the
841
program `prog' was linked to text address 0x1201000, with data at
842
0x12010160 and bss at 0x12010170, in GDB, type:
843
 
844
     (gdbslet) load prog 0x12010000
845
     Loading section .text, size 0xdb0 vma 0x12010000
846
 
847
   If the code is loaded at a different address then what the program
848
was linked to, you may need to use the `section' and `add-symbol-file'
849
commands to tell GDB where to map the symbol table.
850
 
851

852
File: gdb.info,  Node: Sparclet Execution,  Prev: Sparclet Download,  Up: Sparclet
853
 
854
Running and debugging
855
.....................
856
 
857
   You can now begin debugging the task using GDB's execution control
858
commands, `b', `step', `run', etc.  See the GDB manual for the list of
859
commands.
860
 
861
     (gdbslet) b main
862
     Breakpoint 1 at 0x12010000: file prog.c, line 3.
863
     (gdbslet) run
864
     Starting program: prog
865
     Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
866
     3        char *symarg = 0;
867
     (gdbslet) step
868
     4        char *execarg = "hello!";
869
     (gdbslet)
870
 
871

872
File: gdb.info,  Node: Sparclite,  Next: ST2000,  Prev: Sparclet,  Up: Embedded Processors
873
 
874
Fujitsu Sparclite
875
-----------------
876
 
877
`target sparclite DEV'
878
     Fujitsu sparclite boards, used only for the purpose of loading.
879
     You must use an additional command to debug the program.  For
880
     example: target remote DEV using GDB standard remote protocol.
881
 
882

883
File: gdb.info,  Node: ST2000,  Next: Z8000,  Prev: Sparclite,  Up: Embedded Processors
884
 
885
Tandem ST2000
886
-------------
887
 
888
   GDB may be used with a Tandem ST2000 phone switch, running Tandem's
889
STDBUG protocol.
890
 
891
   To connect your ST2000 to the host system, see the manufacturer's
892
manual.  Once the ST2000 is physically attached, you can run:
893
 
894
     target st2000 DEV SPEED
895
 
896
to establish it as your debugging environment.  DEV is normally the
897
name of a serial device, such as `/dev/ttya', connected to the ST2000
898
via a serial line.  You can instead specify DEV as a TCP connection
899
(for example, to a serial line attached via a terminal concentrator)
900
using the syntax `HOSTNAME:PORTNUMBER'.
901
 
902
   The `load' and `attach' commands are _not_ defined for this target;
903
you must load your program into the ST2000 as you normally would for
904
standalone operation.  GDB reads debugging information (such as
905
symbols) from a separate, debugging version of the program available on
906
your host computer.
907
 
908
   These auxiliary GDB commands are available to help you with the
909
ST2000 environment:
910
 
911
`st2000 COMMAND'
912
     Send a COMMAND to the STDBUG monitor.  See the manufacturer's
913
     manual for available commands.
914
 
915
`connect'
916
     Connect the controlling terminal to the STDBUG command monitor.
917
     When you are done interacting with STDBUG, typing either of two
918
     character sequences gets you back to the GDB command prompt:
919
     `~.' (Return, followed by tilde and period) or `~'
920
     (Return, followed by tilde and control-D).
921
 
922

923
File: gdb.info,  Node: Z8000,  Prev: ST2000,  Up: Embedded Processors
924
 
925
Zilog Z8000
926
-----------
927
 
928
   When configured for debugging Zilog Z8000 targets, GDB includes a
929
Z8000 simulator.
930
 
931
   For the Z8000 family, `target sim' simulates either the Z8002 (the
932
unsegmented variant of the Z8000 architecture) or the Z8001 (the
933
segmented variant).  The simulator recognizes which architecture is
934
appropriate by inspecting the object code.
935
 
936
`target sim ARGS'
937
     Debug programs on a simulated CPU.  If the simulator supports setup
938
     options, specify them via ARGS.
939
 
940
After specifying this target, you can debug programs for the simulated
941
CPU in the same style as programs for your host computer; use the
942
`file' command to load a new program image, the `run' command to run
943
your program, and so on.
944
 
945
   As well as making available all the usual machine registers (*note
946
Registers: Registers.), the Z8000 simulator provides three additional
947
items of information as specially named registers:
948
 
949
`cycles'
950
     Counts clock-ticks in the simulator.
951
 
952
`insts'
953
     Counts instructions run in the simulator.
954
 
955
`time'
956
     Execution time in 60ths of a second.
957
 
958
   You can refer to these values in GDB expressions with the usual
959
conventions; for example, `b fputc if $cycles>5000' sets a conditional
960
breakpoint that suspends only after at least 5000 simulated clock ticks.
961
 
962

963
File: gdb.info,  Node: Architectures,  Prev: Embedded Processors,  Up: Configurations
964
 
965
Architectures
966
=============
967
 
968
   This section describes characteristics of architectures that affect
969
all uses of GDB with the architecture, both native and cross.
970
 
971
* Menu:
972
 
973
* A29K::
974
* Alpha::
975
* MIPS::
976
 
977

978
File: gdb.info,  Node: A29K,  Next: Alpha,  Up: Architectures
979
 
980
A29K
981
----
982
 
983
`set rstack_high_address ADDRESS'
984
     On AMD 29000 family processors, registers are saved in a separate
985
     "register stack".  There is no way for GDB to determine the extent
986
     of this stack.  Normally, GDB just assumes that the stack is
987
     "large enough".  This may result in GDB referencing memory
988
     locations that do not exist.  If necessary, you can get around
989
     this problem by specifying the ending address of the register
990
     stack with the `set rstack_high_address' command.  The argument
991
     should be an address, which you probably want to precede with `0x'
992
     to specify in hexadecimal.
993
 
994
`show rstack_high_address'
995
     Display the current limit of the register stack, on AMD 29000
996
     family processors.
997
 
998

999
File: gdb.info,  Node: Alpha,  Next: MIPS,  Prev: A29K,  Up: Architectures
1000
 
1001
Alpha
1002
-----
1003
 
1004
   See the following section.
1005
 
1006

1007
File: gdb.info,  Node: MIPS,  Prev: Alpha,  Up: Architectures
1008
 
1009
MIPS
1010
----
1011
 
1012
   Alpha- and MIPS-based computers use an unusual stack frame, which
1013
sometimes requires GDB to search backward in the object code to find
1014
the beginning of a function.
1015
 
1016
   To improve response time (especially for embedded applications, where
1017
GDB may be restricted to a slow serial line for this search) you may
1018
want to limit the size of this search, using one of these commands:
1019
 
1020
`set heuristic-fence-post LIMIT'
1021
     Restrict GDB to examining at most LIMIT bytes in its search for
1022
     the beginning of a function.  A value of 0 (the default) means
1023
     there is no limit.  However, except for 0, the larger the limit
1024
     the more bytes `heuristic-fence-post' must search and therefore
1025
     the longer it takes to run.
1026
 
1027
`show heuristic-fence-post'
1028
     Display the current limit.
1029
 
1030
These commands are available _only_ when GDB is configured for
1031
debugging programs on Alpha or MIPS processors.
1032
 
1033

1034
File: gdb.info,  Node: Controlling GDB,  Next: Sequences,  Prev: Configurations,  Up: Top
1035
 
1036
Controlling GDB
1037
***************
1038
 
1039
   You can alter the way GDB interacts with you by using the `set'
1040
command.  For commands controlling how GDB displays data, see *Note
1041
Print settings: Print Settings.  Other settings are described here.
1042
 
1043
* Menu:
1044
 
1045
* Prompt::                      Prompt
1046
* Editing::                     Command editing
1047
* History::                     Command history
1048
* Screen Size::                 Screen size
1049
* Numbers::                     Numbers
1050
* Messages/Warnings::           Optional warnings and messages
1051
* Debugging Output::            Optional messages about internal happenings
1052
 
1053

1054
File: gdb.info,  Node: Prompt,  Next: Editing,  Up: Controlling GDB
1055
 
1056
Prompt
1057
======
1058
 
1059
   GDB indicates its readiness to read a command by printing a string
1060
called the "prompt".  This string is normally `(gdb)'.  You can change
1061
the prompt string with the `set prompt' command.  For instance, when
1062
debugging GDB with GDB, it is useful to change the prompt in one of the
1063
GDB sessions so that you can always tell which one you are talking to.
1064
 
1065
   _Note:_  `set prompt' does not add a space for you after the prompt
1066
you set.  This allows you to set a prompt which ends in a space or a
1067
prompt that does not.
1068
 
1069
`set prompt NEWPROMPT'
1070
     Directs GDB to use NEWPROMPT as its prompt string henceforth.
1071
 
1072
`show prompt'
1073
     Prints a line of the form: `Gdb's prompt is: YOUR-PROMPT'
1074
 
1075

1076
File: gdb.info,  Node: Editing,  Next: History,  Prev: Prompt,  Up: Controlling GDB
1077
 
1078
Command editing
1079
===============
1080
 
1081
   GDB reads its input commands via the "readline" interface.  This GNU
1082
library provides consistent behavior for programs which provide a
1083
command line interface to the user.  Advantages are GNU Emacs-style or
1084
"vi"-style inline editing of commands, `csh'-like history substitution,
1085
and a storage and recall of command history across debugging sessions.
1086
 
1087
   You may control the behavior of command line editing in GDB with the
1088
command `set'.
1089
 
1090
`set editing'
1091
`set editing on'
1092
     Enable command line editing (enabled by default).
1093
 
1094
`set editing off'
1095
     Disable command line editing.
1096
 
1097
`show editing'
1098
     Show whether command line editing is enabled.
1099
 
1100

1101
File: gdb.info,  Node: History,  Next: Screen Size,  Prev: Editing,  Up: Controlling GDB
1102
 
1103
Command history
1104
===============
1105
 
1106
   GDB can keep track of the commands you type during your debugging
1107
sessions, so that you can be certain of precisely what happened.  Use
1108
these commands to manage the GDB command history facility.
1109
 
1110
`set history filename FNAME'
1111
     Set the name of the GDB command history file to FNAME.  This is
1112
     the file where GDB reads an initial command history list, and
1113
     where it writes the command history from this session when it
1114
     exits.  You can access this list through history expansion or
1115
     through the history command editing characters listed below.  This
1116
     file defaults to the value of the environment variable
1117
     `GDBHISTFILE', or to `./.gdb_history' (`./_gdb_history' on MS-DOS)
1118
     if this variable is not set.
1119
 
1120
`set history save'
1121
`set history save on'
1122
     Record command history in a file, whose name may be specified with
1123
     the `set history filename' command.  By default, this option is
1124
     disabled.
1125
 
1126
`set history save off'
1127
     Stop recording command history in a file.
1128
 
1129
`set history size SIZE'
1130
     Set the number of commands which GDB keeps in its history list.
1131
     This defaults to the value of the environment variable `HISTSIZE',
1132
     or to 256 if this variable is not set.
1133
 
1134
   History expansion assigns special meaning to the character `!'.
1135
 
1136
   Since `!' is also the logical not operator in C, history expansion
1137
is off by default. If you decide to enable history expansion with the
1138
`set history expansion on' command, you may sometimes need to follow
1139
`!' (when it is used as logical not, in an expression) with a space or
1140
a tab to prevent it from being expanded.  The readline history
1141
facilities do not attempt substitution on the strings `!=' and `!(',
1142
even when history expansion is enabled.
1143
 
1144
   The commands to control history expansion are:
1145
 
1146
`set history expansion on'
1147
`set history expansion'
1148
     Enable history expansion.  History expansion is off by default.
1149
 
1150
`set history expansion off'
1151
     Disable history expansion.
1152
 
1153
     The readline code comes with more complete documentation of
1154
     editing and history expansion features.  Users unfamiliar with GNU
1155
     Emacs or `vi' may wish to read it.
1156
 
1157
`show history'
1158
`show history filename'
1159
`show history save'
1160
`show history size'
1161
`show history expansion'
1162
     These commands display the state of the GDB history parameters.
1163
     `show history' by itself displays all four states.
1164
 
1165
`show commands'
1166
     Display the last ten commands in the command history.
1167
 
1168
`show commands N'
1169
     Print ten commands centered on command number N.
1170
 
1171
`show commands +'
1172
     Print ten commands just after the commands last printed.
1173
 
1174

1175
File: gdb.info,  Node: Screen Size,  Next: Numbers,  Prev: History,  Up: Controlling GDB
1176
 
1177
Screen size
1178
===========
1179
 
1180
   Certain commands to GDB may produce large amounts of information
1181
output to the screen.  To help you read all of it, GDB pauses and asks
1182
you for input at the end of each page of output.  Type  when you
1183
want to continue the output, or `q' to discard the remaining output.
1184
Also, the screen width setting determines when to wrap lines of output.
1185
Depending on what is being printed, GDB tries to break the line at a
1186
readable place, rather than simply letting it overflow onto the
1187
following line.
1188
 
1189
   Normally GDB knows the size of the screen from the terminal driver
1190
software.  For example, on Unix GDB uses the termcap data base together
1191
with the value of the `TERM' environment variable and the `stty rows'
1192
and `stty cols' settings.  If this is not correct, you can override it
1193
with the `set height' and `set width' commands:
1194
 
1195
`set height LPP'
1196
`show height'
1197
`set width CPL'
1198
`show width'
1199
     These `set' commands specify a screen height of LPP lines and a
1200
     screen width of CPL characters.  The associated `show' commands
1201
     display the current settings.
1202
 
1203
     If you specify a height of zero lines, GDB does not pause during
1204
     output no matter how long the output is.  This is useful if output
1205
     is to a file or to an editor buffer.
1206
 
1207
     Likewise, you can specify `set width 0' to prevent GDB from
1208
     wrapping its output.
1209
 
1210

1211
File: gdb.info,  Node: Numbers,  Next: Messages/Warnings,  Prev: Screen Size,  Up: Controlling GDB
1212
 
1213
Numbers
1214
=======
1215
 
1216
   You can always enter numbers in octal, decimal, or hexadecimal in
1217
GDB by the usual conventions: octal numbers begin with `0', decimal
1218
numbers end with `.', and hexadecimal numbers begin with `0x'.  Numbers
1219
that begin with none of these are, by default, entered in base 10;
1220
likewise, the default display for numbers--when no particular format is
1221
specified--is base 10.  You can change the default base for both input
1222
and output with the `set radix' command.
1223
 
1224
`set input-radix BASE'
1225
     Set the default base for numeric input.  Supported choices for
1226
     BASE are decimal 8, 10, or 16.  BASE must itself be specified
1227
     either unambiguously or using the current default radix; for
1228
     example, any of
1229
 
1230
          set radix 012
1231
          set radix 10.
1232
          set radix 0xa
1233
 
1234
     sets the base to decimal.  On the other hand, `set radix 10'
1235
     leaves the radix unchanged no matter what it was.
1236
 
1237
`set output-radix BASE'
1238
     Set the default base for numeric display.  Supported choices for
1239
     BASE are decimal 8, 10, or 16.  BASE must itself be specified
1240
     either unambiguously or using the current default radix.
1241
 
1242
`show input-radix'
1243
     Display the current default base for numeric input.
1244
 
1245
`show output-radix'
1246
     Display the current default base for numeric display.
1247
 
1248

1249
File: gdb.info,  Node: Messages/Warnings,  Next: Debugging Output,  Prev: Numbers,  Up: Controlling GDB
1250
 
1251
Optional warnings and messages
1252
==============================
1253
 
1254
   By default, GDB is silent about its inner workings.  If you are
1255
running on a slow machine, you may want to use the `set verbose'
1256
command.  This makes GDB tell you when it does a lengthy internal
1257
operation, so you will not think it has crashed.
1258
 
1259
   Currently, the messages controlled by `set verbose' are those which
1260
announce that the symbol table for a source file is being read; see
1261
`symbol-file' in *Note Commands to specify files: Files.
1262
 
1263
`set verbose on'
1264
     Enables GDB output of certain informational messages.
1265
 
1266
`set verbose off'
1267
     Disables GDB output of certain informational messages.
1268
 
1269
`show verbose'
1270
     Displays whether `set verbose' is on or off.
1271
 
1272
   By default, if GDB encounters bugs in the symbol table of an object
1273
file, it is silent; but if you are debugging a compiler, you may find
1274
this information useful (*note Errors reading symbol files: Symbol
1275
Errors.).
1276
 
1277
`set complaints LIMIT'
1278
     Permits GDB to output LIMIT complaints about each type of unusual
1279
     symbols before becoming silent about the problem.  Set LIMIT to
1280
     zero to suppress all complaints; set it to a large number to
1281
     prevent complaints from being suppressed.
1282
 
1283
`show complaints'
1284
     Displays how many symbol complaints GDB is permitted to produce.
1285
 
1286
   By default, GDB is cautious, and asks what sometimes seems to be a
1287
lot of stupid questions to confirm certain commands.  For example, if
1288
you try to run a program which is already running:
1289
 
1290
     (gdb) run
1291
     The program being debugged has been started already.
1292
     Start it from the beginning? (y or n)
1293
 
1294
   If you are willing to unflinchingly face the consequences of your own
1295
commands, you can disable this "feature":
1296
 
1297
`set confirm off'
1298
     Disables confirmation requests.
1299
 
1300
`set confirm on'
1301
     Enables confirmation requests (the default).
1302
 
1303
`show confirm'
1304
     Displays state of confirmation requests.
1305
 
1306

1307
File: gdb.info,  Node: Debugging Output,  Prev: Messages/Warnings,  Up: Controlling GDB
1308
 
1309
Optional messages about internal happenings
1310
===========================================
1311
 
1312
`set debug arch'
1313
     Turns on or off display of gdbarch debugging info. The default is
1314
     off
1315
 
1316
`show debug arch'
1317
     Displays the current state of displaying gdbarch debugging info.
1318
 
1319
`set debug event'
1320
     Turns on or off display of GDB event debugging info. The default
1321
     is off.
1322
 
1323
`show debug event'
1324
     Displays the current state of displaying GDB event debugging info.
1325
 
1326
`set debug expression'
1327
     Turns on or off display of GDB expression debugging info. The
1328
     default is off.
1329
 
1330
`show debug expression'
1331
     Displays the current state of displaying GDB expression debugging
1332
     info.
1333
 
1334
`set debug overload'
1335
     Turns on or off display of GDB C++ overload debugging info. This
1336
     includes info such as ranking of functions, etc. The default is
1337
     off.
1338
 
1339
`show debug overload'
1340
     Displays the current state of displaying GDB C++ overload
1341
     debugging info.
1342
 
1343
`set debug remote'
1344
     Turns on or off display of reports on all packets sent back and
1345
     forth across the serial line to the remote machine.  The info is
1346
     printed on the GDB standard output stream. The default is off.
1347
 
1348
`show debug remote'
1349
     Displays the state of display of remote packets.
1350
 
1351
`set debug serial'
1352
     Turns on or off display of GDB serial debugging info. The default
1353
     is off.
1354
 
1355
`show debug serial'
1356
     Displays the current state of displaying GDB serial debugging info.
1357
 
1358
`set debug target'
1359
     Turns on or off display of GDB target debugging info. This info
1360
     includes what is going on at the target level of GDB, as it
1361
     happens. The default is off.
1362
 
1363
`show debug target'
1364
     Displays the current state of displaying GDB target debugging info.
1365
 
1366
`set debug varobj'
1367
     Turns on or off display of GDB variable object debugging info. The
1368
     default is off.
1369
 
1370
`show debug varobj'
1371
     Displays the current state of displaying GDB variable object
1372
     debugging info.
1373
 
1374

1375
File: gdb.info,  Node: Sequences,  Next: Emacs,  Prev: Controlling GDB,  Up: Top
1376
 
1377
Canned Sequences of Commands
1378
****************************
1379
 
1380
   Aside from breakpoint commands (*note Breakpoint command lists:
1381
Break Commands.), GDB provides two ways to store sequences of commands
1382
for execution as a unit: user-defined commands and command files.
1383
 
1384
* Menu:
1385
 
1386
* Define::                      User-defined commands
1387
* Hooks::                       User-defined command hooks
1388
* Command Files::               Command files
1389
* Output::                      Commands for controlled output
1390
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.