public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: "Gui,Jian" <guij@cn.ibm.com>
Cc: systemtap@sources.redhat.com, 	"Frank Ch. Eigler" <fche@redhat.com>
Subject: Re: "no match" semantic error for some existing probe points
Date: Tue, 24 Oct 2006 17:58:00 -0000	[thread overview]
Message-ID: <20061024175754.95BA7180059@magilla.sf.frob.com> (raw)
In-Reply-To: Gui,Jian's message of  Thursday, 19 October 2006 15:39:22 +0800 <45372BAA.7000500@cn.ltcfwd.linux.ibm.com>

> Is it a GCC bug? or is it the expected behavior considering GCC's
> optimizations? for ptrace_disable() is like:
> 
>      245 void ptrace_disable(struct task_struct *child)
>      246 {
>      247         /* make sure the single step bit is not set. */
>      248         clear_single_step(child);
>      249 }

It's likely you are just seeing the result of optimization.  If there is no
prologue for the function (likely), then there is no code at line 246.
clear_single_step is inlined, so there is no code at line 248 except for
what's inlined and so resolves to ptrace-common.h or to bitops.h where the
clear_tsk_thread_flag inline is defined.  

In the DWARF line information, each PC is resolved to one source location.
For inlines, this means the location of the inline's definition, and not
the source location where the inline is called.  So using only the line
info, you can't help this.

There should be a DW_TAG_inlined_subroutine containing this PC range.
That should have DW_AT_call_{file,line} attributes that say ptrace.c
line 248.  If the compiler is producing this info, then we could
potentially make systemtap use it.  The structure of DWARF information
unfortunately does not make this especially easy.


Thanks,
Roland

  reply	other threads:[~2006-10-24 17:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17 10:17 Gui,Jian
2006-10-17 20:55 ` Frank Ch. Eigler
2006-10-18  4:00   ` Gui,Jian
2006-10-19  7:40     ` Gui,Jian
2006-10-24 17:58       ` Roland McGrath [this message]
2006-10-30  6:12         ` Gui,Jian
2006-10-30 22:07           ` Roland McGrath
2006-11-01  7:03             ` Alexandre Oliva
2006-11-01 12:32               ` Gui,Jian
2006-11-07  7:52                 ` Alexandre Oliva
2006-11-07 14:34                   ` Gui,Jian

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=20061024175754.95BA7180059@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=fche@redhat.com \
    --cc=guij@cn.ibm.com \
    --cc=systemtap@sources.redhat.com \
    /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: link
Be 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).