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/30704] New: [gdb/testsuite, i686] FAIL: gdb.base/catch-syscall.exp: multiple targets: i386 vs i386:x86-64: insert catch syscall on syscall 1 -- write on i386:x86-64
Date: Mon, 31 Jul 2023 08:11:34 +0000	[thread overview]
Message-ID: <bug-30704-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 30704
           Summary: [gdb/testsuite, i686] FAIL:
                    gdb.base/catch-syscall.exp: multiple targets: i386 vs
                    i386:x86-64: insert catch syscall on syscall 1 --
                    write on i386:x86-64
           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: ---

I build gdb on native i686-pc-linux-gnu with --enable-targets=all, and ran the
testsuite, and ran into:
...
FAIL: gdb.base/catch-syscall.exp: multiple targets: i386 vs i386:x86-64: insert
catch syscall on syscall 1 -- write on i386:x86-64
FAIL: gdb.base/catch-syscall.exp: multiple targets: sparc vs sparc:v9: insert
catch syscall on syscall 108 -- setresuid on sparc:v9
...

In more detail:
...
(gdb) PASS: gdb.base/catch-syscall.exp: multiple targets: i386 vs i386:x86-64:
set architecture i386:x86-64
catch syscall 1^M
The feature 'catch syscall' is not supported on this architecture yet.^M
(gdb) FAIL: gdb.base/catch-syscall.exp: multiple targets: i386 vs i386:x86-64:
insert catch syscall on syscall 1 -- write on i386:x86-64
...

I tracked this down to amd64-linux-tdep.c not being compiled, so
amd64_linux_init_abi is not called, which would call
amd64_linux_init_abi_common, which does:
...
  set_gdbarch_get_syscall_number (gdbarch,
                                  amd64_linux_get_syscall_number);
...

I looked in Makefile.in, and found amd64-linux-tdep.o listed in
ALL_64_TARGET_OBS:
...
# All target-dependent objects files that require 64-bit CORE_ADDR              
# (used with --enable-targets=all --enable-64-bit-bfd).                         
ALL_64_TARGET_OBS = \
...
so presumably I can make the test-case pass by building with
--enable-64-bit-bfd.

I'm a bit confused that it's valid to set the arch to i386:x86-64 without
--enable-64-bit-bfd, but perhaps that's ok.

So I guess we need to update the test-case.

Note that we do have:
...
$ gdb -q -batch -ex "set arch i386:x86-64"
warning: A handler for the OS ABI "GNU/Linux" is not built into this
configuration
of GDB.  Attempting to continue with the default i386:x86-64 settings.
...
The target architecture is set to "i386:x86-64".

So perhaps we can require the set arch command to issue no warnings.

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

             reply	other threads:[~2023-07-31  8:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31  8:11 vries at gcc dot gnu.org [this message]
2023-07-31  8:37 ` [Bug testsuite/30704] " vries at gcc dot gnu.org
2023-07-31  9:04 ` vries at gcc dot gnu.org
2023-07-31 13:56 ` tromey at sourceware dot org
2023-07-31 14:42 ` 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-30704-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).