From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32346 invoked by alias); 7 Oct 2013 09:28:16 -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 32336 invoked by uid 89); 7 Oct 2013 09:28:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f51.google.com Received: from mail-oa0-f51.google.com (HELO mail-oa0-f51.google.com) (209.85.219.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 07 Oct 2013 09:28:15 +0000 Received: by mail-oa0-f51.google.com with SMTP id h16so5973937oag.10 for ; Mon, 07 Oct 2013 02:28:13 -0700 (PDT) X-Received: by 10.60.98.69 with SMTP id eg5mr1000049oeb.42.1381138093689; Mon, 07 Oct 2013 02:28:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.7.97 with HTTP; Mon, 7 Oct 2013 02:27:33 -0700 (PDT) In-Reply-To: <52316D0C.9000707@mentor.com> References: <522DD104.6090808@codesourcery.com> <52315FC6.4000005@mentor.com> <523163DF.3020707@codesourcery.com> <52316D0C.9000707@mentor.com> From: Hui Zhu Date: Mon, 07 Oct 2013 09:28:00 -0000 Message-ID: Subject: Re: [PATCH] Fix gdb.base/shreloc.exp: (msymbol) relocated functions have different addresses fail in cygwin To: Hui Zhu Cc: Yao Qi , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00176.txt.bz2 Ping. Thanks, Hui On Thu, Sep 12, 2013 at 3:28 PM, Hui Zhu wrote: > Hi Yao, > > Thanks for your review. > > > On 09/12/13 14:49, Yao Qi wrote: >> >> On 09/12/2013 02:31 PM, Hui Zhu wrote: >>> >>> -proc get_msym_addrs { var msymfile } { >>> +proc get_msym_addrs { var msymfile { plus_var "" } } { >> >> >> 'plus_var' is not good candidate for parameter name. I'd call it 'mst' >> or 'msym_type'. > > > Fixed. > > >> >>> # Extract the list of values for symbols matching var in the >>> # minimal symbol output file >>> >>> global gdb_prompt hex >>> set result "" >>> >>> - send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n" >>> + if { "${plus_var}" == "" } { >>> + send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n" >>> + } else { >>> + send_gdb "shell grep -E \" ${plus_var} .* ${var}(\[ \t\]+.*)?\$\" >>> ${msymfile}\n" >>> + } >> >> >> This condition checking is not necessary, we can do >> >> send_gdb "shell grep -E \"${plus_var} ${var}(\[ \t\]+.*)?\$\" >> ${msymfile}\n" > > > Because for the output format is: [ 7] T 0x2aaaaacd058a fn_1 section .text > shreloc1.c > It need a ".*" after "T". So I change "T" to "T.*" to handle it. > > Post a new version according to your comments. > > Best, > > Hui > > > 2013-09-12 Hui Zhu > > * gdb.base/shreloc.exp (get_msym_addrs): Add argument "msym_type". > > (check_different): Ditto. > ((msymbol) relocated functions have different addresses): Add > argument 'T.*' when call check_different.