From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: Mingw gdb validation
Date: Mon, 20 Oct 2008 08:41:00 -0000 [thread overview]
Message-ID: <48FC4417.2030807@st.com> (raw)
Is there any chance for such a patch to be accepted ?
It allows the following test to be successful when using a MinGW gdb
(means a gdb compiled under MSYS environment or using
CFLAGS="-mno-cygwin" under cygwin).
If yes I will write a correct changelog entry.
The following $nl value is the only one that works both on linux and
windows when running a validation.
About gdb.cp/userdef.exp, I don't understand why only in part of the
tests we have a \r\n expected as the answer ?
gdb_test "print one % two" "\\\$\[0-9\]* = {x = 2, y = 3}"
gdb_test "print one && two" "\\\$\[0-9\]* = 1\[\r\n\]" <===== Why
expecting \r\n here and not above ?
--
Denis
Index: ovldbreak.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/ovldbreak.exp,v
retrieving revision 1.10
diff -u -p -r1.10 ovldbreak.exp
--- ovldbreak.exp 3 Apr 2008 21:42:33 -0000 1.10
+++ ovldbreak.exp 17 Oct 2008 12:12:41 -0000
@@ -22,6 +22,7 @@
# tests for overloaded member functions. Set breakpoints on
# overloaded member functions
#
+set nl "\[\r\n\]*"
if $tracelevel then {
@@ -130,7 +131,7 @@ proc set_bp_overloaded {name expectedmen
# Note the arg type variations on lines 6 and 13.
# This accommodates different versions of g++.
-set menu_overload1arg "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\((unsigned int|unsigned)\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\((void|)\\) at.*$srcfile:110\r\n> $"
+set menu_overload1arg "\\\[0\\\] cancel$nl\\\[1\\\] all$nl\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121$nl\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120$nl\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119$nl\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118$nl\\\[6\\\] foo::overload1arg\\((unsigned int|unsigned)\\) at.*$srcfile:117$nl\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116$nl\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115$nl\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114$nl\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113$nl\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112$nl\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111$nl\\\[13\\\] foo::overload1arg\\((void|)\\) at.*$srcfile:110$nl> $"
# Set multiple-symbols to "ask", to allow us to test the use
# of the multiple-choice menu when breaking on an overloaded method.
Index: userdef.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/userdef.exp,v
retrieving revision 1.10
diff -u -p -r1.10 userdef.exp
--- userdef.exp 1 Jan 2008 22:53:19 -0000 1.10
+++ userdef.exp 17 Oct 2008 12:12:41 -0000
@@ -19,6 +19,7 @@
#
# source file "userdef.cc"
#
+set nl "\[\r\n\]*"
if $tracelevel then {
strace $tracelevel
@@ -94,9 +95,9 @@ gdb_test "print one / two" "\\\$\[0-9\]*
gdb_test "print one % two" "\\\$\[0-9\]* = {x = 2, y = 3}"
-gdb_test "print one && two" "\\\$\[0-9\]* = 1\[\r\n\]"
+gdb_test "print one && two" "\\\$\[0-9\]* = 1$nl"
-gdb_test "print one || two" "\\\$\[0-9\]* = 1\[\r\n\]"
+gdb_test "print one || two" "\\\$\[0-9\]* = 1$nl"
gdb_test "print one & two" "\\\$\[0-9\]* = {x = 0, y = 1}"
@@ -104,17 +105,17 @@ gdb_test "print one | two" "\\\$\[0-9\]*
gdb_test "print one ^ two" "\\\$\[0-9\]* = {x = 6, y = 6}"
-gdb_test "print one < two" "\\\$\[0-9\]* = 1\[\r\n\]"
+gdb_test "print one < two" "\\\$\[0-9\]* = 1$nl"
-gdb_test "print one <= two" "\\\$\[0-9\]* = 1\[\r\n\]"
+gdb_test "print one <= two" "\\\$\[0-9\]* = 1$nl"
-gdb_test "print one > two" "\\\$\[0-9\]* = 0\[\r\n\]"
+gdb_test "print one > two" "\\\$\[0-9\]* = 0$nl"
-gdb_test "print one >= two" "\\\$\[0-9\]* = 0\[\r\n\]"
+gdb_test "print one >= two" "\\\$\[0-9\]* = 0$nl"
-gdb_test "print one == two" "\\\$\[0-9\]* = 0\[\r\n\]"
+gdb_test "print one == two" "\\\$\[0-9\]* = 0$nl"
-gdb_test "print one != two" "\\\$\[0-9\]* = 1\[\r\n\]"
+gdb_test "print one != two" "\\\$\[0-9\]* = 1$nl"
# Can't really check the output of this one without knowing
# target integer width. Make sure we don't try to call
@@ -124,7 +125,7 @@ gdb_test "print one << 31" "\\\$\[0-9\]*
# Should be fine even on < 32-bit targets.
gdb_test "print one >> 31" "\\\$\[0-9\]* = {x = 0, y = 0}"
-gdb_test "print !one" "\\\$\[0-9\]* = 0\[\r\n\]"
+gdb_test "print !one" "\\\$\[0-9\]* = 0$nl"
# Assumes 2's complement. So does everything...
gdb_test "print +one" "\\\$\[0-9\]* = {x = 2, y = 3}"
next reply other threads:[~2008-10-20 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 8:41 Denis PILAT [this message]
2008-10-22 9:40 ` Pierre Muller
2008-10-22 13:05 ` Denis PILAT
2008-10-22 14:15 ` Pierre Muller
2008-10-22 13:27 ` Daniel Jacobowitz
2008-10-22 13:32 ` Pedro Alves
2008-10-22 13:38 ` Denis PILAT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48FC4417.2030807@st.com \
--to=denis.pilat@st.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox