Bug 4256 - Monitor library calls as well as system calls
Summary: Monitor library calls as well as system calls
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-22 14:59 UTC by Francis Kung
Modified: 2007-03-22 19:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Kung 2007-03-22 14:59:08 UTC
Rather than only showing system calls in the monitor, it would be a nice feature
to monitor library calls as well.  It would be an extremely useful supplement to
backtraces when debugging a problem.

To reduce verbosity, a filter can be added so that only calls into specified
libraries are logged.
Comment 1 Sami Wagiaalla 2007-03-22 17:56:31 UTC
Yes. This is definatly a vaid functionality. One way we plan to address this is
through something called tag sets. Basically you instrument your souce code, or
the source code of a library with check points. These check points then cause
the monitor to draw events when they are reached during execution.

People can then share TagSets for library foo.so.

Anyone have any other ways for monitoring library calls ?.. is a library call
any different from a regular function call after the library has been loaded ?
Comment 2 Andrew Cagney 2007-03-22 18:03:30 UTC
> Anyone have any other ways for monitoring library calls ?.. is a library call
> any different from a regular function call after the library has been loaded ?

Identical.

(well sometimes its a call through a function pointer, and sometimes through a
"thunk").
Comment 3 Sami Wagiaalla 2007-03-22 19:32:14 UTC
This is done by ltrace (http://packages.debian.org/unstable/source/ltrace)
thanks to cagney for the pointer.

I couldnt quickly tell from the code but one possibility is that it monitors all
library loads then sets breakpoints on all the functions of a library as soon as
it is loaded.