Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ltrace]

The tag has no usage guidance.

3
votes
1answer
161 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; ...
1
vote
0answers
117 views

Systemtap causes a segfault, why?

I'm trying to monitor library calls system-wide. I've written this script to trace library calls for libguestfs: probe begin { printf("ok\n") } probe process("/usr/lib64/libguestfs.so.0....
0
votes
1answer
184 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 &...
0
votes
2answers
366 views

vfork() calls SYS_vfork but fork() calls SYS_clone?

After running ltrace -S on two programs that were compiled by gcc (version 5.4.0), one that calls vfork() and one that calls fork(), I find that vfork() calls SYS_vfork whilst fork() calls SYS_clone.  ...
2
votes
1answer
291 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 ...
3
votes
1answer
130 views

Can getauxval be used to determine whether or not you're being traced?

Coming off of this question, I patched my kernel in a quest to get SQL Server 2017 on Linux to start up. Now I'm getting further but I'm being shut down, strstr("TracerPid:\t0\n", "TracerPid:") ...
4
votes
2answers
728 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
1answer
295 views

why does ltrace produce no output

For several days I have left this command running in a terminal emulator ltrace -p `pgrep xfwm4` while using the system normally, and I'm yet to see any output from ltrace. Note: xfwm4 is Xfce's ...
2
votes
0answers
462 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 ...
6
votes
1answer
500 views

ltracing shared libraries, how?

I would like to trace the function calls to a particular library, call it libfoo. Unfortunately the documentation I have found on it is sparse, so I have a lot of questions. In the documentation of ...
8
votes
2answers
2k 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. ...
1
vote
0answers
1k views

How to trace calls to library from library?

I have an program that calls libcurl, and libcurl calls libgssapi_krb5. If I want to debug calls to libcurl, then ltrace works. But now I want to debug calls to libgssapi_krb5, then ltrace ...
8
votes
2answers
6k views

Which file in kernel specifies fork(), vfork()… to use sys_clone() system call

When ltrace is used for tracing the system calls, I could see that fork() uses sys_clone() rather than sys_fork(). But I couldnt find the linux source where it is defined. My program is #include<...