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 E23FC385841B for ; Fri, 10 Sep 2021 15:41:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E23FC385841B Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-81-HTtT84AEOfCxhKCnpVdAUg-1; Fri, 10 Sep 2021 11:41:21 -0400 X-MC-Unique: HTtT84AEOfCxhKCnpVdAUg-1 Received: by mail-ed1-f72.google.com with SMTP id s15-20020a056402520f00b003cad788f1f6so1135180edd.22 for ; Fri, 10 Sep 2021 08:41:21 -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=xSuvIXfLF7N5r8b3p7cqTPQ6H74ZMOMN8J165elk5NQ=; b=TCiFgS2oXaJxiOCCjInfQwGZe2/vsjh4dwvsGkZN+gaH16rnWwB7XyWufE6BR4VNuz r3+3/lCM1/Q9EanDy4mPuswCL2hixixjZvsRiXey9ncOOFhd3w78AIcrgNMlNnPH30Ya EPfAuVr1x5Oi6EcQUbTpgGGJzVqJdd5czGf/e9a9wxoqQcrSMvJZKZufOfvqalg4ivlk Pzh5UYR7R4kvIjV1S+bNUCctaq5jDrB2tzP5lb/4p/urTY2HOf6xawirkQD1kCw+HhvQ vWTkNoGcQ4lWT9zh+7TQjKdtb9ExVJ3Z92MaQpIH+y9JeB36IdXuvbulNFbuVLo9XccN +PSQ== X-Gm-Message-State: AOAM530F1yo9yJNyrcZVqgLwc+x/49BRvqTo85K12gVI8FxbM5YEeGgz SbOFYjNQSEhEsrSJCMXuio9zxEvzpuR+1As0J2voUL2mK8V3dyUAcN5IndEm+HIl09xOMPkUrAV gGUoDAvcPt9llGWkKRdw37RXQg8Lh1xWn6E0= X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr1580719edc.83.1631288479887; Fri, 10 Sep 2021 08:41:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4+O2Ak1e473NRKZaxXsJHk8xIsMwy2d6aszTYLLHvKe+ep2HekiPL1gFR6dV4TiCY/YRkUhlqfdyIfJOy6OE= X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr1580703edc.83.1631288479719; Fri, 10 Sep 2021 08:41:19 -0700 (PDT) MIME-Version: 1.0 From: Di Chen Date: Fri, 10 Sep 2021 23:41:08 +0800 Message-ID: Subject: [PATCH] PR27940 - The /* pc=0x... */ is no longer printed by "stap -v -L 'kernel.function("*")' To: systemtap@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.5 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: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 15:41:26 -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