public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [aarch64, testsuite] Document the ARM_CC_FOR_TARGET testsuite variable
@ 2022-06-09 13:06 Luis Machado
  2022-06-09 14:30 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Machado @ 2022-06-09 13:06 UTC (permalink / raw)
  To: gdb-patches; +Cc: pedro, jhb

This variable is useful when exercising AArch64 multi-arch support (debugging
32-bit AArch32 executables).

Unfortunately it isn't well documented. This patch adds information about it
and explains how to use it.
---
 gdb/testsuite/README | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index 3a34dcdd154..5b3fde75ece 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -736,3 +736,31 @@ Use [is_remote target] to check whether the DejaGnu target board is
 remote.  When what you really want to know is whether GDB is using the
 remote protocol, because feature X is only available when GDB debugs
 natively, check gdb_protocol instead.
+
+Architecture-specific settings
+******************************
+
+This section documents architecture-specific settings and flags that can be
+used with the GDB testsuite.
+
+- AArch64 (Linux)
+
+The AArch64 ports of GDB and GDBserver support debugging AArch32 32-bit
+programs running on 64-bit state.  There are some tests under gdb.multi/
+that exercise this particular feature.
+
+The tests will attempt to find a compiler capable of generating 32-bit
+executables through the ARM_CC_FOR_TARGET variable.  This variable should
+contain the command line for the compiler, including the full path to it, if
+the compiler is not in $PATH.
+
+If ARM_CC_FOR_TARGET is not set, the testsuite will guess some compiler
+commands.  If none is found, or if the 32-bit executable generated by
+compiler can't be executed correctly, the tests will be marked UNSUPPORTED.
+
+The list of 32-bit Arm compiler names the testsuite will try can be found
+in gdb/testsuite/lib/gdb.exp:arm_cc_for_target.
+
+Example invocation:
+
+make check-gdb TESTS="gdb.multi/multi-arch.exp" RUNTESTFLAGS="ARM_CC_FOR_TARGET=arm-linux-gnueabihf-gcc"
-- 
2.25.1


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

end of thread, other threads:[~2022-06-10  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 13:06 [PATCH] [aarch64, testsuite] Document the ARM_CC_FOR_TARGET testsuite variable Luis Machado
2022-06-09 14:30 ` Pedro Alves
2022-06-10  9:29   ` Luis Machado

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