debug.h

来自「基于4个mips核的noc设计」· C头文件 代码 · 共 799 行 · 第 1/2 页

H
799
字号
  /* Record a function parameter for the current function.  The type     must be popped off the stack.  */  boolean (*function_parameter) PARAMS ((PTR, const char *,					 enum debug_parm_kind, bfd_vma));  /* Start writing out a block.  There is at least one top level block     per function.  Blocks may be nested.  The argument is the     starting address of the block.  */  boolean (*start_block) PARAMS ((PTR, bfd_vma));  /* Finish writing out a block.  The argument is the ending address     of the block.  */  boolean (*end_block) PARAMS ((PTR, bfd_vma));  /* Finish writing out a function.  */  boolean (*end_function) PARAMS ((PTR));  /* Record line number information for the current compilation unit.  */  boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));};/* Exported functions.  *//* The first argument to most of these functions is a handle.  This   handle is returned by the debug_init function.  The purpose of the   handle is to permit the debugging routines to not use static   variables, and hence to be reentrant.  This would be useful for a   program which wanted to handle two executables simultaneously.  *//* Return a debugging handle.  */extern PTR debug_init PARAMS ((void));/* Set the source filename.  This implicitly starts a new compilation   unit.  */extern boolean debug_set_filename PARAMS ((PTR, const char *));/* Change source files to the given file name.  This is used for   include files in a single compilation unit.  */extern boolean debug_start_source PARAMS ((PTR, const char *));/* Record a function definition.  This implicitly starts a function   block.  The debug_type argument is the type of the return value.   The boolean indicates whether the function is globally visible.   The bfd_vma is the address of the start of the function.  Currently   the parameter types are specified by calls to   debug_record_parameter.  */extern boolean debug_record_function  PARAMS ((PTR, const char *, debug_type, boolean, bfd_vma));/* Record a parameter for the current function.  */extern boolean debug_record_parameter  PARAMS ((PTR, const char *, debug_type, enum debug_parm_kind, bfd_vma));/* End a function definition.  The argument is the address where the   function ends.  */extern boolean debug_end_function PARAMS ((PTR, bfd_vma));/* Start a block in a function.  All local information will be   recorded in this block, until the matching call to debug_end_block.   debug_start_block and debug_end_block may be nested.  The argument   is the address at which this block starts.  */extern boolean debug_start_block PARAMS ((PTR, bfd_vma));/* Finish a block in a function.  This matches the call to   debug_start_block.  The argument is the address at which this block   ends.  */extern boolean debug_end_block PARAMS ((PTR, bfd_vma));/* Associate a line number in the current source file with a given   address.  */extern boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));/* Start a named common block.  This is a block of variables that may   move in memory.  */extern boolean debug_start_common_block PARAMS ((PTR, const char *));/* End a named common block.  */extern boolean debug_end_common_block PARAMS ((PTR, const char *));/* Record a named integer constant.  */extern boolean debug_record_int_const PARAMS ((PTR, const char *, bfd_vma));/* Record a named floating point constant.  */extern boolean debug_record_float_const PARAMS ((PTR, const char *, double));/* Record a typed constant with an integral value.  */extern boolean debug_record_typed_const  PARAMS ((PTR, const char *, debug_type, bfd_vma));/* Record a label.  */extern boolean debug_record_label  PARAMS ((PTR, const char *, debug_type, bfd_vma));/* Record a variable.  */extern boolean debug_record_variable  PARAMS ((PTR, const char *, debug_type, enum debug_var_kind, bfd_vma));/* Make an indirect type.  The first argument is a pointer to the   location where the real type will be placed.  The second argument   is the type tag, if there is one; this may be NULL; the only   purpose of this argument is so that debug_get_type_name can return   something useful.  This function may be used when a type is   referenced before it is defined.  */extern debug_type debug_make_indirect_type  PARAMS ((PTR, debug_type *, const char *));/* Make a void type.  */extern debug_type debug_make_void_type PARAMS ((PTR));/* Make an integer type of a given size.  The boolean argument is true   if the integer is unsigned.  */extern debug_type debug_make_int_type PARAMS ((PTR, unsigned int, boolean));/* Make a floating point type of a given size.  FIXME: On some   platforms, like an Alpha, you probably need to be able to specify   the format.  */extern debug_type debug_make_float_type PARAMS ((PTR, unsigned int));/* Make a boolean type of a given size.  */extern debug_type debug_make_bool_type PARAMS ((PTR, unsigned int));/* Make a complex type of a given size.  */extern debug_type debug_make_complex_type PARAMS ((PTR, unsigned int));/* Make a structure type.  The second argument is true for a struct,   false for a union.  The third argument is the size of the struct.   The fourth argument is a NULL terminated array of fields.  */extern debug_type debug_make_struct_type  PARAMS ((PTR, boolean, bfd_vma, debug_field *));/* Make an object type.  The first three arguments after the handle   are the same as for debug_make_struct_type.  The next arguments are   a NULL terminated array of base classes, a NULL terminated array of   methods, the type of the object holding the virtual function table   if it is not this object, and a boolean which is true if this   object has its own virtual function table.  */extern debug_type debug_make_object_type  PARAMS ((PTR, boolean, bfd_vma, debug_field *, debug_baseclass *,	   debug_method *, debug_type, boolean));/* Make an enumeration type.  The arguments are a null terminated   array of strings, and an array of corresponding values.  */extern debug_type debug_make_enum_type  PARAMS ((PTR, const char **, bfd_signed_vma *));/* Make a pointer to a given type.  */extern debug_type debug_make_pointer_type  PARAMS ((PTR, debug_type));/* Make a function type.  The second argument is the return type.  The   third argument is a NULL terminated array of argument types.  The   fourth argument is true if the function takes a variable number of   arguments.  If the third argument is NULL, then the argument types   are unknown.  */extern debug_type debug_make_function_type  PARAMS ((PTR, debug_type, debug_type *, boolean));/* Make a reference to a given type.  */extern debug_type debug_make_reference_type PARAMS ((PTR, debug_type));/* Make a range of a given type from a lower to an upper bound.  */extern debug_type debug_make_range_type  PARAMS ((PTR, debug_type, bfd_signed_vma, bfd_signed_vma));/* Make an array type.  The second argument is the type of an element   of the array.  The third argument is the type of a range of the   array.  The fourth and fifth argument are the lower and upper   bounds, respectively (if the bounds are not known, lower should be   0 and upper should be -1).  The sixth argument is true if this   array is actually a string, as in C.  */extern debug_type debug_make_array_type  PARAMS ((PTR, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,	   boolean));/* Make a set of a given type.  For example, a Pascal set type.  The   boolean argument is true if this set is actually a bitstring, as in   CHILL.  */extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, boolean));/* Make a type for a pointer which is relative to an object.  The   second argument is the type of the object to which the pointer is   relative.  The third argument is the type that the pointer points   to.  */extern debug_type debug_make_offset_type  PARAMS ((PTR, debug_type, debug_type));/* Make a type for a method function.  The second argument is the   return type.  The third argument is the domain.  The fourth   argument is a NULL terminated array of argument types.  The fifth   argument is true if the function takes a variable number of   arguments, in which case the array of argument types indicates the   types of the first arguments.  The domain and the argument array   may be NULL, in which case this is a stub method and that   information is not available.  Stabs debugging uses this, and gets   the argument types from the mangled name.  */extern debug_type debug_make_method_type  PARAMS ((PTR, debug_type, debug_type, debug_type *, boolean));/* Make a const qualified version of a given type.  */extern debug_type debug_make_const_type PARAMS ((PTR, debug_type));/* Make a volatile qualified version of a given type.  */extern debug_type debug_make_volatile_type PARAMS ((PTR, debug_type));/* Make an undefined tagged type.  For example, a struct which has   been mentioned, but not defined.  */extern debug_type debug_make_undefined_tagged_type  PARAMS ((PTR, const char *, enum debug_type_kind));/* Make a base class for an object.  The second argument is the base   class type.  The third argument is the bit position of this base   class in the object.  The fourth argument is whether this is a   virtual class.  The fifth argument is the visibility of the base   class.  */extern debug_baseclass debug_make_baseclass  PARAMS ((PTR, debug_type, bfd_vma, boolean, enum debug_visibility));/* Make a field for a struct.  The second argument is the name.  The   third argument is the type of the field.  The fourth argument is   the bit position of the field.  The fifth argument is the size of   the field (it may be zero).  The sixth argument is the visibility   of the field.  */extern debug_field debug_make_field  PARAMS ((PTR, const char *, debug_type, bfd_vma, bfd_vma,	   enum debug_visibility));/* Make a static member of an object.  The second argument is the   name.  The third argument is the type of the member.  The fourth   argument is the physical name of the member (i.e., the name as a   global variable).  The fifth argument is the visibility of the   member.  */extern debug_field debug_make_static_member  PARAMS ((PTR, const char *, debug_type, const char *,	   enum debug_visibility));/* Make a method.  The second argument is the name, and the third   argument is a NULL terminated array of method variants.  Each   method variant is a method with this name but with different   argument types.  */extern debug_method debug_make_method  PARAMS ((PTR, const char *, debug_method_variant *));/* Make a method variant.  The second argument is the physical name of   the function.  The third argument is the type of the function,   probably constructed by debug_make_method_type.  The fourth   argument is the visibility.  The fifth argument is whether this is   a const function.  The sixth argument is whether this is a volatile   function.  The seventh argument is the index in the virtual   function table, if any.  The eighth argument is the virtual   function context.  */extern debug_method_variant debug_make_method_variant  PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,	   boolean, bfd_vma, debug_type));/* Make a static method argument.  The arguments are the same as for   debug_make_method_variant, except that the last two are omitted   since a static method can not also be virtual.  */extern debug_method_variant debug_make_static_method_variant  PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,	   boolean));/* Name a type.  This returns a new type with an attached name.  */extern debug_type debug_name_type PARAMS ((PTR, const char *, debug_type));/* Give a tag to a type, such as a struct or union.  This returns a   new type with an attached tag.  */extern debug_type debug_tag_type PARAMS ((PTR, const char *, debug_type));/* Record the size of a given type.  */extern boolean debug_record_type_size PARAMS ((PTR, debug_type, unsigned int));/* Find a named type.  */extern debug_type debug_find_named_type PARAMS ((PTR, const char *));/* Find a tagged type.  */extern debug_type debug_find_tagged_type  PARAMS ((PTR, const char *, enum debug_type_kind));/* Get the kind of a type.  */extern enum debug_type_kind debug_get_type_kind PARAMS ((PTR, debug_type));/* Get the name of a type.  */extern const char *debug_get_type_name PARAMS ((PTR, debug_type));/* Get the size of a type.  */extern bfd_vma debug_get_type_size PARAMS ((PTR, debug_type));/* Get the return type of a function or method type.  */extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));/* Get the NULL terminated array of parameter types for a function or   method type (actually, parameter types are not currently stored for   function types).  This may be used to determine whether a method   type is a stub method or not.  The last argument points to a   boolean which is set to true if the function takes a variable   number of arguments.  */extern const debug_type *debug_get_parameter_types PARAMS ((PTR,							    debug_type,							    boolean *));/* Get the target type of a pointer or reference or const or volatile   type.  */extern debug_type debug_get_target_type PARAMS ((PTR, debug_type));/* Get the NULL terminated array of fields for a struct, union, or   class.  */extern const debug_field *debug_get_fields PARAMS ((PTR, debug_type));/* Get the type of a field.  */extern debug_type debug_get_field_type PARAMS ((PTR, debug_field));/* Get the name of a field.  */extern const char *debug_get_field_name PARAMS ((PTR, debug_field));/* Get the bit position of a field within the containing structure.   If the field is a static member, this will return (bfd_vma) -1.  */extern bfd_vma debug_get_field_bitpos PARAMS ((PTR, debug_field));/* Get the bit size of a field.  If the field is a static member, this   will return (bfd_vma) -1.  */extern bfd_vma debug_get_field_bitsize PARAMS ((PTR, debug_field));/* Get the visibility of a field.  */extern enum debug_visibility debug_get_field_visibility  PARAMS ((PTR, debug_field));/* Get the physical name of a field, if it is a static member.  If the   field is not a static member, this will return NULL.  */extern const char *debug_get_field_physname PARAMS ((PTR, debug_field));/* Write out the recorded debugging information.  This takes a set of   function pointers which are called to do the actual writing.  The   first PTR is the debugging handle.  The second PTR is a handle   which is passed to the functions.  */extern boolean debug_write PARAMS ((PTR, const struct debug_write_fns *, PTR));#endif /* DEBUG_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?