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: [PATCH v2 2/2] mi-out: Implement mi redirection using a stack.


On Monday, September 08 2014, Pedro Alves wrote:

>> +    mi_expect_stop "breakpoint-hit" "do_nothing" ".*" ".*" ".*" {".*" ".*"} "Continue to breakpoint"
>> +
>> +    # This will crash gdb if redirection is not done properly.
>> +    mi_gdb_test "help" ".*" "nested redirect"
>
> I think it'd be good to replace this ".*" with a stricter match, just
> in case something goes wrong with undoing the redirection, but nothing
> crashes.  Something like (untested):
>
>  mi_gdb_test "help" "List of classes of commands.*\\^done.*" "nested redirect"

I've been seeing some cases like this in the list (i.e., writing tests
using ".*" a lot).  Maybe this is a good thing to mention in our wiki...

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


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