aboutsummaryrefslogtreecommitdiff
path: root/libiberty/vsnprintf.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-05-17 16:30:09 +0100
committerAlan Hayward <alan.hayward@arm.com>2019-05-17 16:34:01 +0100
commitf9e2e39d23495844d998f54a0fccb9d6be7edb0e (patch)
treec35f247eab501c27d46d93fe2bc001899de68fdc /libiberty/vsnprintf.c
parent81f47ac29f8cdb888f2d81c5daa9bfc4747738aa (diff)
downloadgdb-f9e2e39d23495844d998f54a0fccb9d6be7edb0e.zip
gdb-f9e2e39d23495844d998f54a0fccb9d6be7edb0e.tar.gz
gdb-f9e2e39d23495844d998f54a0fccb9d6be7edb0e.tar.bz2
testsuite: Record all gdb input to gdb.in
When debugging testsuite failures, it can be awkward parsing gdb.log to obtain all the commands run in order to manually re-run the test. This patch adds the functionality to save all gdb commands to the file gdb.in when the testsuite is run. The file is saved in the directory for the test and if gdb is restarted then .1, .2, .3 etc is added to the filename. Once a test has been run, the .in file can be used to re-run the test in the following way: gdb -x outputs/gdb.store/gdb.in outputs/gdb.store/store The code works by intercepting send_gdb. I've added a TYPE to ensure that any commands that would destroy the playback are kept from the log (for example the Y from an answer to a y/n question). Adds library function standard_output_file_with_gdb_instance to open a file postfixed with count of the gdb instance. Ensure this count is reset when a new .exp script is run. I've re-run a random selection of .in files to check they do not error. Logs with commands such as "attach <pid>" will not directly work when re-run. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_unload): Mark Y as an answer. (delete_breakpoints): Likewise. (gdb_run_cmd): Likewise. (gdb_start_cmd): Likewise. (gdb_starti_cmd): Likewise. (gdb_internal_error_resync): Likewise. (gdb_test_multiple): Likewise. (gdb_reinitialize_dir): Likewise. (default_gdb_exit): Likewise. (gdb_file_cmd): Mark kill as optional. (default_gdb_start): Call gdb_stdin_log_init. (send_gdb): Call gdb_stdin_log_write. (rerun_to_main): Mark Y as an answer. (gdb_stdin_log_init): New function. (gdb_stdin_log_write): Likewise.
Diffstat (limited to 'libiberty/vsnprintf.c')
0 files changed, 0 insertions, 0 deletions