From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60675 invoked by alias); 17 Feb 2017 12:09:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 60634 invoked by uid 89); 17 Feb 2017 12:09:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=complaint, xxx X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Feb 2017 12:09:45 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D982E3A76BA; Fri, 17 Feb 2017 12:09:45 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1HC9hmH013854; Fri, 17 Feb 2017 07:09:44 -0500 Subject: Re: [PATCH 8/8] DWARF-5: DW_FORM_data16 To: Jan Kratochvil , gdb-patches@sourceware.org References: <148693097396.9024.2288256732840761882.stgit@host1.jankratochvil.net> <148693102336.9024.6339944981062939536.stgit@host1.jankratochvil.net> Cc: Victor Leschuk From: Pedro Alves Message-ID: <3bfb48f9-168a-26ae-678b-92b059583c4e@redhat.com> Date: Fri, 17 Feb 2017 12:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <148693102336.9024.6339944981062939536.stgit@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00472.txt.bz2 On 02/12/2017 08:23 PM, Jan Kratochvil wrote: > @@ -20250,6 +20261,10 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) > fprintf_unfiltered (f, "expression: size %s", > pulongest (DW_BLOCK (&die->attrs[i])->size)); > break; > + case DW_FORM_data16: > + /* FIXME: Print the contents. */ > + fprintf_unfiltered (f, "constant of 16 bytes"); Should we fix that FIXME? > + break; > case DW_FORM_ref_addr: > fprintf_unfiltered (f, "ref address: "); > fputs_filtered (hex_string (DW_UNSND (&die->attrs[i])), f); > @@ -20411,6 +20426,7 @@ dwarf2_get_attr_constant_value (const struct attribute *attr, int default_value) > return DW_UNSND (attr); > else > { > + /* For DW_FORM_data16 see attr_form_is_constant. */ Spurious space after "For". > complaint (&symfile_complaints, > _("Attribute value is not a constant (%s)"), > dwarf_form_name (attr->form)); > @@ -20694,6 +20710,7 @@ dwarf2_fetch_constant_bytes (sect_offset offset, > case DW_FORM_block4: > case DW_FORM_block: > case DW_FORM_exprloc: > + case DW_FORM_data16: > result = DW_BLOCK (attr)->data; > *len = DW_BLOCK (attr)->size; > break; > +# We need to know the endianess in order > +# to write some of the debugging info we'd like to generate. > +if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] { "failed to prepare for endianness test" instead of "${testfile}.exp". > + return -1 > +} > + > +if { [prepare_for_testing ${testfile}.exp ${testfile} \ "failed to prepare" instead of "${testfile}.exp". > + [list $srcfile $asm_file] {nodebug}] } { > + return -1 > +} > + > +gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321" Thanks, Pedro Alves