public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC 0/3] [gdb/testsuite] Introduce is_x86_64_m64_target
@ 2023-01-25 20:06 Tom de Vries
  2023-01-25 20:06 ` [RFC 1/3] [gdb/contrib] Add refactor.py Tom de Vries
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Tom de Vries @ 2023-01-25 20:06 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

I used a refactoring setup I wrote in python for another refactoring to
rewrite:
...
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
    verbose "Skipping ${testfile}."
    return
}
...
into:
...
require is_x86_64_m64_target
...

It also handles the elseif case.

Due to a recent commit, only the elseif cases are transformed, the others
have been handled already.

Also, I see now that "require {istarget x86_64-*-*} is_lp64_target" can be used,
and that is_x86_64_m64_target not stricly necessary.

I've included the two patches with the refactoring scripts.

Tom de Vries (3):
  [gdb/contrib] Add refactor.py
  [gdb/contrib] Add refactor_require.py
  [gdb/testsuite] Add and use is_x86_64_m64_target

 gdb/contrib/refactor.py                       | 73 +++++++++++++++++++
 gdb/contrib/refactor_require.py               | 53 ++++++++++++++
 .../gdb.arch/amd64-entry-value-param.exp      |  5 +-
 gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp |  5 +-
 .../gdb.mi/mi2-amd64-entry-value.exp          |  5 +-
 .../gdb.python/py-framefilter-invalidarg.exp  |  5 +-
 gdb/testsuite/gdb.python/py-linetable.exp     |  5 +-
 .../gdb.reverse/amd64-tailcall-reverse.exp    |  5 +-
 .../gdb.reverse/singlejmp-reverse.exp         |  5 +-
 gdb/testsuite/lib/gdb.exp                     |  4 +
 10 files changed, 143 insertions(+), 22 deletions(-)
 create mode 100755 gdb/contrib/refactor.py
 create mode 100644 gdb/contrib/refactor_require.py


base-commit: 6121eeb72978cc5749c4c9f119b4dbaf637517c9
-- 
2.35.3


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-01-26 18:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 20:06 [RFC 0/3] [gdb/testsuite] Introduce is_x86_64_m64_target Tom de Vries
2023-01-25 20:06 ` [RFC 1/3] [gdb/contrib] Add refactor.py Tom de Vries
2023-01-25 20:06 ` [RFC 2/3] [gdb/contrib] Add refactor_require.py Tom de Vries
2023-01-25 20:06 ` [RFC 3/3] [gdb/testsuite] Add and use is_x86_64_m64_target Tom de Vries
2023-01-25 21:25   ` Tom Tromey
2023-01-26  9:17     ` [pushed] " Tom de Vries
2023-01-26 15:48       ` Tom de Vries
2023-01-26 16:10         ` Tom Tromey
2023-01-26 16:36           ` Tom de Vries
2023-01-26 16:38           ` Pedro Alves
2023-01-26 17:08             ` Tom de Vries
2023-01-26 18:25               ` Tom Tromey
2023-01-26 18:34               ` Pedro Alves
2023-01-25 21:26 ` [RFC 0/3] [gdb/testsuite] Introduce is_x86_64_m64_target Tom Tromey
2023-01-26  9:30   ` Tom de Vries

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).