From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107689 invoked by alias); 5 Jun 2018 17:38:55 -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 106638 invoked by uid 89); 5 Jun 2018 17:38:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=closely 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; Tue, 05 Jun 2018 17:38:54 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDBD9307A28E; Tue, 5 Jun 2018 17:38:52 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A195E608F3; Tue, 5 Jun 2018 17:38:52 +0000 (UTC) Subject: Re: [RFA 5/6] Add validity bits for psymtab high and low fields To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20180503223621.22544-1-tom@tromey.com> <20180503223621.22544-6-tom@tromey.com> <9b460d82-3c69-21dd-eb9e-1c4598e8e9a8@redhat.com> <878t7t403p.fsf@tromey.com> From: Keith Seitz Message-ID: Date: Tue, 05 Jun 2018 17:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <878t7t403p.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00107.txt.bz2 On 06/05/2018 10:25 AM, Tom Tromey wrote: >>>>>> "Keith" == Keith Seitz writes: > Also the final patch in this series changes this line to: > > if (PSYMTAB_RAW_TEXTHIGH (pst) == 0 && last_function_name > && gdbarch_sofun_address_maybe_missing (gdbarch)) > Sorry, I missed that. In that case, ignore my comment. > Keith> There's also this line in dbx_read_symtab that might qualify (from case N_SCOPE): > > Keith> valu = nlist.n_value + last_function_start; > Keith> if (PSYMTAB_TEXTHIGH (pst) == 0 || valu > PSYMTAB_TEXTHIGH (pst)) > Keith> SET_PSYMTAB_TEXTHIGH (pst, valu); > Keith> break; > > This also gets changed to use the RAW_ forms. Likewise. > Keith> Also in this function, can textlow_not_set be replaced by > Keith> textlow_valid? [The same with the textlow_not_set parameter to > Keith> dbx_end_psymtab?] > > I think it is a good idea, but there is one spot setting textlow_not_set > without invoking SET_PSYMTAB_TEXTLOW. From the N_SO case: > > prev_textlow_not_set = textlow_not_set; > > /* A zero value is probably an indication for the SunPRO 3.0 > compiler. dbx_end_psymtab explicitly tests for zero, so > don't relocate it. */ > > if (nlist.n_value == 0 > && gdbarch_sofun_address_maybe_missing (gdbarch)) > { > textlow_not_set = 1; > valu = 0; > } > else > textlow_not_set = 0; > > I don't know anything about stabs, so my basic idea in this area was to > make the changes as minimal as possible. I should have looked a little more closely at the viability of my suggestion. I agree with you, erring on the side of minimal invasion in "obscure" code is always prudent. Thank you for the explanations. Keith