From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35734 invoked by alias); 27 Mar 2018 04:16:19 -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 35283 invoked by uid 89); 27 Mar 2018 04:16:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1075 X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.46.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Mar 2018 04:16:17 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id C4251400DCD37 for ; Mon, 26 Mar 2018 23:16:15 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 0g1vfJy2Xy2aL0g1vfkyQO; Mon, 26 Mar 2018 23:16:15 -0500 Received: from 174-29-60-18.hlrn.qwest.net ([174.29.60.18]:45338 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1f0g1v-001rSc-6t; Mon, 26 Mar 2018 23:16:15 -0500 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org, Tom Tromey Subject: Re: [RFA 1/2] Make line tables independent of progspace References: <20180321171809.13115-1-tom@tromey.com> <20180321171809.13115-2-tom@tromey.com> Date: Tue, 27 Mar 2018 04:16:00 -0000 In-Reply-To: (Simon Marchi's message of "Fri, 23 Mar 2018 23:40:26 -0400") Message-ID: <87zi2uw3uc.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1f0g1v-001rSc-6t X-Source-Sender: 174-29-60-18.hlrn.qwest.net (bapiya) [174.29.60.18]:45338 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-03/txt/msg00552.txt.bz2 >>>>> "Simon" == Simon Marchi writes: >> +#define SET_LINETABLE_ENTRY_ADDRESS(ENTRY, PC) \ >> + ((ENTRY).m_pc = (PC)) >> +#define LINETABLE_ENTRY_RAW_ADDRESS(ENTRY) \ >> + ((ENTRY).m_pc + 0) >> +#define LINETABLE_ENTRY_ADDRESS(SYMTAB, ENTRY) \ >> + gdbarch_addr_bits_remove \ >> + (get_objfile_arch (SYMTAB_OBJFILE (SYMTAB)), \ >> + ((ENTRY).m_pc \ >> + + ANOFFSET (SYMTAB_OBJFILE (SYMTAB)->section_offsets, \ >> + SYMTAB_COMPUNIT (SYMTAB)->block_line_section))) Simon> Is it possible to make these functions instead of macros? They Simon> could even be made into methods of struct linetable_entry without Simon> making the structure non-pod. I did this and it does seem nicer. The call sites are shorter now and fewer of them have to be line-wrapped. Simon> I think it makes a good difference in terms of readability in those big ifs: Yes, good call. I've run the new patch through the buildbot. I'll resubmit it soon, I just have to update the ChangeLog and rewrite the commit message. Tom