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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [doc/] [gdbint.info-1] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

28
File: gdbint.info,  Node: Top,  Next: Requirements,  Up: (dir)
29
 
30
Scope of this Document
31
**********************
32
 
33
   This document documents the internals of the GNU debugger, GDB.  It
34
includes description of GDB's key algorithms and operations, as well as
35
the mechanisms that adapt GDB to specific hosts and targets.
36
 
37
* Menu:
38
 
39
* Requirements::
40
* Overall Structure::
41
* Algorithms::
42
* User Interface::
43
* Symbol Handling::
44
* Language Support::
45
* Host Definition::
46
* Target Architecture Definition::
47
* Target Vector Definition::
48
* Native Debugging::
49
* Support Libraries::
50
* Coding::
51
* Porting GDB::
52
* Testsuite::
53
* Hints::
54
* Index::
55
 
56

57
File: gdbint.info,  Node: Requirements,  Next: Overall Structure,  Prev: Top,  Up: Top
58
 
59
Requirements
60
************
61
 
62
   Before diving into the internals, you should understand the formal
63
requirements and other expectations for GDB.  Although some of these
64
may seem obvious, there have been proposals for GDB that have run
65
counter to these requirements.
66
 
67
   First of all, GDB is a debugger.  It's not designed to be a front
68
panel for embedded systems.  It's not a text editor.  It's not a shell.
69
It's not a programming environment.
70
 
71
   GDB is an interactive tool.  Although a batch mode is available,
72
GDB's primary role is to interact with a human programmer.
73
 
74
   GDB should be responsive to the user.  A programmer hot on the trail
75
of a nasty bug, and operating under a looming deadline, is going to be
76
very impatient of everything, including the response time to debugger
77
commands.
78
 
79
   GDB should be relatively permissive, such as for expressions.  While
80
the compiler should be picky (or have the option to be made picky),
81
since source code lives for a long time usuazlly, the programmer doing
82
debugging shouldn't be spending time figuring out to mollify the
83
debugger.
84
 
85
   GDB will be called upon to deal with really large programs.
86
Executable sizes of 50 to 100 megabytes occur regularly, and we've
87
heard reports of programs approaching 1 gigabyte in size.
88
 
89
   GDB should be able to run everywhere.  No other debugger is
90
available for even half as many configurations as GDB supports.
91
 
92

93
File: gdbint.info,  Node: Overall Structure,  Next: Algorithms,  Prev: Requirements,  Up: Top
94
 
95
Overall Structure
96
*****************
97
 
98
   GDB consists of three major subsystems: user interface, symbol
99
handling (the "symbol side"), and target system handling (the "target
100
side").
101
 
102
   The user interface consists of several actual interfaces, plus
103
supporting code.
104
 
105
   The symbol side consists of object file readers, debugging info
106
interpreters, symbol table management, source language expression
107
parsing, type and value printing.
108
 
109
   The target side consists of execution control, stack frame analysis,
110
and physical target manipulation.
111
 
112
   The target side/symbol side division is not formal, and there are a
113
number of exceptions.  For instance, core file support involves symbolic
114
elements (the basic core file reader is in BFD) and target elements (it
115
supplies the contents of memory and the values of registers).  Instead,
116
this division is useful for understanding how the minor subsystems
117
should fit together.
118
 
119
The Symbol Side
120
===============
121
 
122
   The symbolic side of GDB can be thought of as "everything you can do
123
in GDB without having a live program running".  For instance, you can
124
look at the types of variables, and evaluate many kinds of expressions.
125
 
126
The Target Side
127
===============
128
 
129
   The target side of GDB is the "bits and bytes manipulator".
130
Although it may make reference to symbolic info here and there, most of
131
the target side will run with only a stripped executable available--or
132
even no executable at all, in remote debugging cases.
133
 
134
   Operations such as disassembly, stack frame crawls, and register
135
display, are able to work with no symbolic info at all.  In some cases,
136
such as disassembly, GDB will use symbolic info to present addresses
137
relative to symbols rather than as raw numbers, but it will work either
138
way.
139
 
140
Configurations
141
==============
142
 
143
   "Host" refers to attributes of the system where GDB runs.  "Target"
144
refers to the system where the program being debugged executes.  In
145
most cases they are the same machine, in which case a third type of
146
"Native" attributes come into play.
147
 
148
   Defines and include files needed to build on the host are host
149
support.  Examples are tty support, system defined types, host byte
150
order, host float format.
151
 
152
   Defines and information needed to handle the target format are target
153
dependent.  Examples are the stack frame format, instruction set,
154
breakpoint instruction, registers, and how to set up and tear down the
155
stack to call a function.
156
 
157
   Information that is only needed when the host and target are the
158
same, is native dependent.  One example is Unix child process support;
159
if the host and target are not the same, doing a fork to start the
160
target process is a bad idea.  The various macros needed for finding the
161
registers in the `upage', running `ptrace', and such are all in the
162
native-dependent files.
163
 
164
   Another example of native-dependent code is support for features that
165
are really part of the target environment, but which require `#include'
166
files that are only available on the host system.  Core file handling
167
and `setjmp' handling are two common cases.
168
 
169
   When you want to make GDB work "native" on a particular machine, you
170
have to include all three kinds of information.
171
 
172

173
File: gdbint.info,  Node: Algorithms,  Next: User Interface,  Prev: Overall Structure,  Up: Top
174
 
175
Algorithms
176
**********
177
 
178
   GDB uses a number of debugging-specific algorithms.  They are often
179
not very complicated, but get lost in the thicket of special cases and
180
real-world issues.  This chapter describes the basic algorithms and
181
mentions some of the specific target definitions that they use.
182
 
183
Frames
184
======
185
 
186
   A frame is a construct that GDB uses to keep track of calling and
187
called functions.
188
 
189
   `FRAME_FP' in the machine description has no meaning to the
190
machine-independent part of GDB, except that it is used when setting up
191
a new frame from scratch, as follows:
192
 
193
           create_new_frame (read_register (FP_REGNUM), read_pc ()));
194
 
195
   Other than that, all the meaning imparted to `FP_REGNUM' is imparted
196
by the machine-dependent code.  So, `FP_REGNUM' can have any value that
197
is convenient for the code that creates new frames.
198
(`create_new_frame' calls `INIT_EXTRA_FRAME_INFO' if it is defined;
199
that is where you should use the `FP_REGNUM' value, if your frames are
200
nonstandard.)
201
 
202
   Given a GDB frame, define `FRAME_CHAIN' to determine the address of
203
the calling function's frame.  This will be used to create a new GDB
204
frame struct, and then `INIT_EXTRA_FRAME_INFO' and `INIT_FRAME_PC' will
205
be called for the new frame.
206
 
207
Breakpoint Handling
208
===================
209
 
210
   In general, a breakpoint is a user-designated location in the program
211
where the user wants to regain control if program execution ever reaches
212
that location.
213
 
214
   There are two main ways to implement breakpoints; either as
215
"hardware" breakpoints or as "software" breakpoints.
216
 
217
   Hardware breakpoints are sometimes available as a builtin debugging
218
features with some chips.  Typically these work by having dedicated
219
register into which the breakpoint address may be stored.  If the PC
220
(shorthand for "program counter") ever matches a value in a breakpoint
221
registers, the CPU raises an exception and reports it to GDB.
222
 
223
   Another possibility is when an emulator is in use; many emulators
224
include circuitry that watches the address lines coming out from the
225
processor, and force it to stop if the address matches a breakpoint's
226
address.
227
 
228
   A third possibility is that the target already has the ability to do
229
breakpoints somehow; for instance, a ROM monitor may do its own
230
software breakpoints.  So although these are not literally "hardware
231
breakpoints", from GDB's point of view they work the same; GDB need not
232
do nothing more than set the breakpoint and wait for something to
233
happen.
234
 
235
   Since they depend on hardware resources, hardware breakpoints may be
236
limited in number; when the user asks for more, GDB will start trying
237
to set software breakpoints.  (On some architectures, notably the
238
32-bit x86 platforms, GDB cannot alsways know whether there's enough
239
hardware resources to insert all the hardware breakpoints and
240
watchpoints.  On those platforms, GDB prints an error message only when
241
the program being debugged is continued.)
242
 
243
   Software breakpoints require GDB to do somewhat more work.  The
244
basic theory is that GDB will replace a program instruction with a
245
trap, illegal divide, or some other instruction that will cause an
246
exception, and then when it's encountered, GDB will take the exception
247
and stop the program.  When the user says to continue, GDB will restore
248
the original instruction, single-step, re-insert the trap, and continue
249
on.
250
 
251
   Since it literally overwrites the program being tested, the program
252
area must be writeable, so this technique won't work on programs in
253
ROM.  It can also distort the behavior of programs that examine
254
themselves, although such a situation would be highly unusual.
255
 
256
   Also, the software breakpoint instruction should be the smallest
257
size of instruction, so it doesn't overwrite an instruction that might
258
be a jump target, and cause disaster when the program jumps into the
259
middle of the breakpoint instruction.  (Strictly speaking, the
260
breakpoint must be no larger than the smallest interval between
261
instructions that may be jump targets; perhaps there is an architecture
262
where only even-numbered instructions may jumped to.)  Note that it's
263
possible for an instruction set not to have any instructions usable for
264
a software breakpoint, although in practice only the ARC has failed to
265
define such an instruction.
266
 
267
   The basic definition of the software breakpoint is the macro
268
`BREAKPOINT'.
269
 
270
   Basic breakpoint object handling is in `breakpoint.c'.  However,
271
much of the interesting breakpoint action is in `infrun.c'.
272
 
273
Single Stepping
274
===============
275
 
276
Signal Handling
277
===============
278
 
279
Thread Handling
280
===============
281
 
282
Inferior Function Calls
283
=======================
284
 
285
Longjmp Support
286
===============
287
 
288
   GDB has support for figuring out that the target is doing a
289
`longjmp' and for stopping at the target of the jump, if we are
290
stepping.  This is done with a few specialized internal breakpoints,
291
which are visible in the output of the `maint info breakpoint' command.
292
 
293
   To make this work, you need to define a macro called
294
`GET_LONGJMP_TARGET', which will examine the `jmp_buf' structure and
295
extract the longjmp target address.  Since `jmp_buf' is target
296
specific, you will need to define it in the appropriate `tm-TARGET.h'
297
file.  Look in `tm-sun4os4.h' and `sparc-tdep.c' for examples of how to
298
do this.
299
 
300
Watchpoints
301
===========
302
 
303
   Watchpoints are a special kind of breakpoints (*note breakpoints:
304
Algorithms.) which break when data is accessed rather than when some
305
instruction is executed.  When you have data which changes without your
306
knowing what code does that, watchpoints are the silver bullet to hunt
307
down and kill such bugs.
308
 
309
   Watchpoints can be either hardware-assisted or not; the latter type
310
is known as "software watchpoints."  GDB always uses hardware-assisted
311
watchpoints if they are available, and falls back on software
312
watchpoints otherwise.  Typical situations where GDB will use software
313
watchpoints are:
314
 
315
   * The watched memory region is too large for the underlying hardware
316
     watchpoint support.  For example, each x86 debug register can
317
     watch up to 4 bytes of memory, so trying to watch data structures
318
     whose size is more than 16 bytes will cause GDB to use software
319
     watchpoints.
320
 
321
   * The value of the expression to be watched depends on data held in
322
     registers (as opposed to memory).
323
 
324
   * Too many different watchpoints requested.  (On some architectures,
325
     this situation is impossible to detect until the debugged program
326
     is resumed.)  Note that x86 debug registers are used both for
327
     hardware breakpoints and for watchpoints, so setting too many
328
     hardware breakpoints might cause watchpoint insertion to fail.
329
 
330
   * No hardware-assisted watchpoints provided by the target
331
     implementation.
332
 
333
   Software watchpoints are very slow, since GDB needs to single-step
334
the program being debugged and test the value of the watched
335
expression(s) after each instruction.  The rest of this section is
336
mostly irrelevant for software watchpoints.
337
 
338
   GDB uses several macros and primitives to support hardware
339
watchpoints:
340
 
341
`TARGET_HAS_HARDWARE_WATCHPOINTS'
342
     If defined, the target supports hardware watchpoints.
343
 
344
`TARGET_CAN_USE_HARDWARE_WATCHPOINT (TYPE, COUNT, OTHER)'
345
     Return the number of hardware watchpoints of type TYPE that are
346
     possible to be set.  The value is positive if COUNT watchpoints of
347
     this type can be set, zero if setting watchpoints of this type is
348
     not supported, and negative if COUNT is more than the maximum
349
     number of watchpoints of type TYPE that can be set.  OTHER is
350
     non-zero if other types of watchpoints are currently enabled (there
351
     are architectures which cannot set watchpoints of different types
352
     at the same time).
353
 
354
`TARGET_REGION_OK_FOR_HW_WATCHPOINT (ADDR, LEN)'
355
     Return non-zero if hardware watchpoints can be used to watch a
356
     region whose address is ADDR and whose length in bytes is LEN.
357
 
358
`TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (SIZE)'
359
     Return non-zero if hardware watchpoints can be used to watch a
360
     region whose size is SIZE.  GDB only uses this macro as a
361
     fall-back, in case `TARGET_REGION_OK_FOR_HW_WATCHPOINT' is not
362
     defined.
363
 
364
`TARGET_DISABLE_HW_WATCHPOINTS (PID)'
365
     Disables watchpoints in the process identified by PID.  This is
366
     used, e.g., on HP-UX which provides operations to disable and
367
     enable the page-level memory protection that implements hardware
368
     watchpoints on that platform.
369
 
370
`TARGET_ENABLE_HW_WATCHPOINTS (PID)'
371
     Enables watchpoints in the process identified by PID.  This is
372
     used, e.g., on HP-UX which provides operations to disable and
373
     enable the page-level memory protection that implements hardware
374
     watchpoints on that platform.
375
 
376
`TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT (PID,START,LEN)'
377
     Some addresses may not be profitable to use hardware to watch, or
378
     may be difficult to understand when the addressed object is out of
379
     scope, and hence should not be watched with hardware watchpoints.
380
     On some targets, this may have severe performance penalties, such
381
     that we might as well use regular watchpoints, and save (possibly
382
     precious) hardware watchpoints for other locations.
383
 
384
`target_insert_watchpoint (ADDR, LEN, TYPE)'
385
`target_remove_watchpoint (ADDR, LEN, TYPE)'
386
     Insert or remove a hardware watchpoint starting at ADDR, for LEN
387
     bytes.  TYPE is the watchpoint type, one of the possible values of
388
     the enumerated data type `target_hw_bp_type', defined by
389
     `breakpoint.h' as follows:
390
 
391
           enum target_hw_bp_type
392
             {
393
               hw_write   = 0, /* Common (write) HW watchpoint */
394
               hw_read    = 1, /* Read    HW watchpoint */
395
               hw_access  = 2, /* Access (read or write) HW watchpoint */
396
               hw_execute = 3  /* Execute HW breakpoint */
397
             };
398
 
399
     These two macros should return 0 for success, non-zero for failure.
400
 
401
`target_remove_hw_breakpoint (ADDR, SHADOW)'
402
`target_insert_hw_breakpoint (ADDR, SHADOW)'
403
     Insert or remove a hardware-assisted breakpoint at address ADDR.
404
     Returns zero for success, non-zero for failure.  SHADOW is the
405
     real contents of the byte where the breakpoint has been inserted;
406
     it is generally not valid when hardware breakpoints are used, but
407
     since no other code touches these values, the implementations of
408
     the above two macros can use them for their internal purposes.
409
 
410
`target_stopped_data_address ()'
411
     If the inferior has some watchpoint that triggered, return the
412
     address associated with that watchpoint.  Otherwise, return zero.
413
 
414
`DECR_PC_AFTER_HW_BREAK'
415
     If defined, GDB decrements the program counter by the value of
416
     `DECR_PC_AFTER_HW_BREAK' after a hardware break-point.  This
417
     overrides the value of `DECR_PC_AFTER_BREAK' when a breakpoint
418
     that breaks is a hardware-assisted breakpoint.
419
 
420
`HAVE_STEPPABLE_WATCHPOINT'
421
     If defined to a non-zero value, it is not necessary to disable a
422
     watchpoint to step over it.
423
 
424
`HAVE_NONSTEPPABLE_WATCHPOINT'
425
     If defined to a non-zero value, GDB should disable a watchpoint to
426
     step the inferior over it.
427
 
428
`HAVE_CONTINUABLE_WATCHPOINT'
429
     If defined to a non-zero value, it is possible to continue the
430
     inferior after a watchpoint has been hit.
431
 
432
`CANNOT_STEP_HW_WATCHPOINTS'
433
     If this is defined to a non-zero value, GDB will remove all
434
     watchpoints before stepping the inferior.
435
 
436
`STOPPED_BY_WATCHPOINT (WAIT_STATUS)'
437
     Return non-zero if stopped by a watchpoint.  WAIT_STATUS is of the
438
     type `struct target_waitstatus', defined by `target.h'.
439
 
440
x86 Watchpoints
441
---------------
442
 
443
   The 32-bit Intel x86 (a.k.a. ia32) processors feature special debug
444
registers designed to facilitate debugging.  GDB provides a generic
445
library of functions that x86-based ports can use to implement support
446
for watchpoints and hardware-assisted breakpoints.  This subsection
447
documents the x86 watchpoint facilities in GDB.
448
 
449
   To use the generic x86 watchpoint support, a port should do the
450
following:
451
 
452
   * Define the macro `I386_USE_GENERIC_WATCHPOINTS' somewhere in the
453
     target-dependent headers.
454
 
455
   * Include the `config/i386/nm-i386.h' header file _after_ defining
456
     `I386_USE_GENERIC_WATCHPOINTS'.
457
 
458
   * Add `i386-nat.o' to the value of the Make variable `NATDEPFILES'
459
     (*note NATDEPFILES: Native Debugging.) or `TDEPFILES' (*note
460
     TDEPFILES: Target Architecture Definition.).
461
 
462
   * Provide implementations for the `I386_DR_LOW_*' macros described
463
     below.  Typically, each macro should call a target-specific
464
     function which does the real work.
465
 
466
   The x86 watchpoint support works by maintaining mirror images of the
467
debug registers.  Values are copied between the mirror images and the
468
real debug registers via a set of macros which each target needs to
469
provide:
470
 
471
`I386_DR_LOW_SET_CONTROL (VAL)'
472
     Set the Debug Control (DR7) register to the value VAL.
473
 
474
`I386_DR_LOW_SET_ADDR (IDX, ADDR)'
475
     Put the address ADDR into the debug register number IDX.
476
 
477
`I386_DR_LOW_RESET_ADDR (IDX)'
478
     Reset (i.e. zero out) the address stored in the debug register
479
     number IDX.
480
 
481
`I386_DR_LOW_GET_STATUS'
482
     Return the value of the Debug Status (DR6) register.  This value is
483
     used immediately after it is returned by `I386_DR_LOW_GET_STATUS',
484
     so as to support per-thread status register values.
485
 
486
   For each one of the 4 debug registers (whose indices are from 0 to 3)
487
that store addresses, a reference count is maintained by GDB, to allow
488
sharing of debug registers by several watchpoints.  This allows users
489
to define several watchpoints that watch the same expression, but with
490
different conditions and/or commands, without wasting debug registers
491
which are in short supply.  GDB maintains the reference counts
492
internally, targets don't have to do anything to use this feature.
493
 
494
   The x86 debug registers can each watch a region that is 1, 2, or 4
495
bytes long.  The ia32 architecture requires that each watched region be
496
appropriately aligned: 2-byte region on 2-byte boundary, 4-byte region
497
on 4-byte boundary.  However, the x86 watchpoint support in GDB can
498
watch unaligned regions and regions larger than 4 bytes (up to 16
499
bytes) by allocating several debug registers to watch a single region.
500
This allocation of several registers per a watched region is also done
501
automatically without target code intervention.
502
 
503
   The generic x86 watchpoint support provides the following API for the
504
GDB's application code:
505
 
506
`i386_region_ok_for_watchpoint (ADDR, LEN)'
507
     The macro `TARGET_REGION_OK_FOR_HW_WATCHPOINT' is set to call this
508
     function.  It counts the number of debug registers required to
509
     watch a given region, and returns a non-zero value if that number
510
     is less than 4, the number of debug registers available to x86
511
     processors.
512
 
513
`i386_stopped_data_address (void)'
514
     The macros `STOPPED_BY_WATCHPOINT' and
515
     `target_stopped_data_address' are set to call this function.  The
516
     argument passed to `STOPPED_BY_WATCHPOINT' is ignored.  This
517
     function examines the breakpoint condition bits in the DR6 Debug
518
     Status register, as returned by the `I386_DR_LOW_GET_STATUS'
519
     macro, and returns the address associated with the first bit that
520
     is set in DR6.
521
 
522
`i386_insert_watchpoint (ADDR, LEN, TYPE)'
523
`i386_remove_watchpoint (ADDR, LEN, TYPE)'
524
     Insert or remove a watchpoint.  The macros
525
     `target_insert_watchpoint' and `target_remove_watchpoint' are set
526
     to call these functions.  `i386_insert_watchpoint' first looks for
527
     a debug register which is already set to watch the same region for
528
     the same access types; if found, it just increments the reference
529
     count of that debug register, thus implementing debug register
530
     sharing between watchpoints.  If no such register is found, the
531
     function looks for a vacant debug register, sets its mirrorred
532
     value to ADDR, sets the mirrorred value of DR7 Debug Control
533
     register as appropriate for the LEN and TYPE parameters, and then
534
     passes the new values of the debug register and DR7 to the
535
     inferior by calling `I386_DR_LOW_SET_ADDR' and
536
     `I386_DR_LOW_SET_CONTROL'.  If more than one debug register is
537
     required to cover the given region, the above process is repeated
538
     for each debug register.
539
 
540
     `i386_remove_watchpoint' does the opposite: it resets the address
541
     in the mirrorred value of the debug register and its read/write and
542
     length bits in the mirrorred value of DR7, then passes these new
543
     values to the inferior via `I386_DR_LOW_RESET_ADDR' and
544
     `I386_DR_LOW_SET_CONTROL'.  If a register is shared by several
545
     watchpoints, each time a `i386_remove_watchpoint' is called, it
546
     decrements the reference count, and only calls
547
     `I386_DR_LOW_RESET_ADDR' and `I386_DR_LOW_SET_CONTROL' when the
548
     count goes to zero.
549
 
550
`i386_insert_hw_breakpoint (ADDR, SHADOW'
551
`i386_remove_hw_breakpoint (ADDR, SHADOW)'
552
     These functions insert and remove hardware-assisted breakpoints.
553
     The macros `target_insert_hw_breakpoint' and
554
     `target_remove_hw_breakpoint' are set to call these functions.
555
     These functions work like `i386_insert_watchpoint' and
556
     `i386_remove_watchpoint', respectively, except that they set up
557
     the debug registers to watch instruction execution, and each
558
     hardware-assisted breakpoint always requires exactly one debug
559
     register.
560
 
561
`i386_stopped_by_hwbp (void)'
562
     This function returns non-zero if the inferior has some watchpoint
563
     or hardware breakpoint that triggered.  It works like
564
     `i386_stopped_data_address', except that it doesn't return the
565
     address whose watchpoint triggered.
566
 
567
`i386_cleanup_dregs (void)'
568
     This function clears all the reference counts, addresses, and
569
     control bits in the mirror images of the debug registers.  It
570
     doesn't affect the actual debug registers in the inferior process.
571
 
572
*Notes:*
573
  1. x86 processors support setting watchpoints on I/O reads or writes.
574
     However, since no target supports this (as of March 2001), and
575
     since `enum target_hw_bp_type' doesn't even have an enumeration
576
     for I/O watchpoints, this feature is not yet available to GDB
577
     running on x86.
578
 
579
  2. x86 processors can enable watchpoints locally, for the current task
580
     only, or globally, for all the tasks.  For each debug register,
581
     there's a bit in the DR7 Debug Control register that determines
582
     whether the associated address is watched locally or globally.  The
583
     current implementation of x86 watchpoint support in GDB always
584
     sets watchpoints to be locally enabled, since global watchpoints
585
     might interfere with the underlying OS and are probably
586
     unavailable in many platforms.
587
 
588

589
File: gdbint.info,  Node: User Interface,  Next: Symbol Handling,  Prev: Algorithms,  Up: Top
590
 
591
User Interface
592
**************
593
 
594
   GDB has several user interfaces.  Although the command-line interface
595
is the most common and most familiar, there are others.
596
 
597
Command Interpreter
598
===================
599
 
600
   The command interpreter in GDB is fairly simple.  It is designed to
601
allow for the set of commands to be augmented dynamically, and also has
602
a recursive subcommand capability, where the first argument to a
603
command may itself direct a lookup on a different command list.
604
 
605
   For instance, the `set' command just starts a lookup on the
606
`setlist' command list, while `set thread' recurses to the
607
`set_thread_cmd_list'.
608
 
609
   To add commands in general, use `add_cmd'.  `add_com' adds to the
610
main command list, and should be used for those commands.  The usual
611
place to add commands is in the `_initialize_XYZ' routines at the ends
612
of most source files.
613
 
614
   Before removing commands from the command set it is a good idea to
615
deprecate them for some time.  Use `deprecate_cmd' on commands or
616
aliases to set the deprecated flag.  `deprecate_cmd' takes a `struct
617
cmd_list_element' as it's first argument.  You can use the return value
618
from `add_com' or `add_cmd' to deprecate the command immediately after
619
it is created.
620
 
621
   The first time a comamnd is used the user will be warned and offered
622
a replacement (if one exists). Note that the replacement string passed
623
to `deprecate_cmd' should be the full name of the command, i.e. the
624
entire string the user should type at the command line.
625
 
626
UI-Independent Output--the `ui_out' Functions
627
=============================================
628
 
629
   The `ui_out' functions present an abstraction level for the GDB
630
output code.  They hide the specifics of different user interfaces
631
supported by GDB, and thus free the programmer from the need to write
632
several versions of the same code, one each for every UI, to produce
633
output.
634
 
635
Overview and Terminology
636
------------------------
637
 
638
   In general, execution of each GDB command produces some sort of
639
output, and can even generate an input request.
640
 
641
   Output can be generated for the following purposes:
642
 
643
   * to display a _result_ of an operation;
644
 
645
   * to convey _info_ or produce side-effects of a requested operation;
646
 
647
   * to provide a _notification_ of an asynchronous event (including
648
     progress indication of a prolonged asynchronous operation);
649
 
650
   * to display _error messages_ (including warnings);
651
 
652
   * to show _debug data_;
653
 
654
   * to _query_ or prompt a user for input (a special case).
655
 
656
This section mainly concentrates on how to build result output,
657
although some of it also applies to other kinds of output.
658
 
659
   Generation of output that displays the results of an operation
660
involves one or more of the following:
661
 
662
   * output of the actual data
663
 
664
   * formatting the output as appropriate for console output, to make it
665
     easily readable by humans
666
 
667
   * machine oriented formatting-a more terse formatting to allow for
668
     easy parsing by programs which read GDB's output
669
 
670
   * annotation, whose purpose is to help a GUI (such as GDBTK or
671
     Emacs) to identify interesting parts in the output
672
 
673
   The `ui_out' routines take care of the first three aspects.
674
Annotations are provided by separate annotation routines.  Note that
675
use of annotations for an interface between a GUI and GDB is deprecated.
676
 
677
   Output can be in the form of a single item, which we call a "field";
678
a "list" of fields; or a "table", which is a list of fields with a
679
header.  In a BNF-like form:
680
 
681
      ::= any single item of data kept by gdb ;;
682
 
683
      ::= {  } ;;
684
 
685
      ::= 
{ } ;;
686
 
687
     
::= { } ;;
688
 
689
      ::=    ;;</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>690</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>691</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>General Conventions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>692</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>-------------------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>693</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>694</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   All `ui_out' routines currently are of type `void', except for</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>695</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_stream_new' which returns a pointer to the newly created object.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>696</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>697</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The first parameter is always the `ui_out' vector object, a pointer</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>698</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>to a `struct ui_out'.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>699</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>700</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The FORMAT parameter is like in `printf' family of functions.  When</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>701</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>it is present, there is usually also a variable list of arguments used</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>702</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>to satisfy the `%' specifiers in the supplied format.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>703</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>704</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   When a character string argument is not used in a `ui_out' function</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>705</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>call, a `NULL' pointer has to be supplied instead.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>706</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>707</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Table and List Functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>708</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>------------------------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>709</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>710</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This section introduces `ui_out' routines for building lists and</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>711</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>tables.  The routines to output the actual data items (fields) are</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>712</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>presented in the next section.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>713</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>714</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   To recap: A "list" is a sequence of "fields" with information about</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>715</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>an object; a "table" is a list of lists, each on a separate line,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>716</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>prefixed by a "header" line with the column "titles".</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>717</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>718</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Use the table functions if your output is composed of a list of</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>719</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>fields for several objects and the console output should have a header.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>720</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Use this even when you are listing just one object but you still want</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>721</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>the header.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>722</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>723</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Use the list functions for the output of each object of a table or if</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>724</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>your output consists of a single list of fields.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>725</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>726</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   You can nest a list into a table, but not the other way around.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>727</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>728</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Lists can also be nested: some of your fields may be lists or</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>729</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>"tuples"-`{NAME,VALUE}' pairs.  The maximum nesting level is currently</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>730</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>4.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>731</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>732</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The overall structure of the table output code is something like</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>733</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>this:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>734</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>735</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       ui_out_table_begin</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>736</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         ui_out_table_header</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>737</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         ...</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>738</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         ui_out_table_body</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>739</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_list_begin</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>740</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>             ui_out_field_*</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>741</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>             ...</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>742</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_list_end</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>743</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ...</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>744</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       ui_out_table_end</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>745</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>746</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Here's the description of table- and list-related `ui_out' functions:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>747</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>748</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_table_begin (struct ui_out *UIOUT, int</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>749</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          NBROFCOLS, char *TBLID)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>750</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     The function `ui_out_table_begin' marks the beginning of the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>751</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     output of a table.  It should always be called before any other</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>752</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `ui_out' function for a given table.  NBROFCOLS is the number of</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>753</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     columns in the table, and TBLID is an optional string identifying</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>754</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     the table.  The string pointed to by TBLID is copied by the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>755</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     implementation of `ui_out_table_begin', so the application can</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>756</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     free the string if it was `malloc'ed.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>757</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>758</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     The companion function `ui_out_table_end', described below, marks</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>759</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     the end of the table's output.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>760</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>761</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_table_header (struct ui_out *UIOUT, int WIDTH,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>762</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          enum ui_align ALIGNMENT, char *COLHDR)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>763</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `ui_out_table_header' provides the header information for a single</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>764</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     table column.  You call this function several times, one each for</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>765</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     every column of the table, after `ui_out_table_begin', but before</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>766</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `ui_out_table_body'.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>767</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>768</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     The value of WIDTH gives the column width in characters.  The</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>769</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     value of ALIGNMENT is one of `left', `center', and `right', and it</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>770</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     specifies how to align the header: left-justify, center, or</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>771</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     right-justify it.  COLHDR points to a string that specifies the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>772</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     column header; the implementation copies that string, so column</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>773</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     header strings in `malloc'ed storage can be freed after the call.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>774</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>775</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_table_body (struct ui_out *UIOUT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>776</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function marks the end of header information and the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>777</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     beginning of table body output.  It doesn't by itself produce any</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>778</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     data output; that is done by the list and field output functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>779</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     described below.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>780</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>781</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_table_end (struct ui_out *UIOUT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>782</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function signals the end of a table's output.  It should be</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>783</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     called after the table body has been produced by the list and field</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>784</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     output functions.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>785</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>786</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     There should be exactly one call to `ui_out_table_end' for each</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>787</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     call to `ui_out_table_begin', otherwise the `ui_out' functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>788</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     will signal an internal error.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>789</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>790</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The output of the lists that represent the table rows must follow the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>791</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>call to `ui_out_table_body' and precede the call to `ui_out_table_end'.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>792</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>You produce the lists by calling `ui_out_list_begin' and</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>793</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_list_end', with suitable calls to functions which actually</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>794</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>output fields between them.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>795</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>796</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_list_begin (struct ui_out *UIOUT, char *LSTID)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>797</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function marks the beginning or a list output.  LSTID points</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>798</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     to an optional string that identifies the list; it is copied by</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>799</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     the implementation, and so strings in `malloc'ed storage can be</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>800</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     freed after the call.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>801</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>802</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_list_end (struct ui_out *UIOUT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>803</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function signals an end of a list output.  There should be</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>804</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     exactly one call to `ui_out_list_end' for each call to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>805</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `ui_out_list_begin', otherwise an internal GDB error will be</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>806</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     signaled.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>807</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>808</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Item Output Functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>809</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>---------------------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>810</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>811</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The functions described below produce output for the actual data</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>812</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>items, or fields, which contain information about the object.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>813</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>814</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Choose the appropriate function accordingly to your particular needs.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>815</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>816</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_fmt (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>817</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FLDNAME, char *FORMAT, ...)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>818</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This is the most general output function.  It produces the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>819</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     representation of the data in the variable-length argument list</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>820</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     according to formatting specifications in FORMAT, a `printf'-like</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>821</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     format string.  The optional argument FLDNAME supplies the name of</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>822</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     the field.  The data items themselves are supplied as additional</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>823</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     arguments after FORMAT.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>824</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>825</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This generic function should be used only when it is not possible</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>826</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     to use one of the specialized versions (see below).</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>827</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>828</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_int (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>829</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FLDNAME, int VALUE)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>830</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function outputs a value of an `int' variable.  It uses the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>831</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `"%d"' output conversion specification.  FLDNAME specifies the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>832</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     name of the field.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>833</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>834</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_core_addr (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>835</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FLDNAME, CORE_ADDR ADDRESS)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>836</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function outputs an address.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>837</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>838</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_string (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>839</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FLDNAME, const char *STRING)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>840</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function outputs a string using the `"%s"' conversion</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>841</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     specification.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>842</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>843</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Sometimes, there's a need to compose your output piece by piece using</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>844</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>functions that operate on a stream, such as `value_print' or</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>845</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`fprintf_symbol_filtered'.  These functions accept an argument of the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>846</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>type `struct ui_file *', a pointer to a `ui_file' object used to store</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>847</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>the data stream used for the output.  When you use one of these</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>848</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>functions, you need a way to pass their results stored in a `ui_file'</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>849</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>object to the `ui_out' functions.  To this end, you first create a</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>850</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_stream' object by calling `ui_out_stream_new', pass the `stream'</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>851</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>member of that `ui_stream' object to `value_print' and similar</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>852</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>functions, and finally call `ui_out_field_stream' to output the field</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>853</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>you constructed.  When the `ui_stream' object is no longer needed, you</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>854</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>should destroy it and free its memory by calling `ui_out_stream_delete'.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>855</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>856</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: struct ui_stream *ui_out_stream_new (struct ui_out *UIOUT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>857</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function creates a new `ui_stream' object which uses the same</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>858</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     output methods as the `ui_out' object whose pointer is passed in</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>859</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     UIOUT.  It returns a pointer to the newly created `ui_stream'</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>860</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     object.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>861</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>862</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_stream_delete (struct ui_stream *STREAMBUF)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>863</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This functions destroys a `ui_stream' object specified by</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>864</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     STREAMBUF.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>865</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>866</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_stream (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>867</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FIELDNAME, struct ui_stream *STREAMBUF)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>868</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function consumes all the data accumulated in</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>869</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     `streambuf->stream' and outputs it like `ui_out_field_string'</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>870</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     does.  After a call to `ui_out_field_stream', the accumulated data</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>871</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     no longer exists, but the stream is still valid and may be used</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>872</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     for producing more fields.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>873</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>874</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   *Important:* If there is any chance that your code could bail out</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>875</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>before completing output generation and reaching the point where</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>876</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_stream_delete' is called, it is necessary to set up a cleanup,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>877</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>to avoid leaking memory and other resources.  Here's a skeleton code to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>878</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>do that:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>879</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>880</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      struct ui_stream *mybuf = ui_out_stream_new (uiout);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>881</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      struct cleanup *old = make_cleanup (ui_out_stream_delete, mybuf);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>882</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      ...</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>883</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      do_cleanups (old);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>884</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>885</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   If the function already has the old cleanup chain set (for other</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>886</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>kinds of cleanups), you just have to add your cleanup to it:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>887</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>888</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       mybuf = ui_out_stream_new (uiout);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>889</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       make_cleanup (ui_out_stream_delete, mybuf);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>890</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>891</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Note that with cleanups in place, you should not call</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>892</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_stream_delete' directly, or you would attempt to free the same</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>893</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>buffer twice.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>894</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>895</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Utility Output Functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>896</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>------------------------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>897</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>898</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_field_skip (struct ui_out *UIOUT, char</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>899</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          *FLDNAME)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>900</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function skips a field in a table.  Use it if you have to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>901</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     leave an empty field without disrupting the table alignment.  The</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>902</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     argument FLDNAME specifies a name for the (missing) filed.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>903</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>904</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_text (struct ui_out *UIOUT, char *STRING)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>905</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function outputs the text in STRING in a way that makes it</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>906</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     easy to be read by humans.  For example, the console</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>907</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     implementation of this method filters the text through a built-in</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>908</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     pager, to prevent it from scrolling off the visible portion of the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>909</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     screen.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>910</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>911</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     Use this function for printing relatively long chunks of text</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>912</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     around the actual field data: the text it produces is not aligned</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>913</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     according to the table's format.  Use `ui_out_field_string' to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>914</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     output a string field, and use `ui_out_message', described below,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>915</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     to output short messages.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>916</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>917</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_spaces (struct ui_out *UIOUT, int NSPACES)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>918</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function outputs NSPACES spaces.  It is handy to align the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>919</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     text produced by `ui_out_text' with the rest of the table or list.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>920</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>921</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_message (struct ui_out *UIOUT, int VERBOSITY,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>922</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          char *FORMAT, ...)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>923</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function produces a formatted message, provided that the</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>924</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     current verbosity level is at least as large as given by</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>925</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     VERBOSITY.  The current verbosity level is specified by the user</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>926</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     with the `set verbositylevel' command.(1)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>927</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>928</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_wrap_hint (struct ui_out *UIOUT, char *INDENT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>929</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function gives the console output filter (a paging filter) a</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>930</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     hint of where to break lines which are too long.  Ignored for all</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>931</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     other output consumers.  INDENT, if non-`NULL', is the string to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>932</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     be printed to indent the wrapped text on the next line; it must</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>933</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     remain accessible until the next call to `ui_out_wrap_hint', or</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>934</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     until an explicit newline is produced by one of the other</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>935</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     functions.  If INDENT is `NULL', the wrapped text will not be</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>936</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     indented.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>937</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>938</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> - Function: void ui_out_flush (struct ui_out *UIOUT)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>939</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     This function flushes whatever output has been accumulated so far,</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>940</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>     if the UI buffers output.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>941</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>942</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Examples of Use of `ui_out' functions</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>943</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>-------------------------------------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>944</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>945</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This section gives some practical examples of using the `ui_out'</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>946</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>functions to generalize the old console-oriented code in GDB.  The</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>947</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>examples all come from functions defined on the `breakpoints.c' file.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>948</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>949</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This example, from the `breakpoint_1' function, shows how to produce</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>950</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>a table.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>951</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>952</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The original code was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>953</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>954</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      if (!found_a_breakpoint++)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>955</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>956</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_breakpoints_headers ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>957</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>958</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (0);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>959</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          printf_filtered ("Num ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>960</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>961</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          printf_filtered ("Type           ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>962</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (2);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>963</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          printf_filtered ("Disp ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>964</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (3);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>965</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          printf_filtered ("Enb ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>966</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          if (addressprint)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>967</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>968</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>              annotate_field (4);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>969</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>              printf_filtered ("Address    ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>970</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>971</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>972</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          printf_filtered ("What\n");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>973</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>974</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_breakpoints_table ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>975</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>976</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>977</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Here's the new version:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>978</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>979</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>      if (!found_a_breakpoint++)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>980</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>981</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_breakpoints_headers ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>982</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          if (addressprint)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>983</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            ui_out_table_begin (ui, 6);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>984</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          else</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>985</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            ui_out_table_begin (ui, 5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>986</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>987</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (0);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>988</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_header (ui, 4, left, "Num");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>989</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>990</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_header (ui, 15, left, "Type");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>991</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (2);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>992</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_header (ui, 5, left, "Disp");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>993</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (3);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>994</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_header (ui, 4, left, "Enb");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>995</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          if (addressprint)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>996</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>997</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>              annotate_field (4);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>998</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>              ui_out_table_header (ui, 11, left, "Address");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>999</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1000</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1001</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_header (ui, 40, left, "What");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1002</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1003</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          ui_out_table_body (ui);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1004</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          annotate_breakpoints_table ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1005</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1006</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1007</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This example, from the `print_one_breakpoint' function, shows how to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1008</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>produce the actual data for the table whose structure was defined in</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1009</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>the above example.  The original code was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1010</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1011</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_record ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1012</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (0);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1013</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        printf_filtered ("%-3d ", b->number);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1014</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1015</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        if ((int)b->type > (sizeof(bptypes)/sizeof(bptypes[0]))</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1016</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            || ((int) b->type != bptypes[(int) b->type].type))</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1017</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          internal_error ("bptypes table does not describe type #%d.",</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1018</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>                          (int)b->type);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1019</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        printf_filtered ("%-14s ", bptypes[(int)b->type].description);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1020</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (2);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1021</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        printf_filtered ("%-4s ", bpdisps[(int)b->disposition]);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1022</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (3);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1023</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        printf_filtered ("%-3c ", bpenables[(int)b->enable]);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1024</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1025</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This is the new version:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1026</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1027</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_record ();</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1028</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        ui_out_list_begin (uiout, "bkpt");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1029</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (0);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1030</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        ui_out_field_int (uiout, "number", b->number);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1031</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1032</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0])))</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1033</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>            || ((int) b->type != bptypes[(int) b->type].type))</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1034</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>          internal_error ("bptypes table does not describe type #%d.",</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1035</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>                          (int) b->type);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1036</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        ui_out_field_string (uiout, "type", bptypes[(int)b->type].description);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1037</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (2);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1038</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        ui_out_field_string (uiout, "disp", bpdisps[(int)b->disposition]);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1039</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        annotate_field (3);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1040</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>        ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int)b->enable]);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1041</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1042</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This example, also from `print_one_breakpoint', shows how to produce</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1043</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>a complicated output field using the `print_expression' functions which</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1044</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>requires a stream to be passed.  It also shows how to automate stream</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1045</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>destruction with cleanups.  The original code was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1046</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1047</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1048</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         print_expression (b->exp, gdb_stdout);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1049</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1050</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The new version is:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1051</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1052</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       struct ui_stream *stb = ui_out_stream_new (uiout);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1053</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1054</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       ...</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1055</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1056</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       print_expression (b->exp, stb->stream);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1057</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       ui_out_field_stream (uiout, "what", local_stream);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1058</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1059</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   This example, also from `print_one_breakpoint', shows how to use</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1060</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_text' and `ui_out_field_string'.  The original code was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1061</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1062</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1063</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->dll_pathname == NULL)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1064</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         printf_filtered ("<any library> ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1065</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       else</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1066</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         printf_filtered ("library \"%s\" ", b->dll_pathname);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1067</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1068</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   It became:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1069</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1070</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1071</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->dll_pathname == NULL)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1072</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1073</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_field_string (uiout, "what", "<any library>");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1074</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_spaces (uiout, 1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1075</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1076</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       else</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1077</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1078</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_text (uiout, "library \"");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1079</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_field_string (uiout, "what", b->dll_pathname);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1080</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_text (uiout, "\" ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1081</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1082</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1083</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   The following example from `print_one_breakpoint' shows how to use</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1084</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_field_int' and `ui_out_spaces'.  The original code was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1085</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1086</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1087</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->forked_inferior_pid != 0)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1088</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         printf_filtered ("process %d ", b->forked_inferior_pid);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1089</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1090</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   It became:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1091</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1092</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1093</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->forked_inferior_pid != 0)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1094</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1095</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_text (uiout, "process ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1096</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_field_int (uiout, "what", b->forked_inferior_pid);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1097</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_spaces (uiout, 1);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1098</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1099</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1100</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Here's an example of using `ui_out_field_string'.  The original code</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1101</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>was:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1102</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1103</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1104</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->exec_pathname != NULL)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1105</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         printf_filtered ("program \"%s\" ", b->exec_pathname);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1106</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1107</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   It became:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1108</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1109</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (5);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1110</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       if (b->exec_pathname != NULL)</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1111</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         {</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1112</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_text (uiout, "program \"");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1113</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_field_string (uiout, "what", b->exec_pathname);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1114</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>           ui_out_text (uiout, "\" ");</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1115</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>         }</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1116</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1117</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   Finally, here's an example of printing an address.  The original</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1118</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>code:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1119</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1120</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (4);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1121</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       printf_filtered ("%s ",</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1122</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>             local_hex_string_custom ((unsigned long) b->address, "08l"));</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1123</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1124</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   It became:</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1125</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1126</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       annotate_field (4);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1127</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>       ui_out_field_core_addr (uiout, "Address", b->address);</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1128</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1129</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Console Printing</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1130</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>================</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1131</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1132</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>TUI</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1133</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>===</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1134</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1135</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>libgdb</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1136</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>======</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1137</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1138</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   `libgdb' was an abortive project of years ago.  The theory was to</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1139</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>provide an API to GDB's functionality.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1140</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1141</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   ---------- Footnotes ----------</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1142</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1143</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>   (1) As of this writing (April 2001), setting verbosity level is not</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1144</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>yet implemented, and is always returned as zero.  So calling</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1145</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>`ui_out_message' with a VERBOSITY argument more than zero will cause</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1146</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>the message to never be printed.</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>1147</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code> </code></pre></td>
      </tr>
   </tbody>
</table>


<script type='text/javascript'>
/* <![CDATA[ */
var rev = new Array();
var a = document.getElementsByTagName('a');
for (var i = 0; i < a.length; i++) {
  if (a[i].className == 'blame-revision') {
    var id = a[i].id;
    addEvent(a[i], 'mouseover', function() { mouseover(this) } );
    addEvent(a[i], 'mouseout', function() { mouseout(this) } );
  }
}

function mouseover(a) {
  // Find the revision by using the link
  var m = /rev=(\d+)/.exec(a.href);
  var r = m[1];

  div = document.createElement('div');
  div.className = 'blame-popup';
  div.innerHTML = rev[r];
  a.parentNode.appendChild(div);
}

function mouseout(a) {
  var div = a.parentNode.parentNode.getElementsByTagName('div');
  for (var i = 0; i < div.length; i++) {
    if (div[i].className = 'blame-popup') {
      div[i].parentNode.removeChild(div[i]);
    }
  }
}

function addEvent(obj, type, func) {
  if (obj.addEventListener) {
    obj.addEventListener(type, func, false);
    return true;
  } else if (obj.attachEvent) {
    return obj.attachEvent('on' + type, func);
  } else {
    return false;
  }
}
rev[578] = '<div class="info"><span class="date">2002-01-16 10:26:11 GMT<\/span><\/div><div class="msg">Insight<\/div>';
/* ]]> */
</script>

</div>
</div>
<div id="websvnfooter">
    <p style="padding:0; margin:0"><small>powered by: <a href="http://www.websvn.info">WebSVN 2.1.0</a></small></p>
</div>
        </div>

                
        <div style="clear: both; margin-left: 200px;">
            <ins
                class="adsbygoogle"
                style="display:inline-block;width:728px;height:90px"
                data-ad-client="ca-pub-8561717607970465"
                data-ad-slot="4128044249"></ins>
            <script type="text/javascript">(adsbygoogle = window.adsbygoogle || []).push({});</script>
        </div>
        
            </div>
    <div class="bot">
        © copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.
    </div>
</div>

<!-- Old browser warning -->
<script type="text/javascript">
  if (!('borderImage' in document.createElement('div').style)) {
    var div = document.getElementById('old-browser-warning')
    div.innerHTML = '<b>Your browser is out-of-date!</b>        Update your browser to view this website correctly.'
    div.setAttribute('style', 'background-color: red; border-bottom: 2px solid black; margin: 0 -12px 12px -12px; padding: 12px; text-align: center;')
  }
</script>
<!-- /Old browser warning -->
<!-- Google search -->
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
<script type="text/javascript" src="//www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script>
<script type="text/javascript" src="//www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
<!-- /Google search -->

</body>
</html>