[PATCH] mips: terminate the FDE before the return trampoline in makecontext
Maciej W. Rozycki
macro@imgtec.com
Tue Mar 29 13:09:00 GMT 2016
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
More information about the Libc-alpha
mailing list