From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applying to mainline] dwarf-reader: Support creating functions from DW_TAG_inlined_subroutine DIE
Date: Fri, 08 Mar 2024 18:36:26 +0100 [thread overview]
Message-ID: <87ttlg4odh.fsf@redhat.com> (raw)
Hello,
While working on something else, I realized the recent support of
build_ir_node_from_die for DW_TAG_inlined_subroutine DIEs was triggering
an assert violation in build_function_decl. So I am applying the patch
below to the mainline to address that.
Update the assert in build_function_decl to work on
DW_TAG_inlined_subroutine DIEs.
* src/abg-dwarf-reader.cc (build_function_decl): Loosen the assert
to accept DW_TAG_inlined_subroutine DIEs.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
src/abg-dwarf-reader.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 2473588c..dda5507d 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -15348,7 +15348,8 @@ build_function_decl(reader& rdr,
function_decl_sptr result = fn;
if (!die)
return result;
- ABG_ASSERT(dwarf_tag(die) == DW_TAG_subprogram);
+ int tag = dwarf_tag(die);
+ ABG_ASSERT(tag == DW_TAG_subprogram || tag == DW_TAG_inlined_subroutine);
if (!die_is_public_decl(die))
return result;
--
2.39.3
--
Dodji
reply other threads:[~2024-03-08 17:36 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=87ttlg4odh.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).