From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D35D3857809; Wed, 5 Oct 2022 15:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D35D3857809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664984602; bh=rA9hInwSknuQW+7JYipjeRAlg6XA6LDOOExxLgaazsw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ASDztxqZki74eMNFMhYG/fIyN3IkHaeBaUBGxZWhIf8Bzy4U0W3e69nuXPU6uAd+u TjCZe7PIF+/NLI8zpQFgcBMEkb2XfjmhwhPUQ8rxUrBFx252VAxpK8FtWGhuvbX9oX iZeaAHF+0SwH0005Y1lITSWcmsA7zzh8IMOqvKys= From: "vries at gcc dot gnu.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 15:43:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server 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=3D29652 --- Comment #9 from Tom de Vries --- Well, this is a different way of dealing with it: ... diff --git a/gdb/remote.c b/gdb/remote.c index 2f6cb2d01ee..3ae6ad688b8 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2543,14 +2543,13 @@ remote_target::remote_add_inferior (bool fake_pid_p, int pid,=20 int attached, inf->attach_flag =3D attached; inf->fake_pid_p =3D fake_pid_p; + current_program_space->exec_close (); + /* If no main executable is currently open then attempt to open the file that was executed to create this inferior. */ - if (try_open_exec && get_exec_file (0) =3D=3D NULL) + if (try_open_exec) exec_file_locate_attach (pid, 0, 1); - /* Check for exec file mismatch, and let the user solve it. */ - validate_exec_file (1); - return inf; } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=