Skip to content

Trigger on DSO symbols? #189

Answered by Xyene
tkocmathla asked this question in Q&A
Discussion options

You must be logged in to vote

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

Core.eprintf "[ Attaching to %s @ 0x%016Lx ]\n%!" name addr;
, if you were up for recompiling magic-trace from source you could hardcode an address from a DSO ther…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tkocmathla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants