From patchwork Thu Aug 30 14:52:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 29129 Received: (qmail 23554 invoked by alias); 30 Aug 2018 14:52:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 23539 invoked by uid 89); 30 Aug 2018 14:52:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Aug 2018 14:52:42 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1FCA317C412 for ; Thu, 30 Aug 2018 14:52:40 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA8222C7C7 for ; Thu, 30 Aug 2018 14:52:40 +0000 (UTC) From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH/OBV] Use host_address_to_string in compile_cplus_instance::enter_scope Date: Thu, 30 Aug 2018 07:52:40 -0700 Message-Id: <20180830145240.15018-1-keiths@redhat.com> X-IsSubscribed: yes This patch fixes a problem being reported by the buildbot with an invalid argument to a "%p" printf format. Instead of "%p", the debug output is changed to use "%s" and host_address_to_string. gdb/ChangeLog * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope): Use "%s" and host_address_to_string instead of "%p" in printf. --- gdb/ChangeLog | 5 +++++ gdb/compile/compile-cplus-types.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43e22e2ab1..2e59caf5c6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-08-30 Keith Seitz + + * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope): + Use "%s" and host_address_to_string instead of "%p" in printf. + 2018-08-29 Keith Seitz * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 9425fc6ac7..e86a573fa3 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -259,7 +259,10 @@ compile_cplus_instance::enter_scope (compile_scope &new_scope) if (must_push) { if (debug_compile_cplus_scopes) - fprintf_unfiltered (gdb_stdlog, "entering new scope %p\n", new_scope); + { + fprintf_unfiltered (gdb_stdlog, "entering new scope %s\n", + host_address_to_string (&new_scope)); + } /* Push the global namespace. */ plugin ().push_namespace ("");