This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA, Patch, testsuite] gdb.base/list.exp: initial state test for stub targets.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]