From: Nick Clifton Date: Thu, 12 Sep 2002 10:35:54 +0000 (+0000) Subject: Handle DW_OP_GNU_push_tls_address. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=065c959b713a738e84e065d57428e27eccee9076;p=binutils-gdb.git Handle DW_OP_GNU_push_tls_address. Synch up with the gcc's dwarf2.h --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 280467b24de..135cd5e2020 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2002-09-12 Roland McGrath + + * readelf.c (decode_location_expression): DW_OP_calli -> DW_OP_call_ref + Handle DW_OP_GNU_push_tls_address. + 2002-09-11 Nick Clifton * po/tr.po: Updated Turkish translation. diff --git a/binutils/readelf.c b/binutils/readelf.c index 870e0dffb7b..05b553d7cbc 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -7348,7 +7348,7 @@ decode_location_expression (data, pointer_size, length) printf ("DW_OP_nop"); break; - /* DWARF 2.1 extensions. */ + /* DWARF 3 extensions. */ case DW_OP_push_object_address: printf ("DW_OP_push_object_address"); break; @@ -7360,8 +7360,13 @@ decode_location_expression (data, pointer_size, length) printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4)); data += 4; break; - case DW_OP_calli: - printf ("DW_OP_calli"); + case DW_OP_call_ref: + printf ("DW_OP_call_ref"); + break; + + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + printf ("DW_OP_GNU_push_tls_address"); break; default: @@ -7436,13 +7441,16 @@ display_debug_loc (section, start, file) addr = section->sh_addr; bytes = section->sh_size; section_end = start + bytes; + if (bytes == 0) { printf (_("\nThe .debug_loc section is empty.\n")); return 0; } + printf (_("Contents of the .debug_loc section:\n\n")); printf (_("\n Offset Begin End Expression\n")); + while (start < section_end) { unsigned long begin; @@ -7541,7 +7549,6 @@ fetch_indirect_string (offset) return debug_str_contents + offset; } - static int display_debug_str (section, start, file) Elf32_Internal_Shdr * section; @@ -7602,7 +7609,6 @@ display_debug_str (section, start, file) return 1; } - static unsigned char * read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size) unsigned long attribute; @@ -7956,8 +7962,8 @@ display_debug_info (section, start, file) break; } - /* Check for RELA relocations in the abbrev_offset address, and - apply them. */ + /* Check for RELA relocations in the + abbrev_offset address, and apply them. */ for (relsec = section_headers; relsec < section_headers + elf_header.e_shnum; ++relsec) @@ -8036,7 +8042,6 @@ display_debug_info (section, start, file) free_abbrevs (); /* Read in the abbrevs used by this compilation unit. */ - { Elf32_Internal_Shdr * sec; unsigned char * begin; diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 0ffa6ab9d31..389569eab5d 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,10 @@ +2002-09-12 Roland McGrath + + * dwarf2.h: Updates from GCC version of thie file: + (enum dwarf_location_atom): DW_OP_calli -> DW_OP_call_ref. + Add DW_OP_GNU_push_tls_address. + (DW_OP_lo_user): Change to 0xe0. + 2002-08-28 Catherine Moore * elf/v850.h (R_V850_LONGCALL, R_V850_ALIGN, diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h index 0e78310c69f..6463b5a9082 100644 --- a/include/elf/dwarf2.h +++ b/include/elf/dwarf2.h @@ -10,22 +10,22 @@ Derived from the DWARF 1 implementation written by Ron Guilmette (rfg@netcom.com), November 1990. -This file is part of GCC. + This file is part of GCC. -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2, or (at your option) any later -version. + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* This file is derived from the DWARF specification (a public document) Revision 2.0.0 (July 27, 1993) developed by the UNIX International @@ -488,10 +488,12 @@ enum dwarf_location_atom DW_OP_push_object_address = 0x97, DW_OP_call2 = 0x98, DW_OP_call4 = 0x99, - DW_OP_calli = 0x9a + DW_OP_call_ref = 0x9a, + /* GNU extensions. */ + DW_OP_GNU_push_tls_address = 0xe0 }; -#define DW_OP_lo_user 0x80 /* Implementation-defined range start. */ +#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */ #define DW_OP_hi_user 0xff /* Implementation-defined range end. */ /* Type encodings. */ @@ -679,7 +681,6 @@ enum dwarf_source_language DW_LANG_Mips_Assembler = 0x8001 }; - #define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ #define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */