From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 12/27] Use clean_restart in gdb.trace
Date: Thu, 26 Jan 2023 17:34:48 +0000 [thread overview]
Message-ID: <2912783e-3846-cc5a-9225-3ed08a96f18f@palves.net> (raw)
In-Reply-To: <20230125224614.1006886-13-tom@tromey.com>
On 2023-01-25 10:45 p.m., Tom Tromey wrote:
> --- a/gdb/testsuite/gdb.trace/unavailable.exp
> +++ b/gdb/testsuite/gdb.trace/unavailable.exp
> @@ -202,10 +202,7 @@ proc gdb_collect_args_test {} {
>
> foreach target_name ${trace_file_targets} {
> # Restart GDB and read the trace data in ${TARGET_NAME} target.
> - gdb_exit
> - gdb_start
> - gdb_reinitialize_dir $srcdir/$subdir
> - gdb_file_cmd $binfile
> + clean_restart $binfile
Note this one is not 100% equivalent, because this was using gdb_file_cmd instead of gdb_load for
a reason -- I think because afterwards we're explicitly connecting to a target, while gdb_load may connect
to the target. I recall patches from Daniel switching from gdb_load to gdb_file_cmd in tests that
don't really need execution for that reason years ago. ISTR a number of them, but I'm not finding all
that much. I did find this one, though:
https://sourceware.org/pipermail/gdb-patches/2010-March/072735.html
So IIRC, what Daniel described back then is I think the reason several tests in
for example gdb.base/ use gdb_file_cmd.
So I grepped for gdb_file_cmd in gdb.base/ and randomly picked gdb.base/list.exp, used
git blame and that led me to this patch:
https://sourceware.org/pipermail/gdb-patches/2012-June/093697.html
which again is exactly about avoiding gdb_load.
So maybe for the cases we are using gdb_file_cmd today, we should use:
clean_restart
gdb_file_cmd $binfile
instead of:
clean_restart $binfile
?
Pedro Alves
> gdb_test "target ${target_name} ${tracefile}.args.${target_name}" ".*" \
> "change to ${target_name} target"
next prev parent reply other threads:[~2023-01-26 17:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 22:45 [PATCH 00/27] Many small testsuite cleanups Tom Tromey
2023-01-25 22:45 ` [PATCH 01/27] Use ordinary calling convention for clean_restart Tom Tromey
2023-01-25 22:45 ` [PATCH 02/27] Use clean_restart in gdb.dlang Tom Tromey
2023-01-25 22:45 ` [PATCH 03/27] Eliminate spurious returns from the test suite Tom Tromey
2023-01-25 22:45 ` [PATCH 04/27] Remove some dead code in gdb.fortran/info-types.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 05/27] Minor "require" fixups Tom Tromey
2023-01-25 22:45 ` [PATCH 06/27] Remove unnecessary call to standard_testfile Tom Tromey
2023-01-25 22:45 ` [PATCH 07/27] Start gdb after building executable in mi-basics.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 08/27] Use mi_clean_restart more Tom Tromey
2023-01-25 22:45 ` [PATCH 09/27] Use clean_restart in gdb.pascal Tom Tromey
2023-01-25 22:45 ` [PATCH 10/27] Use clean_restart in gdb.linespec Tom Tromey
2023-01-25 22:45 ` [PATCH 11/27] Use clean_restart in gdb.opencl Tom Tromey
2023-01-25 22:45 ` [PATCH 12/27] Use clean_restart in gdb.trace Tom Tromey
2023-01-26 17:34 ` Pedro Alves [this message]
2023-01-26 18:34 ` Tom Tromey
2023-01-27 0:36 ` Tom Tromey
2023-01-25 22:46 ` [PATCH 13/27] Use clean_restart in gdb.objc Tom Tromey
2023-01-25 22:46 ` [PATCH 14/27] Use clean_restart in gdb.threads Tom Tromey
2023-01-25 22:46 ` [PATCH 15/27] Use clean_restart in gdb.guile Tom Tromey
2023-01-25 22:46 ` [PATCH 16/27] Use clean_restart in gdb.arch Tom Tromey
2023-01-25 22:46 ` [PATCH 17/27] Use clean_restart in gdb.reverse Tom Tromey
2023-01-25 22:46 ` [PATCH 18/27] Use clean_restart in gdb.dwarf2 Tom Tromey
2023-01-25 22:46 ` [PATCH 19/27] Use clean_restart in gdb.ada Tom Tromey
2023-01-25 22:46 ` [PATCH 20/27] Use clean_restart in gdb.fortran Tom Tromey
2023-01-25 22:46 ` [PATCH 21/27] Use clean_restart in gdb.stabs Tom Tromey
2023-01-25 22:46 ` [PATCH 22/27] Use clean_restart in gdb.go Tom Tromey
2023-01-25 22:46 ` [PATCH 23/27] Use clean_restart in gdb.perf Tom Tromey
2023-01-25 22:46 ` [PATCH 24/27] Use clean_restart in gdb.disasm Tom Tromey
2023-01-25 22:46 ` [PATCH 25/27] Use clean_restart in gdb.cp Tom Tromey
2023-01-25 22:46 ` [PATCH 26/27] Use clean_restart in gdb.python Tom Tromey
2023-01-25 22:46 ` [PATCH 27/27] Use clean_restart in gdb.base Tom Tromey
2023-01-26 17:37 ` [PATCH 00/27] Many small testsuite cleanups Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2912783e-3846-cc5a-9225-3ed08a96f18f@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).