This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Accessing another thread's errno


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


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