[RFA] completion in command definition

Jerome Guitton guitton@adacore.com
Tue Jan 31 14:29:00 GMT 2017


Hi Pedro,

Pedro Alves (palves@redhat.com):
> OK (but please remember to edit out the question and "attachment"
> from the commit log).

I've integrated your comments; I can push the patch in attachment
next week, if no objection.


About this question:

> > +gdb_test_multiple "define breakmain" "$test" \
> > +{
> > +  -re "Type commands for definition of \"breakmain\".\r\nEnd with a line saying just \"end\".\r\n>$" \
> > +    {
> > +      pass "$test"
> > +
> > +      set test "send body of breakmain"
> > +      gdb_test_multiple "break main\ncommand\necho\nend\nend" "$test"  \
> > +        {
> > +         -re "$gdb_prompt $"\
> > +                 {pass "$test"}
> 
> Does this fail with an unfixed GDB?  I ask since this is just matching the
> prompt, which a "bad" GDB also outputs?

This won't fail; the following tests ("breakmain" and "info break")
will fail though. Calling breakmain would make an unfixed GDB wait for
an additional "end" command, causing a timeout.

I've added an additional call to "end" after "breakmain, to avoid
polluting the other tests in define.exp (otherwise they would time out
one after the other).

Thanks,
Jerome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2017-01-31-command-abbrev-in-define-test.diff
Type: text/x-diff
Size: 8085 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20170131/6f37b24a/attachment.bin>


More information about the Gdb-patches mailing list