From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 28A1F3858C39 for ; Fri, 10 Sep 2021 15:22:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28A1F3858C39 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-235-HQHZIY3_OLqDOUSwS98x_A-1; Fri, 10 Sep 2021 11:22:41 -0400 X-MC-Unique: HQHZIY3_OLqDOUSwS98x_A-1 Received: by mail-ej1-f71.google.com with SMTP id bo11-20020a170906d04b00b005d477e1e41fso1212469ejb.11 for ; Fri, 10 Sep 2021 08:22:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=b245Y7cH12UjwMsFmtYSXQDtNTQrMAjQfN0OF2zvBM0=; b=YBUuNDQNlRzDm0xKP18yyCY35FUhms7TocOOGGpB64db+wYUNyH0H6LhWjjWDWVwEg VR4BV8tgGFgB8kN7SWaGF3vYMhht2veAt+gL/o2gcYvVy4ZL/JBJMmvqsjgNUz3jZFH2 EJyEZy8kUdKhAlO9Nl3rvuLyv6kwSSeR+9GVyx9+zK7hY6sRt1aEMOi9k7Gl/1Pv9jRx o2AHSzR9815dFhQ70R1F86KMiplSyuF3FayeDJihrTSTUIu53E5UvWExu+mBLWHzf52w 4M51rosLWsXyYVPD9rag60tGasZ52Yco2mb2LhQbAnzJp7wbROH9ZRd5Hw9AdJ/iwGmh xxvQ== X-Gm-Message-State: AOAM533Eh7Zg8b02ng9jm+ns5WQdO3+lj5zbUUiSue7W5nW0E/nBD1bm 1v+fb7vFSdQ9nyk19rfUu/I7QTB25sAteYeEONnRTsHmb3vj5fYctTpRl3z60sa7mB6gt5Cd+4I q9g1jxbuDZqeeRssvwSKhBpEimHMILeG+RAjHTmK2mA== X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr1483935edc.83.1631287360551; Fri, 10 Sep 2021 08:22:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmWL+EX09ziM9awPu6ztxNKByG/+DqEAT6oeg0oaXwL/GNlG2p8cLJCU2VsuUWPXF1zlS4MxwhWfjkNiZXNJU= X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr1483910edc.83.1631287360315; Fri, 10 Sep 2021 08:22:40 -0700 (PDT) MIME-Version: 1.0 From: Di Chen Date: Fri, 10 Sep 2021 23:22:29 +0800 Message-ID: Subject: [PATCH] PR27940 - The /* pc=0x... */ is no longer printed by "stap -v -L 'kernel.function("*")' To: elfutils-devel@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 15:22:46 -0000 >From a98718a1b97357e53cef966ed9826c69e159f46e Mon Sep 17 00:00:00 2001 From: Di Chen Date: Thu, 2 Sep 2021 12:52:47 +0800 Subject: [PATCH] The /* pc=0x... */ is no longer printed by "stap -v -L 'kernel.function("*")' The disappeared /* pc=0x... */ resulted from the missing implementation of the function "dwarf_derived_probe::printsig_nonest". Which makes "p->printsig_nonest(sig)" in main.cxx end up calling "derived_probe::printsig_nonest", and the type of "p" is (gdb) ptype /m p type = /* real type = dwarf_derived_probe * */ This patch added "dwarf_derived_probe::printsig_nonest" for PC value print. https://sourceware.org/bugzilla/show_bug.cgi?id=27940 Signed-off-by: Di Chen --- elaborate.h | 2 +- tapsets.cxx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/elaborate.h b/elaborate.h index 9817172a7..baa29e67c 100644 --- a/elaborate.h +++ b/elaborate.h @@ -204,7 +204,7 @@ struct derived_probe: public probe virtual probe_point* sole_location () const; virtual probe_point* script_location () const; virtual void printsig (std::ostream &o) const cxx_override; - void printsig_nonest (std::ostream &o) const; + virtual void printsig_nonest (std::ostream &o) const; // return arguments of probe if there virtual void getargs (std::list &) const {} void printsig_nested (std::ostream &o) const; diff --git a/tapsets.cxx b/tapsets.cxx index 68b75610e..27d8995ce 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -560,6 +560,7 @@ struct dwarf_derived_probe: public generic_kprobe_derived_probe bool access_vars; void printsig (std::ostream &o) const; + void printsig_nonest (std::ostream &o) const; virtual void join_group (systemtap_session& s); void emit_probe_local_init(systemtap_session& s, translator_output * o); void getargs(std::list &arg_set) const; @@ -5386,6 +5387,16 @@ dwarf_derived_probe::printsig (ostream& o) const } +void +dwarf_derived_probe::printsig_nonest (ostream& o) const +{ + sole_location()->print (o); + if (symbol_name != "") + o << " /* pc=<" << symbol_name << "+" << offset << "> */"; + else + o << " /* pc=" << section << "+0x" << hex << addr << dec << " */"; +} + void dwarf_derived_probe::join_group (systemtap_session& s) -- 2.31.1