From: Luis Machado <luis.machado@arm.com>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [aarch64, testsuite] Document the ARM_CC_FOR_TARGET testsuite variable
Date: Fri, 10 Jun 2022 10:29:54 +0100 [thread overview]
Message-ID: <3c4d067d-9220-0f13-286f-68f3bc6be67e@arm.com> (raw)
In-Reply-To: <94ce4a6d-e491-df16-d6aa-f202c4c9c3e0@palves.net>
On 6/9/22 15:30, Pedro Alves wrote:
>
> On 2022-06-09 14:06, Luis Machado wrote:
>> 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
>> +******************************
>
> The non-architecture-specific settings are actually called "parameters", as in:
>
> Testsuite Parameters
> ********************
>
> I think your new section should come right after that one, and be called
>
> "Architecture-specific Parameters"
>
>> +
>> +This section documents architecture-specific settings and flags that can be
>
> s/settings and flags/parameters/
>
>> +used with the GDB testsuite.
>> +
>> +- AArch64 (Linux)
>> +
>
> There should be a line with the parameter name before describing it, like in
> the generic section. Just:
>
> ARM_CC_FOR_TARGET
>
> followed by an empty line.
>
>> +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
>
> "attempt to find" here sound a bit odd here, since with the variable set, the
> testsuite doesn't try to find anything, it assumes what we specify works.
> See below.
>
>> +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.
>> +
>
> I suggest swapping around the description to first say what happens by
> default, and then talk about overriding the default. Like this:
>
> ARM_CC_FOR_TARGET
>
> 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.
>
> By default, the testsuite tries to find a compiler capable of
> generating 32-bit executables. If no compiler is found, or if the
> 32-bit executable generated by the found 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.
>
> You can set ARM_CC_FOR_TARGET to override the search and explicitly
> specify the compiler to use. This variable should contain the command
> line for the compiler, including the full path to it, if the compiler
> is not in $PATH.
>
>> +Example invocation:
>> +
>> +make check-gdb TESTS="gdb.multi/multi-arch.exp" RUNTESTFLAGS="ARM_CC_FOR_TARGET=arm-linux-gnueabihf-gcc"
>
> The command line should be indended, like all the other example invocations in the file.
>
> Otherwise LGTM.
Thanks. I've made those changes locally and pushed it as 3abc1d8fe0e09a4ba806d5e2a1902ac45f825ee9.
prev parent reply other threads:[~2022-06-10 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 13:06 Luis Machado
2022-06-09 14:30 ` Pedro Alves
2022-06-10 9:29 ` Luis Machado [this message]
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=3c4d067d-9220-0f13-286f-68f3bc6be67e@arm.com \
--to=luis.machado@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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).