Questions tagged [ltrace]
The ltrace tag has no summary.
17 questions
1 vote
1 answer
947 views
Timing system call with ltrace: Adding `syscall` + `clock_gettime`?
I'm looking for some clarity in terms of the system calls. I tried avoiding the vDSO by calling a system call clock_gettime directly. Here is a snippet of a program named sys_clock_gettime. int clock =...
0 votes
1 answer
1k views
Why ltrace doesn't show a call to glibc __nss_configure_lookup()
I'm trying to understand how ltrace command works. So I've been poking around in /etc/nsswitch.conf. I have a "hosts: resolve" line in there - it tells glibc to dynamically load nss-resolve ...
3 votes
1 answer
1k views
Why do strace and ltrace cause EINTR to happen?
Consider this program: #include <stdio.h> #include <sys/epoll.h> int main(void) { int epfd = epoll_create1(0); struct epoll_event event; event.events = EPOLLIN; ...
0 votes
1 answer
586 views
How to continuously check ltrace command output in C program [closed]
I'm trying to capture output of ltrace command using C program. I have tried using popen() but that's not working, I need to capture continuously output not only once. Below is my code: #include &...
3 votes
1 answer
2k views
System-wide monitoring of calls to a library function
I have a modern Linux desktop with lots of processes running concurrently. One of those processes, and I don't know which one, calls a function some_func from a popular dynamic library some_lib (think ...
5 votes
2 answers
4k views
How do I hide TracerPID from a process?
I'm conjecturing SQL Server on Linux is checking /proc/self/status for TracerPID and then dying if it's not 0. I want to test that. Playing around, here is the strace, ... lots of stuff openat(...
2 votes
0 answers
1k views
How to trace at runtime the symbols of loaded shared library?
I want to be able to know what are the symbols that are used from a certain shared library at runtime. I use gdb and I set the solib-search-path to the user defined shared library. I am not sure if ...
9 votes
2 answers
5k views
How to determine what instructions a process is executing?
I know about strace and ltrace, but that only tells me what system calls and library calls a process is executing, respectively. I would like to know exactly what instructions a process is executing. ...