This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Isn't it OK to drop 'set write'?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb <gdb at sourceware dot org>, Gary Benson <gbenson at redhat dot com>
- Date: Tue, 28 Jul 2015 20:17:44 +0200
- Subject: Re: Isn't it OK to drop 'set write'?
- Authentication-results: sourceware.org; auth=none
- References: <20150726204905 dot GA18543 at host1 dot jankratochvil dot net> <CADPb22QYcH6QDOSk28oHP9MXpQ=FodZYvQELNsh+4iuF=J+ong at mail dot gmail dot 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