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 server/29652] [gdbserver] Keeping symbols between two gdbserver sessions breaks second session Date: Wed, 05 Oct 2022 09:51:27 +0000 [thread overview] Message-ID: <bug-29652-4717-mLOe98uyqd@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29652-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29652 --- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- This fixes it: ... diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index a6a9ec5c86b..ce3278f5e89 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -571,9 +571,11 @@ find_program_interpreter (void) int sect_size = bfd_section_size (interp_sect); gdb::byte_vector buf (sect_size); - bfd_get_section_contents (current_program_space->exec_bfd (), - interp_sect, buf.data (), 0, sect_size); - return buf; + bool res + = bfd_get_section_contents (current_program_space->exec_bfd (), + interp_sect, buf.data (), 0, sect_size); + if (res) + return buf; } } ... It makes the function fall back to: ... /* If we didn't find it, use the target auxiliary vector. */ return read_program_header (PT_INTERP, NULL, NULL); ... which works for this case. But perhaps the root cause of the problem is that bfd_get_section_contents returns false in the first place, and we need "gdb_assert (res)" instead, and fix the assert? -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-10-05 9:51 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-05 9:19 [Bug server/29652] New: " vries at gcc dot gnu.org 2022-10-05 9:25 ` [Bug server/29652] " vries at gcc dot gnu.org 2022-10-05 9:51 ` vries at gcc dot gnu.org [this message] 2022-10-05 10:04 ` vries at gcc dot gnu.org 2022-10-05 10:40 ` vries at gcc dot gnu.org 2022-10-05 10:43 ` vries at gcc dot gnu.org 2022-10-05 12:54 ` vries at gcc dot gnu.org 2022-10-05 12:54 ` vries at gcc dot gnu.org 2022-10-05 12:58 ` vries at gcc dot gnu.org 2022-10-05 15:43 ` vries at gcc dot gnu.org 2022-10-12 15:42 ` vries at gcc dot gnu.org 2022-10-20 8:42 ` vries at gcc dot gnu.org 2022-10-20 8:44 ` 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-29652-4717-mLOe98uyqd@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).