From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23302 invoked by alias); 13 Jun 2014 19:01:07 -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 23289 invoked by uid 89); 13 Jun 2014 19:01:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Jun 2014 19:01:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WvWij-0001pG-SH from Maciej_Rozycki@mentor.com ; Fri, 13 Jun 2014 12:01:01 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 13 Jun 2014 12:01:01 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 13 Jun 2014 20:00:59 +0100 Date: Fri, 13 Jun 2014 19:01:00 -0000 From: "Maciej W. Rozycki" To: Joel Brobecker CC: Tom Tromey , Subject: Re: [PATCH 0/7] more constification In-Reply-To: <20140612084534.GC4730@adacore.com> Message-ID: References: <1402512797-6082-1-git-send-email-tromey@redhat.com> <20140612084534.GC4730@adacore.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-06/txt/msg00536.txt.bz2 On Thu, 12 Jun 2014, Joel Brobecker wrote: > > Patch #6 casts away const in a couple spots. There's a justification > > in the patch; but I also wanted to add that the casts only affect > > mdebugread.c, which can't really be said to be actively maintained in > > any case. > > I am wondering whether we should consider the option of deprecating > those targets that use this code. This affects alpha-tru64 and > maybe mips-linux (although - is that option still supported by > GCC? And even if it was, who would want to use that object format > instead of ELF???). It's also said to be used by some versions > of IRIX, but I am not sure that GDB works on those - the ones > we've been supporting until a few years ago were using ELF. PDR (Procedure Descriptor Record) data is produced for all the usual MIPS Linux and bare-iron ELF targets (and probably IRIX too as it is where this stuff originates from) and both GAS and GCC continue supporting it even though plain ECOFF support has been removed. I know of no plans to deprecate it. In fact I have a patch outstanding to restitute some of this stuff that got deleted a while ago from GDB (apparently, by accident, it was not enabled for any target) and extend it somewhat, although this being rather dated still requires some polishing. The reason is these PDR records are the only reasonably reliable way on the MIPS target to do any stack backtracing in stripped code (the heuristic unwinders typically fail on optimised code where GCC stuffs random instructions even before function prologues and its unfeasible to add code to decode the whole MIPS instruction set to prevent these unwinders from doing so) and without it if e.g. on Linux you interrupt the debuggee in a system call invoked from shared libc that has been stripped (which is usually the case), then you find yourself in the middle of nowhere with no way to recover (of course you can always hit `continue', but that does not guarantee to get you to any better place). However I believe MIPS support is mostly self-contained and does not use mdebugread.c, it has its own mips-mdebug-tdep.c handler (that however uses mdebugread.h for structure definitions; these might be moved over to mips-mdebug-tdep.h of course if need be). I hope this clears the situation a bit WRT the MIPS port. Maciej