From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E543B385AC09; Wed, 23 Aug 2023 19:18:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E543B385AC09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692818302; bh=vxuu/BXjw9gDNZLjihZEz2TvjnPUyFRPTVNY4rD+EMM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wJrYLmVyBFpmXlUDLJ70VKqLE1lxsx2cK/aDIy07ngwAv5CO+w8BnyIrEfEZRQCCG Eq8i2WCdalr2HObruJKCKhWgw+uhtsSOdUrL/FjnyM49QOijOb0buaD34GE3vDO4sS yd7NUC68zavCXcBqSc76iVPBL/2O455YNBVwwzV0= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug remote/28489] Allow caching of remote objfiles Date: Wed, 23 Aug 2023 19:18:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot 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=3D28489 --- Comment #12 from Tom Tromey --- (In reply to Tom Tromey from comment #7) > It occurred to me that to make this work, we'll need a new protocol > extension (no big deal) and gdbserver will have to know how to > extract the build id (a bigger deal). I was thinking about this again and I did a little experiment. I instrumented BFD to print how much data it reads from the underlying file. Then I wrote a small program to open an ELF and extract its build id. When I coalesce all the reads I end up with it reading 5388 bytes in 3 different parts of the file. This doesn't seem so bad -- gdb could just do the reads using the existing protocol and then switch to a local file (or start one) if the build-id matches (or is new). Furthermore, it seems like there isn't really a need to read the entire file eagerly. gdb won't ever use most of it, I think. The idea here would be to have gdb cache pages from the file locally, and keep a bitmap (in the same file) indicating which pages are valid. Then when BFD requests some new page, go fetch it from the remote. --=20 You are receiving this mail because: You are on the CC list for the bug.=