Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Mingw gdb validation
@ 2008-10-20  8:41 Denis PILAT
  2008-10-22  9:40 ` Pierre Muller
  2008-10-22 13:27 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Denis PILAT @ 2008-10-20  8:41 UTC (permalink / raw)
  To: gdb-patches

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}"





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-22 14:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-20  8:41 Mingw gdb validation Denis PILAT
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox