From b9d649c726fcd4635e26cf54624152cbe43c9d5e Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 16 Nov 2024 23:39:48 +0100 Subject: ltrace: add -n and -e --- src/trace_profile/ltrace.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/trace_profile') diff --git a/src/trace_profile/ltrace.md b/src/trace_profile/ltrace.md index 12bd4b3..2881c07 100644 --- a/src/trace_profile/ltrace.md +++ b/src/trace_profile/ltrace.md @@ -7,8 +7,10 @@ ltrace [opts] [prg] -o ... log output into -l . show who calls into lib matched by -C .......... demangle + -e . show calls symbols matched by -x . which symbol table entry points to trace (can be of form sym_pattern@lib_pattern) + -n number of spaces to indent nested calls ``` # Example @@ -18,6 +20,11 @@ List which program/libs call into `libstdc++`: ltrace -l '*libstdc++*' -C -o ltrace.log ./main ``` +List calls to specific symbols: +```bash +ltrace -e malloc -e free ./main +``` + Trace symbols from `dlopen(3)`ed libraries. ```bash # Assume libfoo.so would be dynamically loaded via dlopen. -- cgit v1.2.3