public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Wenji Huang <wenji.huang@oracle.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: SystemTAP <systemtap@sources.redhat.com>
Subject: Re: Avoid assertion error for statement probe
Date: Mon, 10 Aug 2009 09:29:00 -0000	[thread overview]
Message-ID: <4A7FE7A1.4090607@oracle.com> (raw)
In-Reply-To: <y0my6pv5zmq.fsf@fche.csb>

Frank Ch. Eigler wrote:
[...]
>> $ stap -e 'probe process("./stap").statement("foo@main.cxx:*") {}'
>> semantic error: no matched function 'foo' in main.cxx
>> semantic error: no probes found
> 
> Not a bad idea, but perhaps we don't need that particular "no matched
> function" message that covers just this case, considering that the "no
> probes found" message can/should be paired with the probe point.
> 
> 
> - FChE
> 
How about to defer the error to the outer calling ?

$ stap -e 'probe process("./stap").statement("foo@main.cxx:1025-1026") {}'
semantic error: no match while resolving probe point 
process("./stap").statement("foo@main.cxx:1025-1026")
semantic error: no probes found
Pass 2: analysis failed.  Try again with another '--vp 01' option.

diff --git a/dwflpp.cxx b/dwflpp.cxx
index ff62265..d37b5e9 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -794,6 +794,8 @@ dwflpp::iterate_over_srcfile_lines (char const * 
srcfile,
    auto_free_ref<Dwarf_Line**> free_srcsp(srcsp);

    get_module_dwarf();
+  if (!this->function)
+    return;

    if (line_type == RELATIVE)
      {

  reply	other threads:[~2009-08-10  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07  2:54 Wenji Huang
2009-08-07 16:59 ` Frank Ch. Eigler
2009-08-10  9:29   ` Wenji Huang [this message]
2009-08-10 18:53     ` Mark Wielaard

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=4A7FE7A1.4090607@oracle.com \
    --to=wenji.huang@oracle.com \
    --cc=fche@redhat.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).