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/31566] New: [gdb/testsuite] is_aarch32_target return false on aarch32
Date: Wed, 27 Mar 2024 15:28:35 +0000	[thread overview]
Message-ID: <bug-31566-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=31566

            Bug ID: 31566
           Summary: [gdb/testsuite] is_aarch32_target return false on
                    aarch32
           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: ---

While running tests on aarch64-linux, I noticed:
...
Executing on host: gcc  -fno-stack-protector  -fdiagnostics-color=never -w -c
-g  -o /data/vries/gdb/build/gdb/testsuite/temp/1485517/aarch32.o
/data/vries/gdb/build/gdb/testsuite/temp/1485517/aarch32.c    (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never
-w -c -g -o /data/vries/gdb/build/gdb/testsuite/temp/1485517/aarch32.o
/data/vries/gdb/build/gdb/testsuite/temp/1485517/aarch32.c^M
/data/vries/gdb/build/gdb/testsuite/temp/1485517/aarch32.c:1:9: error: unknown
type name 'mov'^M
    1 |         mov r0, r0^M
      |         ^~~^M
...

This is is_aarch32_target:
...
gdb_caching_proc is_aarch32_target {} {
    if { [istarget "arm*-*-*"] } {
        return 1
    }

    if { ![istarget "aarch64*-*-*"] } {
        return 0
    }

    set list {}
    foreach reg \
        {r0 r1 r2 r3} {
            lappend list "\tmov $reg, $reg"
        }

    return [gdb_can_simple_compile aarch32 [join $list \n]]
}
...

On an aarch32 target, this will always return false, because it tries to
compile raw assembly instructions in a .c file using a compiler.

AFAICT, this is a regression since commit c221b2f7708 ("Testsuite: Add
gdb_can_simple_compile").

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2024-03-27 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 15:28 vries at gcc dot gnu.org [this message]
2024-03-27 15:32 ` [Bug testsuite/31566] " vries at gcc dot gnu.org
2024-03-27 16:11 ` vries at gcc dot gnu.org
2024-03-27 16:19 ` [Bug testsuite/31566] [gdb/testsuite] is_aarch32_target contains dead code vries at gcc dot gnu.org
2024-03-27 19:25 ` vries at gcc dot gnu.org
2024-03-27 19:29 ` 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-31566-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: link
Be 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).