This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. 12e8c7d7c2af309b8fd6bf0f61e99b0a6aad4c80
- From: tromey at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 19 Dec 2013 16:03:17 -0000
- Subject: gdb and binutils branch master updated. 12e8c7d7c2af309b8fd6bf0f61e99b0a6aad4c80
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 12e8c7d7c2af309b8fd6bf0f61e99b0a6aad4c80 (commit)
via fcd488ca4e57141ac8ad28b6a5f560f3b9753a67 (commit)
from d493b2839b90ba7f4b5200505f94e45268777d7b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=12e8c7d7c2af309b8fd6bf0f61e99b0a6aad4c80
commit 12e8c7d7c2af309b8fd6bf0f61e99b0a6aad4c80
Author: Tom Tromey <tromey@redhat.com>
Date: Fri Dec 6 11:34:49 2013 -0700
don't allocate serial_ops
Now that struct serial_ops is const everywhere, we can easily turn the
instances into globals. This patch implements this idea.
On the one hand I think this is nicer since it makes a bit more data
readonly and slightly reduces allocations. On the other hand it
reduces readability somewhat.
If the readability is a concern to anyone I was thinking I could write
a macro that conditionally uses GCC's designated initializer
extension.
Tested by rebuilding on x86-64 Fedora 18, both natively and using the
mingw cross tools.
2013-12-19 Tom Tromey <tromey@redhat.com>
* ser-unix.c (hardwire_ops): New global.
(_initialize_ser_hardwire): Use it.
* ser-tcp.c (tcp_ops): New global.
(_initialize_ser_tcp): Use it.
* ser-pipe.c (pipe_ops): New global.
(_initialize_ser_pipe): Use it.
* ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): New
globals.
(_initialize_ser_windows): Use them.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fcd488ca4e57141ac8ad28b6a5f560f3b9753a67
commit fcd488ca4e57141ac8ad28b6a5f560f3b9753a67
Author: Tom Tromey <tromey@redhat.com>
Date: Fri Dec 6 10:58:50 2013 -0700
make serial_ops const
I noticed that the serial_ops vtable is not const, but really it ought
to be.
This patch constifies it, removing the only mutable field in the
process.
Tested by rebuilding on x86-64 Fedora 18, both natively and using the
mingw cross tools.
2013-12-19 Tom Tromey <tromey@redhat.com>
* serial.c (serial_ops_p): New typedef.
(serial_ops_list): Now a VEC.
(serial_interface_lookup): Return const. Use VEC_iterate.
(serial_add_interface): Make parameter const.
(serial_open): Update.
(serial_fdopen_ops): Make 'ops' const.
(serial_pipe): Update.
* ser-tcp.c (_initialize_ser_tcp): Update.
* ser-pipe.c (_initialize_ser_pipe): Update.
* ser-unix.c (_initialize_ser_hardwire): Update.
* ser-mingw.c (_initialize_ser_windows): Update.
* ser-go32.c (dos_ops): Now const. Update.
* serial.h (struct serial) <ops>: Now const.
(struct serial_ops) <next>: Remove.
(serial_add_interface): Make parameter const.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 30 +++++++
gdb/ser-go32.c | 3 +-
gdb/ser-mingw.c | 237 +++++++++++++++++++++++++++++--------------------------
gdb/ser-pipe.c | 51 ++++++------
gdb/ser-tcp.c | 57 +++++++------
gdb/ser-unix.c | 58 +++++++------
gdb/serial.c | 27 ++++---
gdb/serial.h | 5 +-
8 files changed, 262 insertions(+), 206 deletions(-)
hooks/post-receive
--
gdb and binutils