From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5505 invoked by alias); 17 Oct 2014 23:17:48 -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 5492 invoked by uid 89); 17 Oct 2014 23:17:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f74.google.com Received: from mail-pa0-f74.google.com (HELO mail-pa0-f74.google.com) (209.85.220.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 17 Oct 2014 23:17:46 +0000 Received: by mail-pa0-f74.google.com with SMTP id kq14so294049pab.1 for ; Fri, 17 Oct 2014 16:17:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=Wle2ohzCbKjgED6SxQFJ31Cb3nH5/ntLfE7hAj5Jy5Q=; b=DdAE8XHm8htz3qRKsGtgdiinpmRZlGRv8Hk9lNitasNKTvUZkaJ3eaiU8pCqWh2zuz 7vnYrxI/Qr+BmPlX9cmJrtZl8pAyMXKBQerJ9dNNrxjsMmSENJFU2Jc6NPagUseSEguB YSUAwlAbZZz2O14sspzr+lvw7kgqdWDGcG4lDZ9pv0P8rovB0dZUmvK3iH8lSwnFm9fV 8mmgZeY8xjWLsfq/fAGDz29e/5a4YxJMtp555lTiWsZ7QEb70cJqYZVPbT815Y9YHdKw FSPSjI5/df1sSYUI/MEntL4xjWuYL6lOyi5F64ddmYAkTeHbfLjMePhL3/s1D9RvkSxg 37Yg== X-Gm-Message-State: ALoCoQlQweSmM3LRPfLZLCecqsz7tt8gMYPizY2O44EGGjJ+v8q9dnIm8nAtuxUVCBCIdE1oNse1Ab97Pr0fVs83AnTf4oiYiSy5ll49lh2YWPSnY/gOu4REQr9sxX1tjQPK2w9XDYd4Gf8WooB8fmrcDwpRnXNldESGRUrhCQ4o9IlckC8e3n4= X-Received: by 10.66.220.202 with SMTP id py10mr7888905pac.19.1413587863800; Fri, 17 Oct 2014 16:17:43 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id l45si119338yha.2.2014.10.17.16.17.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 16:17:43 -0700 (PDT) Received: from ruffy.mtv.corp.google.com ([172.17.128.44]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id LqlLbdDP.1; Fri, 17 Oct 2014 16:17:43 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21569.41878.581721.500583@ruffy.mtv.corp.google.com> Date: Fri, 17 Oct 2014 23:17:00 -0000 To: Kwok Cheung Yeung Cc: Pedro Alves , Subject: Re: [PATCH] Fix gdb.dwarf2/dw2-dir-file-name.exp test for MIPS architectures In-Reply-To: <54419857.4070504@codesourcery.com> References: <54399A91.8000006@mentor.com> <5441066B.7000402@redhat.com> <54419857.4070504@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00497.txt.bz2 Kwok Cheung Yeung writes: > Maciej has already reviewed this patch internally, and I can confirm > that the test still passes cleanly on x86_64 Linux. > > If there are no objections I will go ahead and commit it tomorrow. > > Thanks, > > Kwok > > On 17/10/2014 1:07 PM, Pedro Alves wrote: > > Looks fine to me, but I'd like to hear Maciej's OK on the MIPS specifics too. > > > > Please make sure x86_64 still works. > > > > I wonder if this test could be simplified using the testsuite's dwarf > > assembler (Dwarf::assemble). > > > >> > >> Kwok > >> > >> 2014-08-14 Kwok Cheung Yeung > >> > >> gdb/testsuite/ > >> * gdb.dwarf2/dw2-dir-file-name.exp (addr_len): New. > >> (out_cu): Use addr_len for the size of addresses. > >> (out_line): Likewise. Size DW_LNE_set_address instruction > >> according to addr_len. > >> * gdb.dwarf2/dw2-dir-file-name.c (START_INSNS): New. > >> (FUNC): Add START_INSNS to definition. Hi. One nit. I'm guessing there's an attempt here to have the comments align properly in the generated file. @@ -54,8 +62,8 @@ proc out_cu { name cu_dir cu_name line_dir line_name } { .ascii \"GNU C\\0\" /* DW_AT_producer */ .byte 2 /* DW_AT_language (DW_LANG_C) */ .4byte .Lline_${name}_begin /* DW_AT_stmt_list */ - .4byte ${name}_start /* DW_AT_low_pc */ - .4byte ${name}_end /* DW_AT_high_pc */ + .${addr_len}byte ${name}_start /* DW_AT_low_pc */ + .${addr_len}byte ${name}_end /* DW_AT_high_pc */ " if { $cu_dir != "" } { puts $f " .ascii $cu_dir /* DW_AT_comp_dir */" I'd rather not go down this path, and just keep the source reasonably clean in this regard. E.g., @@ -54,8 +62,8 @@ proc out_cu { name cu_dir cu_name line_dir line_name } { .ascii \"GNU C\\0\" /* DW_AT_producer */ .byte 2 /* DW_AT_language (DW_LANG_C) */ .4byte .Lline_${name}_begin /* DW_AT_stmt_list */ - .4byte ${name}_start /* DW_AT_low_pc */ - .4byte ${name}_end /* DW_AT_high_pc */ + .${addr_len}byte ${name}_start /* DW_AT_low_pc */ + .${addr_len}byte ${name}_end /* DW_AT_high_pc */ " if { $cu_dir != "" } { puts $f " .ascii $cu_dir /* DW_AT_comp_dir */" Thanks.