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]

[PATCH] Make mips-linux signal frame unwinding more robust.


Greetings,

The current signal frame unwinding code in mips-linux-tdep.c assumes a constant offset from the signal return trampoline to the signal frame. The assumption does not hold for all kernels. Specifically those that have to be compiled with ICACHE_REFILLS_WORKAROUND_WAR set (SGI O2 for example). In the near future, it is likely that the assumption will cease to hold universally, as we are attempting to move the signal return trampoline off the stack entirely.

The libgcc unwinder already gets this right by using the signal frame's SP to locate the sigcontext.

This patch makes gdb follow suit and find the sigcontext_base using the signal frame's SP rather than an offset from the trampoline.

Tested on mips64-linux with no regressions (and more than 100 improvements).

OK to commit?

How about on the 7.1 branch?

2010-02-22 David Daney <ddaney@caviumnetworks.com>

	* mips-linux-tdep.c: Update struct sigframe comments.
	(mips_linux_o32_sigframe_init): Set sigcontext_base using
	this_frame's sp.
	(mips_linux_n32n64_sigframe_init): Same.

Attachment: gdb.patch
Description: Text document


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