This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
This patch to the Go frontend and libgo copies the signal code from the Go 1.7 runtime. This adds a little shell script to auto-generate runtime.sigtable from the known signal names. This forces the main package to always import the runtime package. Otherwise some runtime package global variables may never be initialized. This sets the syscallsp and syscallpc fields of g when entering a syscall, so that the runtime package knows when a g is executing a syscall. This fixes runtime.funcPC to avoid dead store elimination of the interface value when the function is inlined. The signal code in C now has some target-specific code to return the PC where the signal occurred and to dump the registers on a hard crash. This is what the gc toolchain does as well. I wrote versions of that code for x86 GNU/Linux. Other targets will fall back reasonably and display less information. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Bootstrapped and ran relevant tests on sparc-sun-solaris. Committed to mainline. Ian
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |