[gdb/dap] Make dap log printing thread-safe

I read that printing from different python threads is thread-unsafe, and I
noticed that the dap log printing is used from different threads, but doesn't
take care to make the printing thread-safe.

Fix this by using a lock to access LoggingParam.log_file.

Tested on aarch64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
1 file changed