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

📄 dwarfout.c

📁 GUN开源阻止下的编译器GCC
💻 C
📖 第 1 页 / 共 5 页
字号:
   stock m88k/svr4 assembler, both of which need to see .L at the start of   a label in order to prevent that label from going into the linker symbol   table).  When I get time, I'll have to fix this the right way so that we   will use ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_INTERNAL_LABEL herein,   but that will require a rather massive set of changes.  For the moment,   the following definitions out to produce the right results for all svr4   and svr3 assemblers. -- rfg*/#ifndef TEXT_BEGIN_LABEL#define TEXT_BEGIN_LABEL	".L_text_b"#endif#ifndef TEXT_END_LABEL#define TEXT_END_LABEL		".L_text_e"#endif#ifndef DATA_BEGIN_LABEL#define DATA_BEGIN_LABEL	".L_data_b"#endif#ifndef DATA_END_LABEL#define DATA_END_LABEL		".L_data_e"#endif#ifndef DATA1_BEGIN_LABEL#define DATA1_BEGIN_LABEL	".L_data1_b"#endif#ifndef DATA1_END_LABEL#define DATA1_END_LABEL		".L_data1_e"#endif#ifndef RODATA_BEGIN_LABEL#define RODATA_BEGIN_LABEL	".L_rodata_b"#endif#ifndef RODATA_END_LABEL#define RODATA_END_LABEL	".L_rodata_e"#endif#ifndef RODATA1_BEGIN_LABEL#define RODATA1_BEGIN_LABEL	".L_rodata1_b"#endif#ifndef RODATA1_END_LABEL#define RODATA1_END_LABEL	".L_rodata1_e"#endif#ifndef BSS_BEGIN_LABEL#define BSS_BEGIN_LABEL		".L_bss_b"#endif#ifndef BSS_END_LABEL#define BSS_END_LABEL		".L_bss_e"#endif#ifndef LINE_BEGIN_LABEL#define LINE_BEGIN_LABEL	".L_line_b"#endif#ifndef LINE_LAST_ENTRY_LABEL#define LINE_LAST_ENTRY_LABEL	".L_line_last"#endif#ifndef LINE_END_LABEL#define LINE_END_LABEL		".L_line_e"#endif#ifndef DEBUG_BEGIN_LABEL#define DEBUG_BEGIN_LABEL	".L_debug_b"#endif#ifndef SFNAMES_BEGIN_LABEL#define SFNAMES_BEGIN_LABEL	".L_sfnames_b"#endif#ifndef SRCINFO_BEGIN_LABEL#define SRCINFO_BEGIN_LABEL	".L_srcinfo_b"#endif#ifndef MACINFO_BEGIN_LABEL#define MACINFO_BEGIN_LABEL	".L_macinfo_b"#endif#ifndef DIE_BEGIN_LABEL_FMT#define DIE_BEGIN_LABEL_FMT	".L_D%u"#endif#ifndef DIE_END_LABEL_FMT#define DIE_END_LABEL_FMT	".L_D%u_e"#endif#ifndef PUB_DIE_LABEL_FMT#define PUB_DIE_LABEL_FMT	".L_P%u"#endif#ifndef INSN_LABEL_FMT#define INSN_LABEL_FMT		".L_I%u_%u"#endif#ifndef BLOCK_BEGIN_LABEL_FMT#define BLOCK_BEGIN_LABEL_FMT	".L_B%u"#endif#ifndef BLOCK_END_LABEL_FMT#define BLOCK_END_LABEL_FMT	".L_B%u_e"#endif#ifndef SS_BEGIN_LABEL_FMT#define SS_BEGIN_LABEL_FMT	".L_s%u"#endif#ifndef SS_END_LABEL_FMT#define SS_END_LABEL_FMT	".L_s%u_e"#endif#ifndef EE_BEGIN_LABEL_FMT#define EE_BEGIN_LABEL_FMT	".L_e%u"#endif#ifndef EE_END_LABEL_FMT#define EE_END_LABEL_FMT	".L_e%u_e"#endif#ifndef MT_BEGIN_LABEL_FMT#define MT_BEGIN_LABEL_FMT	".L_t%u"#endif#ifndef MT_END_LABEL_FMT#define MT_END_LABEL_FMT	".L_t%u_e"#endif#ifndef LOC_BEGIN_LABEL_FMT#define LOC_BEGIN_LABEL_FMT	".L_l%u"#endif#ifndef LOC_END_LABEL_FMT#define LOC_END_LABEL_FMT	".L_l%u_e"#endif#ifndef BOUND_BEGIN_LABEL_FMT#define BOUND_BEGIN_LABEL_FMT	".L_b%u_%u_%c"#endif#ifndef BOUND_END_LABEL_FMT#define BOUND_END_LABEL_FMT	".L_b%u_%u_%c_e"#endif#ifndef DERIV_BEGIN_LABEL_FMT#define DERIV_BEGIN_LABEL_FMT	".L_d%u"#endif#ifndef DERIV_END_LABEL_FMT#define DERIV_END_LABEL_FMT	".L_d%u_e"#endif#ifndef SL_BEGIN_LABEL_FMT#define SL_BEGIN_LABEL_FMT	".L_sl%u"#endif#ifndef SL_END_LABEL_FMT#define SL_END_LABEL_FMT	".L_sl%u_e"#endif#ifndef BODY_BEGIN_LABEL_FMT#define BODY_BEGIN_LABEL_FMT	".L_b%u"#endif#ifndef BODY_END_LABEL_FMT#define BODY_END_LABEL_FMT	".L_b%u_e"#endif#ifndef FUNC_END_LABEL_FMT#define FUNC_END_LABEL_FMT	".L_f%u_e"#endif#ifndef TYPE_NAME_FMT#define TYPE_NAME_FMT		".L_T%u"#endif#ifndef DECL_NAME_FMT#define DECL_NAME_FMT		".L_E%u"#endif#ifndef LINE_CODE_LABEL_FMT#define LINE_CODE_LABEL_FMT	".L_LC%u"#endif#ifndef SFNAMES_ENTRY_LABEL_FMT#define SFNAMES_ENTRY_LABEL_FMT	".L_F%u"#endif#ifndef LINE_ENTRY_LABEL_FMT#define LINE_ENTRY_LABEL_FMT	".L_LE%u"#endif/* Definitions of defaults for various types of primitive assembly language   output operations.   If necessary, these may be overridden from within your tm.h file,   but typically, you shouldn't need to override these.  */#ifndef ASM_OUTPUT_PUSH_SECTION#define ASM_OUTPUT_PUSH_SECTION(FILE, SECTION) \  fprintf ((FILE), PUSHSECTION_FORMAT, PUSHSECTION_ASM_OP, SECTION)#endif#ifndef ASM_OUTPUT_POP_SECTION#define ASM_OUTPUT_POP_SECTION(FILE) \  fprintf ((FILE), "\t%s\n", POPSECTION_ASM_OP)#endif#ifndef ASM_OUTPUT_SOURCE_FILENAME#define ASM_OUTPUT_SOURCE_FILENAME(FILE,NAME) \  do {	fprintf (FILE, "\t%s\t", FILE_ASM_OP);				\	output_quoted_string (FILE, NAME);				\	fputc ('\n', FILE);						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_DELTA2#define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2)			\ do {	fprintf ((FILE), "\t%s\t", UNALIGNED_SHORT_ASM_OP);		\	assemble_name (FILE, LABEL1);					\	fprintf (FILE, "-");						\	assemble_name (FILE, LABEL2);					\	fprintf (FILE, "\n");						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_DELTA4#define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2)			\ do {	fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);		\	assemble_name (FILE, LABEL1);					\	fprintf (FILE, "-");						\	assemble_name (FILE, LABEL2);					\	fprintf (FILE, "\n");						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_TAG#define ASM_OUTPUT_DWARF_TAG(FILE,TAG)					\  do {									\    fprintf ((FILE), "\t%s\t0x%x",					\		     UNALIGNED_SHORT_ASM_OP, (unsigned) TAG);		\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_tag_name (TAG));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_ATTRIBUTE#define ASM_OUTPUT_DWARF_ATTRIBUTE(FILE,ATTR)				\  do {									\    fprintf ((FILE), "\t%s\t0x%x",					\		     UNALIGNED_SHORT_ASM_OP, (unsigned) ATTR);		\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_attr_name (ATTR));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_STACK_OP#define ASM_OUTPUT_DWARF_STACK_OP(FILE,OP)				\  do {									\    fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, (unsigned) OP);		\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_stack_op_name (OP));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_FUND_TYPE#define ASM_OUTPUT_DWARF_FUND_TYPE(FILE,FT)				\  do {									\    fprintf ((FILE), "\t%s\t0x%x",					\		     UNALIGNED_SHORT_ASM_OP, (unsigned) FT);		\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_fund_type_name (FT));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_FMT_BYTE#define ASM_OUTPUT_DWARF_FMT_BYTE(FILE,FMT)				\  do {									\    fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, (unsigned) FMT);	\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_fmt_byte_name (FMT));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_TYPE_MODIFIER#define ASM_OUTPUT_DWARF_TYPE_MODIFIER(FILE,MOD)			\  do {									\    fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, (unsigned) MOD);	\    if (flag_verbose_asm)						\      fprintf ((FILE), "\t%s %s",					\		       ASM_COMMENT_START, dwarf_typemod_name (MOD));	\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_ADDR#define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL)				\ do {	fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);		\	assemble_name (FILE, LABEL);					\	fprintf (FILE, "\n");						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_ADDR_CONST#define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX)				\  do {									\    fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);			\    output_addr_const ((FILE), (RTX));					\    fputc ('\n', (FILE));						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_REF#define ASM_OUTPUT_DWARF_REF(FILE,LABEL)				\ do {	fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP);		\	assemble_name (FILE, LABEL);					\	fprintf (FILE, "\n");						\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_DATA1#define ASM_OUTPUT_DWARF_DATA1(FILE,VALUE) \  fprintf ((FILE), "\t%s\t0x%x\n", ASM_BYTE_OP, VALUE)#endif#ifndef ASM_OUTPUT_DWARF_DATA2#define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \  fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE)#endif#ifndef ASM_OUTPUT_DWARF_DATA4#define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \  fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, (unsigned) VALUE)#endif#ifndef ASM_OUTPUT_DWARF_DATA8#define ASM_OUTPUT_DWARF_DATA8(FILE,HIGH_VALUE,LOW_VALUE)		\  do {									\    if (WORDS_BIG_ENDIAN)						\      {									\	fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \	fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\      }									\    else								\      {									\	fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\	fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \      }									\  } while (0)#endif#ifndef ASM_OUTPUT_DWARF_STRING#define ASM_OUTPUT_DWARF_STRING(FILE,P) \  ASM_OUTPUT_ASCII ((FILE), P, strlen (P)+1)#endif/************************ general utility functions **************************/inline char *xstrdup (s)     register char *s;{  register char *p = (char *) xmalloc (strlen (s) + 1);  strcpy (p, s);  return p;}inline intis_pseudo_reg (rtl)     register rtx rtl;{  return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER))          || ((GET_CODE (rtl) == SUBREG)	      && (REGNO (XEXP (rtl, 0)) >= FIRST_PSEUDO_REGISTER)));}inline treetype_main_variant (type)     register tree type;{  type = TYPE_MAIN_VARIANT (type);  /* There really should be only one main variant among any group of variants     of a given type (and all of the MAIN_VARIANT values for all members of     the group should point to that one type) but sometimes the C front-end     messes this up for array types, so we work around that bug here.  */  if (TREE_CODE (type) == ARRAY_TYPE)    {      while (type != TYPE_MAIN_VARIANT (type))        type = TYPE_MAIN_VARIANT (type);    }  return type;}/* Return non-zero if the given type node represents a tagged type.  */inline intis_tagged_type (type)     register tree type;{  register enum tree_code code = TREE_CODE (type);  return (code == RECORD_TYPE || code == UNION_TYPE	  || code == QUAL_UNION_TYPE || code == ENUMERAL_TYPE);}static char *dwarf_tag_name (tag)     register unsigned tag;{  switch (tag)    {    case TAG_padding:			return "TAG_padding";    case TAG_array_type:		return "TAG_array_type";    case TAG_class_type:		return "TAG_class_type";    case TAG_entry_point:		return "TAG_entry_point";    case TAG_enumeration_type:		return "TAG_enumeration_type";    case TAG_formal_parameter:		return "TAG_formal_parameter";    case TAG_global_subroutine:		return "TAG_global_subroutine";    case TAG_global_variable:		return "TAG_global_variable";    case TAG_label:			return "TAG_label";    case TAG_lexical_block:		return "TAG_lexical_block";

⌨️ 快捷键说明

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