From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 732453858D20; Wed, 17 Apr 2024 10:52:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 732453858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713351155; bh=41smClwPUs3QrlntUkzFRz+QDMnvlaq5ymaKNObuWg8=; h=From:To:Subject:Date:From; b=hpcXiX4NK/lCAKEeNDn+tNrKsaxENYgSVy71WqDLSubJNzyoNn0bQVsRNj07BACLH 0hJchTqxebbS+9wvVKSBpmSgXHGMH/lmh3kthM9SfUA1jbaizfjtz2NeKlbJeqLC6g CrwkSRftAMA7E2u5gKwshM7Dfw+eEpVcr/RSXk+U= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/31647] New: [gdb/testsuite, old dejagnu] ERROR: invalid command name "gdb_find_gnatmake" Date: Wed, 17 Apr 2024 10:52:34 +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: normal 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=3D31647 Bug ID: 31647 Summary: [gdb/testsuite, old dejagnu] ERROR: invalid command name "gdb_find_gnatmake" Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On SLE-11, with a gdb-13.2-based package, I ran into: ... Running /usr/src/packages/BUILD/gdb-13.2/gdb/testsuite/gdb.ada/mi_prot.exp = ... UNRESOLVED: gdb.ada/mi_prot.exp: testcase aborted due to invalid command na= me: gdb_find_gnatmake ERROR: tcl error sourcing /usr/src/packages/BUILD/gdb-13.2/gdb/testsuite/gdb.ada/mi_prot.exp. ERROR: invalid command name "gdb_find_gnatmake" while executing "::gdb_tcl_unknown gdb_find_gnatmake" ("uplevel" body line 1) invoked from within "uplevel 1 ::gdb_tcl_unknown $args" (procedure "::unknown" line 5) invoked from within "gdb_find_gnatmake" (procedure "gnatmake_version_at_least" line 2) invoked from within "gnatmake_version_at_least 8" invoked from within "if { ![gnatmake_version_at_least 8] } { return -1 }" ... The problem is that gdb_find_gnatmake is a backup for find_gnatmake: ... if {[info procs find_gnatmake] =3D=3D ""} { rename gdb_find_gnatmake find_gnatmake set use_gdb_compile(ada) 1 gdb_note [join [list $note_prefix "Ada" $note_suffix] ""] } ... so gnatmake_version_at_least should use find_gnatmake instead. We normally don't run into this because dejagnu is recent enough to include= a find_gnatmake, so gdb_find_gnatmake is kept. With SLE-11, an old dejagnu is used, find_gnatmake is not found so gdb_find_gnatmake is renamed to find_gnatmake, and we run into the error. It's confusing that we're using the gdb_ prefix here, it seems something legitimate to use. Maybe we should use future_ or gdb_future_ prefix instead to make this more clear. Also, we could do: ... if {[info procs find_gnatmake] =3D=3D ""} { rename gdb_find_gnatmake find_gnatmake set use_gdb_compile(ada) 1 gdb_note [join [list $note_prefix "Ada" $note_suffix] ""] } else { rename gdb_find_gnatmake "" } ... to prevent it being used by accident with a newer dejagnu. --=20 You are receiving this mail because: You are on the CC list for the bug.=