From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D54D3857811; Mon, 6 Jun 2022 07:03:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D54D3857811 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/29227] [gdb, m32] FAIL: gdb.base/corefile.exp: core-file warning-free Date: Mon, 06 Jun 2022 07:03:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb 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: Message-ID: In-Reply-To: References: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 07:03:24 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29227 --- Comment #2 from Tom de Vries --- (In reply to Tom de Vries from comment #1) > I wonder why is the core file is marked fbsd. That seems to have to do with priorities: ... (gdb) p abfd->xvec $36 =3D (const struct bfd_target *) 0x2010b00 (gdb) p abfd->xvec->match_priority $37 =3D 1 '\001' ... and: ... (gdb) p abfd->xvec $41 =3D (const struct bfd_target *) 0x20112a0 (gdb) p abfd->xvec->match_priority $42 =3D 0 '\000' ... and the matching in bfd/format.c where we find that lower priorities are better: ... if (match_priority < best_match) { best_match =3D match_priority; best_count =3D 0; } ... Still for the exec the fbsd arch fails to match, but for the core it does. For the exec, we hit this in elfcode.h:elf_object_p(): ... if (ebd->elf_machine_code !=3D EM_NONE && i_ehdrp->e_ident[EI_OSABI] !=3D ebd->elf_osabi && ebd->elf_osabi !=3D ELFOSABI_NONE) goto got_wrong_format_error; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=