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 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 [thread overview] Message-ID: <bug-29814-4717-keoqlcAc5w@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29814-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29814 --- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Ulrich Weigand from comment #4) > This fix seems wrong. The symbol should have been marked as having no local > entry point (i.e. fun.minsym->target_flag_1 () should have returned 0). > > You should check why that doesn't happen - what does > ppc_elfv2_elf_make_msymbol_special do for this symbol? > > 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 those > 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 += 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 *gdbarch, static void ppc_elfv2_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym) { + if ((sym->flags & BSF_SYNTHETIC) != 0) + return; elf_symbol_type *elf_sym = (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 != NULL, as in ppc64_elf_make_msymbol_special. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-11-23 16:16 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-21 13:27 [Bug tdep/29814] New: " vries at gcc dot gnu.org 2022-11-21 16:32 ` [Bug tdep/29814] " vries at gcc dot gnu.org 2022-11-23 10:14 ` vries at gcc dot gnu.org 2022-11-23 11:11 ` vries at gcc dot gnu.org 2022-11-23 11:59 ` uweigand at gcc dot gnu.org 2022-11-23 16:16 ` vries at gcc dot gnu.org [this message] 2022-11-23 16:37 ` cel at us dot ibm.com 2022-11-23 17:03 ` uweigand at gcc dot gnu.org 2022-11-23 20:43 ` cel at us dot ibm.com 2022-11-24 12:45 ` vries at gcc dot gnu.org 2022-11-28 9:50 ` cvs-commit at gcc dot gnu.org 2022-11-28 9:51 ` 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-29814-4717-keoqlcAc5w@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: linkBe 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).