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: eliminate deprecated_insert_raw_breakpoint. what's left.


Maciej W. Rozycki wrote:

> On Wed, 10 Sep 2014, Ulrich Weigand wrote:
> > Once OSF/1 and IRIX are gone, I hope all of the ECOFF/mdebug debug
> > format support can go as well (mipsread.c, mdebugread.c etc.) ...
> 
>  Some of that stuff will best stay, to support Procedure Descriptor 
> Records used on MIPS ELF targets, including but not limited to Linux.  
> 
>  These records are the only way to get backtracing, and consequently any 
> reasonable control of the debuggee, to work from places that have debug 
> information stripped, such as often when you interrupt your debuggee while 
> waiting in a syscall (libc.so will often have no debug information 
> included, as usually won't other system-installed shared libraries).  
> Without that debugging is from my experience severely impeded -- you end 
> up in the middle of nowhere and virtually all you can do is `continue' or 
> `stepi', that'll in many cases merely put you back in the sleeping 
> syscall.
> 
>  All MIPS ELF binaries produced by the GNU toolchain carry these PDR 
> records along unless their exclusion has been explicitly requested from 
> GAS (which is not the default and in most cases undesirable, these records 
> are very lightweight and occupy little space).
> 
>  I have already identified `mdebugread.h' being the only piece required 
> though -- in addition to `mips-mdebug-tdep.h' and `mips-mdebug-tdep.c' 
> that were removed from our tree as a result of an unfortunate coincidence 
> and have been maintained outside it for years now; they need some 
> improvements at the time they are brought back too.  Maybe `mdebugread.h' 
> can be stripped down a bit and actually folded into `mips-mdebug-tdep.h' 
> eventually.

This confuses me a bit, which is probably because I don't see what's in
mips-mdebug-tdep.c ...

Looking at alpha-mdebug-tdep.c, which I had hoped would be mostly equivalent,
this gets the PDR records from the magic MDEBUG_EFI_SYMBOL_NAME symbol, which
is created by mdebugread.c while parsing the .mdebug section in an ELF file
or while parsing an ECOFF file.  So if we remove mdebugread.c, nobody will
ever set MDEBUG_EFI_SYMBOL_NAME, which means alpha-mdebug-tdep.c is a no-op.

Is this handled differently on mips?   [ In general, it would be really
good if mips-mdebug-tdep.c is brought back into the tree if it is actually
being used in practice.  Having people maintain stuff out-of-tree long-term
makes it hard to see if common code features are no longer used ... ]

Also, do you happen to know if on other (non- OSF/1) Alpha platforms the
.mdebug debug format is ever used?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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