This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA, Patch, testsuite] gdb.base/list.exp: initial state test for stub targets.
- From: Pedro Alves <palves at redhat dot com>
- To: Iain Sandoe <iain at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Jun 2012 13:33:10 +0100
- Subject: Re: [RFA, Patch, testsuite] gdb.base/list.exp: initial state test for stub targets.
- References: <C6DF26D5-4C9E-4C05-8C30-B226C311393E@codesourcery.com>
On 06/13/2012 01:23 PM, Iain Sandoe wrote:
> Hi,
>
> At present, gdb.base/list.exp behaves differently for targets that use a stub and those that are native, simulator or gdbserver.
>
> For the latter cases, the test does not cause an inferior to be created, and the default list lines around main works 'as expected'.
>
> For the stub case, an inferior is created and this will generally be stopped in some start-up or exception code. At present, this is handled by running to main and then skipping the default listing, unsupport-ing the 'default list lines around main' test.
>
> I was asked to look into removing that 'unsupported'.
>
> One way to make things consistent would be to avoid creating the inferior for the stub case - since the listing tests only require host-side actions. This could be achieved by replacing the gdb_load in the test with a gdb_file_cmd, in the test; Patch (a) below.
I prefer this option, for removing the special casing, making everything work the
same everywhere (and making the test run a little bit faster).
> comments/OK for (a) or (b)?
> gdb/testsuite:
>
> * gdb.base/list.exp (test_listsize): Adjust to allow testing of default
> lines on targets using stubs.
>
Okay for (a) from me. But the ChangeLog entry should say what you did, not
why you did it. Something like:
* gdb.base/list.exp (test_listsize): Remove $use_gdb_stub special case.
(top level): Use gdb_file_cmd instead of gdb_load.
--
Pedro Alves