X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fdwarf.c;h=ad961b8c9d0758704f05023f3a73f441b43fd3c4;hb=9108bc33b1ca0b2e930c0cce5b1a0394e33e86be;hp=b6c0a3af86913a0d175eafd4b13b1d3383c55c75;hpb=3391569f218cd5d05e96769f47559d5828be3acd;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/dwarf.c b/binutils/dwarf.c index b6c0a3af86..ad961b8c9d 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -1575,6 +1575,25 @@ decode_location_expression (unsigned char * data, data += bytes_read; printf ("DW_OP_GNU_const_index <0x%s>", dwarf_vmatoa ("x", uvalue)); break; + case DW_OP_GNU_variable_value: + /* FIXME: Strictly speaking for 64-bit DWARF3 files + this ought to be an 8-byte wide computation. */ + if (dwarf_version == -1) + { + printf (_("(DW_OP_GNU_variable_value in frame info)")); + /* No way to tell where the next op is, so just bail. */ + return need_frame_base; + } + if (dwarf_version == 2) + { + SAFE_BYTE_GET_AND_INC (uvalue, data, pointer_size, end); + } + else + { + SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end); + } + printf ("DW_OP_GNU_variable_value: <0x%s>", dwarf_vmatoa ("x", uvalue)); + break; /* HP extensions. */ case DW_OP_HP_is_value: @@ -3424,7 +3443,7 @@ display_formatted_table (unsigned char * data, unsigned char * end, const DWARF2_Internal_LineInfo * linfo, struct dwarf_section * section, - const char * what) + bfd_boolean is_dir) { unsigned char *format_start, format_count, *format, formati; dwarf_vma data_count, datai; @@ -3440,7 +3459,10 @@ display_formatted_table (unsigned char * data, data += bytes_read; if (data == end) { - warn (_("Corrupt %s format table entry\n"), what); + if (is_dir) + warn (_("Corrupt directory format table entry\n")); + else + warn (_("Corrupt file name format table entry\n")); return data; } } @@ -3449,18 +3471,28 @@ display_formatted_table (unsigned char * data, data += bytes_read; if (data == end) { - warn (_("Corrupt %s list\n"), what); + if (is_dir) + warn (_("Corrupt directory list\n")); + else + warn (_("Corrupt file name list\n")); return data; } if (data_count == 0) { - printf (_("\n The %s Table is empty.\n"), what); + if (is_dir) + printf (_("\n The Directory Table is empty.\n")); + else + printf (_("\n The File Name Table is empty.\n")); return data; } - printf (_("\n The %s Table (offset 0x%lx):\n"), what, - (long)(data - start)); + if (is_dir) + printf (_("\n The Directory Table (offset 0x%lx):\n"), + (long) (data - start)); + else + printf (_("\n The File Name Table (offset 0x%lx):\n"), + (long) (data - start)); printf (_(" Entry")); /* Delay displaying name as the last entry for better screen layout. */ @@ -3528,7 +3560,10 @@ display_formatted_table (unsigned char * data, } if (data == end) { - warn (_("Corrupt %s entries list\n"), what); + if (is_dir) + warn (_("Corrupt directory entries list\n")); + else + warn (_("Corrupt file name entries list\n")); return data; } putchar ('\n'); @@ -3636,9 +3671,9 @@ display_debug_lines_raw (struct dwarf_section * section, load_debug_section_with_follow (line_str, file); data = display_formatted_table (data, start, end, &linfo, section, - _("Directory")); + TRUE); data = display_formatted_table (data, start, end, &linfo, section, - _("File name")); + FALSE); } else {