From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0AF33856DE2; Mon, 25 Sep 2023 19:17:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0AF33856DE2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695669473; bh=yPQahZLUykeU2w0OYWZRm22JEj0nPAnNM17amPlK0vM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i8pTKaRaPgxQ2EDeyZjfajF6NQWSYWT7HS6J2U8U+TEDuXpc2jrem3vcJ6kN8eDo4 nTSSlcCWUM3BDzm0lLURNbllWftz7Pp0/XTe5IZigzfhnxvCIsCxtoqLJe2aUDEsPV 6cV7jEEb98qC7dMheHgkP1YKTnAN4RRXf02KQkc4= From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/12997] support dwarf4 .debug_types Date: Mon, 25 Sep 2023 19:17:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D12997 William Cohen changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wcohen at redhat dot com --- Comment #2 from William Cohen --- This is partially addressed by git commit 337b7c44b1cd672f76e58166a562c12a300ddb20: Author: Tom Tromey 2012-03-16 12:44:14 Committer: Mark Wielaard 2012-03-21 11:36:31 Parent: 1485ded3f2d709c9011bd9f340ce39b1930f7e32 (PR13876: same another test case) Child: 2a885a4a9ca1826187c97c7eb128b06b4a5222f2 (Depend on elfutils 0.148+, document debug_types support requires 0.154+.) Branches: master, remotes/origin/master and many more (54) Follows: release-1.7 Precedes: release-1.8 Partial fix for PR12997 - support dwarf4 .debug_types This fix does not solve the ET_REL case pointed out in the PR. However, it does work ok for ordinary code. * dwflpp.cxx (dwflpp::iterate_over_cus): Add 'want_types' argument. Iterate over type units. (dwflpp::declaration_resolve_other_cus): Update. (dwflpp::iterate_single_function): Update. (dwflpp::iterate_over_globals): Also allow DW_TAG_type_unit. * dwflpp.h (module_tus_read_t): New typedef. (dwflpp::iterate_over_cus): Update. (dwflpp::module_tus_read): New member. * tapsets.cxx (dwarf_query::query_module_dwarf): Update. (tracepoint_query::handle_query_module): Update. * testsuite/systemtap.pass1-4/debugtypes.cxx: New file. * testsuite/systemtap.pass1-4/debugtypes.exp: New file. * testsuite/systemtap.pass1-4/debugtypes.stp: New file. I built gdb with '-gdwarf-4 -fdebug-types-section'. Then I tried this stap script: probe process("/home/tromey/gnu/archer/build/gdb/gdb").function("dwarf2_attr") { println(@cast($dwarf2_per_objfile, "struct dwarf2_per_objfile")->objfile) } With Fedora 16 stap: barimba. stap -p2 /tmp/q.stp semantic error: type definition 'struct dwarf2_per_objfile' not found: identifier '@cast' at /tmp/q.stp:2:15 source: println(@cast($dwarf2_per_objfile, "struct dwarf2_per_objfile")->objfile) ^ Pass 2: analysis failed. Try again with another '--vp 01' option. After the patch, this works. --=20 You are receiving this mail because: You are the assignee for the bug.=