aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gdb/doc/libgdb.texinfo
blob: c67c3a88359d03a262525598a05bea156b25ed3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
\input texinfo   @c -*-texinfo-*-
@c %**start of header
@setfilename libgdb.info
@settitle Libgdb
@setchapternewpage odd
@c %**end of header

@ifinfo
This file documents libgdb, the GNU library for symbolic debuggers.

Copyright 1993 Cygnus Support

Permission is granted to ...
@end ifinfo

@c  This title page illustrates only one of the
@c  two methods of forming a title page.

@titlepage
@title Libgdb
@subtitle Version 0.1
@subtitle 27 Sep 1993
@author Thomas Lord

@c  The following two commands
@c  start the copyright page.
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1993 COPYRIGHT-OWNER

Published by ...

Permission is granted to ...
@end titlepage

@node Top, Overview, (dir), (dir)

@ifinfo

Libgdb is a library which provides the core functionality of a symbolic
debugger.  It is derived from GNU GDB and depends on the BFD library.

This is an early draft of this document.  Subsequent versions will likely
contain revisions, deletions and additions.

This document applies to version 0.0.

Text marked `[[[' indicates areas which require expansion.

Many nodes describe library entry points by giving a prototype and brief
description:

@deftypefun {const char **} gdb_warranty ()
(warranty_info)
Return a pointer to the text of the GDB disclaimer.
@end deftypefun

The parenthesized symbols (e.g. `(warranty_info)') refer to the
existing GDB source and generally indicate where to find code with
which to implement the library function.
@end ifinfo

@menu
* Copying::          Your rights and freedoms.
* Overview::	     The basics of libgdb and this document.
* Conventions::	     Programming conventions for users of libgdb.
* Targets::	     Selecting debugging targets and symbol tables.
* Symtabs::	     Accessing symbol tables and debugging information.
* Source::	     Relating inferiors to source files.
* Running::	     Creating, continuing, and stepping through an
		       inferior process.
* Stopping::         Using breakpoints, signaling an inferior.
* Stack::	     Accessing an inferior's execution stack.
* Expressions::      How to parse and evaluate expressions in the
 		       context of an inferior.
* Values::	     Data from the inferior, the values of expressions.
* Examining::	     Formatting values as strings.
* Types::	     Examining the types of an inferiors data.
@end menu


@node    Copying, Overview, top,      top
@comment node-name,     next,           previous, up
@chapter Copying
@cindex copying

blah blah

@node    Overview, Conventions, Copying,      top
@comment node-name,     next,           previous, up
@chapter Overview
@cindex overview
@cindex definitions


Libgdb is a library which provides the core functionality of a symbolic
debugger.  It is derived from GNU GDB and depends on the BFD library.

target
inferior



@node    Conventions, Targets, Overview,      top
@comment node-name,     next,           previous, up
@chapter Programming Conventions for Libgdb Clients
@cindex Conventions

@heading Naming Conventions

Names intentionally exported from libgdb all begin @code{gdb_}
as in @code{gdb_use_file}.


@heading Error Returns

Libgdb functions that might not succeed generally have a return
type of @code{gdb_error_t}.

@deftypefun {const char *} gdb_error_msg (gdb_error_t @var{error})
returns a reasonable error message for @var{error}.
@end deftypefun


@heading Blocking I/O

[[[....]]]


@heading Global Parameters
@subheading the current directory 
@deftypefun gdb_error_t gdb_cd (char * @var{dir})
Specify gdb's default directory as well as the working
directory for the inferior (when first started).@*
(cd_command)
@end deftypefun

@deftypefun {char *} gdb_copy_pwd ()
Make a copy of the name of gdb's default directory.@*
(pwd_command)
@end deftypefun


@subheading controlling the input/output radix
@deftypefun gdb_error_t gdb_set_base (int)
Change the default output radix to 10 or 16, or set it to 0
(heuristic).  This command is mostly obsolete now that the print
command allows formats to apply to aggregates, but is still handy
occasionally.@*
(set_base_command)
@end deftypefun

@deftypefun gdb_error_t gdb_set_input_radix (int)
@deftypefunx gdb_error_t gdb_set_output_radix (int)
@deftypefunx gdb_error_t gdb_set_radix (int)
Valid output radixes are only 0 (heuristic), 10, and 16.@*
(set_radix)
@end deftypefun


@subheading manipulating environments
@deftp Type {struct environ}
@example
struct environ
@{ 
  int allocated;
  char ** vector;
@}
@end example
A `struct environ' holds a description of environment
variable bindings.
@end deftp

@deftypefun {struct environ *} gdb_make_environ ()
Create a new (empty) environment.@*
(make_environ)
@end deftypefun

@deftypefun {void} gdb_free_environ (struct environ *)
Free an environment allocated by `gdb_make_environ'.@*
(free_environ)
@end deftypefun

@deftypefun {void} gdb_init_environ (struct environ * env)
Copy the processes environment into ENV.@*
(init_environ)
@end deftypefun

@deftypefun {char **} gdb_get_in_environ (const struct environ * @var{env}, const char * @var{var})
Look up the binding of @var{var} in @var{env}.@*
(get_in_environ)
@end deftypefun


@deftypefun {void} gdb_set_in_environ (struct environ * @var{env}, const char * @var{var}, const char * @var{value})
Lookup/bind variables within an environment.
(set_in_environ)
@end deftypefun


@subheading legal notices
@deftypefun {char **} gdb_copying ()
@deftypefunx {char **} gdb_warranty ()
These return pointers to NULL terminated arrays of strings.
They contain text which describes the conditions under which
libgdb is distributed (`gdb_copying') and which explains to
users that there is no warranty for libgdb (`gdb_warranty').@*
(show_warranty_command, show_copying_command)
@end deftypefun


@subheading the inferior's terminal
@deftypefun void gdb_inferiors_io (int @var{std_in}, int @var{std_out}, int @var{std_err})
Assert that the given descriptors should be copied into
descriptors 0, 1, and 2 of the inferior when it
is next run.
@end deftypefun


@heading callbacks

One idiom used in several places deserves mention.
At times, it makes sense for libgdb functions to 
invoke functions provided by the libgdb client.
Where this is the case, callback structures are used
to refer to client functions.  For example, here
are the declarations for a callback to which libgdb 
will pass an integer and a character pointer.

@example
struct a_gdb_cback;
typedef void (*a_gdb_cback_fn) (struct a_gdb_cback *,
                                int, char *);
@end example

Suppose the client wants the callback to be implemented
by @code{foo} which we will assume takes not only the integer
and character pointer, but also a floating point number.
The client could use these declarations:

@example
struct my_cback
@{
  struct a_gdb_cback gdb_cback;  /* must be first */
  float magic_number;
@};

void
foo_helper (struct a_gdb_cback * callback, int i, char * cp)
@{
  foo ( ((struct my_cback *)callback)->magic_number, i, c);
@}

struct my_cback
@{
   foo_helper,
   1079252848.8
@} the_cback;
@end example


@subheading stream callbacks

A common kind of callback takes just a character pointer,
presumed to point to part or all of an informational
message.

@example
struct gdb_stream_cback;
typedef void (*gdb_stream_cback_fn) (struct gdb_stream_cback *,
				     char *);
@end example


@subheading integer callbacks

Another common kind of callback takes just an integer.

@example
struct gdb_int_cback;
typedef void (*gdb_int_cback_fn) (struct gdb_int_cback *, int);
@end example

@node    Targets, Symtabs, Conventions,      top
@comment node-name,     next,           previous, up
@chapter Selecting Targets and Symbol Tables for Debugging
@cindex targets

@deftypefun gdb_error_t gdb_use_file (char * @var{filename})
Arrange to read both executable code and symbol table information
from FILENAME.

This is exactly equivalent to a sequence of two calls:
@example
  gdb_use_exec_file (filename);
  gdb_use_symbol_file (filename);
@end example
(file_command)
@end deftypefun


@deftypefun gdb_error_t gdb_use_exec_file (char * @var{filename})
Read the code to debug from `filename'.@*
(exec_file_command)
@end deftypefun


@deftypefun {char *} gdb_get_exec_file ()
Return the name of the executable file as a string or 0
if there is none.
@end deftypefun


@deftypefun gdb_error_t gdb_use_core (char * @var{filename})
Specify the whereabouts of a core dump file to be used as the
"contents of memory".  Traditionally, core files contain only some
parts of the address space of the process that generated them; GDB
can access the executable file itself for other parts.

If @var{filename} is @code{NULL}, no core file is used.@*
(core_file_command)
@end deftypefun


@deftypefun gdb_error_t gdb_use_symbol_file (char * @var{filename})
Arrange to read symbol table information from `filename'.

This is the same as:

  gdb_symbol_file_add (filename, 1, (CORE_ADDR)0, 1, 0, 0);

See @code{gdb_symbol_file_add} for finer control over the symbol 
table.@*
(symbol_file_command)
@end deftypefun


@deftypefun gdb_error_t gdb_symbol_file_add (@var{name}, @var{verbose}, @var{text_addr}, @var{replace}, @var{eager})
Arrange to read additional symbol table information from
the file `name'.

The arguments are:
@itemize @minus
@item struct gdb_stream_cback * @var{info_out}

Callback to handle informational output.

@item char * @var{name}

If not 0, verbose output will occur.

@item int @var{be_verbose}

Regulates the amount of informational output produced.

@item CORE_ADDR @var{text_addr}

is the address at which the named file is presumed to have 
been loaded.

@item int @var{replace}@*

If not 0, this will become the only file 
in the symbol table -- all previously loaded
symbol table information will be discarded.

@item int @var{readnow}

If not 0, eagerly read symbols from this file,otherwise
symbols will only be read lazily (as needed).
@end itemize
@end deftypefun


@deftypefun {char *} gdb_copy_exec_path ()
Make a copy of the execution path.@*
[[[implement: strsave(get_in_environ (inferior_environ, "PATH"));]]]@*
(path_info)
@end deftypefun


@deftypefun void gdb_mod_exec_path (char * @var{dirnames})
Add zero or more directories to the front of the execution path.
@var{dirnames} should be a colon separated list of directory names.@*
(path_command)
@end deftypefun


@deftypefun gdb_error_t gdb_target_device (char * @var{name})
Connects the libgdb host environment to a target machine 
or process.@*
(target foo)
@end deftypefun


@deftypefun gdb_error_t gdb_set_baud (int @var{rate})
If using a remote target connected by a serial port, 
use RATE as the communication speed.
@end deftypefun


@deftypefun gdb_error_t gdb_set_target_debugging (int @var{level})
Choose the level of verboseness of with which a remote
target produces debugging output.
@end deftypefun

@node    Symtabs, Source, Targets,      top
@comment node-name,     next,           previous, up
@chapter Accessing symbol tables and debugging information.
@cindex Symtabs
@cindex {Symbol Tables}

@deftp Type {struct symtab}
Each source file is represented by a struct symtab. 
In many contexts, @code{struct symtab *} is used in preference 
to a {char *} filename to refer to the source.
@end deftp


@deftypefun {char *} gdb_symtab_to_filename (struct symtab *)
@deftypefunx {char *} gdb_symtab_to_dirname (struct symtab *)
Return the location of the file corresponding to this symtab.
@code{gdb_symtab_to_dirname} might return @code{NULL} if no directory 
is known. @code{gdb_symtab_to_line_count} might return -1 if line
number information is unavailable.
@end deftypefun  

@deftypefun int gdb_symtab_to_line_count (struct symtab *)
(See also `Source')
@end deftypefun


@deftypefun {struct symtab *} gdb_filename_to_symtab (char * @var{filename})
Lookup the symbol table of a source file named NAME.@*
(lookup_symtab)
@end deftypefun


@deftp Type {struct symtab_and_line}
@example
struct symtab_and_line
@{
  struct symtab *symtab;
  int line;
  CORE_ADDR pc;
  CORE_ADDR end;
@}
@end example

@code{struct symtab_and_line} is used to refer to a particular line 
of source code.  It is used to locate breakpoints in the source
code and the executable.

@code{line} starts at 1 and proceeds through symtab->nlines. 
0 is never a valid line number; it is used to indicate 
that line number information is not available.
@end deftp


@deftypefun {struct symtab_and_line} gdb_find_pc_line (CORE_ADDR @var{pc}, int @var{notcurrent})
Find the source file and line number for a given @var{pc} value.
Return a structure containing a symtab pointer, a line number,
and a pc range for the entire source line.
The value's @code{.pc} field is NOT the specified @var{pc}.
@var{notcurrent} nonzero means, if specified pc is on a line boundary,
use the line that ends there.  Otherwise, in that case, the line
that begins there is used.@*
(find_pc_line)
@end deftypefun


@deftypefun gdb_error_t gdb_find_line (struct symtab_and_line * @var{out}, struct symtab *, int)
Create a symtab_and_line for a given symtab and line number.
In other words, if you know the source file and line, 
this returns a location for the breakpoint.@*
(resolve_sal_pc)
@end deftypefun


@deftypefun {struct symtabs_and_lines} gdb_decode_line (@var{argptr}, @var{firstln}, @var{default_symtab}, @var{default_line}, @var{canonical})
@example
  char ** argptr;
  int funfirstline;
  struct symtab * default_symtab;
  int default_line;
  char *** canonical;
@end example
  Parse a string that specifies a line number in GDB syntax.
  @var{argptr} will be advanced over the characters actually parsed.

   The string can be:

   LINENUM -- that line number in current file.  PC returned is 0.
   FILE:LINENUM -- that line in that file.  PC returned is 0.
   FUNCTION -- line number of openbrace of that function.
      PC returned is the start of the function.
   VARIABLE -- line number of definition of that variable.
      PC returned is 0.
   FILE:FUNCTION -- likewise, but prefer functions in that file.
   *EXPR -- line in which address EXPR appears.

   FUNCTION may be an undebuggable function found in minimal symbol
   table.

   If the argument FUNFIRSTLINE is nonzero, we want the first line
   of real code inside a function when a function is specified.

   DEFAULT_SYMTAB specifies the file to use if none is specified.
   It defaults to current_source_symtab.

   DEFAULT_LINE specifies the line number to use for relative line
   numbers (that start with signs).  Defaults to current_source_line.
   If CANONICAL is non-NULL, store an array of strings containing the
   canonical line specs there if necessary. Currently overloaded
   member functions and line numbers or static functions without a
   filename yield a canonical line spec. The array and the line spec
   strings are allocated on the heap, it is the callers responsibility
   to free them.

   Note that it is possible to return zero for the symtab
   if no file is validly specified.  Callers must check that.
   Also, the line number returned may be invalid.

   The return value of this function includes allocated memory
   which the caller is responsible for freeing:

	  struct symtabs_and_lines sals;
	  sals = decode_line_spec (arg, 1);
	  ....
	  free (sals.sals);@*
(decode_line_1)
@end deftypefun


@deftp Type {struct block *}
Lexical environments in the program are represented by struct block.
These are useful as arguements to expression parsing functions (see
`Expressions').
@end deftp


@deftypefun {struct block *} gdb_block_for_pc (CORE_ADDR)
Return the innermost lexical block containing the 
specified pc value, or 0 if there is none.@*
(block_for_pc)
@end deftypefun


@deftypefun {struct block *} gdb_get_frame_block (FRAME @var{frame})
This returns the block being executed by a given 
stack frame (see `Stack')@*
(get_frame_block)
@end deftypefun


@deftypefun int gdb_find_line_pc_range (@var{syms}, @var{line}, @var{start_out}, @var{end_out})
@example
struct symtab * @var{start_out};
int @var{line};
CORE_ADDR * @var{start_out};
CORE_ADDR * @var{end_out};
@end example
Find the range of pc values in a line.@*
Store the starting pc of the line into @code{*@var{startptr}}.
and the ending pc (start of next line) into @code{*@var{endptr}}.

Returns 1 to indicate success.@*
Returns 0 if could not find the specified line.@*
(find_line_pc_range)
@end deftypefun


@deftypefun int gdb_find_pc_partial_function (@var{pc}, @var{name}, @var{address}, @var{endaddr})
@example
CORE_ADDR @var{pc};
char **@var{name};
CORE_ADDR *@var{address};
CORE_ADDR *@var{endaddr};
@end example
Finds the "function" (text symbol) that is smaller than @var{pc} but
greatest of all of the potential text symbols.  Sets @code{*@var{name}}
and/or @code{*@var{address}} conditionally if that pointer is non-null.  If
@var{endaddr} is non-null, then set @code{*@var{endaddr}} to be the end of
the function (exclusive), but passing @var{endaddr} as non-null means that
the function might cause symbols to be read.  This function either succeeds
or fails (not halfway succeeds).  If it succeeds, it sets
@code{*@var{name}}, @code{*@var{address}}, and @code{*@var{endaddr}} to
real information and returns 1.  If it fails, it sets @code{*@var{name}},
@code{*@var{address}}, and @code{*@var{endaddr}} to zero and returns 0.

@example   
      pc = get_frame_pc (selected_frame);
      if (find_pc_partial_function (pc, &name, &low, &high) == 0)
	error ("No function contains program counter for selected frame.\n");
@end example
(find_pc_partial_function)
@end deftypefun


@deftypefun void gdb_list_symbols (@var{info_out}, @var{regexp}, @var{class}, @var{bpt})
@example
struct gdb_stream_cback * @var{info_out};
char * @var{regexp};
int @var{class};
int @var{bpt};
@end example
List all symbols (if @var{regexp} is NULL) or all symbols matching @var{regexp}.


If @var{class} is ...
@itemize @bullet
@item
0, list all symbols except functions, type names, and
constants (enums).
@item
1, list only functions.
@item
2, list only type names.
@item
3, list only method names.
@end itemize
BPT is non-zero if set a breakpoint at the functions we find.@*
(variables_info, functions_info, types_info, list_symbols)
@end deftypefun


@deftypefun int gdb_locals_info (struct gdb_stream_cback * @var{info_out}, FRAME @var{frame})
Print all the local variables in the given frame.
including all the blocks active in that frame
at its current pc.

Returns 1 if the job was done,
or 0 if nothing was printed because we have no info
on the function running in @var{frame}.@*
(locals_info)
@end deftypefun


@deftypefun int print_frame_arg_vars (struct gdb_stream_cback *, FRAME)
Similar to `gdb_locals_info'.@*
(args_info)
@end deftypefun

@node    Source, Running, Symtabs,      top
@comment node-name,     next,           previous, up
@chapter Relating Inferiors to Source Files
@cindex source
@cindex {source files}

How to find the source that corresponds to executable code and the
executable code that corresponds to a line of source.

@deftypefun {char *} gdb_copy_source_fullname (struct symtab *@var{s})
Return a copy of the full path name to a source file.
(See `Symtabs' for more information about filenames
and symbol tables.).
@end deftypefun


@deftypefun int gdb_open_source_file (struct symtab *@var{s})
Open a source file corresponding to @var{s}.  Returns a file descriptor
or negative number for error.
[[[We may decide not to provide this function.]]]@*
(open_source_file)
@end deftypefun


@deftypefun int gdb_source_line_pos (struct symtab * @var{s}, int @var{lineno})
Return the byte offset of a given line of source 
or a negative number if @var{lineno} is out of range.@*
(find_source_lines)
@end deftypefun


 -- IDIOM: The gdb command `show directories'.
@example
  puts_filtered ("Source directories searched: ");
  puts_filtered (source_path);
  puts_filtered ("\n");
@end example
(show_directories)


@deftypefun {char *} gdb_source_path ()
Return the path in which source files are sought.@*
(source_path)
@end deftypefun


@deftypefun void gdb_modify_source_path (char * @var{dirnames})
Change the source path according to dirnames.@*
(directory_command)
@end deftypefun


See `Symtabs' for functions relating symbol tables to files.
(source_info)


See `Symtabs' for functions relating source lines to PC values.
(line_info)


[[[Try to expose sources_info without having to introduce struct object *?]]]
(sources_info)


@node    Running, Stopping, Source,      top
@comment node-name,     next,           previous, up
@chapter Creating, Continuing, and Stepping Through an Inferior Process
@cindex running


@deftypefun gdb_error_t gdb_target_create_inferior (@var{exec}, @var{args}, @var{environ})
@example
char * @var{exec_file};
char * @var{inferior_args};
char ** @var{inferior_environment_vector};
@end example
Create a running inferior.
[[[I think the exec_file parameter is redundant.  Perhaps this will take
only two arguments.]]]@*
(run_command, target_create_inferior)
@end deftypefun


@deftypefun int gdb_target_has_execution ()
Return non-0 if an inferior is running.@*
(target_has_execution)
@end deftypefun


@deftypefun void gdb_target_kill ()
Kill the inferior process.   Make it go away.
The inferior may become a core file.
If so, gdb_target_has_stack() will return non-0.@*
(target_kill)
@end deftypefun


@deftypefun gdb_error_t gdb_step_1 (@var{skip_subs}, @var{single_inst}, @var{repeat_count})
@example 
int skip_subs;
int single_inst;
int repeat_count;
@end example
Continue a program a little bit.  Roughly:
@example
    for (; count > 0; --count)
      gdb_clear_proceed_status ();
      gdb_proceed (...);
@end example
(next_command, nexti_command, step_command, stepi_command)
@end deftypefun


 -- IDIOM: Continuing a program where it stopped.
@example
  gdb_clear_proceed_status ();
  gdb_proceed ((CORE_ADDR) -1, -1, 0);
@end example
(continue_command)


 -- IDIOM: Continuing a program giving it a specified signal.
@example
  gdb_clear_proceed_status ();
  gdb_proceed ((CORE_ADDR) -1, signum, 0);
@end example
(signal_command)


@deftypefun {char *} strtosigno (char * @var{str})
(Typical use:)
@example
  signum = strtosigno (signum_exp);

  if (signum == 0)
    /* Not found as a name, try it as an expression.  */
    signum = parse_and_eval_address (signum_exp);

  gdb_clear_proceed_status ();
  gdb_proceed ();
@end example
@end deftypefun


 -- IDIOM: Continuing a program at a specified address.
@example
  gdb_clear_proceed_status ();
  gdb_proceed (addr, 0, 0);
@end example
(jump_command)


@deftypefun gdb_error_t gdb_finish ()
"finish": Set a temporary breakpoint at the place
the selected frame will return to, then continue.
This is a convenience function but it summarizes a lot
of other stuff.@*
(finish_command)
@end deftypefun


@deftypefun void gdb_clear_proceed_status ()
Clear out all variables saying what to do when inferior is continued.
First do this, then set the ones you want, then call @code{gdb_proceed}.

  [[[Some of these should be documented, others hidden.]]]
@example
  The variables are: 
    trap_expected = 0;
    step_range_start = 0;
    step_range_end = 0;
    step_frame_address = 0;
    step_over_calls = -1;
    stop_after_trap = 0;
    stop_soon_quietly = 0;
    proceed_to_finish = 0;
    breakpoint_proceeded = 1;	/* We're about to proceed... */

    /* Discard any remaining commands or status from previous stop.  */
    bpstat_clear (&stop_bpstat);
@end example
(clear_proceed_status)
@end deftypefun


@deftypefun void gdb_proceed (CORE_ADDR @var{addr}, int @var{signal}, int @var{step})
Basic routine for continuing the program in various fashions.

@var{addr} is the address to resume at, or -1 for resume where stopped.@*
@var{signal} is the signal to give it, or 0 for none,
or -1 for act according to how it stopped.@*
@var{step} is nonzero if should trap after one instruction.
-1 means return after that and print nothing.@*
You should probably set various step_... variables
before calling here, if you are stepping.

You should call @code{gdb_clear_proceed_status} before calling proceed.
(See the documentation for @code{gdb_clear_proceed_status} for more
parameters to @code{gdb_proceed}).@*
(proceed)
@end deftypefun


@deftypefun gdb_error_t gdb_return (value @var{return_value}, FRAME @var{frame})
Make @var{frame} return to @var{value} to it's caller.
Unlike the other functions in this section, this doesn't
call proceed.
(return_command)
@end deftypefun


@deftypefun int gdb_inferior_pid ()
0 or the valid pid of an inferior.
@end deftypefun


@deftypefun gdb_error_t gdb_attach (int @var{pid})
takes a program started up outside of gdb and
`attaches'' to it.  This stops it cold in its tracks and allows us
to start debugging it.  and wait for the trace-trap that results
from attaching.@*
(attach_command)
@end deftypefun


@deftypefun gdb_error_t gdb_detach (int @var{signal_num})
Takes a program previously attached to and detaches it.
The program resumes execution and will no longer stop
on signals, etc.  We better not have left any breakpoints
in the program or it'll die when it hits one.  For this
to work, it may be necessary for the process to have been
previously attached.  It *might* work if the program was
started via the normal ptrace (PTRACE_TRACEME).@*
(detach_command)
@end deftypefun

@node    Stopping, Stack, Running,      top
@comment node-name,     next,           previous, up
@chapter Using Breakpoints, Signaling an Inferior
@cindex stopping
@cindex breakpoints


@deftp Type {struct breakpoint}
Breakpoints are typically represented @code{struct breakpoint *}.
@end deftp


@deftypefun {struct breakpoint *} gdb_find_breakpoint (int)
Find a breakpoint given it's number (return 0 if it doesn't exist).
@end deftypefun

@deftypefun gdb_error_t gdb_set_break (struct breakpoint * @var{brk_out}, struct symtab_and_line)
@deftypefunx gdb_error_t gdb_set_tbreak (struct breakpoint *, struct symtab_and_line)
@deftypefunx gdb_error_t gdb_set_until (struct breakpoint *, struct symtab_and_line)
These three are like their command language counterparts.
They are front ends to `gdb_set_raw_breakpoint'.
See `Symtabs' for sources of `struct symtab_and_line'.@*
(break_command, break_command_1, until_command, tbreak_command)
@end deftypefun


@deftypefun gdb_error_t gdb_set_watchpt (@var{brk_out}, @var{exp_string}, @var{exp}, @var{exp_valid_block})
@example
struct breakpoint * @var{brk_out};
char * @var{exp_string};
struct expression * @var{exp};
struct block * @var{expression_valid_block};
@end example
Set a watchpoint for the given expression.@*
(watch_command)
@end deftypefun


@deftypefun void gdb_set_ignore_count (int @var{bptnum}, int @var{count})
Set ignore-count of breakpoint number BPTNUM to COUNT.@*
(set_ignore_count)
@end deftypefun


@deftypefun {struct gdb_bp_condition *} gdb_set_condition (@var{bp}, @var{exp_str}, @var{cond})
@example
int @var{pbtnum};
char * @var{exp_str};
struct gdb_bp_condition * @var{cond};

typedef int (*gdb_bp_fn) (struct gdb_bp_condition *, int bp_num);
struct gdb_bp_condition
@{
  gdb_bp_fn fn;
@};
@end example
Add a condition to a breakpoint.
The condition is a callback which should return 
0 to skip the breakpoint, and 1 to break at it.
It is called at times when the break might occur.

A useful application of these callbacks to attach
an expression to breakpoints like the gdb `condition' 
command.  See `Expressions' for the parsing and 
evaluation of expressions.@*
(condition_command)
@end deftypefun


@deftypefun gdb_error_t gdb_enable_breakpoint (struct breakpoint * @var{bpt}, int @var{once})
@deftypefunx gdb_error_t gdb_disable_breakpoint (struct breakpoint * @var{bpt})
Enable/disable a breakpoint.  If `once' is not 0, the 
breakpoint is only temporarily enabled.@*
(enable_breakpoint, disable_breakpoint, enable_command)
@end deftypefun


@deftypefun gdb_error_t gdb_delete_breakpoint (struct breakpoint * @var{bpt})
Delete a breakpoint and clean up all traces of it in the 
data structures.@*
(delete_breakpoint)
@end deftypefun


@deftypefun void gdb_clear_breakpoints (struct symtabs_and_lines * @var{sals})
Clear breakpoints from a list of program locations as
might be returned by `gdb_decode_line' (see `Symtabs').@*
(clear_command)
@end deftypefun


@deftypefun {static struct symtabs_and_lines} get_catch_sals (int @var{this_level_only})
Return the line numbers of all exception handlers currently 
active (or `this_level_only'?? [[[?]]]).
[[[The implementation should remember to resolve_sal_pc]]]
@end deftypefun


@deftp Type {struct breakpoint_cback} 
@example
typedef void (*breakpoint_cback_fn) (struct breakpoint_cback *, int bp_num);
struct breakpoint_cback
@{
  breakpoint_cback_fn fn;
@};
@end example

Breakpoints can have an associated function which is called
when the program is stopped by that breakpoint.@*
(commands_command)
@end deftp


@deftypefun {struct breakpoint_cback *} gdb_set_breakpoint_cback (int @var{bp_num}, struct breakpoint_cback *)
This sets a breakpoint callback and returns the previous callback value
for that breakpoint.
[[[In the long run, the command interpreter should be available
   for the use of hooks like this one.]]]
@end deftypefun


@deftypefun {struct breakpoint_cback *} gdb_get_breakpoint_cback (int @var{bp_num})
@end deftypefun


@deftypefun void gdb_breakpoints_info (struct gdb_stream_cback, int @var{bp_num}, int @var{watches})
Print information on breakpoint number @var{bnum}, or -1 if all.
If @var{watches} is zero, process only breakpoints; if @var{watches}
is nonzero, process only watchpoints.
[[[In the long run, expose the information read off by this function.]]]@*
(info breakpoints, info watchpoints, breakpoints_info, breakpoint_1)
@end deftypefun


@deftypefun void gdb_catch_info (struct gdb_stream_cback *)
Print a list of all the exception handlers that are active in the
current stack frame at the current point of execution.@*
(catch_info)
@end deftypefun


@deftypefun void gdb_handle_command (char * @var{args})
Takes arguments like the gdb command `handle' and has
the same effect.@*
(handle_command)
@end deftypefun


@deftypefun void gdb_signals_info (struct gdb_stream_cback *)
Show how signals are handled.@*
(signals_info)
@end deftypefun


@node    Stack, Expressions, Stopping,      top
@comment node-name,     next,           previous, up
@chapter Accessing An Inferior's Execution Stack
@cindex stack
@cindex FRAME
@cindex {stack frames}



@deftp Type FRAME
This type representing active stack frames in the inferior.  
Consider this type opaque.
@end deftp


@deftypefun FRAME gdb_get_innermost_frame ()
Returns the innermost frame or the frame most recently designated
as current by a call to gdb_set_current_frame.@*
(get_current_frame)
@end deftypefun


@deftypefun FRAME gdb_get_caller_frame (FRAME @var{frame})
Return the frame that called @var{frame}.@*
If @var{frame} is the original frame (it has no caller), return 0.@*
(get_prev_frame)
@end deftypefun


@deftypefun FRAME gdb_get_called_frame (FRAME @var{frame})
Return the frame that @var{frame} calls (0 if @var{frame} is the innermost
frame).@*
(get_next_frame)
@end deftypefun


@deftypefun FRAME gdb_parse_frame_specification (char * @var{frame_exp})
Read a frame specification in whatever the appropriate format is.
Call @code{error}() If the specification is in any way invalid (i.e.
this function never returns NULL).@*
(parse_frame_specification)
@end deftypefun


@deftypefun CORE_ADDR get_frame_pc (FRAME @var{frame})@*
(Example use: Implementing @code{disassemble_command})@*
(get_frame_pc)
@end deftypefun


@deftypefun FRAME gdb_selected_frame ()
The "selected" stack frame is used by default for local and 
arg access. May be @code{NULL}, for no selected frame.@*
(variable selected_frame)
@end deftypefun


@deftypefun int gdb_selected_frame_level ()
Level of the selected frame:@*
0 for innermost,@*
1 for its caller,@*
or -1 for frame specified by address with no defined level.@*
(variable selected_frame_level)
@end deftypefun


@deftypefun void gdb_select_frame (FRAME @var{frame}, int @var{level})
Select frame @var{frame}, and note that its stack level is @var{level}.
@var{level} may be -1 if an actual level number is not known.
Calls @code{set_language} to establish the correct language for the
selected frame.
@end deftypefun


 -- IDIOM: Computing Frame Levels@*
@example
/* Try to figure out what level this frame is as before a 
     call to gdb_select_frame.  But if there is
     no current stack, don't error out, just pass -1
     instead. */
frame1 = 0;
level = -1;
if (get_current_frame()) @{
    for (frame1 = get_prev_frame (0);
	 frame1 && frame1 != frame;
	 frame1 = get_prev_frame (frame1))
      level++;
@}
@end example


@deftypefun void gdb_print_stack_frame (@var{cback}, @var{frame}, @var{level}, @var{source})
@example
struct gdb_stream_cback * @var{cback};
FRAME @var{frame};
int @var{level};
int @var{source};
@end example
Print a stack frame briefly.  @var{frame} should be the frame id
and @var{level} should be its level in the stack (or -1 for level not defined).
This prints the level, the function executing, the arguments,
and the file name and line number.@*
If the pc is not at the beginning of the source line,
the actual pc is printed at the beginning.@*
If @var{source} is 1, print the source line as well.@*
If @var{source} is -1, print ONLY the source line.@*
(print_stack_frame)
@end deftypefun


@deftypefun void gdb_print_backtrace (cback, @var{count}, @var{from_tty})
@example
struct gdb_stream_cback * @var{cback};
int @var{count};
int @var{from_tty};
@end example
Print briefly all stack frames or just the innermost @var{count} frames.@*
(backtrace_command)
@end deftypefun


@deftypefun FRAME gdb_find_relative_frame (FRAME @var{frame}, int * @var{level_offset_ptr})
Find a frame a certain number of levels away from @var{frame}.
@var{level_offset_ptr} points to an int containing the number of levels.
Positive means go to earlier frames (up); negative, the reverse.
The int that contains the number of levels is counted toward
zero as the frames for those levels are found.
If the top or bottom frame is reached, that frame is returned,
but the final value of @var{*level_offset_ptr} is nonzero and indicates
how much farther the original request asked to go.
@end deftypefun


@deftypefun FRAME gdb_select_frame_downward (int @var{count})
@deftypefunx FRAME gdb_select_frame_upward (int @var{count})
Simply a combination of find_relative_frame and select_frame.
Returns the newly selected frame.@*
(down_silently_command, up_silently_command)
@end deftypefun


@deftypefun void gdb_frame_info (struct gdb_stream_cback * @var{cback}, FRAME @var{frame})
Print verbosely the selected the argument @var{frame}.
This means absolutely all information in the frame is printed.@*
(frame_info)
@end deftypefun


@node    Expressions, Values,  Stack,    top
@comment node-name,     next,           previous, up
@chapter How to Parse and Evaluate Expressions 
@cindex parsing
@cindex expressions
@cindex {expression evaluation}
@cindex evaluation


@deftp Type {struct expression *}
This represents a parsed expression as might be used for a 
breakpoint condition.
@end deftp


@deftp Type {struct block}
Describes a lexical environment.
@end deftp

See also `Values'
See also `Examining'


@deftypefun struct expression * parse_exp_1 (char ** @var{stringptr}, struct block * @var{block} int @var{comma})
Read an expression from the string @code{*@var{stringptr}} points to,
parse it, and return a pointer to a  struct expression  that we malloc.
Use @var{block} as the lexical context for variable names;
if @var{block} is zero, use the block of the selected stack frame.
Meanwhile, advance @code{*@var{stringptr}} to point after the expression,
at the first nonwhite character that is not part of the expression
(possibly a null character).

If @var{comma} is nonzero, stop if a comma is reached.
(See `Stack' for information about the selected frame)
@end deftypefun


@deftypefun gdb_error_t gdb_evaluate_expression (value * @var{value_out}, struct expression * @var{exp})
Evaluate an expression.  See `values' for more information about
the return type.@*
(evaluate_expression)
@end deftypefun


@deftypefun value gdb_evaluate_type (struct expression @var{*exp})
Evaluate an expression, avoiding all memory references
and getting a value whose type alone is correct.@*
(evaluate_type)
@end deftypefun



@node    Values,  Examining, Expressions,     top
@comment node-name,     next,           previous, up
@chapter Data from the Inferior, the Values of Expressions
@cindex values
@cindex {expression values}

Values are allocated by functions such as @code{gdb_evaluate_expression}.
All currently allocated values are on the list @code{all_values} and can be
freed by calling @code{gdb_free_all_values}.

To preserve a value across calls to @code{gdb_free_all_values}, use
@code{gdb_release_value}.  Values added to the history list are automaticly
released.  To free a released value use @code{gdb_free_value}.


@deftypefun void gdb_free_value (value)
Free the memory associated with a released value.
Do not call this function except on values that have been
passed to @code{gdb_release_value}.@*
(gdb_value_free)
@end deftypefun


@deftypefun void gdb_free_all_values (void)
Free all allocated values which haven't been released.
This should be called periodically from outside the dynamic
scope of libgdb functions.@*
(free_all_values)
@end deftypefun


@deftypefun void gdb_release_value (value @var{val})
Remove a value from the list @code{all_values} in order to 
protect it from @code{gdb_free_all_values}.@*
(release_value)
@end deftypefun


There is a `history list' -- a numbered list of values for
future reference.  These can be referred to in expressions,
for example.

@deftypefun int gdb_record_latest_value (value @var{val})
Add a value to the history list.@*
(record_latest_value)
@end deftypefun


@deftypefun value gdb_access_value_history (int @var{index})
Retrieve a value from the history list.@*
(access_value_history)
@end deftypefun


[[[At the moment, the only libgdb use for values is
 string formatting (see `Examining').  So, they are treated
 as opaque.  It'd be useful to expose more of them in the long run.]]]


@node    Examining, Types, Values,       top
@comment node-name,     next,           previous, up
@chapter Formatting Values as Strings
@cindex examining
@cindex printing
@cindex formatting
@cindex {pretty printing}


Many functions in this section use @code{struct gdb_stream_cback}.
That structure is explained in `Basics'.


@deftypefun void gdb_print_formatted (struct gdb_stream_cback * @var{cback}, value @var{val}, int @var{format}, int @var{size})
Print value @var{val} on a stream according to @var{format}, a letter or 0.
Do not end with a newline.
0 means print @var{val} according to its own type.
@var{size} is the letter for the size of datum being printed.
This is used to pad hex numbers so they line up.@*
(print_formatted)
@end deftypefun


@deftypefun static void gdb_printf_command (struct gdb_stream_cback * @var{cback}, char * @var{format}, value * @var{values}, int @var{n_values})@*
(printf_command)
@end deftypefun


@deftypefun int gdb_value_print (struct gdb_stream_cback * @var{cback}, @var{value}, int @var{format}, enum @var{val_prettyprint})
Print the value @var{val} in C-ish syntax on @var{stream}.
@var{format} is a format-letter, or 0 for print in natural format of data type.
If the object printed is a string pointer, returns
the number of string bytes printed.
[[[implementation: watch the change in argument order]]]@*
(value_print)
@end deftypefun


 -- IDIOM: This prints the values of all convenience variables:
@example
for (var = internalvars; var; var = var->next)
@{
printf_filtered ("$%s = ", var->name);
value_print (var->value, stdout, 0, Val_pretty_default);
printf_filtered ("\n");
@}
@end example


@deftypefun int gdb_print_insn (struct gdb_stream_cback * @var{cback}, CORE_ADDR @var{memaddr})
Print the instruction at @var{memaddr} and return the 
length of the instruction in bytes.@*
(print_insn)
@end deftypefun


@deftypefun void gdb_print_address (struct gdb_stream_cback * @var{cback}, CORE_ADDR @var{addr})
Print address @var{addr} symbolically on @var{stream}.
First print it as a number.  Then perhaps print
@code{<SYMBOL + OFFSET>} after the number.@*
(print_address)
@end deftypefun


 -- IDIOM: This is the core of a dissasemble command:
@example
for (pc = low; pc < high; )
@{
  print_address (pc, stdout);
  printf_filtered (":\t");
  pc += print_insn (pc, stdout);
  printf_filtered ("\n");
@}
@end example
Advice for computing pc extents like @code{low} and @code{high}
can be found in `Symtabs' -- for example,  @code{gdb_find_line_pc_range}.@*
(disassemble_command)


@deftypefun void gdb_print_registers (struct gdb_stream_cback * @var{cback}, int @var{regnum}, int @var{fpregs}, int @var{fancy})
Print the values of registers. 
@var{regnum} can be -1 (print all the registers) or a specific register number.
If @var{regnum} is -1, @var{fpregs} determines whether floating point registers are
shown.@*
(info registers, info all-registers, nofp_registers_info, all_registers_info)
@end deftypefun


@deftypefun char * gdb_register_name (int @var{i})
Look up a register name by number.
@end deftypefun


@deftypefun int gdb_parse_register_name (char ** @var{name})
Parse a register name and advance a text pointer.
Return -1 for bogus names.
@end deftypefun


@deftypefun CORE_ADDR gdb_read_pc ()
Return the contents of the inferior's program counter.
@end deftypefun


@deftypefun int gdb_is_stepping ()
If true, the inferior is stopped after being stepped.
@end deftypefun


@deftypefun void gdb_current_breakpoints (gdb_int_cback)
Call a callback for each of the current breakpoints.@*
(program_info)
@end deftypefun


@deftypefun int gdb_stop_signal ()
Return the signal that stopped the inferior.
@end deftypefun


@deftypefun char * strsigno (int)
Return a symbolic name for a signal.
@end deftypefun


@deftypefun void gdb_target_info (struct gdb_stream_cback *)
Print status information about target we're accessing.@*
(target_files_info, e.g. child_files_info)
@end deftypefun


float_info
[[[what is appropriate?]]]


@deftypefun void gdb_address_info (struct gdb_stream_cback * @var{cback}, char * @var{symbol});
Like the `info address' command -- show where @var{symbol}
is located.@*
(address_info)
@end deftypefun


@node    Types, top,       Examining, top
@comment node-name,     next,           previous, up
@chapter Examining the Types of an Inferior's Data
@cindex types


@deftp Type {struct type}
@code{struct type *} is used to represent a type.  For example, that is
the type returned by the macro @code{VALUE_TYPE(val)} which yields the
type of inferior data recorded in @code{val}.  (see `evaluate_type' in
`Expressions').
@end deftp


@deftypefun void type_print (@var{type}, @var{varstring}, @var{stream_cback}, @var{show})
@example
struct type @var{*type};
char @var{*varstring};
struct gdb_stream_cback * @var{stream_cback};
FILE @var{*stream};
int @var{show};
@end example
Print a description of a type @var{type} in the form of a declaration of a
variable named @var{varstring}.  (@var{varstring} is demangled if necessary.)
Output goes to @var{stream_cback}.

If @var{show} is positive, we show the contents of the outermost level
of structure even if there is a type name that could be used instead.
If @var{show} is negative, we never show the details of elements' types.
(See `Basics' for an explanation of `struct gdb_stream_cback').
@end deftypefun


[[[In the long run, we need something to programmaticly read off type 
   structures in a machine/language independent way.]]]

@bye