Re: Isn't it OK to drop 'set write'?

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.