This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Use host_address_to_string in compile_cplus_instance::enter_scope
- From: Keith Seitz <kseitz at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 30 Aug 2018 14:52:51 -0000
- Subject: [binutils-gdb] Use host_address_to_string in compile_cplus_instance::enter_scope
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fdad7678b74a170ead1ef967007be087435715f7
commit fdad7678b74a170ead1ef967007be087435715f7
Author: Keith Seitz <keiths@redhat.com>
Date: Thu Aug 30 07:47:03 2018 -0700
Use host_address_to_string in compile_cplus_instance::enter_scope
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.
Diff:
---
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 43e22e2..2e59caf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-30 Keith Seitz <keiths@redhat.com>
+
+ * 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 <keiths@redhat.com>
* 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 9425fc6..e86a573 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 ("");