From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE85C3858D38; Tue, 7 Feb 2023 10:35:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE85C3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675766123; bh=AIXqluTq9YcdKFHeqOioWRlQOUwtxbuuCA5O34/SOno=; h=From:To:Subject:Date:From; b=VS8rjaHD/phBY2IonmtuTlILXFlhwS3dmWntbjH+YV9XmGpmDXs87KVgnkZk2tvSh K8kjzxMXyMI1nLdrffli6ldFObLO8lccMcW85QCu+NBp7DWSSfbxP0msJvLYKRu4FM rATLGgo5v68Ok/kVFJdNf/b5Q3NstNNf9ZQIakkk= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/30094] New: [gdb/testsuite, ada] Introduce gnat_runtime_has_minimal_debug_info / gnat_runtime_has_full_debug_info Date: Tue, 07 Feb 2023 10:35:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org 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 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30094 Bug ID: 30094 Summary: [gdb/testsuite, ada] Introduce gnat_runtime_has_minimal_debug_info / gnat_runtime_has_full_debug_info Product: gdb Version: HEAD Status: NEW Severity: enhancement Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I ran into: ... (gdb) catch exception some_kind_of_error^M Your Ada runtime appears to be missing some debugging information.^M Cannot insert Ada exception catchpoint in this configuration.^M (gdb) UNSUPPORTED: gdb.ada/catch_ex_std.exp: catch exception some_kind_of_e= rror ... and indeed, after installing the debug info package libada7-debuginfo, I got instead: ... PASS: gdb.ada/catch_ex_std.exp: compilation foo.adb PASS: gdb.ada/catch_ex_std.exp: catch exception some_kind_of_error PASS: gdb.ada/catch_ex_std.exp: caught the exception PASS: gdb.ada/catch_ex_std.exp: print $_ada_exception =3D some_package.some_kind_of_error'Address ... Then I wondered if it would be possible to use gnat_runtime_has_debug_info = in this test-case, say using a require. So I tried: ... require allow_ada_tests +require gnat_runtime_has_debug_info + standard_ada_testfile foo ... and removed the debug info package, but I ran into the same UNSUPPORTED as before, in other words, gnat_runtime_has_debug_info returned 1. The reason is that gnat_runtime_has_debug_info tests for presence of a symb= ol __gnat_debug_raise_exception, and while the debug info package is not installed, the shared lib is not stripped and we find it here: ... $ nm -D /usr/lib64/libgnat-7.so | grep __gnat_debug_raise_exception 000000000025ac7c T __gnat_debug_raise_exception ... Interestingly, when looking at the "Your Ada runtime appears" error, it triggers for the very same symbol, and it triggers because msym.minsym->typ= e () !=3D mst_solib_trampoline, instead it has: ... (gdb) p msym.minsym->type () $4 =3D mst_text ... Concluding, there seem to be two levels of debug info support, minimal and full, and the minimal one seems to be sufficient to allow gdb.ada/ptype_tagged_param to pass, while the full one is required for gdb.ada/catch_ex_std.exp. It would be good if we had gnat_runtime_has_debug_info variants to distingu= ish between these cases. --=20 You are receiving this mail because: You are on the CC list for the bug.=