aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-11-16 23:39:48 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-11-16 23:39:48 +0100
commitb9d649c726fcd4635e26cf54624152cbe43c9d5e (patch)
tree34c83e05576dcdfe487aaf7b40a407795eb40583 /src
parentd11cf73b01feb3fc559ca8790db70f468ab19b5e (diff)
downloadnotes-b9d649c726fcd4635e26cf54624152cbe43c9d5e.tar.gz
notes-b9d649c726fcd4635e26cf54624152cbe43c9d5e.zip
ltrace: add -n and -e
Diffstat (limited to 'src')
-rw-r--r--src/trace_profile/ltrace.md7
1 files changed, 7 insertions, 0 deletions
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 <file> ... log output into <file>
-l <filter> . show who calls into lib matched by <filter>
-C .......... demangle
+ -e <filter> . show calls symbols matched by <filter>
-x <filter> . which symbol table entry points to trace
(can be of form sym_pattern@lib_pattern)
+ -n <num> 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.