OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [binutils/] [dwarf.c] - Diff between revs 161 and 163

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 161 Rev 163
Line 127... Line 127...
  if (byte_size != 0)
  if (byte_size != 0)
    {
    {
      if (byte_size > 0 && byte_size <= 8)
      if (byte_size > 0 && byte_size <= 8)
        offset = 16 - 2 * byte_size;
        offset = 16 - 2 * byte_size;
      else
      else
        error ("Wrong size in print_dwarf_vma");
        error (_("Wrong size in print_dwarf_vma"));
    }
    }
 
 
  fputs (buff + offset, stdout);
  fputs (buff + offset, stdout);
}
}
 
 
Line 351... Line 351...
                                      read_leb128 (data, & bytes_read, 0)));
                                      read_leb128 (data, & bytes_read, 0)));
                data += bytes_read;
                data += bytes_read;
                break;
                break;
              case DW_LNE_HP_SFC_associate:
              case DW_LNE_HP_SFC_associate:
                printf ("    DW_LNE_HP_SFC_associate ");
                printf ("    DW_LNE_HP_SFC_associate ");
                printf (_("(%s"),
                printf ("(%s",
                        dwarf_vmatoa ("u",
                        dwarf_vmatoa ("u",
                                      read_leb128 (data, & bytes_read, 0)));
                                      read_leb128 (data, & bytes_read, 0)));
                data += bytes_read;
                data += bytes_read;
                printf (_(",%s"),
                printf (",%s",
                        dwarf_vmatoa ("u",
                        dwarf_vmatoa ("u",
                                      read_leb128 (data, & bytes_read, 0)));
                                      read_leb128 (data, & bytes_read, 0)));
                data += bytes_read;
                data += bytes_read;
                printf (_(",%s)\n"),
                printf (",%s)\n",
                        dwarf_vmatoa ("u",
                        dwarf_vmatoa ("u",
                                      read_leb128 (data, & bytes_read, 0)));
                                      read_leb128 (data, & bytes_read, 0)));
                data += bytes_read;
                data += bytes_read;
                break;
                break;
              default:
              default:
                printf ("    UNKNOW DW_LNE_HP_SFC opcode (%u)\n", opc);
                printf (_("    UNKNOWN DW_LNE_HP_SFC opcode (%u)\n"), opc);
                data = edata;
                data = edata;
                break;
                break;
              }
              }
          }
          }
      }
      }
Line 1070... Line 1070...
        case DW_OP_call_frame_cfa:
        case DW_OP_call_frame_cfa:
          printf ("DW_OP_call_frame_cfa");
          printf ("DW_OP_call_frame_cfa");
          break;
          break;
        case DW_OP_bit_piece:
        case DW_OP_bit_piece:
          printf ("DW_OP_bit_piece: ");
          printf ("DW_OP_bit_piece: ");
          printf ("size: %s ",
          printf (_("size: %s "),
                  dwarf_vmatoa ("u", read_leb128 (data, &bytes_read, 0)));
                  dwarf_vmatoa ("u", read_leb128 (data, &bytes_read, 0)));
          data += bytes_read;
          data += bytes_read;
          printf ("offset: %s ",
          printf (_("offset: %s "),
                  dwarf_vmatoa ("u", read_leb128 (data, &bytes_read, 0)));
                  dwarf_vmatoa ("u", read_leb128 (data, &bytes_read, 0)));
          data += bytes_read;
          data += bytes_read;
          break;
          break;
 
 
          /* DWARF 4 extensions.  */
          /* DWARF 4 extensions.  */
Line 1093... Line 1093...
          data += uvalue;
          data += uvalue;
          break;
          break;
 
 
          /* GNU extensions.  */
          /* GNU extensions.  */
        case DW_OP_GNU_push_tls_address:
        case DW_OP_GNU_push_tls_address:
          printf ("DW_OP_GNU_push_tls_address or DW_OP_HP_unknown");
          printf (_("DW_OP_GNU_push_tls_address or DW_OP_HP_unknown"));
          break;
          break;
        case DW_OP_GNU_uninit:
        case DW_OP_GNU_uninit:
          printf ("DW_OP_GNU_uninit");
          printf ("DW_OP_GNU_uninit");
          /* FIXME: Is there data associated with this OP ?  */
          /* FIXME: Is there data associated with this OP ?  */
          break;
          break;
Line 1603... Line 1603...
        case DW_LANG_Mips_Assembler:    printf ("(MIPS assembler)"); break;
        case DW_LANG_Mips_Assembler:    printf ("(MIPS assembler)"); break;
          /* UPC extension.  */
          /* UPC extension.  */
        case DW_LANG_Upc:               printf ("(Unified Parallel C)"); break;
        case DW_LANG_Upc:               printf ("(Unified Parallel C)"); break;
        default:
        default:
          if (uvalue >= DW_LANG_lo_user && uvalue <= DW_LANG_hi_user)
          if (uvalue >= DW_LANG_lo_user && uvalue <= DW_LANG_hi_user)
            printf ("(implementation defined: %s)",
            printf (_("(implementation defined: %s)"),
                    dwarf_vmatoa ("x", uvalue));
                    dwarf_vmatoa ("x", uvalue));
          else
          else
            printf ("(Unknown: %s)", dwarf_vmatoa ("x", uvalue));
            printf (_("(Unknown: %s)"), dwarf_vmatoa ("x", uvalue));
          break;
          break;
        }
        }
      break;
      break;
 
 
    case DW_AT_encoding:
    case DW_AT_encoding:
Line 1644... Line 1644...
        case DW_ATE_HP_imaginary_float128:      printf ("(HP_imaginary_float128)"); break;
        case DW_ATE_HP_imaginary_float128:      printf ("(HP_imaginary_float128)"); break;
 
 
        default:
        default:
          if (uvalue >= DW_ATE_lo_user
          if (uvalue >= DW_ATE_lo_user
              && uvalue <= DW_ATE_hi_user)
              && uvalue <= DW_ATE_hi_user)
            printf ("(user defined type)");
            printf (_("(user defined type)"));
          else
          else
            printf ("(unknown type)");
            printf (_("(unknown type)"));
          break;
          break;
        }
        }
      break;
      break;
 
 
    case DW_AT_accessibility:
    case DW_AT_accessibility:
Line 1658... Line 1658...
        {
        {
        case DW_ACCESS_public:          printf ("(public)"); break;
        case DW_ACCESS_public:          printf ("(public)"); break;
        case DW_ACCESS_protected:       printf ("(protected)"); break;
        case DW_ACCESS_protected:       printf ("(protected)"); break;
        case DW_ACCESS_private:         printf ("(private)"); break;
        case DW_ACCESS_private:         printf ("(private)"); break;
        default:
        default:
          printf ("(unknown accessibility)");
          printf (_("(unknown accessibility)"));
          break;
          break;
        }
        }
      break;
      break;
 
 
    case DW_AT_visibility:
    case DW_AT_visibility:
      switch (uvalue)
      switch (uvalue)
        {
        {
        case DW_VIS_local:              printf ("(local)"); break;
        case DW_VIS_local:              printf ("(local)"); break;
        case DW_VIS_exported:           printf ("(exported)"); break;
        case DW_VIS_exported:           printf ("(exported)"); break;
        case DW_VIS_qualified:          printf ("(qualified)"); break;
        case DW_VIS_qualified:          printf ("(qualified)"); break;
        default:                        printf ("(unknown visibility)"); break;
        default:                        printf (_("(unknown visibility)")); break;
        }
        }
      break;
      break;
 
 
    case DW_AT_virtuality:
    case DW_AT_virtuality:
      switch (uvalue)
      switch (uvalue)
        {
        {
        case DW_VIRTUALITY_none:        printf ("(none)"); break;
        case DW_VIRTUALITY_none:        printf ("(none)"); break;
        case DW_VIRTUALITY_virtual:     printf ("(virtual)"); break;
        case DW_VIRTUALITY_virtual:     printf ("(virtual)"); break;
        case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
        case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
        default:                        printf ("(unknown virtuality)"); break;
        default:                        printf (_("(unknown virtuality)")); break;
        }
        }
      break;
      break;
 
 
    case DW_AT_identifier_case:
    case DW_AT_identifier_case:
      switch (uvalue)
      switch (uvalue)
        {
        {
        case DW_ID_case_sensitive:      printf ("(case_sensitive)"); break;
        case DW_ID_case_sensitive:      printf ("(case_sensitive)"); break;
        case DW_ID_up_case:             printf ("(up_case)"); break;
        case DW_ID_up_case:             printf ("(up_case)"); break;
        case DW_ID_down_case:           printf ("(down_case)"); break;
        case DW_ID_down_case:           printf ("(down_case)"); break;
        case DW_ID_case_insensitive:    printf ("(case_insensitive)"); break;
        case DW_ID_case_insensitive:    printf ("(case_insensitive)"); break;
        default:                        printf ("(unknown case)"); break;
        default:                        printf (_("(unknown case)")); break;
        }
        }
      break;
      break;
 
 
    case DW_AT_calling_convention:
    case DW_AT_calling_convention:
      switch (uvalue)
      switch (uvalue)
Line 1703... Line 1703...
        case DW_CC_program:     printf ("(program)"); break;
        case DW_CC_program:     printf ("(program)"); break;
        case DW_CC_nocall:      printf ("(nocall)"); break;
        case DW_CC_nocall:      printf ("(nocall)"); break;
        default:
        default:
          if (uvalue >= DW_CC_lo_user
          if (uvalue >= DW_CC_lo_user
              && uvalue <= DW_CC_hi_user)
              && uvalue <= DW_CC_hi_user)
            printf ("(user defined)");
            printf (_("(user defined)"));
          else
          else
            printf ("(unknown convention)");
            printf (_("(unknown convention)"));
        }
        }
      break;
      break;
 
 
    case DW_AT_ordering:
    case DW_AT_ordering:
      switch (uvalue)
      switch (uvalue)
        {
        {
        case -1: printf ("(undefined)"); break;
        case -1: printf (_("(undefined)")); break;
        case 0:  printf ("(row major)"); break;
        case 0:  printf ("(row major)"); break;
        case 1:  printf ("(column major)"); break;
        case 1:  printf ("(column major)"); break;
        }
        }
      break;
      break;
 
 
Line 1767... Line 1767...
        if (form == DW_FORM_ref_sig8)
        if (form == DW_FORM_ref_sig8)
          break;
          break;
 
 
        if (form == DW_FORM_ref1
        if (form == DW_FORM_ref1
            || form == DW_FORM_ref2
            || form == DW_FORM_ref2
            || form == DW_FORM_ref4)
            || form == DW_FORM_ref4
 
            || form == DW_FORM_ref_udata)
          uvalue += cu_offset;
          uvalue += cu_offset;
 
 
        if (uvalue >= section->size)
        if (uvalue >= section->size)
          warn (_("Offset %s used as value for DW_AT_import attribute of DIE at offset %lx is too big.\n"),
          warn (_("Offset %s used as value for DW_AT_import attribute of DIE at offset %lx is too big.\n"),
                dwarf_vmatoa ("x", uvalue),
                dwarf_vmatoa ("x", uvalue),
Line 1781... Line 1782...
            unsigned long abbrev_number;
            unsigned long abbrev_number;
            abbrev_entry * entry;
            abbrev_entry * entry;
 
 
            abbrev_number = read_leb128 (section->start + uvalue, NULL, 0);
            abbrev_number = read_leb128 (section->start + uvalue, NULL, 0);
 
 
            printf ("[Abbrev Number: %ld", abbrev_number);
            printf (_("[Abbrev Number: %ld"), abbrev_number);
            for (entry = first_abbrev; entry != NULL; entry = entry->next)
            for (entry = first_abbrev; entry != NULL; entry = entry->next)
              if (entry->entry == abbrev_number)
              if (entry->entry == abbrev_number)
                break;
                break;
            if (entry != NULL)
            if (entry != NULL)
              printf (" (%s)", get_TAG_name (entry->tag));
              printf (" (%s)", get_TAG_name (entry->tag));
Line 2959... Line 2960...
              printf (_("CU: %s:\n"), file_table[0].name);
              printf (_("CU: %s:\n"), file_table[0].name);
              printf (_("File name                            Line number    Starting address\n"));
              printf (_("File name                            Line number    Starting address\n"));
            }
            }
          else
          else
            {
            {
              if (do_wide || strlen ((char *) directory_table[0]) < 76)
              unsigned int ix = file_table[0].directory_index;
                printf (_("CU: %s/%s:\n"), directory_table[0],
              const char *directory = ix ? (char *)directory_table[ix - 1] : ".";
                        file_table[0].name);
              if (do_wide || strlen (directory) < 76)
 
                printf (_("CU: %s/%s:\n"), directory, file_table[0].name);
              else
              else
                printf ("%s:\n", file_table[0].name);
                printf ("%s:\n", file_table[0].name);
 
 
              printf (_("File name                            Line number    Starting address\n"));
              printf (_("File name                            Line number    Starting address\n"));
            }
            }
Line 4213... Line 4215...
      printf (_("  Pointer Size:             %d\n"), arange.ar_pointer_size);
      printf (_("  Pointer Size:             %d\n"), arange.ar_pointer_size);
      printf (_("  Segment Size:             %d\n"), arange.ar_segment_size);
      printf (_("  Segment Size:             %d\n"), arange.ar_segment_size);
 
 
      address_size = arange.ar_pointer_size + arange.ar_segment_size;
      address_size = arange.ar_pointer_size + arange.ar_segment_size;
 
 
 
      if (address_size == 0)
 
        {
 
          error (_("Invalid address size in %s section!\n"),
 
                 section->name);
 
          break;
 
        }
 
 
      /* The DWARF spec does not require that the address size be a power
      /* The DWARF spec does not require that the address size be a power
         of two, but we do.  This will have to change if we ever encounter
         of two, but we do.  This will have to change if we ever encounter
         an uneven architecture.  */
         an uneven architecture.  */
      if ((address_size & (address_size - 1)) != 0)
      if ((address_size & (address_size - 1)) != 0)
        {
        {
Line 5099... Line 5108...
                        reg_prefix, regname (opa, 0));
                        reg_prefix, regname (opa, 0));
              if (*reg_prefix == '\0')
              if (*reg_prefix == '\0')
                {
                {
                  fc->col_type[opa] = cie->col_type[opa];
                  fc->col_type[opa] = cie->col_type[opa];
                  fc->col_offset[opa] = cie->col_offset[opa];
                  fc->col_offset[opa] = cie->col_offset[opa];
 
                  if (do_debug_frames_interp
 
                      && fc->col_type[opa] == DW_CFA_unreferenced)
 
                    fc->col_type[opa] = DW_CFA_undefined;
                }
                }
              break;
              break;
 
 
            case DW_CFA_set_loc:
            case DW_CFA_set_loc:
              vma = get_encoded_value (start, fc->fde_encoding, section);
              vma = get_encoded_value (start, fc->fde_encoding, section);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.