Skip to content

attaching ltrace to a process started with LD_PRELOAD does not recognize -x filter #3

@gonber

Description

@gonber

I want to test a library mylib.so that is to be used in LD_PRELOAD. To test that certain functions in the library are being called I run

# LD_PRELOAD=mylib.so ltrace -CLx *opendir*@mylib.so python
>>> import os
>>> os.listdir(".")
opendir@mylib.so("." <unfinished ...>
(...)

However I'd prefer to operate in attached mode. Something like

# ltrace -CLx *opendir*@mylib.so -p <pid>

If I start python with LD_PRELOAD in a separate shell and give the correct pid to ltrace I do not get any output from ltrace.

Interestingly this works

# ltrace -Ce *opendir* -p <pid>
exe->opendir(".") = 0x22bcb00

Do you have any idea of what's going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions