in reply to Re^2: (OT) Logging open calls from a C program
in thread (OT) Logging open calls from a C program

I don't think lsof can replace a call trace in this case. The requirement is

I need to see what files a program is opening,...

which I read as "List all files the program opens during its lifetime". With lsof you get a snapshot of the files that are open at the moment. You'll miss files that were open but have been closed again, as well as those the program hasn't opened yet.

Anno