From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <sourceware-bugzilla@sourceware.org>
Received: by sourceware.org (Postfix, from userid 48)
	id 4EAB2385801A; Wed,  5 Oct 2022 10:04:37 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EAB2385801A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org;
	s=default; t=1664964277;
	bh=Q1JGjZO+9ijFnp95DkVztWtqMpFXHaEhOiu3BPDD9ww=;
	h=From:To:Subject:Date:In-Reply-To:References:From;
	b=q4Vf7a089pOLhtMktxiYhX+KWwYh4zEFf6aKAYFjw5gSf/fTG02Q/WAdPYSK/6JXE
	 VOzN2TB9tpdJzmkuP0t2MGYJtRF7bHVwR+9JBhZyQcCro7RzON/psiogxVOpN4hq1E
	 0WHUWpayH0HIOGMc3ZSs2y4DKW4e+L35G/eFSN3M=
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 10:04:37 +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: <bug-29652-4717-wnIPAXGqUJ@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-29652-4717@http.sourceware.org/bugzilla/>
References: <bug-29652-4717@http.sourceware.org/bugzilla/>
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: <gdb-prs.sourceware.org>

https://sourceware.org/bugzilla/show_bug.cgi?id=3D29652

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
> But perhaps the root cause of the problem is that bfd_get_section_contents
> returns false in the first place,

Drilling down, this happens here in target_fileio_pread:
...
  else if (fh->target =3D=3D NULL)
    *target_errno =3D FILEIO_EIO;
...
because:
...
(gdb) p *fh
$8 =3D {target =3D 0x0, target_fd =3D 4}
...

In contrast, the first time, when the read succeeds, we have instead:
...
(gdb) p *fh
$15 =3D {target =3D 0x16d43a0, target_fd =3D 4}
...

--=20
You are receiving this mail because:
You are on the CC list for the bug.=