This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/7] more constification


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]