• Tom Tromey's avatar
    Remove cleanup from remote.c · 8d64371b
    Tom Tromey authored
    This removes the remaining cleanup from remote.c, by changing
    remote_state::buf to be a gdb::char_vector, and then fixing up all the
    fallout.  The resulting patch is somewhat ugly, but on the other hand,
    it eliminates some possibilities for mistakes.
    Regression tested using the
    Fedora-x86_64-native-extended-gdbserver-m64 builder on the buildbot.
    2019-01-15  Tom Tromey  <tom@tromey.com>
    	* remote.c (class remote_state) <buf>: Now a char_vector.
    	<buf_size>: Remove.
    	(remote_target::getpkt): Change type of buf.  Remove sizeof_buf
    	(remote_target::getpkt_or_notif_sane): Likewise.
    	(class remote_target) <putpkt>: New overload.
    	(remote_target::read_frame): Change type of "buf_p".  Remove
    	sizeof_p parameter.
    	(packet_ok): New overload.
    	(packet_check_result): New overload.
    	Update all uses.