testsuite, mi: prevent buffer overflow in get_mi_thread_list

If there is a large number of threads in the input program, the expect
buffer in `get_mi_thread_list` would become full.  Prevent this by
consuming the buffer in small pieces.

Regression-tested using the gdb.mi tests.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
1 file changed