From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E40ED3858C36; Wed, 4 Jan 2023 17:11:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E40ED3858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672852295; bh=EyerfjqzCsNFZF/pWDiF3tuQMGVadSDI7NbV6176LPU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MjpSL9LPx71GLtQ8WjKdu5AioNpzuMWgW5v+WI2anmlgp5oSpQ9WDneHCIXVso9SG ijPrOSdDctfS2e2YKCfsgSa2HtDCL1A3TR/J32pA4Tci8dSpLT2ptO5AUCL+pSBO6x hzT4cECNBq70HriSN+5RCHseai4kb0IvVxapPoog= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug remote/28489] Allow caching of remote objfiles Date: Wed, 04 Jan 2023 17:11:35 +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: simark at simark dot ca 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 #11 from Simon Marchi --- (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 think it would be fine for GDBserver to learn how to extract build-ids. = It should be quite fast, and including a build-id field in the shared library = list does not increase much the data transferred. I don't know if GDB needs to download the libraries up front for other reasons though. Otherwise, in theory, GDB should be able to extract the build-id of remote libraries by reading just the necessary bits (without downloading the whole file), using remote file-io. The upside is that it should work with the existing protocol, but the downside is that it would do many small requests= to read small bits here and there (reading the ELF header, then looking through notes), so it adds a lot of back and forth, and the latency adds up. > I guess a different idea would be to construct a cached directory > tree that works like a sysroot, and use the existing remote > protocol stat capability to decide when to update a file. In this > approach, build ids just would not be used (or, rather, would be > used to locate remote debuginfo files). Using modification times to know when cached files are stale, or something else? That seems difficult to manage. Do you make one directory per remot= e?=20 You could connect to 10.0.0.11:8888 and it's some system, and later connect= to 10.0.0.11:8888, and it's another system. How do you detect that? --=20 You are receiving this mail because: You are on the CC list for the bug.=