From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 523113852C6A; Wed, 23 Nov 2022 16:16:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 523113852C6A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669220217; bh=Mc69n7CwnDuXQLePqBQn78Sr3oThXSzvj0o/jVSu1pM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PvBwTH5IOKrKonjThz3Q9BbcuV/Daxl1ElW9v8lN07sJbj9r3ztyZkvuKxU4WjAdy lP3J5UnyeO1tRRCAo+nqhfkcxlBbglKmkbWnFEf3nW5EqFV/C4TzTx5u7Bj8vYsSWN R8OhWhF3SFRF+rX2hvoxAfNNGso7mLcYu7YB9rUA= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29814] [gdb/tdep, powerpc64le] FAIL: gdb.base/msym-bp-shl.exp: debug=0: before run: info breakpoint Date: Wed, 23 Nov 2022 16:16:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29814 --- Comment #5 from Tom de Vries --- (In reply to Ulrich Weigand from comment #4) > This fix seems wrong. The symbol should have been marked as having no lo= cal > entry point (i.e. fun.minsym->target_flag_1 () should have returned 0). >=20 > You should check why that doesn't happen - what does > ppc_elfv2_elf_make_msymbol_special do for this symbol? >=20 > Is this a "real" symbol, or is it one of the synthetic symbols generated = by > BFD? In the latter case, either ...make_msybol_special doesn't handle th= ose > correctly, or the symbol is synthesized using wrong flags. Thanks for the comments, that's very helpful. It is a synthetic symbol, and AFAIU the problem is the cast from asymbol* to elf_symbol_type*. In ppc64_elf_get_synthetic_symtab we have: ... 2577 size +=3D plt_count * sizeof (asymbol); ... so we only allocate an asymbol. This fixes the test-case: ... diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index cc5a26431ba..5aeb4e849d5 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1632,6 +1632,8 @@ ppc_linux_core_read_description (struct gdbarch *gdba= rch, static void ppc_elfv2_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *m= sym) { + if ((sym->flags & BSF_SYNTHETIC) !=3D 0) + return; elf_symbol_type *elf_sym =3D (elf_symbol_type *)sym; /* If the symbol is marked as having a local entry point, set a target ... Now the question is whether there are any synthetic symbols which still need ppc_elfv2_elf_make_msymbol_special to do something, for instance when sym->udata.p !=3D NULL, as in ppc64_elf_make_msymbol_special. --=20 You are receiving this mail because: You are on the CC list for the bug.=