1 /* debug.h -- Describe generic debugging information.
2 Copyright (C) 1995, 1996 Free Software Foundation, Inc.
3 Written by Ian Lance Taylor <ian@cygnus.com>.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 /* This header file describes a generic debugging information format.
26 We may eventually have readers which convert different formats into
27 this generic format, and writers which write it out. The initial
28 impetus for this was writing a convertor from stabs to HP IEEE-695
31 /* Different kinds of types. */
37 /* Indirect via a pointer. */
55 /* Union class (can this really happen?). */
56 DEBUG_KIND_UNION_CLASS,
57 /* Enumeration type. */
75 /* Const qualified type. */
77 /* Volatile qualified type. */
85 /* Different kinds of variables. */
89 /* A global variable. */
91 /* A static variable. */
93 /* A local static variable. */
95 /* A local variable. */
97 /* A register variable. */
101 /* Different kinds of function parameters. */
105 /* A stack based parameter. */
107 /* A register parameter. */
109 /* A stack based reference parameter. */
110 DEBUG_PARM_REFERENCE,
111 /* A register reference parameter. */
115 /* Different kinds of visibility. */
117 enum debug_visibility
119 /* A public field (e.g., a field in a C struct). */
120 DEBUG_VISIBILITY_PUBLIC,
121 /* A protected field. */
122 DEBUG_VISIBILITY_PROTECTED,
123 /* A private field. */
124 DEBUG_VISIBILITY_PRIVATE,
125 /* A field which should be ignored. */
126 DEBUG_VISIBILITY_IGNORE
131 typedef struct debug_type *debug_type;
133 #define DEBUG_TYPE_NULL ((debug_type) NULL)
135 /* A field in a struct or union. */
137 typedef struct debug_field *debug_field;
139 #define DEBUG_FIELD_NULL ((debug_field) NULL)
141 /* A base class for an object. */
143 typedef struct debug_baseclass *debug_baseclass;
145 #define DEBUG_BASECLASS_NULL ((debug_baseclass) NULL)
147 /* A method of an object. */
149 typedef struct debug_method *debug_method;
151 #define DEBUG_METHOD_NULL ((debug_method) NULL)
153 /* The arguments to a method function of an object. These indicate
154 which method to run. */
156 typedef struct debug_method_variant *debug_method_variant;
158 #define DEBUG_METHOD_VARIANT_NULL ((debug_method_variant) NULL)
160 /* This structure is passed to debug_write. It holds function
161 pointers that debug_write will call based on the accumulated
162 debugging information. */
164 struct debug_write_fns
166 /* This is called at the start of each new compilation unit with the
167 name of the main file in the new unit. */
168 boolean (*start_compilation_unit) PARAMS ((PTR, const char *));
170 /* This is called at the start of each source file within a
171 compilation unit, before outputting any global information for
172 that file. The argument is the name of the file. */
173 boolean (*start_source) PARAMS ((PTR, const char *));
175 /* Each writer must keep a stack of types. */
177 /* Push an empty type onto the type stack. This type can appear if
178 there is a reference to a type which is never defined. */
179 boolean (*empty_type) PARAMS ((PTR));
181 /* Push a void type onto the type stack. */
182 boolean (*void_type) PARAMS ((PTR));
184 /* Push an integer type onto the type stack, given the size and
185 whether it is unsigned. */
186 boolean (*int_type) PARAMS ((PTR, unsigned int, boolean));
188 /* Push a floating type onto the type stack, given the size. */
189 boolean (*float_type) PARAMS ((PTR, unsigned int));
191 /* Push a complex type onto the type stack, given the size. */
192 boolean (*complex_type) PARAMS ((PTR, unsigned int));
194 /* Push a boolean type onto the type stack, given the size. */
195 boolean (*bool_type) PARAMS ((PTR, unsigned int));
197 /* Push an enum type onto the type stack, given the tag, a NULL
198 terminated array of names and the associated values. If there is
199 no tag, the tag argument will be NULL. If this is an undefined
200 enum, the names and values arguments will be NULL. */
201 boolean (*enum_type) PARAMS ((PTR, const char *, const char **,
204 /* Pop the top type on the type stack, and push a pointer to that
205 type onto the type stack. */
206 boolean (*pointer_type) PARAMS ((PTR));
208 /* Push a function type onto the type stack. The second argument
209 indicates the number of argument types that have been pushed onto
210 the stack. If the number of argument types is passed as -1, then
211 the argument types of the function are unknown, and no types have
212 been pushed onto the stack. The third argument is true if the
213 function takes a variable number of arguments. The return type
214 of the function is pushed onto the type stack below the argument
216 boolean (*function_type) PARAMS ((PTR, int, boolean));
218 /* Pop the top type on the type stack, and push a reference to that
219 type onto the type stack. */
220 boolean (*reference_type) PARAMS ((PTR));
222 /* Pop the top type on the type stack, and push a range of that type
223 with the given lower and upper bounds onto the type stack. */
224 boolean (*range_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
226 /* Push an array type onto the type stack. The top type on the type
227 stack is the range, and the next type on the type stack is the
228 element type. These should be popped before the array type is
229 pushed. The arguments are the lower bound, the upper bound, and
230 whether the array is a string. */
231 boolean (*array_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma,
234 /* Pop the top type on the type stack, and push a set of that type
235 onto the type stack. The argument indicates whether this set is
237 boolean (*set_type) PARAMS ((PTR, boolean));
239 /* Push an offset type onto the type stack. The top type on the
240 type stack is the target type, and the next type on the type
241 stack is the base type. These should be popped before the offset
243 boolean (*offset_type) PARAMS ((PTR));
245 /* Push a method type onto the type stack. If the second argument
246 is true, the top type on the stack is the class to which the
247 method belongs; otherwise, the class must be determined by the
248 class to which the method is attached. The third argument is the
249 number of argument types; these are pushed onto the type stack in
250 reverse order (the first type popped is the last argument to the
251 method). A value of -1 for the third argument means that no
252 argument information is available. The fourth argument is true
253 if the function takes a variable number of arguments. The next
254 type on the type stack below the domain and the argument types is
255 the return type of the method. All these types must be popped,
256 and then the method type must be pushed. */
257 boolean (*method_type) PARAMS ((PTR, boolean, int, boolean));
259 /* Pop the top type off the type stack, and push a const qualified
260 version of that type onto the type stack. */
261 boolean (*const_type) PARAMS ((PTR));
263 /* Pop the top type off the type stack, and push a volatile
264 qualified version of that type onto the type stack. */
265 boolean (*volatile_type) PARAMS ((PTR));
267 /* Start building a struct. This is followed by calls to the
268 struct_field function, and finished by a call to the
269 end_struct_type function. The second argument is the tag; this
270 will be NULL if there isn't one. If the second argument is NULL,
271 the third argument is a constant identifying this struct for use
272 with tag_type. The fourth argument is true for a struct, false
273 for a union. The fifth argument is the size. If this is an
274 undefined struct or union, the size will be 0 and struct_field
275 will not be called before end_struct_type is called. */
276 boolean (*start_struct_type) PARAMS ((PTR, const char *, unsigned int,
277 boolean, unsigned int));
279 /* Add a field to the struct type currently being built. The type
280 of the field should be popped off the type stack. The arguments
281 are the name, the bit position, the bit size (may be zero if the
282 field is not packed), and the visibility. */
283 boolean (*struct_field) PARAMS ((PTR, const char *, bfd_vma, bfd_vma,
284 enum debug_visibility));
286 /* Finish building a struct, and push it onto the type stack. */
287 boolean (*end_struct_type) PARAMS ((PTR));
289 /* Start building a class. This is followed by calls to several
290 functions: struct_field, class_static_member, class_baseclass,
291 class_start_method, class_method_variant,
292 class_static_method_variant, and class_end_method. The class is
293 finished by a call to end_class_type. The first five arguments
294 are the same as for start_struct_type. The sixth argument is
295 true if there is a virtual function table; if there is, the
296 seventh argument is true if the virtual function table can be
297 found in the type itself, and is false if the type of the object
298 holding the virtual function table should be popped from the type
300 boolean (*start_class_type) PARAMS ((PTR, const char *, unsigned int,
301 boolean, unsigned int, boolean,
304 /* Add a static member to the class currently being built. The
305 arguments are the field name, the physical name, and the
306 visibility. The type must be popped off the type stack. */
307 boolean (*class_static_member) PARAMS ((PTR, const char *, const char *,
308 enum debug_visibility));
310 /* Add a baseclass to the class currently being built. The type of
311 the baseclass must be popped off the type stack. The arguments
312 are the bit position, whether the class is virtual, and the
314 boolean (*class_baseclass) PARAMS ((PTR, bfd_vma, boolean,
315 enum debug_visibility));
317 /* Start adding a method to the class currently being built. This
318 is followed by calls to class_method_variant and
319 class_static_method_variant to describe different variants of the
320 method which take different arguments. The method is finished
321 with a call to class_end_method. The argument is the method
323 boolean (*class_start_method) PARAMS ((PTR, const char *));
325 /* Describe a variant to the class method currently being built.
326 The type of the variant must be popped off the type stack. The
327 second argument is the physical name of the function. The
328 following arguments are the visibility, whether the variant is
329 const, whether the variant is volatile, the offset in the virtual
330 function table, and whether the context is on the type stack
331 (below the variant type). */
332 boolean (*class_method_variant) PARAMS ((PTR, const char *,
333 enum debug_visibility,
337 /* Describe a static variant to the class method currently being
338 built. The arguments are the same as for class_method_variant,
339 except that the last two arguments are omitted. The type of the
340 variant must be popped off the type stack. */
341 boolean (*class_static_method_variant) PARAMS ((PTR, const char *,
342 enum debug_visibility,
345 /* Finish describing a class method. */
346 boolean (*class_end_method) PARAMS ((PTR));
348 /* Finish describing a class, and push it onto the type stack. */
349 boolean (*end_class_type) PARAMS ((PTR));
351 /* Push a type on the stack which was given a name by an earlier
353 boolean (*typedef_type) PARAMS ((PTR, const char *));
355 /* Push a tagged type on the stack which was defined earlier. If
356 the second argument is not NULL, the type was defined by a call
357 to tag. If the second argument is NULL, the type was defined by
358 a call to start_struct_type or start_class_type with a tag of
359 NULL and the number of the third argument. Either way, the
360 fourth argument is the tag kind. Note that this may be called
361 for a struct (class) being defined, in between the call to
362 start_struct_type (start_class_type) and the call to
363 end_struct_type (end_class_type). */
364 boolean (*tag_type) PARAMS ((PTR, const char *, unsigned int,
365 enum debug_type_kind));
367 /* Pop the type stack, and typedef it to the given name. */
368 boolean (*typdef) PARAMS ((PTR, const char *));
370 /* Pop the type stack, and declare it as a tagged struct or union or
371 enum or whatever. The tag passed down here is redundant, since
372 was also passed when enum_type, start_struct_type, or
373 start_class_type was called. */
374 boolean (*tag) PARAMS ((PTR, const char *));
376 /* This is called to record a named integer constant. */
377 boolean (*int_constant) PARAMS ((PTR, const char *, bfd_vma));
379 /* This is called to record a named floating point constant. */
380 boolean (*float_constant) PARAMS ((PTR, const char *, double));
382 /* This is called to record a typed integer constant. The type is
383 popped off the type stack. */
384 boolean (*typed_constant) PARAMS ((PTR, const char *, bfd_vma));
386 /* This is called to record a variable. The type is popped off the
388 boolean (*variable) PARAMS ((PTR, const char *, enum debug_var_kind,
391 /* Start writing out a function. The return type must be popped off
392 the stack. The boolean is true if the function is global. This
393 is followed by calls to function_parameter, followed by block
395 boolean (*start_function) PARAMS ((PTR, const char *, boolean));
397 /* Record a function parameter for the current function. The type
398 must be popped off the stack. */
399 boolean (*function_parameter) PARAMS ((PTR, const char *,
400 enum debug_parm_kind, bfd_vma));
402 /* Start writing out a block. There is at least one top level block
403 per function. Blocks may be nested. The argument is the
404 starting address of the block. */
405 boolean (*start_block) PARAMS ((PTR, bfd_vma));
407 /* Finish writing out a block. The argument is the ending address
409 boolean (*end_block) PARAMS ((PTR, bfd_vma));
411 /* Finish writing out a function. */
412 boolean (*end_function) PARAMS ((PTR));
414 /* Record line number information for the current compilation unit. */
415 boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));
418 /* Exported functions. */
420 /* The first argument to most of these functions is a handle. This
421 handle is returned by the debug_init function. The purpose of the
422 handle is to permit the debugging routines to not use static
423 variables, and hence to be reentrant. This would be useful for a
424 program which wanted to handle two executables simultaneously. */
426 /* Return a debugging handle. */
428 extern PTR debug_init PARAMS ((void));
430 /* Set the source filename. This implicitly starts a new compilation
433 extern boolean debug_set_filename PARAMS ((PTR, const char *));
435 /* Change source files to the given file name. This is used for
436 include files in a single compilation unit. */
438 extern boolean debug_start_source PARAMS ((PTR, const char *));
440 /* Record a function definition. This implicitly starts a function
441 block. The debug_type argument is the type of the return value.
442 The boolean indicates whether the function is globally visible.
443 The bfd_vma is the address of the start of the function. Currently
444 the parameter types are specified by calls to
445 debug_record_parameter. */
447 extern boolean debug_record_function
448 PARAMS ((PTR, const char *, debug_type, boolean, bfd_vma));
450 /* Record a parameter for the current function. */
452 extern boolean debug_record_parameter
453 PARAMS ((PTR, const char *, debug_type, enum debug_parm_kind, bfd_vma));
455 /* End a function definition. The argument is the address where the
458 extern boolean debug_end_function PARAMS ((PTR, bfd_vma));
460 /* Start a block in a function. All local information will be
461 recorded in this block, until the matching call to debug_end_block.
462 debug_start_block and debug_end_block may be nested. The argument
463 is the address at which this block starts. */
465 extern boolean debug_start_block PARAMS ((PTR, bfd_vma));
467 /* Finish a block in a function. This matches the call to
468 debug_start_block. The argument is the address at which this block
471 extern boolean debug_end_block PARAMS ((PTR, bfd_vma));
473 /* Associate a line number in the current source file with a given
476 extern boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));
478 /* Start a named common block. This is a block of variables that may
481 extern boolean debug_start_common_block PARAMS ((PTR, const char *));
483 /* End a named common block. */
485 extern boolean debug_end_common_block PARAMS ((PTR, const char *));
487 /* Record a named integer constant. */
489 extern boolean debug_record_int_const PARAMS ((PTR, const char *, bfd_vma));
491 /* Record a named floating point constant. */
493 extern boolean debug_record_float_const PARAMS ((PTR, const char *, double));
495 /* Record a typed constant with an integral value. */
497 extern boolean debug_record_typed_const
498 PARAMS ((PTR, const char *, debug_type, bfd_vma));
500 /* Record a label. */
502 extern boolean debug_record_label
503 PARAMS ((PTR, const char *, debug_type, bfd_vma));
505 /* Record a variable. */
507 extern boolean debug_record_variable
508 PARAMS ((PTR, const char *, debug_type, enum debug_var_kind, bfd_vma));
510 /* Make an indirect type. The first argument is a pointer to the
511 location where the real type will be placed. The second argument
512 is the type tag, if there is one; this may be NULL; the only
513 purpose of this argument is so that debug_get_type_name can return
514 something useful. This function may be used when a type is
515 referenced before it is defined. */
517 extern debug_type debug_make_indirect_type
518 PARAMS ((PTR, debug_type *, const char *));
520 /* Make a void type. */
522 extern debug_type debug_make_void_type PARAMS ((PTR));
524 /* Make an integer type of a given size. The boolean argument is true
525 if the integer is unsigned. */
527 extern debug_type debug_make_int_type PARAMS ((PTR, unsigned int, boolean));
529 /* Make a floating point type of a given size. FIXME: On some
530 platforms, like an Alpha, you probably need to be able to specify
533 extern debug_type debug_make_float_type PARAMS ((PTR, unsigned int));
535 /* Make a boolean type of a given size. */
537 extern debug_type debug_make_bool_type PARAMS ((PTR, unsigned int));
539 /* Make a complex type of a given size. */
541 extern debug_type debug_make_complex_type PARAMS ((PTR, unsigned int));
543 /* Make a structure type. The second argument is true for a struct,
544 false for a union. The third argument is the size of the struct.
545 The fourth argument is a NULL terminated array of fields. */
547 extern debug_type debug_make_struct_type
548 PARAMS ((PTR, boolean, bfd_vma, debug_field *));
550 /* Make an object type. The first three arguments after the handle
551 are the same as for debug_make_struct_type. The next arguments are
552 a NULL terminated array of base classes, a NULL terminated array of
553 methods, the type of the object holding the virtual function table
554 if it is not this object, and a boolean which is true if this
555 object has its own virtual function table. */
557 extern debug_type debug_make_object_type
558 PARAMS ((PTR, boolean, bfd_vma, debug_field *, debug_baseclass *,
559 debug_method *, debug_type, boolean));
561 /* Make an enumeration type. The arguments are a null terminated
562 array of strings, and an array of corresponding values. */
564 extern debug_type debug_make_enum_type
565 PARAMS ((PTR, const char **, bfd_signed_vma *));
567 /* Make a pointer to a given type. */
569 extern debug_type debug_make_pointer_type
570 PARAMS ((PTR, debug_type));
572 /* Make a function type. The second argument is the return type. The
573 third argument is a NULL terminated array of argument types. The
574 fourth argument is true if the function takes a variable number of
575 arguments. If the third argument is NULL, then the argument types
578 extern debug_type debug_make_function_type
579 PARAMS ((PTR, debug_type, debug_type *, boolean));
581 /* Make a reference to a given type. */
583 extern debug_type debug_make_reference_type PARAMS ((PTR, debug_type));
585 /* Make a range of a given type from a lower to an upper bound. */
587 extern debug_type debug_make_range_type
588 PARAMS ((PTR, debug_type, bfd_signed_vma, bfd_signed_vma));
590 /* Make an array type. The second argument is the type of an element
591 of the array. The third argument is the type of a range of the
592 array. The fourth and fifth argument are the lower and upper
593 bounds, respectively (if the bounds are not known, lower should be
594 0 and upper should be -1). The sixth argument is true if this
595 array is actually a string, as in C. */
597 extern debug_type debug_make_array_type
598 PARAMS ((PTR, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
601 /* Make a set of a given type. For example, a Pascal set type. The
602 boolean argument is true if this set is actually a bitstring, as in
605 extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, boolean));
607 /* Make a type for a pointer which is relative to an object. The
608 second argument is the type of the object to which the pointer is
609 relative. The third argument is the type that the pointer points
612 extern debug_type debug_make_offset_type
613 PARAMS ((PTR, debug_type, debug_type));
615 /* Make a type for a method function. The second argument is the
616 return type. The third argument is the domain. The fourth
617 argument is a NULL terminated array of argument types. The fifth
618 argument is true if the function takes a variable number of
619 arguments, in which case the array of argument types indicates the
620 types of the first arguments. The domain and the argument array
621 may be NULL, in which case this is a stub method and that
622 information is not available. Stabs debugging uses this, and gets
623 the argument types from the mangled name. */
625 extern debug_type debug_make_method_type
626 PARAMS ((PTR, debug_type, debug_type, debug_type *, boolean));
628 /* Make a const qualified version of a given type. */
630 extern debug_type debug_make_const_type PARAMS ((PTR, debug_type));
632 /* Make a volatile qualified version of a given type. */
634 extern debug_type debug_make_volatile_type PARAMS ((PTR, debug_type));
636 /* Make an undefined tagged type. For example, a struct which has
637 been mentioned, but not defined. */
639 extern debug_type debug_make_undefined_tagged_type
640 PARAMS ((PTR, const char *, enum debug_type_kind));
642 /* Make a base class for an object. The second argument is the base
643 class type. The third argument is the bit position of this base
644 class in the object. The fourth argument is whether this is a
645 virtual class. The fifth argument is the visibility of the base
648 extern debug_baseclass debug_make_baseclass
649 PARAMS ((PTR, debug_type, bfd_vma, boolean, enum debug_visibility));
651 /* Make a field for a struct. The second argument is the name. The
652 third argument is the type of the field. The fourth argument is
653 the bit position of the field. The fifth argument is the size of
654 the field (it may be zero). The sixth argument is the visibility
657 extern debug_field debug_make_field
658 PARAMS ((PTR, const char *, debug_type, bfd_vma, bfd_vma,
659 enum debug_visibility));
661 /* Make a static member of an object. The second argument is the
662 name. The third argument is the type of the member. The fourth
663 argument is the physical name of the member (i.e., the name as a
664 global variable). The fifth argument is the visibility of the
667 extern debug_field debug_make_static_member
668 PARAMS ((PTR, const char *, debug_type, const char *,
669 enum debug_visibility));
671 /* Make a method. The second argument is the name, and the third
672 argument is a NULL terminated array of method variants. Each
673 method variant is a method with this name but with different
676 extern debug_method debug_make_method
677 PARAMS ((PTR, const char *, debug_method_variant *));
679 /* Make a method variant. The second argument is the physical name of
680 the function. The third argument is the type of the function,
681 probably constructed by debug_make_method_type. The fourth
682 argument is the visibility. The fifth argument is whether this is
683 a const function. The sixth argument is whether this is a volatile
684 function. The seventh argument is the offset in the virtual
685 function table, if any. The eighth argument is the virtual
688 extern debug_method_variant debug_make_method_variant
689 PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
690 boolean, bfd_vma, debug_type));
692 /* Make a static method argument. The arguments are the same as for
693 debug_make_method_variant, except that the last two are omitted
694 since a static method can not also be virtual. */
696 extern debug_method_variant debug_make_static_method_variant
697 PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
700 /* Name a type. This returns a new type with an attached name. */
702 extern debug_type debug_name_type PARAMS ((PTR, const char *, debug_type));
704 /* Give a tag to a type, such as a struct or union. This returns a
705 new type with an attached tag. */
707 extern debug_type debug_tag_type PARAMS ((PTR, const char *, debug_type));
709 /* Record the size of a given type. */
711 extern boolean debug_record_type_size PARAMS ((PTR, debug_type, unsigned int));
713 /* Find a named type. */
715 extern debug_type debug_find_named_type PARAMS ((PTR, const char *));
717 /* Find a tagged type. */
719 extern debug_type debug_find_tagged_type
720 PARAMS ((PTR, const char *, enum debug_type_kind));
722 /* Get the kind of a type. */
724 extern enum debug_type_kind debug_get_type_kind PARAMS ((PTR, debug_type));
726 /* Get the name of a type. */
728 extern const char *debug_get_type_name PARAMS ((PTR, debug_type));
730 /* Get the size of a type. */
732 extern bfd_vma debug_get_type_size PARAMS ((PTR, debug_type));
734 /* Get the return type of a function or method type. */
736 extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));
738 /* Get the NULL terminated array of parameter types for a function or
739 method type (actually, parameter types are not currently stored for
740 function types). This may be used to determine whether a method
741 type is a stub method or not. The last argument points to a
742 boolean which is set to true if the function takes a variable
743 number of arguments. */
745 extern const debug_type *debug_get_parameter_types PARAMS ((PTR,
749 /* Get the target type of a pointer or reference or const or volatile
752 extern debug_type debug_get_target_type PARAMS ((PTR, debug_type));
754 /* Get the NULL terminated array of fields for a struct, union, or
757 extern const debug_field *debug_get_fields PARAMS ((PTR, debug_type));
759 /* Get the type of a field. */
761 extern debug_type debug_get_field_type PARAMS ((PTR, debug_field));
763 /* Get the name of a field. */
765 extern const char *debug_get_field_name PARAMS ((PTR, debug_field));
767 /* Get the bit position of a field within the containing structure.
768 If the field is a static member, this will return (bfd_vma) -1. */
770 extern bfd_vma debug_get_field_bitpos PARAMS ((PTR, debug_field));
772 /* Get the bit size of a field. If the field is a static member, this
773 will return (bfd_vma) -1. */
775 extern bfd_vma debug_get_field_bitsize PARAMS ((PTR, debug_field));
777 /* Get the visibility of a field. */
779 extern enum debug_visibility debug_get_field_visibility
780 PARAMS ((PTR, debug_field));
782 /* Get the physical name of a field, if it is a static member. If the
783 field is not a static member, this will return NULL. */
785 extern const char *debug_get_field_physname PARAMS ((PTR, debug_field));
787 /* Write out the recorded debugging information. This takes a set of
788 function pointers which are called to do the actual writing. The
789 first PTR is the debugging handle. The second PTR is a handle
790 which is passed to the functions. */
792 extern boolean debug_write PARAMS ((PTR, const struct debug_write_fns *, PTR));