From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69066 invoked by alias); 29 Mar 2018 21:07:06 -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 69057 invoked by uid 89); 29 Mar 2018 21:07:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,SPF_PASS autolearn=ham version=3.3.2 spammy=Yeah, Easter, easter X-HELO: 9pmail.ess.barracuda.com Received: from 9pmail.ess.barracuda.com (HELO 9pmail.ess.barracuda.com) (64.235.154.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Mar 2018 21:07:04 +0000 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1403.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Thu, 29 Mar 2018 21:06:39 +0000 Received: from [10.20.78.31] (10.20.78.31) by mips01.mipstec.com (10.20.43.31) with Microsoft SMTP Server id 14.3.361.1; Thu, 29 Mar 2018 11:20:25 -0700 Date: Thu, 29 Mar 2018 21:07:00 -0000 From: "Maciej W. Rozycki" To: Simon Marchi CC: Simon Marchi , Tom Tromey , Yao Qi , Subject: Re: [RFA 1/2] Make line tables independent of progspace In-Reply-To: <4ca333ee-44da-d086-e3c2-cd65b46a46c1@ericsson.com> Message-ID: References: <20180321171809.13115-1-tom@tromey.com> <20180321171809.13115-2-tom@tromey.com> <87zi2uw3uc.fsf@tromey.com> <87vadiw24a.fsf@tromey.com> <4ca333ee-44da-d086-e3c2-cd65b46a46c1@ericsson.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-BESS-ID: 1522357599-321459-31532-1103-1 X-BESS-VER: 2018.4-r1803282120 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.191521 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status:1 X-SW-Source: 2018-03/txt/msg00602.txt.bz2 On Thu, 29 Mar 2018, Simon Marchi wrote: > Since adjust_dwarf2_line used to be passed the relocated address, Tom included a > "hack" where he relocates the address, passes it through gdbarch_adjust_dwarf2_line, > and unrelocates it: > > /* Handle DW_LNE_set_address. */ > void handle_set_address (CORE_ADDR baseaddr, CORE_ADDR address) > { > m_op_index = 0; > /* Pass the relocated address to the gdbarch for modification, but > then only store the relative address. */ > address += baseaddr; > m_address = (gdbarch_adjust_dwarf2_line (m_gdbarch, address, false) > - baseaddr); > } > > I think right now this is necessary, because mips_adjust_dwarf2_line does a > minimal symbol lookup, which are relocated. So if we passed an unrelocated > address, I guess it wouldn't find the symbol. Yeah, I guess it's all right, the difference will ever be either 1 or 0. I would pass it through MIPS16 and/or microMIPS regression testing to be sure. We have the Good Friday public holiday tomorrow here in the UK and then Easter Monday, so I won't be able to schedule a test run until sometime next week though. > I just wanted to make sure there wasn't anything you saw that is obviously > wrong with this approach. I think that eventually we'll be able to pass an > unrelocated address to adjust_dwarf2_line, but in the mean time we probably > need this hack. This piece and the associated infrastructure is scheduled to go once Yao has sorted the issue with function descriptions and his proposed change: , when we'll be able to reduce the amount of hackery required to handle the broken debug record generation for compressed MIPS code (where the ISA bit is set in line records, but not in any other debug records). At that point we'll have to have a hook to remove the ISA bit from line entries instead though; perhaps that'll be the very `gdbarch_addr_bits_remove'. Maciej