Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb <gdb@sourceware.org>, Gary Benson <gbenson@redhat.com>
Subject: Re: Isn't it OK to drop 'set write'?
Date: Tue, 28 Jul 2015 18:17:00 -0000	[thread overview]
Message-ID: <20150728181744.GA16897@host1.jankratochvil.net> (raw)
In-Reply-To: <CADPb22QYcH6QDOSk28oHP9MXpQ=FodZYvQELNsh+4iuF=J+ong@mail.gmail.com>

On Tue, 28 Jul 2015 19:51:02 +0200, Doug Evans wrote:
> OOC, how does it simplify the build-id patchset?

For writable files one needs to use gdb_bfd_fopen() but normally one has to
use gdb_bfd_open() which provides bfd-caching.  But they are called similarly
so that is not such a complication.

Rather the GDB codebase already contains an exception:
	writing into executable files is not supported for target: sysroots
where Gary wrote as a reason:
	/* gdb_bfd_fopen does not support "target:" filenames.  */
But I see it rather due to gdb_bfd_open() and not gdb_bfd_fopen(), more
specifically its gdb_bfd_openr_iovec() - the real underlying reason is that
BFD provides bfd_openr_iovec() but nothing like bfd_openrw_iovec().
As "target:" should be preferred in general this makes the writability a bit
limited functionality.

gdbserver should support FILEIO_O_RDWR so on the gdbserver protocol side that
should be OK.

For the build-id patchset I am unifying files opening API so all the
differences mess it up a bit.


Jan


  reply	other threads:[~2015-07-28 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-26 20:49 Jan Kratochvil
2015-07-28 17:51 ` Doug Evans
2015-07-28 18:17   ` Jan Kratochvil [this message]
2015-08-03 18:11 ` Joel Brobecker

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=20150728181744.GA16897@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=gbenson@redhat.com \
    --cc=gdb@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