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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [doc/] [gdb.info-10] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 362 markom
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
2 106 markom
 
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 Eighth Edition, March 2000, of `Debugging with GDB: the
11
GNU Source-Level Debugger' for GDB Version 5.0.
12
 
13
   Copyright (C) 1988-2000 Free Software Foundation, Inc.
14
 
15
   Permission is granted to make and distribute verbatim copies of this
16
manual provided the copyright notice and this permission notice are
17
preserved on all copies.
18
 
19
   Permission is granted to copy and distribute modified versions of
20
this manual under the conditions for verbatim copying, provided also
21
that the entire resulting derived work is distributed under the terms
22
of a permission notice identical to this one.
23
 
24
   Permission is granted to copy and distribute translations of this
25
manual into another language, under the above conditions for modified
26
versions.
27
 
28

29
File: gdb.info,  Node: GDB/MI Command Description Format,  Next: GDB/MI Breakpoint Table Commands,  Prev: GDB/MI Output Records,  Up: GDB/MI
30
 
31
GDB/MI Command Description Format
32
=================================
33
 
34
   The remaining sections describe blocks of commands.  Each block of
35
commands is laid out in a fashion similar to this chapter.
36
 
37
   Note the the line breaks shown in the examples are here only for
38
readability. They don't appear in the real output.  Also note that the
39
commands with a non-available example (N.A.) are not yet implemented.
40
 
41
Motivation
42
----------
43
 
44
   The motivation for this collection of commands
45
 
46
Introduction
47
------------
48
 
49
   A brief introduction to this collection of commands as a whole.
50
 
51
Commands
52
--------
53
 
54
   For each command in the block, the following is described:
55
 
56
Synopsis
57
........
58
 
59
      -command ARGS...
60
 
61
GDB Command
62
...........
63
 
64
   The corresponding GDB CLI command.
65
 
66
Result
67
......
68
 
69
Out-of-band
70
...........
71
 
72
Notes
73
.....
74
 
75
Example
76
.......
77
 
78

79
File: gdb.info,  Node: GDB/MI Breakpoint Table Commands,  Next: GDB/MI Data Manipulation,  Prev: GDB/MI Command Description Format,  Up: GDB/MI
80
 
81
GDB/MI Breakpoint table commands
82
================================
83
 
84
   This section documents GDB/MI commands for manipulating breakpoints.
85
 
86
The `-break-after' Command
87
--------------------------
88
 
89
Synopsis
90
........
91
 
92
      -break-after NUMBER COUNT
93
 
94
   The breakpoint number NUMBER is not in effect until it has been hit
95
COUNT times.  To see how this is reflected in the output of the
96
`-break-list' command, see the description of the `-break-list' command
97
below.
98
 
99
GDB Command
100
...........
101
 
102
   The corresponding GDB command is `ignore'.
103
 
104
Example
105
.......
106
 
107
     (gdb)
108
     -break-insert main
109
     ^done,bkpt={number="1",addr="0x000100d0",file="hello.c",line="5"}
110
     (gdb)
111
     -break-after 1 3
112
     ~
113
     ^done
114
     (gdb)
115
     -break-list
116
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
117
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
118
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
119
     ignore="3"}}
120
     (gdb)
121
 
122
-break-condition
123
----------------
124
 
125
Synopsis
126
........
127
 
128
      -break-condition NUMBER EXPR
129
 
130
   Breakpoint NUMBER will stop the program only if the condition in
131
EXPR is true.  The condition becomes part of the `-break-list' output
132
(see the description of the `-break-list' command below).
133
 
134
GDB Command
135
...........
136
 
137
   The corresponding GDB command is `condition'.
138
 
139
Example
140
.......
141
 
142
     (gdb)
143
     -break-condition 1 1
144
     ^done
145
     (gdb)
146
     -break-list
147
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
148
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
149
     addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
150
     times="0",ignore="3"}}
151
     (gdb)
152
 
153
The `-break-delete' Command
154
---------------------------
155
 
156
Synopsis
157
........
158
 
159
      -break-delete ( BREAKPOINT )+
160
 
161
   Delete the breakpoint(s) whose number(s) are specified in the
162
argument list. This is obviously reflected in the breakpoint list.
163
 
164
GDB command
165
...........
166
 
167
   The corresponding GDB command is `delete'.
168
 
169
Example
170
.......
171
 
172
     (gdb)
173
     -break-delete 1
174
     ^done
175
     (gdb)
176
     -break-list
177
     ^done,BreakpointTable={}
178
     (gdb)
179
 
180
The `-break-disable' Command
181
----------------------------
182
 
183
Synopsis
184
........
185
 
186
      -break-disable ( BREAKPOINT )+
187
 
188
   Disable the named BREAKPOINT(s).  The field `enabled' in the break
189
list is now set to `n' for the named BREAKPOINT(s).
190
 
191
GDB Command
192
...........
193
 
194
   The corresponding GDB command is `disable'.
195
 
196
Example
197
.......
198
 
199
     (gdb)
200
     -break-disable 2
201
     ^done
202
     (gdb)
203
     -break-list
204
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
205
     bkpt={number="2",type="breakpoint",disp="keep",enabled="n",
206
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
207
     (gdb)
208
 
209
The `-break-enable' Command
210
---------------------------
211
 
212
Synopsis
213
........
214
 
215
      -break-enable ( BREAKPOINT )+
216
 
217
   Enable (previously disabled) BREAKPOINT(s).
218
 
219
GDB Command
220
...........
221
 
222
   The corresponding GDB command is `enable'.
223
 
224
Example
225
.......
226
 
227
     (gdb)
228
     -break-enable 2
229
     ^done
230
     (gdb)
231
     -break-list
232
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
233
     bkpt={number="2",type="breakpoint",disp="keep",enabled="y",
234
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
235
     (gdb)
236
 
237
The `-break-info' Command
238
-------------------------
239
 
240
Synopsis
241
........
242
 
243
      -break-info BREAKPOINT
244
 
245
   Get information about a single breakpoint.
246
 
247
GDB command
248
...........
249
 
250
   The corresponding GDB command is `info break BREAKPOINT'.
251
 
252
Example
253
.......
254
 
255
   N.A.
256
 
257
The `-break-insert' Command
258
---------------------------
259
 
260
Synopsis
261
........
262
 
263
      -break-insert [ -t ] [ -h ] [ -r ]
264
         [ -c CONDITION ] [ -i IGNORE-COUNT ]
265
         [ -p THREAD ] [ LINE | ADDR ]
266
 
267
If specified, LINE, can be one of:
268
 
269
   * function
270
 
271
   * filename:linenum
272
 
273
   * filename:function
274
 
275
   * *address
276
 
277
   The possible optional parameters of this command are:
278
 
279
`-t'
280
     Insert a tempoary breakpoint.
281
 
282
`-h'
283
     Insert a hardware breakpoint.
284
 
285
`-c CONDITION'
286
     Make the breakpoint conditional on CONDITION.
287
 
288
`-i IGNORE-COUNT'
289
     Initialize the IGNORE-COUNT.
290
 
291
`-r'
292
     Insert a regular breakpoint in all the functions whose names match
293
     the given regular expression.  Other flags are not applicable to
294
     regular expresson.
295
 
296
Result
297
......
298
 
299
   The result is in the form:
300
 
301
      ^done,bkptno="NUMBER",func="FUNCNAME",
302
       file="FILENAME",line="LINENO"
303
 
304
where NUMBER is the GDB number for this breakpoint, FUNCNAME is the
305
name of the function where the breakpoint was inserted, FILENAME is the
306
name of the source file which contains this function, and LINENO is the
307
source line number within that file.
308
 
309
   Note: this format is open to change.
310
 
311
GDB Command
312
...........
313
 
314
   The corresponding GDB commands are `break', `tbreak', `hbreak',
315
`thbreak', and `rbreak'.
316
 
317
Example
318
.......
319
 
320
     (gdb)
321
     -break-insert main
322
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
323
     (gdb)
324
     -break-insert -t foo
325
     ^done,bkpt={number="2",addr="0x00010774",file="recursive2.c",line="11"}
326
     (gdb)
327
     -break-list
328
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
329
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
330
     addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"},
331
     bkpt={number="2",type="breakpoint",disp="del",enabled="y",
332
     addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"}}
333
     (gdb)
334
     -break-insert -r foo.*
335
     ~int foo(int, int);
336
     ^done,bkpt={number="3",addr="0x00010774",file="recursive2.c",line="11"}
337
     (gdb)
338
 
339
The `-break-list' Command
340
-------------------------
341
 
342
Synopsis
343
........
344
 
345
      -break-list
346
 
347
   Displays the list of inserted breakpoints, showing the following
348
fields:
349
 
350
`Number'
351
     number of the breakpoint
352
 
353
`Type'
354
     type of the breakpoint: `breakpoint' or `watchpoint'
355
 
356
`Disposition'
357
     should the breakpoint be deleted or disabled when it is hit: `keep'
358
     or `nokeep'
359
 
360
`Enabled'
361
     is the breakpoint enabled or no: `y' or `n'
362
 
363
`Address'
364
     memory location at which the breakpoint is set
365
 
366
`What'
367
     logical location of the breakpoint, expressed by function name,
368
     file name, line number
369
 
370
`times'
371
     number of times the breakpoint has been hit
372
 
373
   If there are no breakpoints or watchpoints, the BreakpointTable
374
field is an empty list.
375
 
376
GDB Command
377
...........
378
 
379
   The corresponding GDB command is `info break'.
380
 
381
Example
382
.......
383
 
384
     (gdb)
385
     -break-list
386
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
387
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
388
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"},
389
     bkpt={number="2",type="breakpoint",disp="keep",enabled="y",
390
     addr="0x00010114",func="foo",file="hello.c",line="13",times="0"}}
391
     (gdb)
392
 
393
   Here's an example of the result when there are no breakpoints:
394
 
395
     (gdb)
396
     -break-list
397
     ^done,BreakpointTable={}
398
     (gdb)
399
 
400
The `-break-watch' Command
401
--------------------------
402
 
403
Synopsis
404
........
405
 
406
      -break-watch [ -a | -r ]
407
 
408
   Create a watchpoint.  With the `-a' option it will create an
409
"access" watchpoint, i.e. a watchpoint that triggers either on a read
410
from or on a write to the memory location.  With the `-r' option, the
411
watchpoint created is a "read" watchpoint, i.e. it will trigger only
412
when the memory location is accessed for reading.  Without either of
413
the options, the watchpoint created is a regular watchpoint, i.e. it
414
will trigger when the memory location is accessed for writing.  *Note
415
Setting watchpoints: Set Watchpoints.
416
 
417
   Note that `-break-list' will report a single list of watchpoints and
418
breakpoints inserted.
419
 
420
GDB Command
421
...........
422
 
423
   The corresponding GDB commands are `watch', `awatch', and `rwatch'.
424
 
425
Example
426
.......
427
 
428
   Setting a watchpoint on a variable in the `main' function:
429
 
430
     (gdb)
431
     -break-watch x
432
     ^done,wpt={number="2",exp="x"}
433
     (gdb)
434
     -exec-continue
435
     ^running
436
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="x"},
437
     value={old="-268439212",new="55"},
438
     frame={func="main",args={},file="recursive2.c",line="5"}
439
     (gdb)
440
 
441
   Setting a watchpoint on a variable local to a function.  GDB will
442
stop the program execution twice: first for the variable changing
443
value, then for the watchpoint going out of scope.
444
 
445
     (gdb)
446
     -break-watch C
447
     ^done,wpt={number="5",exp="C"}
448
     (gdb)
449
     -exec-continue
450
     ^running
451
     ^done,reason="watchpoint-trigger",
452
     wpt={number="5",exp="C"},value={old="-276895068",new="3"},
453
     frame={func="callee4",args={},
454
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"}
455
     (gdb)
456
     -exec-continue
457
     ^running
458
     ^done,reason="watchpoint-scope",wpnum="5",
459
     frame={func="callee3",args={{name="strarg",
460
     value="0x11940 \"A string argument.\""}},
461
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
462
     (gdb)
463
 
464
   Listing breakpoints and watchpoints, at different points in the
465
program execution.  Note that once the watchpoint goes out of scope, it
466
is deleted.
467
 
468
     (gdb)
469
     -break-watch C
470
     ^done,wpt={number="2",exp="C"}
471
     (gdb)
472
     -break-list
473
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
474
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
475
     addr="0x00010734",func="callee4",
476
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"},
477
     bkpt={number="2",type="watchpoint",disp="keep",
478
     enabled="y",addr="",what="C",times="0"}}
479
     (gdb)
480
     -exec-continue
481
     ^running
482
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="C"},
483
     value={old="-276895068",new="3"},
484
     frame={func="callee4",args={},
485
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"}
486
     (gdb)
487
     -break-list
488
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
489
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
490
     addr="0x00010734",func="callee4",
491
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"},
492
     bkpt={number="2",type="watchpoint",disp="keep",
493
     enabled="y",addr="",what="C",times="-5"}}
494
     (gdb)
495
     -exec-continue
496
     ^running
497
     ^done,reason="watchpoint-scope",wpnum="2",
498
     frame={func="callee3",args={{name="strarg",
499
     value="0x11940 \"A string argument.\""}},
500
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
501
     (gdb)
502
     -break-list
503
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
504
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
505
     addr="0x00010734",func="callee4",
506
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"}}
507
     (gdb)
508
 
509

510
File: gdb.info,  Node: GDB/MI Data Manipulation,  Next: GDB/MI Program Control,  Prev: GDB/MI Breakpoint Table Commands,  Up: GDB/MI
511
 
512
GDB/MI Data Manipulation
513
========================
514
 
515
   This section describes the GDB/MI commands that manipulate data:
516
examine memory and registers, evaluate expressions, etc.
517
 
518
The `-data-disassemble' Command
519
-------------------------------
520
 
521
Synopsis
522
........
523
 
524
      -data-disassemble
525
         [ -s START-ADDR -e END-ADDR ]
526
       | [ -f FILENAME -l LINENUM [ -n LINES ] ]
527
       -- MODE
528
 
529
Where:
530
 
531
`START-ADDR'
532
     is the beginning address (or `$pc')
533
 
534
`END-ADDR'
535
     is the end address
536
 
537
`FILENAME'
538
     is the name of the file to disassemble
539
 
540
`LINENUM'
541
     is the line number to disassemble around
542
 
543
`LINES'
544
     is the the number of disassembly lines to be produced.  If it is
545
     -1, the whole function will be disassembled, in case no END-ADDR is
546
     specified.  If END-ADDR is specified as a non-zero value, and
547
     LINES is lower than the number of disassembly lines between
548
     START-ADDR and END-ADDR, only LINES lines are displayed; if LINES
549
     is higher than the number of lines between START-ADDR and
550
     END-ADDR, only the lines up to END-ADDR are displayed.
551
 
552
`MODE'
553
     is either 0 (meaning only disassembly) or 1 (meaning mixed source
554
     and disassembly)
555
 
556
Result
557
......
558
 
559
   The output for each instruction is composed of two fields:
560
 
561
   * Address
562
 
563
   * Func-name
564
 
565
   * Offset
566
 
567
   * Instruction
568
 
569
   Note that whatever included in the instruction field, is not
570
manipulated directely by flathead, i.e. it is not possible to adjust
571
its format.
572
 
573
GDB Command
574
...........
575
 
576
   There's no direct mapping from this command to the CLI.
577
 
578
Example
579
.......
580
 
581
   Disassemble from the current value of `$pc' to `$pc + 20':
582
 
583
     (gdb)
584
     -data-disassemble -s $pc -e "$pc + 20" -- 0
585
     ^done,
586
     asm_insns={
587
     {address="0x000107c0",func-name="main",offset="4",
588
     inst="mov  2, %o0"},
589
     {address="0x000107c4",func-name="main",offset="8",
590
     inst="sethi  %hi(0x11800), %o2"},
591
     {address="0x000107c8",func-name="main",offset="12",
592
     inst="or  %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"},
593
     {address="0x000107cc",func-name="main",offset="16",
594
     inst="sethi  %hi(0x11800), %o2"},
595
     {address="0x000107d0",func-name="main",offset="20",
596
     inst="or  %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"}}
597
     (gdb)
598
 
599
   Disassemble the whole `main' function.  Line 32 is part of `main'.
600
 
601
     -data-disassemble -f basics.c -l 32 -- 0
602
     ^done,asm_insns={
603
     {address="0x000107bc",func-name="main",offset="0",
604
     inst="save  %sp, -112, %sp"},
605
     {address="0x000107c0",func-name="main",offset="4",
606
     inst="mov   2, %o0"},
607
     {address="0x000107c4",func-name="main",offset="8",
608
     inst="sethi %hi(0x11800), %o2"},
609
     [...]
610
     {address="0x0001081c",func-name="main",offset="96",inst="ret "},
611
     {address="0x00010820",func-name="main",offset="100",inst="restore "}}
612
     (gdb)
613
 
614
   Disassemble 3 instructions from the start of `main':
615
 
616
     (gdb)
617
     -data-disassemble -f basics.c -l 32 -n 3 -- 0
618
     ^done,asm_insns={
619
     {address="0x000107bc",func-name="main",offset="0",
620
     inst="save  %sp, -112, %sp"},
621
     {address="0x000107c0",func-name="main",offset="4",
622
     inst="mov  2, %o0"},
623
     {address="0x000107c4",func-name="main",offset="8",
624
     inst="sethi  %hi(0x11800), %o2"}}
625
     (gdb)
626
 
627
   Disassemble 3 instructions from the start of `main' in mixed mode:
628
 
629
     (gdb)
630
     -data-disassemble -f basics.c -l 32 -n 3 -- 1
631
     ^done,asm_insns={
632
     src_and_asm_line={line="31",
633
     file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
634
       testsuite/gdb.mi/basics.c",line_asm_insn={
635
     {address="0x000107bc",func-name="main",offset="0",
636
     inst="save  %sp, -112, %sp"}}},
637
 
638
     src_and_asm_line={line="32",
639
     file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
640
       testsuite/gdb.mi/basics.c",line_asm_insn={
641
     {address="0x000107c0",func-name="main",offset="4",
642
     inst="mov  2, %o0"},
643
     {address="0x000107c4",func-name="main",offset="8",
644
     inst="sethi  %hi(0x11800), %o2"}}}}
645
     (gdb)
646
 
647
The `-data-evaluate-expression' Command
648
---------------------------------------
649
 
650
Synopsis
651
........
652
 
653
      -data-evaluate-expression EXPR
654
 
655
   Evaluate EXPR as an expression.  The expression could contain an
656
inferior function call.  The function call will execute synchronously.
657
If the expression contains spaces, it must be enclosed in double quotes.
658
 
659
GDB Command
660
...........
661
 
662
   The corresponding GDB commands are `print', `output', and `call'.
663
In `gdbtk' only, there's a corresponding `gdb_eval' command.
664
 
665
Example
666
.......
667
 
668
   In the following example, the numbers that precede the commands are
669
the "tokens" described in *Note GDB/MI Command Syntax: GDB/MI Command
670
Syntax.  Notice how GDB/MI returns the same tokens in its output.
671
 
672
     211-data-evaluate-expression A
673
     211^done,value="1"
674
     (gdb)
675
     311-data-evaluate-expression &A
676
     311^done,value="0xefffeb7c"
677
     (gdb)
678
     411-data-evaluate-expression A+3
679
     411^done,value="4"
680
     (gdb)
681
     511-data-evaluate-expression "A + 3"
682
     511^done,value="4"
683
     (gdb)
684
 
685
The `-data-list-changed-registers' Command
686
------------------------------------------
687
 
688
Synopsis
689
........
690
 
691
      -data-list-changed-registers
692
 
693
   Display a list of the registers that have changed.
694
 
695
GDB Command
696
...........
697
 
698
   GDB doesn't have a direct analog for this command; `gdbtk' has the
699
corresponding command `gdb_changed_register_list'.
700
 
701
Example
702
.......
703
 
704
   On a PPC MBX board:
705
 
706
     (gdb)
707
     -exec-continue
708
     ^running
709
 
710
     (gdb)
711
     *stopped,reason="breakpoint-hit",bkptno="1",frame={func="main",
712
     args={},file="try.c",line="5"}
713
     (gdb)
714
     -data-list-changed-registers
715
     ^done,changed-registers={"0","1","2","4","5","6","7","8","9",
716
     "10","11","13","14","15","16","17","18","19","20","21","22","23",
717
     "24","25","26","27","28","30","31","64","65","66","67","69"}
718
     (gdb)
719
 
720
The `-data-list-register-names' Command
721
---------------------------------------
722
 
723
Synopsis
724
........
725
 
726
      -data-list-register-names [ ( REGNO )+ ]
727
 
728
   Show a list of register names for the current target.  If no
729
arguments are given, it shows a list of the names of all the registers.
730
If integer numbers are given as arguments, it will print a list of the
731
names of the registers corresponding to the arguments.
732
 
733
GDB Command
734
...........
735
 
736
   GDB does not have a command which corresponds to
737
`-data-list-register-names'.  In `gdbtk' there is a corresponding
738
command `gdb_regnames'.
739
 
740
Example
741
.......
742
 
743
   For the PPC MBX board:
744
     (gdb)
745
     -data-list-register-names
746
     ^done,register-names={"r0","r1","r2","r3","r4","r5","r6","r7",
747
     "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
748
     "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
749
     "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
750
     "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
751
     "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
752
     "pc","ps","cr","lr","ctr","xer"}
753
     (gdb)
754
     -data-list-register-names 1 2 3
755
     ^done,register-names={"r1","r2","r3"}
756
     (gdb)
757
 
758
The `-data-list-register-values' Command
759
----------------------------------------
760
 
761
Synopsis
762
........
763
 
764
      -data-list-register-values FMT [ ( REGNO )*]
765
 
766
   Display the registers' contents.  FMT is the format according to
767
which the registers' contents are to be returned, followed by an
768
optional list of numbers specifying the registers to display.  A
769
missing list of numbers indicates that the contents of all the
770
registers must be returned.
771
 
772
   Allowed formats for FMT are:
773
 
774
`x'
775
     Hexadecimal
776
 
777
`o'
778
     Octal
779
 
780
`t'
781
     Binary
782
 
783
`d'
784
     Decimal
785
 
786
`r'
787
     Raw
788
 
789
`N'
790
     Natural
791
 
792
GDB Command
793
...........
794
 
795
   The corresponding GDB commands are `info reg', `info all-reg', and
796
(in `gdbtk') `gdb_fetch_registers'.
797
 
798
Example
799
.......
800
 
801
   For a PPC MBX board (note: line breaks are for readability only, they
802
don't appear in the actual output):
803
 
804
     (gdb)
805
     -data-list-register-values r 64 65
806
     ^done,register-values={{number="64",value="0xfe00a300"},
807
     {number="65",value="0x00029002"}}
808
     (gdb)
809
     -data-list-register-values x
810
     ^done,register-values={{number="0",value="0xfe0043c8"},
811
     {number="1",value="0x3fff88"},{number="2",value="0xfffffffe"},
812
     {number="3",value="0x0"},{number="4",value="0xa"},
813
     {number="5",value="0x3fff68"},{number="6",value="0x3fff58"},
814
     {number="7",value="0xfe011e98"},{number="8",value="0x2"},
815
     {number="9",value="0xfa202820"},{number="10",value="0xfa202808"},
816
     {number="11",value="0x1"},{number="12",value="0x0"},
817
     {number="13",value="0x4544"},{number="14",value="0xffdfffff"},
818
     {number="15",value="0xffffffff"},{number="16",value="0xfffffeff"},
819
     {number="17",value="0xefffffed"},{number="18",value="0xfffffffe"},
820
     {number="19",value="0xffffffff"},{number="20",value="0xffffffff"},
821
     {number="21",value="0xffffffff"},{number="22",value="0xfffffff7"},
822
     {number="23",value="0xffffffff"},{number="24",value="0xffffffff"},
823
     {number="25",value="0xffffffff"},{number="26",value="0xfffffffb"},
824
     {number="27",value="0xffffffff"},{number="28",value="0xf7bfffff"},
825
     {number="29",value="0x0"},{number="30",value="0xfe010000"},
826
     {number="31",value="0x0"},{number="32",value="0x0"},
827
     {number="33",value="0x0"},{number="34",value="0x0"},
828
     {number="35",value="0x0"},{number="36",value="0x0"},
829
     {number="37",value="0x0"},{number="38",value="0x0"},
830
     {number="39",value="0x0"},{number="40",value="0x0"},
831
     {number="41",value="0x0"},{number="42",value="0x0"},
832
     {number="43",value="0x0"},{number="44",value="0x0"},
833
     {number="45",value="0x0"},{number="46",value="0x0"},
834
     {number="47",value="0x0"},{number="48",value="0x0"},
835
     {number="49",value="0x0"},{number="50",value="0x0"},
836
     {number="51",value="0x0"},{number="52",value="0x0"},
837
     {number="53",value="0x0"},{number="54",value="0x0"},
838
     {number="55",value="0x0"},{number="56",value="0x0"},
839
     {number="57",value="0x0"},{number="58",value="0x0"},
840
     {number="59",value="0x0"},{number="60",value="0x0"},
841
     {number="61",value="0x0"},{number="62",value="0x0"},
842
     {number="63",value="0x0"},{number="64",value="0xfe00a300"},
843
     {number="65",value="0x29002"},{number="66",value="0x202f04b5"},
844
     {number="67",value="0xfe0043b0"},{number="68",value="0xfe00b3e4"},
845
     {number="69",value="0x20002b03"}}
846
     (gdb)
847
 
848
The `-data-read-memory' Command
849
-------------------------------
850
 
851
Synopsis
852
........
853
 
854
      -data-read-memory [ -o BYTE-OFFSET ]
855
        ADDRESS WORD-FORMAT WORD-SIZE
856
        NR-ROWS NR-COLS [ ASCHAR ]
857
 
858
where:
859
 
860
`ADDRESS'
861
     An expression specifying the address of the first memory word to be
862
     read.  Complex expressions containing embedded white space should
863
     be quoted using the C convention.
864
 
865
`WORD-FORMAT'
866
     The format to be used to print the memory words.  The notation is
867
     the same as for GDB's `print' command (*note Output formats:
868
     Output Formats.).
869
 
870
`WORD-SIZE'
871
     The size of each memory word in bytes.
872
 
873
`NR-ROWS'
874
     The number of rows in the output table.
875
 
876
`NR-COLS'
877
     The number of columns in the output table.
878
 
879
`ASCHAR'
880
     If present, indicates that each row should include an ASCII dump.
881
     The value of ASCHAR is used as a padding character when a byte is
882
     not a member of the printable ASCII character set (printable ASCII
883
     characters are those whose code is between 32 and 126,
884
     inclusively).
885
 
886
`BYTE-OFFSET'
887
     An offset to add to the ADDRESS before fetching memory.
888
 
889
   This command displays memory contents as a table of NR-ROWS by
890
NR-COLS words, each word being WORD-SIZE bytes.  In total, `NR-ROWS *
891
NR-COLS * WORD-SIZE' bytes are read (returned as `total-bytes').
892
Should less then the requested number of bytes be returned by the
893
target, the missing words are identified using `N/A'.  The number of
894
bytes read from the target is returned in `nr-bytes' and the starting
895
address used to read memory in `addr'.
896
 
897
   The address of the next/previous page or row is available in
898
`next-row' and `prev-row', `next-page' and `prev-page'.
899
 
900
GDB Command
901
...........
902
 
903
   The corresponding GDB command is `x'.  `gdbtk' has `gdb_get_mem'
904
memory read.
905
 
906
Example
907
.......
908
 
909
   Read six bytes of memory starting at `bytes+6' but then offset by
910
`-6' bytes.  Format as three rows of two columns. One byte per word.
911
Display each word in hex.
912
 
913
     (gdb)
914
     9-data-read-memory -o -6 -- bytes+6 x 1 3 2
915
     9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
916
     next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
917
     prev-page="0x0000138a",memory={
918
     {addr="0x00001390",data={"0x00","0x01"}},
919
     {addr="0x00001392",data={"0x02","0x03"}},
920
     {addr="0x00001394",data={"0x04","0x05"}}}
921
     (gdb)
922
 
923
   Read two bytes of memory starting at address `shorts + 64' and
924
display as a single word formatted in decimal.
925
 
926
     (gdb)
927
     5-data-read-memory shorts+64 d 2 1 1
928
     5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
929
     next-row="0x00001512",prev-row="0x0000150e",
930
     next-page="0x00001512",prev-page="0x0000150e",memory={
931
     {addr="0x00001510",data={"128"}}}
932
     (gdb)
933
 
934
   Read thirty two bytes of memory starting at `bytes+16' and format as
935
eight rows of four columns.  Include a string encoding with `x' used as
936
the non-printable character.
937
 
938
     (gdb)
939
     4-data-read-memory bytes+16 x 1 8 4 x
940
     4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
941
     next-row="0x000013c0",prev-row="0x0000139c",
942
     next-page="0x000013c0",prev-page="0x00001380",memory={
943
     {addr="0x000013a0",data={"0x10","0x11","0x12","0x13"},ascii="xxxx"},
944
     {addr="0x000013a4",data={"0x14","0x15","0x16","0x17"},ascii="xxxx"},
945
     {addr="0x000013a8",data={"0x18","0x19","0x1a","0x1b"},ascii="xxxx"},
946
     {addr="0x000013ac",data={"0x1c","0x1d","0x1e","0x1f"},ascii="xxxx"},
947
     {addr="0x000013b0",data={"0x20","0x21","0x22","0x23"},ascii=" !\"#"},
948
     {addr="0x000013b4",data={"0x24","0x25","0x26","0x27"},ascii="$%&'"},
949
     {addr="0x000013b8",data={"0x28","0x29","0x2a","0x2b"},ascii="()*+"},
950
     {addr="0x000013bc",data={"0x2c","0x2d","0x2e","0x2f"},ascii=",-./"}}
951
     (gdb)
952
 
953
The `-display-delete' Command
954
-----------------------------
955
 
956
Synopsis
957
........
958
 
959
      -display-delete NUMBER
960
 
961
   Delete the display NUMBER.
962
 
963
GDB Command
964
...........
965
 
966
   The corresponding GDB command is `delete display'.
967
 
968
Example
969
.......
970
 
971
   N.A.
972
 
973
The `-display-disable' Command
974
------------------------------
975
 
976
Synopsis
977
........
978
 
979
      -display-disable NUMBER
980
 
981
   Disable display NUMBER.
982
 
983
GDB Command
984
...........
985
 
986
   The corresponding GDB command is `disable display'.
987
 
988
Example
989
.......
990
 
991
   N.A.
992
 
993
The `-display-enable' Command
994
-----------------------------
995
 
996
Synopsis
997
........
998
 
999
      -display-enable NUMBER
1000
 
1001
   Enable display NUMBER.
1002
 
1003
GDB Command
1004
...........
1005
 
1006
   The corresponding GDB command is `enable display'.
1007
 
1008
Example
1009
.......
1010
 
1011
   N.A.
1012
 
1013
The `-display-insert' Command
1014
-----------------------------
1015
 
1016
Synopsis
1017
........
1018
 
1019
      -display-insert EXPRESSION
1020
 
1021
   Display EXPRESSION every time the program stops.
1022
 
1023
GDB Command
1024
...........
1025
 
1026
   The corresponding GDB command is `display'.
1027
 
1028
Example
1029
.......
1030
 
1031
   N.A.
1032
 
1033
The `-display-list' Command
1034
---------------------------
1035
 
1036
Synopsis
1037
........
1038
 
1039
      -display-list
1040
 
1041
   List the displays.  Do not show the current values.
1042
 
1043
GDB Command
1044
...........
1045
 
1046
   The corresponding GDB command is `info display'.
1047
 
1048
Example
1049
.......
1050
 
1051
   N.A.
1052
 
1053
The `-environment-cd' Command
1054
-----------------------------
1055
 
1056
Synopsis
1057
........
1058
 
1059
      -environment-cd PATHDIR
1060
 
1061
   Set GDB's working directory.
1062
 
1063
GDB Command
1064
...........
1065
 
1066
   The corresponding GDB command is `cd'.
1067
 
1068
Example
1069
.......
1070
 
1071
     (gdb)
1072
     -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
1073
     ^done
1074
     (gdb)
1075
 
1076
The `-environment-directory' Command
1077
------------------------------------
1078
 
1079
Synopsis
1080
........
1081
 
1082
      -environment-directory PATHDIR
1083
 
1084
   Add directory PATHDIR to beginning of search path for source files.
1085
 
1086
GDB Command
1087
...........
1088
 
1089
   The corresponding GDB command is `dir'.
1090
 
1091
Example
1092
.......
1093
 
1094
     (gdb)
1095
     -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
1096
     ^done
1097
     (gdb)
1098
 
1099
The `-environment-path' Command
1100
-------------------------------
1101
 
1102
Synopsis
1103
........
1104
 
1105
      -environment-path ( PATHDIR )+
1106
 
1107
   Add directories to beginning of search path for object files.
1108
 
1109
GDB Command
1110
...........
1111
 
1112
   The corresponding GDB command is `path'.
1113
 
1114
Example
1115
.......
1116
 
1117
     (gdb)
1118
     -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb
1119
     ^done
1120
     (gdb)
1121
 
1122
The `-environment-pwd' Command
1123
------------------------------
1124
 
1125
Synopsis
1126
........
1127
 
1128
      -environment-pwd
1129
 
1130
   Show the current working directory.
1131
 
1132
GDB command
1133
...........
1134
 
1135
   The corresponding GDB command is `pwd'.
1136
 
1137
Example
1138
.......
1139
 
1140
     (gdb)
1141
     -environment-pwd
1142
     ~Working directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb.
1143
     ^done
1144
     (gdb)
1145
 
1146

1147
File: gdb.info,  Node: GDB/MI Program Control,  Next: GDB/MI Miscellaneous Commands,  Prev: GDB/MI Data Manipulation,  Up: GDB/MI
1148
 
1149
GDB/MI Program control
1150
======================
1151
 
1152
Program termination
1153
...................
1154
 
1155
   As a result of execution, the inferior program can run to
1156
completion, if it doesn't encouter any breakpoints.  In this case the
1157
ouput will include an exit code, if the program has exited
1158
exceptionally.
1159
 
1160
Examples:
1161
.........
1162
 
1163
Program exited normally:
1164
 
1165
     (gdb)
1166
     -exec-run
1167
     ^running
1168
     (gdb)
1169
     x = 55
1170
     *stopped,reason="exited-normally"
1171
     (gdb)
1172
 
1173
Program exited exceptionally:
1174
 
1175
     (gdb)
1176
     -exec-run
1177
     ^running
1178
     (gdb)
1179
     x = 55
1180
     *stopped,reason="exited",exit-code="01"
1181
     (gdb)
1182
 
1183
   Another way the program can terminate is if it receives a signal
1184
such as `SIGINT'.  In this case, GDB/MI displays this:
1185
 
1186
     (gdb)
1187
     *stopped,reason="exited-signalled",signal-name="SIGINT",
1188
     signal-meaning="Interrupt"
1189
 
1190
The `-exec-abort' Command
1191
-------------------------
1192
 
1193
Synopsis
1194
........
1195
 
1196
      -exec-abort
1197
 
1198
   Kill the inferior running program.
1199
 
1200
GDB Command
1201
...........
1202
 
1203
   The corresponding GDB command is `kill'.
1204
 
1205
Example
1206
.......
1207
 
1208
   N.A.
1209
 
1210
The `-exec-arguments' Command
1211
-----------------------------
1212
 
1213
Synopsis
1214
........
1215
 
1216
      -exec-arguments ARGS
1217
 
1218
   Set the inferior program arguments, to be used in the next
1219
`-exec-run'.
1220
 
1221
GDB Command
1222
...........
1223
 
1224
   The corresponding GDB command is `set args'.
1225
 
1226
Example
1227
.......
1228
 
1229
   Don't have one around.
1230
 
1231
The `-exec-continue' Command
1232
----------------------------
1233
 
1234
Synopsis
1235
........
1236
 
1237
      -exec-continue
1238
 
1239
   Asynchronous command.  Resumes the execution of the inferior program
1240
until a breakpoint is encountered, or until the inferior exits.
1241
 
1242
GDB Command
1243
...........
1244
 
1245
   The corresponding GDB corresponding is `continue'.
1246
 
1247
Example
1248
.......
1249
 
1250
     -exec-continue
1251
     ^running
1252
     (gdb)
1253
     @Hello world
1254
     *stopped,reason="breakpoint-hit",bkptno="2",frame={func="foo",args={},
1255
     file="hello.c",line="13"}
1256
     (gdb)
1257
 
1258
The `-exec-finish' Command
1259
--------------------------
1260
 
1261
Synopsis
1262
........
1263
 
1264
      -exec-finish
1265
 
1266
   Asynchronous command.  Resumes the execution of the inferior program
1267
until the current function is exited.  Displays the results returned by
1268
the function.
1269
 
1270
GDB Command
1271
...........
1272
 
1273
   The corresponding GDB command is `finish'.
1274
 
1275
Example
1276
.......
1277
 
1278
   Function returning `void'.
1279
 
1280
     -exec-finish
1281
     ^running
1282
     (gdb)
1283
     @hello from foo
1284
     *stopped,reason="function-finished",frame={func="main",args={},
1285
     file="hello.c",line="7"}
1286
     (gdb)
1287
 
1288
   Function returning other than `void'.  The name of the internal GDB
1289
variable storing the result is printed, together with the value itself.
1290
 
1291
     -exec-finish
1292
     ^running
1293
     (gdb)
1294
     *stopped,reason="function-finished",frame={addr="0x000107b0",func="foo",
1295
     args={{name="a",value="1"},{name="b",value="9"}},
1296
     file="recursive2.c",line="14"},
1297
     gdb-result-var="$1",return-value="0"
1298
     (gdb)
1299
 
1300
The `-exec-interrupt' Command
1301
-----------------------------
1302
 
1303
Synopsis
1304
........
1305
 
1306
      -exec-interrupt
1307
 
1308
   Asynchronous command. Interrupts the background execution of the
1309
target.  Note how the token associated with the stop message is the one
1310
for the execution command that has been interrupted.  The token for the
1311
interrupt itself only appears in the '^done' output.  If the user is
1312
trying to interrupt a non-running program, an error message will be
1313
printed.
1314
 
1315
GDB Command
1316
...........
1317
 
1318
   The corresponding GDB command is `interrupt'.
1319
 
1320
Example
1321
.......
1322
 
1323
     (gdb)
1324
     111-exec-continue
1325
     111^running
1326
 
1327
     (gdb)
1328
     222-exec-interrupt
1329
     222^done
1330
     (gdb)
1331
     111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
1332
     frame={addr="0x00010140",func="foo",args={},file="try.c",line="13"}
1333
     (gdb)
1334
 
1335
     (gdb)
1336
     -exec-interrupt
1337
     ^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
1338
     (gdb)
1339
 
1340
The `-exec-next' Command
1341
------------------------
1342
 
1343
Synopsis
1344
........
1345
 
1346
      -exec-next
1347
 
1348
   Asynchronous command.  Resumes execution of the inferior program,
1349
stopping when the beginning of the next source line is reached.
1350
 
1351
GDB Command
1352
...........
1353
 
1354
   The corresponding GDB command is `next'.
1355
 
1356
Example
1357
.......
1358
 
1359
     -exec-next
1360
     ^running
1361
     (gdb)
1362
     *stopped,reason="end-stepping-range",line="8",file="hello.c"
1363
     (gdb)
1364
 
1365
The `-exec-next-instruction' Command
1366
------------------------------------
1367
 
1368
Synopsis
1369
........
1370
 
1371
      -exec-next-instruction
1372
 
1373
   Asynchronous command.  Executes one machine instruction.  If the
1374
instruction is a function call continues until the function returns.  If
1375
the program stops at an instruction in the middle of a source line, the
1376
address will be printed as well.
1377
 
1378
GDB Command
1379
...........
1380
 
1381
   The corresponding GDB command is `nexti'.
1382
 
1383
Example
1384
.......
1385
 
1386
     (gdb)
1387
     -exec-next-instruction
1388
     ^running
1389
 
1390
     (gdb)
1391
     *stopped,reason="end-stepping-range",
1392
     addr="0x000100d4",line="5",file="hello.c"
1393
     (gdb)
1394
 
1395
The `-exec-return' Command
1396
--------------------------
1397
 
1398
Synopsis
1399
........
1400
 
1401
      -exec-return
1402
 
1403
   Makes current function return immediately.  Doesn't execute the
1404
inferior.  Displays the new current frame.
1405
 
1406
GDB Command
1407
...........
1408
 
1409
   The corresponding GDB command is `return'.
1410
 
1411
Example
1412
.......
1413
 
1414
     (gdb)
1415
     200-break-insert callee4
1416
     200^done,bkpt={number="1",addr="0x00010734",
1417
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}
1418
     (gdb)
1419
     000-exec-run
1420
     000^running
1421
     (gdb)
1422
     000*stopped,reason="breakpoint-hit",bkptno="1",
1423
     frame={func="callee4",args={},
1424
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}
1425
     (gdb)
1426
     205-break-delete
1427
     205^done
1428
     (gdb)
1429
     111-exec-return
1430
     111^done,frame={level="0 ",func="callee3",
1431
     args={{name="strarg",
1432
     value="0x11940 \"A string argument.\""}},
1433
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
1434
     (gdb)
1435
 
1436
The `-exec-run' Command
1437
-----------------------
1438
 
1439
Synopsis
1440
........
1441
 
1442
      -exec-run
1443
 
1444
   Asynchronous command.  Starts execution of the inferior from the
1445
beginning.  The inferior executes until either a breakpoint is
1446
encountered or the program exits.
1447
 
1448
GDB Command
1449
...........
1450
 
1451
   The corresponding GDB command is `run'.
1452
 
1453
Example
1454
.......
1455
 
1456
     (gdb)
1457
     -break-insert main
1458
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
1459
     (gdb)
1460
     -exec-run
1461
     ^running
1462
     (gdb)
1463
     *stopped,reason="breakpoint-hit",bkptno="1",
1464
     frame={func="main",args={},file="recursive2.c",line="4"}
1465
     (gdb)
1466
 
1467
The `-exec-show-arguments' Command
1468
----------------------------------
1469
 
1470
Synopsis
1471
........
1472
 
1473
      -exec-show-arguments
1474
 
1475
   Print the arguments of the program.
1476
 
1477
GDB Command
1478
...........
1479
 
1480
   The corresponding GDB command is `show args'.
1481
 
1482
Example
1483
.......
1484
 
1485
   N.A.
1486
 
1487
The `-exec-step' Command
1488
------------------------
1489
 
1490
Synopsis
1491
........
1492
 
1493
      -exec-step
1494
 
1495
   Asynchronous command.  Resumes execution of the inferior program,
1496
stopping when the beginning of the next source line is reached, if the
1497
next source line is not a function call.  If it is, stop at the first
1498
instruction of the called function.
1499
 
1500
GDB Command
1501
...........
1502
 
1503
   The corresponding GDB command is `step'.
1504
 
1505
Example
1506
.......
1507
 
1508
   Stepping into a function:
1509
 
1510
     -exec-step
1511
     ^running
1512
     (gdb)
1513
     *stopped,reason="end-stepping-range",
1514
     frame={func="foo",args={{name="a",value="10"},
1515
     {name="b",value="0"}},file="recursive2.c",line="11"}
1516
     (gdb)
1517
 
1518
   Regular stepping:
1519
 
1520
     -exec-step
1521
     ^running
1522
     (gdb)
1523
     *stopped,reason="end-stepping-range",line="14",file="recursive2.c"
1524
     (gdb)
1525
 
1526
The `-exec-step-instruction' Command
1527
------------------------------------
1528
 
1529
Synopsis
1530
........
1531
 
1532
      -exec-step-instruction
1533
 
1534
   Asynchronous command.  Resumes the inferior which executes one
1535
machine instruction.  The output, once GDB has stopped, will vary
1536
depending on whether we have stopped in the middle of a source line or
1537
not.  In the former case, the address at which the program stopped will
1538
be printed as well.
1539
 
1540
GDB Command
1541
...........
1542
 
1543
   The corresponding GDB command is `stepi'.
1544
 
1545
Example
1546
.......
1547
 
1548
     (gdb)
1549
     -exec-step-instruction
1550
     ^running
1551
 
1552
     (gdb)
1553
     *stopped,reason="end-stepping-range",
1554
     frame={func="foo",args={},file="try.c",line="10"}
1555
     (gdb)
1556
     -exec-step-instruction
1557
     ^running
1558
 
1559
     (gdb)
1560
     *stopped,reason="end-stepping-range",
1561
     frame={addr="0x000100f4",func="foo",args={},file="try.c",line="10"}
1562
     (gdb)
1563
 
1564
The `-exec-until' Command
1565
-------------------------
1566
 
1567
Synopsis
1568
........
1569
 
1570
      -exec-until [ LOCATION ]
1571
 
1572
   Asynchronous command.  Executes the inferior until the LOCATION
1573
specified in the argument is reached.  If there is no argument, the
1574
inferior executes until a source line greater than the current one is
1575
reached.  The reason for stopping in this case will be
1576
"location-reached".
1577
 
1578
GDB Command
1579
...........
1580
 
1581
   The corresponding GDB command is `until'.
1582
 
1583
Example
1584
.......
1585
 
1586
     (gdb)
1587
     -exec-until recursive2.c:6
1588
     ^running
1589
     (gdb)
1590
     x = 55
1591
     *stopped,reason="location-reached",frame={func="main",args={},
1592
     file="recursive2.c",line="6"}
1593
     (gdb)
1594
 
1595
The `-file-exec-and-symbols' Command
1596
------------------------------------
1597
 
1598
Synopsis
1599
........
1600
 
1601
      -file-exec-and-symbols FILE
1602
 
1603
   Specify the executable file to be debugged.  This file is the one
1604
from which the symbol table is also read.  If no file is specified, the
1605
command clears the executable and symbol information.  If breakpoints
1606
are set when using this command with no arguments, gdb will produce
1607
error messages.  Otherwise, no output is produced, except a completion
1608
notification.
1609
 
1610
GDB Command
1611
...........
1612
 
1613
   The corresponding GDB command is `file'.
1614
 
1615
Example
1616
.......
1617
 
1618
     (gdb)
1619
     -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
1620
     ^done
1621
     (gdb)
1622
 
1623
The `-file-exec-file' Command
1624
-----------------------------
1625
 
1626
Synopsis
1627
........
1628
 
1629
      -file-exec-file FILE
1630
 
1631
   Specify the executable file to be debugged.  Unlike
1632
`-file-exec-and-symbols', the symbol table is _not_ read from this
1633
file.  If used without argument, GDB clears the information about the
1634
executable file.  No output is produced, except a completion
1635
notification.
1636
 
1637
GDB Command
1638
...........
1639
 
1640
   The corresponding GDB command is `exec-file'.
1641
 
1642
Example
1643
.......
1644
 
1645
     (gdb)
1646
     -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
1647
     ^done
1648
     (gdb)
1649
 
1650
The `-file-list-exec-sections' Command
1651
--------------------------------------
1652
 
1653
Synopsis
1654
........
1655
 
1656
      -file-list-exec-sections
1657
 
1658
   List the sections of the current executable file.
1659
 
1660
GDB Command
1661
...........
1662
 
1663
   The GDB command `info file' shows, among the rest, the same
1664
information as this command.  `gdbtk' has a corresponding command
1665
`gdb_load_info'.
1666
 
1667
Example
1668
.......
1669
 
1670
   N.A.
1671
 
1672
The `-file-list-exec-source-files' Command
1673
------------------------------------------
1674
 
1675
Synopsis
1676
........
1677
 
1678
      -file-list-exec-source-files
1679
 
1680
   List the source files for the current executable.
1681
 
1682
GDB Command
1683
...........
1684
 
1685
   There's no GDB command which directly corresponds to this one.
1686
`gdbtk' has an analogous command `gdb_listfiles'.
1687
 
1688
Example
1689
.......
1690
 
1691
   N.A.
1692
 
1693
The `-file-list-shared-libraries' Command
1694
-----------------------------------------
1695
 
1696
Synopsis
1697
........
1698
 
1699
      -file-list-shared-libraries
1700
 
1701
   List the shared libraries in the program.
1702
 
1703
GDB Command
1704
...........
1705
 
1706
   The corresponding GDB command is `info shared'.
1707
 
1708
Example
1709
.......
1710
 
1711
   N.A.
1712
 
1713
The `-file-list-symbol-files' Command
1714
-------------------------------------
1715
 
1716
Synopsis
1717
........
1718
 
1719
      -file-list-symbol-files
1720
 
1721
   List symbol files.
1722
 
1723
GDB Command
1724
...........
1725
 
1726
   The corresponding GDB command is `info file' (part of it).
1727
 
1728
Example
1729
.......
1730
 
1731
   N.A.
1732
 
1733
The `-file-symbol-file' Command
1734
-------------------------------
1735
 
1736
Synopsis
1737
........
1738
 
1739
      -file-symbol-file FILE
1740
 
1741
   Read symbol table info from the specified FILE argument.  When used
1742
without arguments, clears GDB's symbol table info.  No output is
1743
produced, except for a completion notification.
1744
 
1745
GDB Command
1746
...........
1747
 
1748
   The corresponding GDB command is `symbol-file'.
1749
 
1750
Example
1751
.......
1752
 
1753
     (gdb)
1754
     -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
1755
     ^done
1756
     (gdb)
1757
 
1758

1759
File: gdb.info,  Node: GDB/MI Miscellaneous Commands,  Next: GDB/MI Stack Manipulation,  Prev: GDB/MI Program Control,  Up: GDB/MI
1760
 
1761
Miscellaneous GDB commands in GDB/MI
1762
====================================
1763
 
1764
The `-gdb-exit' Command
1765
-----------------------
1766
 
1767
Synopsis
1768
........
1769
 
1770
      -gdb-exit
1771
 
1772
   Exit GDB immediately.
1773
 
1774
GDB Command
1775
...........
1776
 
1777
   Approximately corresponds to `quit'.
1778
 
1779
Example
1780
.......
1781
 
1782
     (gdb)
1783
     -gdb-exit
1784
 
1785
The `-gdb-set' Command
1786
----------------------
1787
 
1788
Synopsis
1789
........
1790
 
1791
      -gdb-set
1792
 
1793
   Set an internal GDB variable.
1794
 
1795
GDB Command
1796
...........
1797
 
1798
   The corresponding GDB command is `set'.
1799
 
1800
Example
1801
.......
1802
 
1803
     (gdb)
1804
     -gdb-set $foo=3
1805
     ^done
1806
     (gdb)
1807
 
1808
The `-gdb-show' Command
1809
-----------------------
1810
 
1811
Synopsis
1812
........
1813
 
1814
      -gdb-show
1815
 
1816
   Show the current value of a GDB variable.
1817
 
1818
GDB command
1819
...........
1820
 
1821
   The corresponding GDB command is `show'.
1822
 
1823
Example
1824
.......
1825
 
1826
     (gdb)
1827
     -gdb-show annotate
1828
     ^done,value="0"
1829
     (gdb)
1830
 
1831
The `-gdb-version' Command
1832
--------------------------
1833
 
1834
Synopsis
1835
........
1836
 
1837
      -gdb-version
1838
 
1839
   Show version information for GDB.  Used mostly in testing.
1840
 
1841
GDB Command
1842
...........
1843
 
1844
   There's no equivalent GDB command.  GDB by default shows this
1845
information when you start an interactive session.
1846
 
1847
Example
1848
.......
1849
 
1850
     (gdb)
1851
     -gdb-version
1852
     ~GNU gdb 5.2.1
1853
     ~Copyright 2000 Free Software Foundation, Inc.
1854
     ~GDB is free software, covered by the GNU General Public License, and
1855
     ~you are welcome to change it and/or distribute copies of it under
1856
     ~ certain conditions.
1857
     ~Type "show copying" to see the conditions.
1858
     ~There is absolutely no warranty for GDB.  Type "show warranty" for
1859
     ~ details.
1860
     ~This GDB was configured as
1861
      "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
1862
     ^done
1863
     (gdb)
1864
 

powered by: WebSVN 2.1.0

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