diff options
-rw-r--r-- | src/trace_profile/ltrace.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/trace_profile/ltrace.md b/src/trace_profile/ltrace.md index cfa3fae..12bd4b3 100644 --- a/src/trace_profile/ltrace.md +++ b/src/trace_profile/ltrace.md @@ -7,6 +7,8 @@ ltrace [opts] [prg] -o <file> ... log output into <file> -l <filter> . show who calls into lib matched by <filter> -C .......... demangle + -x <filter> . which symbol table entry points to trace + (can be of form sym_pattern@lib_pattern) ``` # Example @@ -15,3 +17,17 @@ List which program/libs call into `libstdc++`: ```bash ltrace -l '*libstdc++*' -C -o ltrace.log ./main ``` + +Trace symbols from `dlopen(3)`ed libraries. +```bash +# Assume libfoo.so would be dynamically loaded via dlopen. +ltrace -x '@libfoo.so' + +# Trace all dlopened symbols. +ltrace -x '*' +# Trace all symbols from dlopened libraries which name match the +# pattern "liby*". +ltrace -x '@liby*' +# Trace symbol "foo" from all dlopened libraries matching the pattern. +ltrace -x 'foo@liby*' +```
\ No newline at end of file |