public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/31566] New: [gdb/testsuite] is_aarch32_target return false on aarch32
@ 2024-03-27 15:28 vries at gcc dot gnu.org
  2024-03-27 15:32 ` [Bug testsuite/31566] " vries at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-27 15:28 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-27 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 15:28 [Bug testsuite/31566] New: [gdb/testsuite] is_aarch32_target return false on aarch32 vries at gcc dot gnu.org
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

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).