This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] mips: terminate the FDE before the return trampoline in makecontext


On Wed, 23 Mar 2016, Aurelien Jarno wrote:

> >  What's this NOP needed for here?
> 
> We have to separate these to blocks because the unwinder uses ra-1 to
> find the FDE.

 Ah indeed, I remember now, thanks!

 For the record: I found that bloody piece when trying to make GDB 
interpret DWARF records correctly for compressed code.  The choice to use 
PC-1 in the unwinder arbitrarily across all architectures broke DWARF 
record interpretation in the MIPS port of GDB as the calculation flips the 
ISA bit.  Since it's been like that from the beginning and consequently 
encoded across binaries out there handling GDB had to be adjusted to 
painfully recover the ISA bit from the symbol table as DWARF records are 
interpreted (while the DWARF records should have sufficed by themselves).

 If I had designed this part of the unwinder, I'd have made the adjustment 
target-specific and specifically PC-2 for the MIPS target, i.e. the 
minimum instruction size in the ISA (a rule which should actually work 
universally I believe).

 FWIW,

  Maciej


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