[gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1
authorTom de Vries <tdevries@suse.de>
Fri, 8 Oct 2021 12:17:09 +0000 (14:17 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 8 Oct 2021 12:17:09 +0000 (14:17 +0200)
commit048cb8b4666f8bb93649a1e0b4b8889b1e5f8073
tree2b8cbf108b03bca1fe94bfc84bdf34b3ef345a56
parent2550e478ad11b199780b733f2c657ab8ffdb0f14
[gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1

When running test-case gdb.base/info_sources_2.exp with check-read1, I run
into:
...
FAIL: gdb.base/info_sources_2.exp: args: : info sources  (timeout)
...

Fix this by consuming a "$src1, $src2, ..., $srcn: line bit by bit rather than
as one whole line.

Also add the missing handling of "Objfile has no debug information".

Tested on x86_64-linux.
gdb/testsuite/gdb.base/info_sources_2.exp