public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: pmachata@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: ftrace: tracing inside dynamic linker has to be allowed with -i option Date: Wed, 12 Dec 2007 21:58:00 -0000 [thread overview] Message-ID: <20071212215844.23202.qmail@sourceware.org> (raw) The branch, master has been updated via 1cc9d6f4bc5db27bf30ff59207d5588bf090495c (commit) from 3365da12a517b83f255cd2ebff24c00ac43bd8d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1cc9d6f4bc5db27bf30ff59207d5588bf090495c Author: Petr Machata <pmachata@redhat.com> Date: Wed Dec 12 22:58:35 2007 +0100 ftrace: tracing inside dynamic linker has to be allowed with -i option * ftrace now implicitly generates -@INTERP rule at the end of each script. When the user wishes to trace dynamic linker, she should use -i. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/bindir/ChangeLog | 5 +++++ frysk-core/frysk/bindir/ftrace.java | 19 +++++++++++++++++++ frysk-core/frysk/bindir/ftrace.xml | 11 +++++++++++ 3 files changed, 35 insertions(+), 0 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog index 835f14a..eb12a1d 100644 --- a/frysk-core/frysk/bindir/ChangeLog +++ b/frysk-core/frysk/bindir/ChangeLog @@ -1,5 +1,10 @@ 2007-12-12 Petr Machata <pmachata@redhat.com> + * ftrace.java: Support -i for tracing inside dynamic linker. + * ftrace.xml: Describe it. + +2007-12-12 Petr Machata <pmachata@redhat.com> + * ftrace.java: Use aliasing capabilities of Symbol. (checkNameMatches): New method. diff --git a/frysk-core/frysk/bindir/ftrace.java b/frysk-core/frysk/bindir/ftrace.java index a0c416b..55e8524 100644 --- a/frysk-core/frysk/bindir/ftrace.java +++ b/frysk-core/frysk/bindir/ftrace.java @@ -308,6 +308,7 @@ class ftrace final List dynRules = new ArrayList(); final List symRules = new ArrayList(); final MyLtraceController controller = new MyLtraceController(); + boolean allowInterpTracing = false; Ftrace tracer = new Ftrace(); @@ -453,6 +454,13 @@ class ftrace } }); + parser.add(new Option('i', "don't trace dynamic linker symbols") { + public void parsed(String arg) throws OptionException + { + allowInterpTracing = true; + } + }); + parser.add(new Option("plt", "trace library calls done via PLT", "RULE[,RULE]...") { public void parsed(String arg) { pltRules.add(arg); @@ -504,6 +512,17 @@ class ftrace if (writer == null) writer = new PrintWriter(System.out); + // If tracing dynamic linker disabled, generate implicit + // -@INTERP rule at the end of the chain. + if (!allowInterpTracing) { + if (pltRules.size() > 0) + pltRules.add("-@INTERP"); + if (dynRules.size() > 0) + dynRules.add("-@INTERP"); + if (symRules.size() > 0) + symRules.add("-@INTERP"); + } + // We need to load and apply rules separately, to get all log // messages. for (Iterator it = pltRules.iterator(); it.hasNext(); ) diff --git a/frysk-core/frysk/bindir/ftrace.xml b/frysk-core/frysk/bindir/ftrace.xml index 71279d7..30bb6b8 100644 --- a/frysk-core/frysk/bindir/ftrace.xml +++ b/frysk-core/frysk/bindir/ftrace.xml @@ -69,6 +69,7 @@ <cmdsynopsis> <command>ftrace</command> <arg choice="opt">-c</arg> + <arg choice="opt">-i</arg> <arg choice="opt">-m</arg> <arg choice="opt">-o=<replaceable>FILE</replaceable></arg> <arg choice="opt" rep="repeat">-p=<replaceable>PID</replaceable></arg> @@ -158,6 +159,16 @@ <variablelist> <varlistentry> + <term>-i</term> + <listitem> + <para>Trace inside dynamic linker. When this option is + not present, <function>ftrace</function> will function + as if -@INTERP rule was present at the end of each + tracing script.</para> + </listitem> + </varlistentry> + + <varlistentry> <term>-plt=<replaceable>RULE</replaceable>[,<replaceable>RULE</replaceable>...]</term> <listitem> <para>Trace library calls done via PLT entries matching each hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-12-12 21:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20071212215844.23202.qmail@sourceware.org \ --to=pmachata@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).