[PATCH 3/4] Transform \r\n in MI variables

Yao Qi
2013-09-17T13:07:41Z

The previous patch can't transform \r\n in variables, so this patch
update these variables which have \r\n in MI.

gdb/testsuite:

2013-09-17 Yao Qi <yao@codesourcery.com>

* lib/mi-support.exp (mi_gdb_prompt): Replace "\r\n" with
"\r+\n".
(thread_selected_re): Likewise.
(gdbindex_warning_re): Likewise.
(library_loaded_re): Likewise.
(breakpoint_re): Likewise.
---
gdb/testsuite/lib/mi-support.exp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index a9b22c2..86f91ac 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -21,7 +21,7 @@
# Set it if it is not already set.
global mi_gdb_prompt
if ![info exists mi_gdb_prompt] then {
- set mi_gdb_prompt "\[(\]gdb\[)\] \r\n"
+ set mi_gdb_prompt "\[(\]gdb\[)\] \r+\n"
}

global mi_inferior_spawn_id
@@ -29,10 +29,10 @@ global mi_inferior_tty_name

set MIFLAGS "-i=mi"

-set thread_selected_re "=thread-selected,id=\"\[0-9\]+\"\r\n"
-set gdbindex_warning_re "&\"warning: Skipping \[^\r\n\]+ \.gdb_index section in \[^\r\n\]+\"\r\n(?:&\"\\\\n\"\r\n)?"
-set library_loaded_re "=library-loaded\[^\n\]+\"\r\n(?:$gdbindex_warning_re)?"
-set breakpoint_re "=(?:breakpoint-created|breakpoint-deleted)\[^\n\]+\"\r\n"
+set thread_selected_re "=thread-selected,id=\"\[0-9\]+\"\r+\n"
+set gdbindex_warning_re "&\"warning: Skipping \[^\r\n\]+ \.gdb_index section in \[^\r\n\]+\"\r+\n(?:&\"\\\\n\"\r+\n)?"
+set library_loaded_re "=library-loaded\[^\n\]+\"\r+\n(?:$gdbindex_warning_re)?"
+set breakpoint_re "=(?:breakpoint-created|breakpoint-deleted)\[^\n\]+\"\r+\n"

#
# mi_gdb_exit -- exit the GDB, killing the target program if necessary
--
1.7.7.6