⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demangle.h

📁 功能较全面的反汇编器:反汇编器ht-2.0.15.tar.gz
💻 H
📖 第 1 页 / 共 2 页
字号:
  DEMANGLE_COMPONENT_POINTER,  /* A reference.  The one subtree is the type which is being     referenced.  */  DEMANGLE_COMPONENT_REFERENCE,  /* C++0x: An rvalue reference.  The one subtree is the type which is     being referenced.  */  DEMANGLE_COMPONENT_RVALUE_REFERENCE,  /* A complex type.  The one subtree is the base type.  */  DEMANGLE_COMPONENT_COMPLEX,  /* An imaginary type.  The one subtree is the base type.  */  DEMANGLE_COMPONENT_IMAGINARY,  /* A builtin type.  This holds the builtin type information.  */  DEMANGLE_COMPONENT_BUILTIN_TYPE,  /* A vendor's builtin type.  This holds the name of the type.  */  DEMANGLE_COMPONENT_VENDOR_TYPE,  /* A function type.  The left subtree is the return type.  The right     subtree is a list of ARGLIST nodes.  Either or both may be     NULL.  */  DEMANGLE_COMPONENT_FUNCTION_TYPE,  /* An array type.  The left subtree is the dimension, which may be     NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an     expression.  The right subtree is the element type.  */  DEMANGLE_COMPONENT_ARRAY_TYPE,  /* A pointer to member type.  The left subtree is the class type,     and the right subtree is the member type.  CV-qualifiers appear     on the latter.  */  DEMANGLE_COMPONENT_PTRMEM_TYPE,  /* An argument list.  The left subtree is the current argument, and     the right subtree is either NULL or another ARGLIST node.  */  DEMANGLE_COMPONENT_ARGLIST,  /* A template argument list.  The left subtree is the current     template argument, and the right subtree is either NULL or     another TEMPLATE_ARGLIST node.  */  DEMANGLE_COMPONENT_TEMPLATE_ARGLIST,  /* An operator.  This holds information about a standard     operator.  */  DEMANGLE_COMPONENT_OPERATOR,  /* An extended operator.  This holds the number of arguments, and     the name of the extended operator.  */  DEMANGLE_COMPONENT_EXTENDED_OPERATOR,  /* A typecast, represented as a unary operator.  The one subtree is     the type to which the argument should be cast.  */  DEMANGLE_COMPONENT_CAST,  /* A unary expression.  The left subtree is the operator, and the     right subtree is the single argument.  */  DEMANGLE_COMPONENT_UNARY,  /* A binary expression.  The left subtree is the operator, and the     right subtree is a BINARY_ARGS.  */  DEMANGLE_COMPONENT_BINARY,  /* Arguments to a binary expression.  The left subtree is the first     argument, and the right subtree is the second argument.  */  DEMANGLE_COMPONENT_BINARY_ARGS,  /* A trinary expression.  The left subtree is the operator, and the     right subtree is a TRINARY_ARG1.  */  DEMANGLE_COMPONENT_TRINARY,  /* Arguments to a trinary expression.  The left subtree is the first     argument, and the right subtree is a TRINARY_ARG2.  */  DEMANGLE_COMPONENT_TRINARY_ARG1,  /* More arguments to a trinary expression.  The left subtree is the     second argument, and the right subtree is the third argument.  */  DEMANGLE_COMPONENT_TRINARY_ARG2,  /* A literal.  The left subtree is the type, and the right subtree     is the value, represented as a DEMANGLE_COMPONENT_NAME.  */  DEMANGLE_COMPONENT_LITERAL,  /* A negative literal.  Like LITERAL, but the value is negated.     This is a minor hack: the NAME used for LITERAL points directly     to the mangled string, but since negative numbers are mangled     using 'n' instead of '-', we want a way to indicate a negative     number which involves neither modifying the mangled string nor     allocating a new copy of the literal in memory.  */  DEMANGLE_COMPONENT_LITERAL_NEG,  /* A libgcj compiled resource.  The left subtree is the name of the     resource.  */  DEMANGLE_COMPONENT_JAVA_RESOURCE,  /* A name formed by the concatenation of two parts.  The left     subtree is the first part and the right subtree the second.  */  DEMANGLE_COMPONENT_COMPOUND_NAME,  /* A name formed by a single character.  */  DEMANGLE_COMPONENT_CHARACTER};/* Types which are only used internally.  */struct demangle_operator_info;struct demangle_builtin_type_info;/* A node in the tree representation is an instance of a struct   demangle_component.  Note that the field names of the struct are   not well protected against macros defined by the file including   this one.  We can fix this if it ever becomes a problem.  */struct demangle_component{  /* The type of this component.  */  enum demangle_component_type type;  union  {    /* For DEMANGLE_COMPONENT_NAME.  */    struct    {      /* A pointer to the name (which need not NULL terminated) and	 its length.  */      const char *s;      int len;    } s_name;    /* For DEMANGLE_COMPONENT_OPERATOR.  */    struct    {      /* Operator.  */      const struct demangle_operator_info *op;    } s_operator;    /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR.  */    struct    {      /* Number of arguments.  */      int args;      /* Name.  */      struct demangle_component *name;    } s_extended_operator;    /* For DEMANGLE_COMPONENT_CTOR.  */    struct    {      /* Kind of constructor.  */      enum gnu_v3_ctor_kinds kind;      /* Name.  */      struct demangle_component *name;    } s_ctor;    /* For DEMANGLE_COMPONENT_DTOR.  */    struct    {      /* Kind of destructor.  */      enum gnu_v3_dtor_kinds kind;      /* Name.  */      struct demangle_component *name;    } s_dtor;    /* For DEMANGLE_COMPONENT_BUILTIN_TYPE.  */    struct    {      /* Builtin type.  */      const struct demangle_builtin_type_info *type;    } s_builtin;    /* For DEMANGLE_COMPONENT_SUB_STD.  */    struct    {      /* Standard substitution string.  */      const char* string;      /* Length of string.  */      int len;    } s_string;    /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM.  */    struct    {      /* Template parameter index.  */      long number;    } s_number;    /* For DEMANGLE_COMPONENT_CHARACTER.  */    struct    {      int character;    } s_character;    /* For other types.  */    struct    {      /* Left (or only) subtree.  */      struct demangle_component *left;      /* Right subtree.  */      struct demangle_component *right;    } s_binary;  } u;};/* People building mangled trees are expected to allocate instances of   struct demangle_component themselves.  They can then call one of   the following functions to fill them in.  *//* Fill in most component types with a left subtree and a right   subtree.  Returns non-zero on success, zero on failure, such as an   unrecognized or inappropriate component type.  */extern intcplus_demangle_fill_component (struct demangle_component *fill,                               enum demangle_component_type,                               struct demangle_component *left,                               struct demangle_component *right);/* Fill in a DEMANGLE_COMPONENT_NAME.  Returns non-zero on success,   zero for bad arguments.  */extern intcplus_demangle_fill_name (struct demangle_component *fill,                          const char *, int);/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the   builtin type (e.g., "int", etc.).  Returns non-zero on success,   zero if the type is not recognized.  */extern intcplus_demangle_fill_builtin_type (struct demangle_component *fill,                                  const char *type_name);/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the   operator and the number of arguments which it takes (the latter is   used to disambiguate operators which can be both binary and unary,   such as '-').  Returns non-zero on success, zero if the operator is   not recognized.  */extern intcplus_demangle_fill_operator (struct demangle_component *fill,                              const char *opname, int args);/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the   number of arguments and the name.  Returns non-zero on success,   zero for bad arguments.  */extern intcplus_demangle_fill_extended_operator (struct demangle_component *fill,                                       int numargs,                                       struct demangle_component *nm);/* Fill in a DEMANGLE_COMPONENT_CTOR.  Returns non-zero on success,   zero for bad arguments.  */extern intcplus_demangle_fill_ctor (struct demangle_component *fill,                          enum gnu_v3_ctor_kinds kind,                          struct demangle_component *name);/* Fill in a DEMANGLE_COMPONENT_DTOR.  Returns non-zero on success,   zero for bad arguments.  */extern intcplus_demangle_fill_dtor (struct demangle_component *fill,                          enum gnu_v3_dtor_kinds kind,                          struct demangle_component *name);/* This function translates a mangled name into a struct   demangle_component tree.  The first argument is the mangled name.   The second argument is DMGL_* options.  This returns a pointer to a   tree on success, or NULL on failure.  On success, the third   argument is set to a block of memory allocated by malloc.  This   block should be passed to free when the tree is no longer   needed.  */extern struct demangle_component *cplus_demangle_v3_components (const char *mangled, int options, void **mem);/* This function takes a struct demangle_component tree and returns   the corresponding demangled string.  The first argument is DMGL_*   options.  The second is the tree to demangle.  The third is a guess   at the length of the demangled string, used to initially allocate   the return buffer.  The fourth is a pointer to a size_t.  On   success, this function returns a buffer allocated by malloc(), and   sets the size_t pointed to by the fourth argument to the size of   the allocated buffer (not the length of the returned string).  On   failure, this function returns NULL, and sets the size_t pointed to   by the fourth argument to 0 for an invalid tree, or to 1 for a   memory allocation error.  */extern char *cplus_demangle_print (int options,                      const struct demangle_component *tree,                      int estimated_length,                      size_t *p_allocated_size);/* This function takes a struct demangle_component tree and passes back   a demangled string in one or more calls to a callback function.   The first argument is DMGL_* options.  The second is the tree to   demangle.  The third is a pointer to a callback function; on each call   this receives an element of the demangled string, its length, and an   opaque value.  The fourth is the opaque value passed to the callback.   The callback is called once or more to return the full demangled   string.  The demangled element string is always nul-terminated, though   its length is also provided for convenience.  In contrast to   cplus_demangle_print(), this function does not allocate heap memory   to grow output strings (except perhaps where alloca() is implemented   by malloc()), and so is normally safe for use where the heap has been   corrupted.  On success, this function returns 1; on failure, 0.  */extern intcplus_demangle_print_callback (int options,                               const struct demangle_component *tree,                               demangle_callbackref callback, void *opaque);#ifdef __cplusplus}#endif /* __cplusplus */#endif	/* DEMANGLE_H */

⌨️ 快捷键说明

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