This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk 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: get syscall num in updateSyscallExit


On Mon, Aug 28, 2006 at 07:42:11PM -0400, Andrew Cagney wrote:
> Sami, you're correct.  sigreturn, which is called when a signal handler 
> exits, restores the state of a thread to what it was before an 
> asynchronous signal was delivered.   Consequently, it destroys all 
> registers.

Hi, Sami and Andrew,
Thanks for your reply and clarification.

I find this problem when I chase bug 3010.  As Andrew mentioned above,
all registers are destroyed when exit sys_rt_sigreturn or
sys_sigreturn, we could not get syscall number from a certain
register.

On PPC64, when exit sys_rt_sigreturn, the value from gpr0(syscall
number) is 3, which is sys_read, so test cases will regard it as an
EXIT from sys_read instead of EXIT from sys_rt_sigreturn, and this 
will cause the problem described in #3010, "Read exit before enter".

It is *NOT* always true to get syscall number from a certain register
when exit a syscall.  How about save syscall number when enter a
syscall, and just return the saved value when get syscall number
leaving syscall?

-- 
Yao Qi


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