public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-30094-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=30094 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_error ... 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 = 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 symbol __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->type () != mst_solib_trampoline, instead it has: ... (gdb) p msym.minsym->type () $4 = 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 distinguish between these cases. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-02-07 10:35 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-07 10:35 vries at gcc dot gnu.org [this message] 2023-06-19 9:47 ` [Bug testsuite/30094] " cvs-commit at gcc dot gnu.org 2023-06-19 9:48 ` vries at gcc dot gnu.org
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=bug-30094-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).