public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applying to mainline] dwarf-reader: Support creating functions from DW_TAG_inlined_subroutine DIE
@ 2024-03-08 17:36 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2024-03-08 17:36 UTC (permalink / raw)
  To: libabigail

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


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

only message in thread, other threads:[~2024-03-08 17:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 17:36 [PATCH, applying to mainline] dwarf-reader: Support creating functions from DW_TAG_inlined_subroutine DIE 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).