From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4506 invoked by alias); 5 Jun 2018 17:25:20 -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 4370 invoked by uid 89); 5 Jun 2018 17:25:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=tricks, pathological X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 17:25:16 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 6C34D400D083D for ; Tue, 5 Jun 2018 12:25:15 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id QFhrf8XrdPvAdQFhrfLc1l; Tue, 05 Jun 2018 12:25:15 -0500 X-Authority-Reason: nr=8 Received: from 75-166-37-59.hlrn.qwest.net ([75.166.37.59]:39376 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fQFhr-0046h2-6r; Tue, 05 Jun 2018 12:25:15 -0500 From: Tom Tromey To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 5/6] Add validity bits for psymtab high and low fields References: <20180503223621.22544-1-tom@tromey.com> <20180503223621.22544-6-tom@tromey.com> <9b460d82-3c69-21dd-eb9e-1c4598e8e9a8@redhat.com> Date: Tue, 05 Jun 2018 17:25:00 -0000 In-Reply-To: <9b460d82-3c69-21dd-eb9e-1c4598e8e9a8@redhat.com> (Keith Seitz's message of "Fri, 1 Jun 2018 14:22:59 -0700") Message-ID: <878t7t403p.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fQFhr-0046h2-6r X-Source-Sender: 75-166-37-59.hlrn.qwest.net (bapiya) [75.166.37.59]:39376 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-06/txt/msg00105.txt.bz2 >>>>> "Keith" == Keith Seitz writes: >> * dbxread.c (end_psymtab): Use texthigh_valid and textlow_valid. Keith> Does this line not also qualify for texthigh_valid: Keith> if (PSYMTAB_TEXTHIGH (pst) == 0 && last_function_name Keith> && gdbarch_sofun_address_maybe_missing (gdbarch)) Keith> ? This is a bit obscure, and I'm not totally sure it is correct. The idea is that this only happens in a pathological case, which we want to detect. There is a comment there: /* Under Solaris, the N_SO symbols always have a value of 0, instead of the usual address of the .o file. Therefore, we have to do some tricks to fill in texthigh and textlow. .. 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)) 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. 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. Tom