Isn't it OK to drop 'set write'?
Jan Kratochvil
jan.kratochvil@redhat.com
Tue Jul 28 18:17:00 GMT 2015
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
More information about the Gdb
mailing list