From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113472 invoked by alias); 15 Apr 2015 13:24:09 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 113419 invoked by uid 89); 15 Apr 2015 13:24:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 15 Apr 2015 13:24:06 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix fails in gdb.dwarf2/dynarr-ptr.exp From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Message-Id: <8cbc97c629061306efb30aa83440bec7380c584e@kwanyin> Date: Wed, 15 Apr 2015 13:24:00 -0000 X-SW-Source: 2015-q2/txt/msg02046.txt.bz2 *** TEST RESULTS FOR COMMIT 8cbc97c629061306efb30aa83440bec7380c584e *** Author: Yao Qi Branch: master Commit: 8cbc97c629061306efb30aa83440bec7380c584e Fix fails in gdb.dwarf2/dynarr-ptr.exp I see many fails in gdb.dwarf2/dynarr-ptr.exp on arm-linux target, started from this print foo.three_ptr.all^M Cannot access memory at address 0x107c8^M (gdb) FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.three_ptr.all print foo.three_ptr.all(1)^M Cannot access memory at address 0x107c8 It turns out that ":$ptr_size" is used incorrectly. array_ptr_label: DW_TAG_pointer_type { {DW_AT_byte_size :$ptr_size } ^^^^^^^^^^ {DW_AT_type :$array_label} } Since the FORM isn't given, and it starts with the ":", it is regarded as a label reference by dwarf assembler. The generated asm file on x86_64 is .uleb128 6 /* Abbrev (DW_TAG_pointer_type) */ .4byte 8 - .Lcu1_begin <----- WRONG .4byte .Llabel2 - .Lcu1_begin Looks .Lcu1_begin is 0 on x86_64 and that is why this test passes on x86_64. On arm, .Lcu1_begin is an address somewhere, and the value of DW_AT_byte_size is a very large number, so memory read request of such large length failed. This patch is to remove ":" and set the form explicitly. The generated asm file on x86_64 becomes .uleb128 6 /* Abbrev (DW_TAG_pointer_type) */ .byte 8 .4byte .Llabel2 - .Lcu1_begin gdb/testsuite: 2015-04-15 Yao Qi * gdb.dwarf2/dynarr-ptr.exp (assemble): Use $ptr_size instead of ":$ptr_size" and set its form explicitly.