From: Bonzini <bo...@gn...> - 2003-05-20 21:14:47
|
This patch allows one to use SA_SIGINFO (both to get info on the signal and to read the ucontext at the moment the signal was sent), and even if SA_SIGINFO is not used, to peep at the sigcontext that the Linux kernel puts on the stack right after the signal number. In the former case, you can actually modify the ucontext and have the changes percolate to the executing program, but not without SA_SIGINFO (mostly for ease of implementation). The patch turns Valgrind's signal handler into a SA_SIGINFO handler, and stores the siginfo_t structure for the pending signals into dcss_sigpending which used to be a boolean. A signal is considered not to be pending if its si_signo field is zero. This patch almost allows me to run GNU Smalltalk under Valgrind with generational GC enabled (which traps SIGSEGV's and needs to look at the fault addresses). It does still crash sometimes, but it is a start. Regards, Paolo Bonzini |