* NEWS: Make note of new record and replay feature for

remote debug sessions.
	* serial.c (gdbcmd.h): Include.
	(serial_logfile, serial_logfp, serial_reading, serial_writing):
 	Define here, for remote debug session logging.
	(serial_log_command, serial_logchar, serial_write, serial_readchar):
	New functions for remote debug session logging.
	(serial_open): Open remote debug session log file when needed.
	(serial_close): Close remote debug session log file when needed.
	(_initialize_serial): Add set/show commands for name of remote
	debug session log file.
	* serial.h (serial_readchar): Declare
	(SERIAL_READCHAR): Call serial_readchar().
	(SERIAL_WRITE): Call serial_write().
	(serial_close): Declare as extern.
	(serial_logfile, serial_logfp): Declare.
	* top.c (execute_command): Declare serial_logfp.  Log user command
	in remote debug session log if log file is open.
	* remote-array.c (array_wait): #ifdef out echo to gdb_stdout.
	(array_read_inferior_memory): Rewrite to fix memory overwrite bug.
	* remote-array.c (SREC_SIZE): Remove, duplicates define in
	monitor.h.
	* remote-array.c (hexchars, hex2mem):  Remove, unused.
	* gdbserver/low-linux.c (store_inferior_registers): Remove
	unnecessary extern declaration of registers[].
	* gdbserver/Makefile.in (all): Add gdbreplay.
	* gdbserver/gdbreplay.c: New file.
	* gdbserver/README: Give example of recording a remote
	debug session with gdb and then replaying it with gdbreplay.
This commit is contained in:
Fred Fish
1996-01-24 21:30:37 +00:00
parent 76e45938c3
commit e8f1ad9a8b
8 changed files with 551 additions and 45 deletions

View File

@ -136,7 +136,9 @@ serial_t serial_fdopen PARAMS ((const int fd));
#define SERIAL_TIMEOUT -2
#define SERIAL_EOF -3
#define SERIAL_READCHAR(SERIAL_T, TIMEOUT) ((SERIAL_T)->ops->readchar((SERIAL_T), TIMEOUT))
extern int serial_readchar PARAMS ((serial_t scb, int timeout));
#define SERIAL_READCHAR(SERIAL_T, TIMEOUT) serial_readchar (SERIAL_T, TIMEOUT)
/* Set the baudrate to the decimal value supplied. Returns 0 for success,
-1 for failure. */
@ -155,11 +157,13 @@ serial_t serial_fdopen PARAMS ((const int fd));
/* Write LEN chars from STRING to the port SERIAL_T. Returns 0 for
success, non-zero for failure. */
#define SERIAL_WRITE(SERIAL_T, STRING, LEN) ((SERIAL_T)->ops->write((SERIAL_T), STRING, LEN))
extern int serial_write PARAMS ((serial_t scb, const char *str, int len));
#define SERIAL_WRITE(SERIAL_T, STRING,LEN) serial_write (SERIAL_T, STRING, LEN)
/* Push out all buffers, close the device and destroy SERIAL_T. */
void serial_close PARAMS ((serial_t, int));
extern void serial_close PARAMS ((serial_t, int));
#define SERIAL_CLOSE(SERIAL_T) serial_close(SERIAL_T, 1)
@ -170,4 +174,9 @@ void serial_close PARAMS ((serial_t, int));
extern void serial_printf PARAMS ((serial_t desc, const char *, ...))
ATTR_FORMAT(printf, 2, 3);
/* File in which to record the remote debugging session */
extern char *serial_logfile;
extern FILE *serial_logfp;
#endif /* SERIAL_H */