From patchwork Fri Jun 2 19:36:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 20745 Received: (qmail 87084 invoked by alias); 2 Jun 2017 19:37:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 86969 invoked by uid 89); 2 Jun 2017 19:37:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=yyy, xxx X-HELO: gproxy6.mail.unifiedlayer.com Received: from gproxy6-pub.mail.unifiedlayer.com (HELO gproxy6.mail.unifiedlayer.com) (67.222.39.168) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Jun 2017 19:36:58 +0000 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id 7C2EE1E0718 for ; Fri, 2 Jun 2017 13:37:01 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id Tvcx1v00j2f2jeq01vd014; Fri, 02 Jun 2017 13:37:01 -0600 X-Authority-Analysis: v=2.2 cv=QdwWhoTv c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=LWSFodeU3zMA:10 a=zstS-IiYAAAA:8 a=EcoHZFdXYUfas_FDnNwA:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 174-29-39-24.hlrn.qwest.net ([174.29.39.24]:55096 helo=pokyo.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dGsNV-0003ge-P6; Fri, 02 Jun 2017 13:36:57 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 5/5] Add some 128-bit integer tests Date: Fri, 2 Jun 2017 13:36:51 -0600 Message-Id: <20170602193651.3173-6-tom@tromey.com> In-Reply-To: <20170602193651.3173-1-tom@tromey.com> References: <20170602193651.3173-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dGsNV-0003ge-P6 X-Source-Sender: 174-29-39-24.hlrn.qwest.net (pokyo.Home) [174.29.39.24]:55096 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== This adds some tests for printing 128-bit integers. 2017-06-02 Tom Tromey * gdb.dwarf2/formdata16.exp: Add tests. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.dwarf2/formdata16.exp | 31 +++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1b72c3a..9c4abe4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2017-06-02 Tom Tromey + * gdb.dwarf2/formdata16.exp: Add tests. + +2017-06-02 Tom Tromey + PR exp/16225: * gdb.reverse/i386-sse-reverse.exp: Update tests. * gdb.arch/vsx-regs.exp: Update tests. diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp index bba2015..a3ccbd3 100644 --- a/gdb/testsuite/gdb.dwarf2/formdata16.exp +++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp @@ -41,18 +41,22 @@ set high "0x123456789abcdef0" set low "0x0fedcba987654321" if { $endianness == "big" } { set pair $high,$low + set pair2 0x0,$low + set negative 0xffffffffffffffff,$low } else { set pair $low,$high + set pair2 $low,0x0 + set negative $low,0xffffffffffffffff } # Make some DWARF for the test. set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { - global pair + global pair pair2 negative cu { addr_size 4 } { compile_unit {} { - declare_labels int_label + declare_labels int_label sint_label int_label: DW_TAG_base_type { {DW_AT_byte_size 16 DW_FORM_udata} @@ -60,11 +64,29 @@ Dwarf::assemble $asm_file { {DW_AT_name "__uint128"} } + sint_label: DW_TAG_base_type { + {DW_AT_byte_size 16 DW_FORM_udata} + {DW_AT_encoding @DW_ATE_signed} + {DW_AT_name "__int128"} + } + DW_TAG_variable { {name xxx} {type :$int_label} {const_value $pair DW_FORM_data16} } + + DW_TAG_variable { + {name yyy} + {type :$int_label} + {const_value $pair2 DW_FORM_data16} + } + + DW_TAG_variable { + {name sss} + {type :$sint_label} + {const_value $negative DW_FORM_data16} + } } } } @@ -75,3 +97,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ } gdb_test "p/x xxx" " = 0x123456789abcdef00fedcba987654321" +gdb_test "p xxx" "= 24197857203266734864629346612071973665" +gdb_test "p/x yyy" " = 0xfedcba987654321" +gdb_test "p yyy" "= 1147797409030816545" +gdb_test "p/x sss" " = 0xffffffffffffffff0fedcba987654321" +gdb_test "p sss" "= -17298946664678735071"