diff mbox series

[1/8,applied] ir: Improve the debugging facilities

Message ID 877dgsdl64.fsf@redhat.com
State New
Headers show
Series [1/8,applied] ir: Improve the debugging facilities | expand

Commit Message

Dodji Seketeli Aug. 11, 2021, 4:02 p.m. UTC
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 mbox series

Patch

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
 	<< " : "