From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC2D4384B801; Thu, 1 Jul 2021 16:30:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC2D4384B801 From: "woodard at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug tools/28043] New: Add LSDA decoding to eu-readelf Date: Thu, 01 Jul 2021 16:30:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: woodard at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 16:30:44 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28043 Bug ID: 28043 Summary: Add LSDA decoding to eu-readelf Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: tools Assignee: unassigned at sourceware dot org Reporter: woodard at redhat dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- One thing that is an important aspect of compatibility between libraries and their consumers (apps and other libraries) are the exceptions thrown and caught. Ideally you want to make sure that all exceptions that could be thr= own are properly caught Unfortunately it is currently EXTREMELY difficult to look at an ELF file see which exceptions are thrown or caught. That information is readily availabl= e in the ELF file it just isn't being decoded. This forces a user to manually interpret the ELF file and decode the LSDA by hand to list the types. This = is very likely above the level of most developers. It would be nice if eu-read= elf were able to decode the LSDA and print it in a human understandable form. I propose a feature that does this: eu-readelf --exceptions-thrown eu-readelf --exceptions-caught and maybe: eu-readelf --exceptions which effectively is the same as eu-readelf --exceptions-thrown --exceptions-caught So far the best descriptions of how to decode those sections that I have be= en able to find are:=20 https://www.airs.com/blog/archives/464 and http://www.hexblog.com/wp-content/uploads/2012/06/Recon-2012-Skochinsky-Com= piler-Internals.pdf (start at about page 35) The code that processes that section in GCC can be found in gcc/libgcc/unwind-c.c that could be a good reference. Once you have the LSDA decoding capabilities it may also be worthwhile to p= rint out the decoded fields when doing --debug-dump=3Dframe and pretty print the structures pointed to by the LSDA pointers. There is a possibility that at least at times llvm generates a different version of the LSDA and so for a fully functional tool you may also want to decode any flavors of LSDA that llvm may generate as well. --=20 You are receiving this mail because: You are on the CC list for the bug.=