public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/8, applied] ir: Improve the debugging facilities
@ 2021-08-11 16:02 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2021-08-11 16:02 UTC (permalink / raw)
  To: libabigail

Hello,

While looking at something else, I stumbled across some minor issues
in the debugging facilities I use to track self comparison problems.

I added a missing ABG_RETURN macro in the stack of equals() function
to better detect when there is a change, under the debugger.

I also fixed get_debug_representation() to properly display the
class/enum name (as expected) rather their pretty representation.

	* src/abg-ir.cc (maybe_compare_as_member_decls): Add a missing
        ABG_RETURN
	(get_debug_representation): Display the name of class and enums,
	not their pretty representation.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.

---
 src/abg-ir.cc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 87b3b182..39540582 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -4706,7 +4706,7 @@ maybe_compare_as_member_decls(const decl_base& l,
 	    *k |= LOCAL_NON_TYPE_CHANGE_KIND;
 	}
     }
-  return result;
+  ABG_RETURN(result);
 }
 
 /// Compares two instances of @ref decl_base.
@@ -8522,7 +8522,7 @@ get_debug_representation(const type_or_decl_base* artifact)
   if (c)
     {
       class_decl *clazz = is_class_type(c);
-      string name = c->get_pretty_representation(/*internal=*/false, true);
+      string name = c->get_qualified_name();
       std::ostringstream o;
       o << name;
 
@@ -8535,8 +8535,7 @@ get_debug_representation(const type_or_decl_base* artifact)
 	      o << "  ";
 	      if (b->get_is_virtual())
 		o << "virtual ";
-	      o << b->get_base_class()->get_pretty_representation(/*internal=*/false,
-								  /*qualified=*/true)
+	      o << b->get_base_class()->get_qualified_name()
 		<< std::endl;
 	    }
 	}
@@ -8582,7 +8581,7 @@ get_debug_representation(const type_or_decl_base* artifact)
     }
   else if (const enum_type_decl* e = is_enum_type(artifact))
     {
-      string name = e->get_pretty_representation(/*internal=*/true, true);
+      string name = e->get_qualified_name();
       std::ostringstream o;
       o << name
 	<< " : "
-- 
2.30.0


-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-11 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 16:02 [PATCH 1/8, applied] ir: Improve the debugging facilities Dodji Seketeli

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).