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 11/15] Don't check $ after gdb_prompt.


On 04/13/2012 08:30 AM, Doug Evans wrote:
> Before we do that though, does this patch have the intended effect?
> I'm not up on the precise details of expect pattern matching, but I'd
> appreciate an explanation of why this is needed.

This patch is to try to fix the FAIL I encounter in
gdb.base/moribund-step.exp.  non-stop is turned on in it, which change
the order of output, and confuse test case to do regexp matching.

In order to show the effect of non-stop changing output, I run
moribund-step.exp twice with native-gdbserver board file, with non-stop
on and off respective.

--- gdb.non_stop_off.log	2012-04-13 18:33:55.000000000 +0800
+++ gdb.non_stop_on.log	2012-04-13 18:38:13.000000000 +0800
....
 Listening on port 2346
 target remote localhost:2346
 Remote debugging using localhost:2346
 Remote debugging from host 127.0.0.1
-Reading symbols from /lib/ld-linux.so.2...(no debugging symbols
found)...done.
-Loaded symbols for /lib/ld-linux.so.2
-0x40000850 in ?? () from /lib/ld-linux.so.2
-(gdb) Set target to remote <------ [1]
+[New Thread 7454]
+(gdb) <--------------------------- [2]
+[Thread 7454] #1 stopped.
+Set target to remote (async)
+0x40000850 in ?? ()
 continue
 Continuing.

Whe non-stop is off, "Remote debugging using
.*$serialport_re.*$gdb_prompt $" matches output [1], everything works
well.  When non-stop is on, there is an extra char '^M' at the end of
"(gdb) " in [2], so "Remote debugging using
.*$serialport_re.*$gdb_prompt $" doesn't match.  So far I have no idea
why there is such extra char '^M' appeared the end of "(gdb) ".

I just find this problem also exists on CVS trunk, so this should can be
addressed out of this patch series.  Sorry about bringing irrelevant
bits into one patch series.

-- 
Yao (éå)


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