Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:54:12+00:00 2026-06-06T21:54:12+00:00

I would like to monitor(debug) a linux dynamic library written in C. I want

  • 0

I would like to monitor(debug) a linux dynamic library written in C.
I want to see when and what parameters are passed to it.

The library to monitor ‘X’, is invoked by another dynamic library ‘Y’.
Both ‘X and ‘Y’ appear in /proc/pid/maps of the executable ‘A’.

Using ltrace, on the executable did not show lib X or Y.
The executable is using multiple threads.

Also, when using ldd command on the exec it doesn’t mention anything about libs X or Y.
ldd Y, shows that Y needs X.

Using ldd on all the libs, execs in the project doesn’t mention anyone who would need Y.
Yet Y appears to be loaded in the /proc/pid/maps of the exec.

I’m not sure what steps I could take in order to debug the X lib, any advice is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:54:14+00:00Added an answer on June 6, 2026 at 9:54 pm

    If user756235 can run it under gdb then this is an approach using this and this. The only question is to make a full list of functions in a shared library X: nm ./libX.so | grep "T "

    And then create .gdbinit (in my case I control args of print_in_lib):

    host: srv2-x64rh5-01, OS: Linux 2.6.18-238.el5>more .gdbinit
    file main
    set pagination off
    set logging file gdb.txt
    set breakpoint pending on
    set logging on
    b print_in_lib
    commands
    info args
    continue
    end
    r
    set logging off
    quit
    

    And when I run gdb:

    host: srv2-x64rh5-01, OS: Linux 2.6.18-238.el5>gdb -q Function
    “print_in_lib” not defined. Breakpoint 1 (print_in_lib) pending.
    warning: no loadable sections found in added symbol-file
    system-supplied DSO at 0x2aaaaaaab000 thousands: 1 print_debug: 0

    Breakpoint 1, print_in_lib (print_debug=0, index=0) at my_lib.cpp:7 7
    if (print_debug) { print_debug = 0 index = 0

    Breakpoint 1, print_in_lib (print_debug=0, index=1) at my_lib.cpp:7 7
    if (print_debug) { print_debug = 0 index = 1

    Breakpoint 1, print_in_lib (print_debug=0, index=2) at my_lib.cpp:7 7
    if (print_debug) { print_debug = 0 index = 2

    Breakpoint 1, print_in_lib (print_debug=0, index=3) at my_lib.cpp:7 7
    if (print_debug) { print_debug = 0 index = 3

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to monitor elasticsearch using nagios. Basiclly, I want to know if
I would like to monitor a log file that is being written to by
I would like to be able to see and monitor my internet data (http/emule/email)
I would like to monitor which of MY classes were accessed during Grails app
I would like to monitor if a server is up or down, and i
I would like to monitor my program which is running on the web server.
I have a Python application in which I would like to monitor the number
I have a thread pool (executor) which I would like to monitor for excessive
I am new to android. I would like to monitor the sip packets that
I would like to compare or monitor a sql file in the Database of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.