Accessing another thread's errno

Jim Clause clause@cc.gatech.edu
Tue Aug 8 20:58:00 GMT 2006


Hello,

Is there a way to set the errno variable of a different thread?

I'm trying to use the Intel Pin instrumentation framework to return
canned values for some system calls.  The problem is that the
instrumentation engine runs in a separate thread so I am unable to
access the errno variable of the program thread.

I am able to access the contents of the registers and I've tried to
set %esp and then call __errno_location (this is on ia32) but haven't
had any luck using that approach.

Any pointers on how to accomplish this would be greatly appreciated.

Thanks,

~Jim



More information about the Libc-alpha mailing list