Trigger on DSO symbols? #189
-
I have an executable dynamically linked to several shared object libraries, and I can't seem to get magic-trace to find symbols in the linked libs, using either the fuzzy-finder with Is this expected, or is there maybe some issue with the way my libs are linked to my executable? I know this is a bit short on detail -- the code in question is proprietary -- but I wanted to ask first if I was just expecting something that wasn't possible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! What you are asking for is not technically impossible, but it is not currently implemented in magic-trace. There is no technical restriction preventing magic-trace from putting the breakpoint anywhere. For context, OCaml code (for which this tool was originally written) is typically all statically linked itself, so the only DSO functions of interest are functions in libc, etc. -- and you can trigger on the PLT trampolines for those. The breakpoint is installed in Line 248 in a180757 -trigger . You'd lose the nicety of the fuzzy-finder, but it'd work.
As a more principled solution, one could imagine:
Patches would definitely be welcome :) |
Beta Was this translation helpful? Give feedback.
Hi! What you are asking for is not technically impossible, but it is not currently implemented in magic-trace.
There is no technical restriction preventing magic-trace from putting the breakpoint anywhere. For context, OCaml code (for which this tool was originally written) is typically all statically linked itself, so the only DSO functions of interest are functions in libc, etc. -- and you can trigger on the PLT trampolines for those.
The breakpoint is installed in
magic-trace/src/trace.ml
Line 248 in a180757