From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH 1/8, applied] ir: Improve the debugging facilities
Date: Wed, 11 Aug 2021 18:02:27 +0200 [thread overview]
Message-ID: <877dgsdl64.fsf@redhat.com> (raw)
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
reply other threads:[~2021-08-11 16:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dgsdl64.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).