data += strlen (data) + 1; break;  case DW_FORM_sdata: uvalue = read_leb128 (data, & bytes_read, 1); data += bytes_read; printf (" %ld", (long) uvalue); break;  case DW_FORM_ref_udata: case DW_FORM_udata: uvalue = read_leb128 (data, & bytes_read, 0); data += bytes_read; printf (is_ref ? " <%lx>" : " %ld", uvalue);
data += strlen ((char *) data) + 1;
read_and_display_attr (attribute, form, data, pointer_size)     unsigned long   attribute;     unsigned long   form;     unsigned char * data;     unsigned long   pointer_size;{  unsigned long   uvalue = 0;  unsigned char * block_start = NULL;  int             bytes_read;  int		  is_ref = 0;  printf ("     %-18s:", get_AT_name (attribute));  switch (form)    {    case DW_FORM_ref_addr:    case DW_FORM_ref1:    case DW_FORM_ref2:    case DW_FORM_ref4:    case DW_FORM_ref8:    case DW_FORM_ref_udata:      is_ref = 1;    }  switch (form)    {    case DW_FORM_ref_addr:    case DW_FORM_addr:      uvalue = byte_get (data, pointer_size);      printf (is_ref ? " <%lx>" : " %#lx", uvalue);      data += pointer_size;      break;    case DW_FORM_ref1:    case DW_FORM_flag:    case DW_FORM_data1:      uvalue = byte_get (data ++, 1);      printf (is_ref ? " <%lx>" : " %ld", uvalue);      break;    case DW_FORM_ref2:    case DW_FORM_data2:      uvalue = byte_get (data, 2);      data += 2;      printf (is_ref ? " <%lx>" : " %ld", uvalue);      break;    case DW_FORM_ref4:    case DW_FORM_data4:      uvalue = byte_get (data, 4);      data += 4;      printf (is_ref ? " <%lx>" : " %ld", uvalue);      break;    case DW_FORM_ref8:    case DW_FORM_data8:      uvalue = byte_get (data, 4);      printf (" %lx", uvalue);      printf (" %lx", (unsigned long) byte_get (data + 4, 4));      data += 8;      break;    case DW_FORM_string:      printf (" %s", data);      data += strlen (data) + 1;      break;    case DW_FORM_sdata:      uvalue = read_leb128 (data, & bytes_read, 1);      data += bytes_read;      printf (" %ld", (long) uvalue);      break;    case DW_FORM_ref_udata:    case DW_FORM_udata:      uvalue = read_leb128 (data, & bytes_read, 0);      data += bytes_read;      printf (is_ref ? " <%lx>" : " %ld", uvalue);      break;    case DW_FORM_block:      uvalue = read_leb128 (data, & bytes_read, 0);      block_start = data + bytes_read;      data = display_block (block_start, uvalue);      uvalue = * block_start;      break;    case DW_FORM_block1:      uvalue = byte_get (data, 1);      block_start = data + 1;      data = display_block (block_start, uvalue);      uvalue = * block_start;      break;    case DW_FORM_block2:      uvalue = byte_get (data, 2);      block_start = data + 2;      data = display_block (block_start, uvalue);      uvalue = * block_start;      break;    case DW_FORM_block4:      uvalue = byte_get (data, 4);      block_start = data + 4;      data = display_block (block_start, uvalue);      uvalue = * block_start;      break;    case DW_FORM_strp:    case DW_FORM_indirect:      warn (_("Unable to handle FORM: %d"), form);      break;    default:      warn (_("Unrecognised form: %d"), form);      break;    }  /* For some attributes we can display futher information.  */  printf ("\t");  switch (attribute)    {    case DW_AT_inline:      switch (uvalue)	{	case DW_INL_not_inlined:          printf (_("(not inlined)")); break;	case DW_INL_inlined:              printf (_("(inlined)")); break;	case DW_INL_declared_not_inlined: printf (_("(declared as inline but ignored)")); break;	case DW_INL_declared_inlined:     printf (_("(declared as inline and inlined)")); break;	default: printf (_("  (Unknown inline attribute value: %lx)"), uvalue); break;	}      break;    case DW_AT_frame_base:      if (uvalue >= DW_OP_reg0 && uvalue <= DW_OP_reg31)	printf ("(reg %ld)", uvalue - DW_OP_reg0);      break;    case DW_AT_language:      switch (uvalue)	{	case DW_LANG_C:              printf ("(non-ANSI C)"); break;	case DW_LANG_C89:            printf ("(ANSI C)"); break;	case DW_LANG_C_plus_plus:    printf ("(C++)"); break;	case DW_LANG_Fortran77:      printf ("(FORTRAN 77)"); break;	case DW_LANG_Fortran90:      printf ("(Fortran 90)"); break;	case DW_LANG_Modula2:        printf ("(Modula 2)"); break;	case DW_LANG_Pascal83:       printf ("(ANSI Pascal)"); break;	case DW_LANG_Ada83:          printf ("(Ada)"); break;	case DW_LANG_Cobol74:        printf ("(Cobol 74)"); break;	case DW_LANG_Cobol85:        printf ("(Cobol 85)"); break;	case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;	default:                     printf ("(Unknown: %lx)", uvalue); break;	}      break;    case DW_AT_encoding:      switch (uvalue)	{	case DW_ATE_void:            printf ("(void)"); break;	case DW_ATE_address:         printf ("(machine address)"); break;	case DW_ATE_boolean:         printf ("(boolean)"); break;	case DW_ATE_complex_float:   printf ("(complex float)"); break;	case DW_ATE_float:           printf ("(float)"); break;	case DW_ATE_signed:          printf ("(signed)"); break;	case DW_ATE_signed_char:     printf ("(signed char)"); break;	case DW_ATE_unsigned:        printf ("(unsigned)"); break;	case DW_ATE_unsigned_char:   printf ("(unsigned char)"); break;	default:	  if (uvalue >= DW_ATE_lo_user	      && uvalue <= DW_ATE_hi_user)	    printf ("(user defined type)");	  else	    printf ("(unknown type)");	  break;	}      break;    case DW_AT_accessibility:      switch (uvalue)	{	case DW_ACCESS_public:		printf ("(public)"); break;	case DW_ACCESS_protected:	printf ("(protected)"); break;	case DW_ACCESS_private:		printf ("(private)"); break;	default:		        printf ("(unknown accessibility)"); break;	}      break;    case DW_AT_visibility:      switch (uvalue)	{	case DW_VIS_local:	printf ("(local)"); break;	case DW_VIS_exported:	printf ("(exported)"); break;	case DW_VIS_qualified:	printf ("(qualified)"); break;	default:		printf ("(unknown visibility)"); break;	}      break;    case DW_AT_virtuality:      switch (uvalue)	{	case DW_VIRTUALITY_none:	printf ("(none)"); break;	case DW_VIRTUALITY_virtual:	printf ("(virtual)"); break;	case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;	default:		        printf ("(unknown virtuality)"); break;	}      break;    case DW_AT_identifier_case:      switch (uvalue)	{	case DW_ID_case_sensitive:	printf ("(case_sensitive)"); break;	case DW_ID_up_case:		printf ("(up_case)"); break;	case DW_ID_down_case:		printf ("(down_case)"); break;	case DW_ID_case_insensitive:	printf ("(case_insensitive)"); break;	default:		        printf ("(unknown case)"); break;	}      break;    case DW_AT_calling_convention:      switch (uvalue)	{	case DW_CC_normal:	printf ("(normal)"); break;	case DW_CC_program:	printf ("(program)"); break;	case DW_CC_nocall:	printf ("(nocall)"); break;	default:	  if (uvalue >= DW_CC_lo_user	      && uvalue <= DW_CC_hi_user)	    printf ("(user defined)");	  else	    printf ("(unknown convention)");	}      break;    case DW_AT_location:    case DW_AT_data_member_location:    case DW_AT_vtable_elem_location:      printf ("(");      decode_location_expression (block_start, pointer_size);      printf (")");      break;    default:      break;    }  printf ("\n");  return data;}