public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug remote/28489] Allow caching of remote objfiles
Date: Wed, 23 Aug 2023 19:18:21 +0000	[thread overview]
Message-ID: <bug-28489-4717-3YQDvLovLw@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28489-4717@http.sourceware.org/bugzilla/>

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

--- Comment #12 from Tom Tromey <tromey at sourceware dot org> ---
(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.

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

  parent reply	other threads:[~2023-08-23 19:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 15:24 [Bug remote/28489] New: " tromey at sourceware dot org
2023-01-02 19:30 ` [Bug remote/28489] " tromey at sourceware dot org
2023-01-03  2:56 ` simark at simark dot ca
2023-01-03  4:09 ` daniel at mariadb dot org
2023-01-03  9:57 ` mark at klomp dot org
2023-01-03 16:45 ` tromey at sourceware dot org
2023-01-03 16:57 ` simark at simark dot ca
2023-01-03 17:55 ` mark at klomp dot org
2023-01-04  1:39 ` tromey at sourceware dot org
2023-01-04  2:58 ` fche at redhat dot com
2023-01-04  4:07 ` tromey at sourceware dot org
2023-01-04  4:13 ` simark at simark dot ca
2023-01-04 17:11 ` simark at simark dot ca
2023-08-23 19:18 ` tromey at sourceware dot org [this message]
2023-08-23 19:26 ` fche at redhat dot com
2023-08-23 19:30 ` tromey at sourceware dot org
2023-08-24 17:40 ` tromey at sourceware dot org
2023-08-24 19:41 ` tromey at sourceware dot 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-28489-4717-3YQDvLovLw@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: link
Be 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).