]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
C++ify fileio_fh_t, replace VEC with std::vector
authorPedro Alves <palves@redhat.com>
Wed, 11 Apr 2018 10:29:39 +0000 (11:29 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 11 Apr 2018 10:29:39 +0000 (11:29 +0100)
commit5ff79300aef4f4c991194541ec3ad9a2618ff24c
treeba6930cb692c7a14d11f90784afd19c9efb8fd54
parent18e404c4e2eb15443cc6dda93cbd38bdfeb17667
C++ify fileio_fh_t, replace VEC with std::vector

Preparation for the next patch.

- Replace VEC with std::vector.
- Rewrite a couple macros as methods/functions.
- While at it, rename fileio_fh_t::fd as fileio_fh_t::target_fd to
  avoid confusion between target and host file descriptors.

gdb/ChangeLog:
2018-04-11  Pedro Alves  <palves@redhat.com>

* target.c (fileio_fh_t): Make it a named struct instead of a
typedef.
(fileio_fh_t::is_closed): New method.
(DEF_VEC_O (fileio_fh_t)): Remove.
(fileio_fhandles): Now a std::vector.
(is_closed_fileio_fh): Delete.
(acquire_fileio_fd): Adjust.  Rename parameters.
(release_fileio_fd): Adjust.
(fileio_fd_to_fh): Reimplement as a function instead of a macro.
(target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
(target_fileio_close): Adjust.
gdb/ChangeLog
gdb/target.c