Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [SH] ... can do this signal stuff!
@ 2012-02-28 10:03 Thomas Schwinge
  2012-02-28 13:43 ` Pedro Alves
  2012-02-28 16:05 ` Testsuite regression for annota1.exp and annota3.exp [Re: [PATCH] [SH] ... can do this signal stuff!] Jan Kratochvil
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Schwinge @ 2012-02-28 10:03 UTC (permalink / raw)
  To: gdb-patches; +Cc: Kevin Buettner

[-- Attachment #1: Type: text/plain, Size: 3622 bytes --]

Hi!

An oldie -- this code has been there as of its initial import in April
1999, but the world has changed a bit in the mean time...

This fixes another 223 testsuite FAILs for sh-linux-gnu; no effect for
sh-elf (tests are not run there).

gdb/testsuite/
2012-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	* gdb.base/annota1.c [__sh__]: Remove any special-casing.
	* gdb.base/annota3.c: Likewise.
	* gdb.base/sigall.c: Likewise.
	* gdb.base/signals.c: Likewise.
	* gdb.reverse/sigall-reverse.c: Likewise.

Index: gdb/testsuite/gdb.base/annota1.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 annota1.c
--- gdb/testsuite/gdb.base/annota1.c	2 Nov 1999 04:44:26 -0000	1.1.1.3
+++ gdb/testsuite/gdb.base/annota1.c	28 Feb 2012 09:14:11 -0000
@@ -1,10 +1,6 @@
 #include <stdio.h>
 #include <signal.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#endif
-
 
 #ifdef PROTOTYPES
 void
Index: gdb/testsuite/gdb.base/annota3.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota3.c,v
retrieving revision 1.1
diff -u -p -r1.1 annota3.c
--- gdb/testsuite/gdb.base/annota3.c	3 Aug 2003 01:57:13 -0000	1.1
+++ gdb/testsuite/gdb.base/annota3.c	28 Feb 2012 09:14:11 -0000
@@ -1,10 +1,6 @@
 #include <stdio.h>
 #include <signal.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#endif
-
 
 #ifdef PROTOTYPES
 void
Index: gdb/testsuite/gdb.base/sigall.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigall.c,v
retrieving revision 1.3
diff -u -p -r1.3 sigall.c
--- gdb/testsuite/gdb.base/sigall.c	13 Dec 2011 17:22:08 -0000	1.3
+++ gdb/testsuite/gdb.base/sigall.c	28 Feb 2012 09:14:11 -0000
@@ -1,9 +1,6 @@
 #include <signal.h>
 #include <unistd.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#endif
 
 /* Signal handlers, we set breakpoints in them to make sure that the
    signals really get delivered.  */
Index: gdb/testsuite/gdb.base/signals.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/signals.c,v
retrieving revision 1.2
diff -u -p -r1.2 signals.c
--- gdb/testsuite/gdb.base/signals.c	13 Dec 2011 17:22:08 -0000	1.2
+++ gdb/testsuite/gdb.base/signals.c	28 Feb 2012 09:14:11 -0000
@@ -3,10 +3,6 @@
 #include <signal.h>
 #include <unistd.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#define alarm(a)	/* Ditto for alarm() */
-#endif
 
 static int count = 0;
 
Index: gdb/testsuite/gdb.reverse/sigall-reverse.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.reverse/sigall-reverse.c,v
retrieving revision 1.6
diff -u -p -r1.6 sigall-reverse.c
--- gdb/testsuite/gdb.reverse/sigall-reverse.c	4 Jan 2012 08:27:54 -0000	1.6
+++ gdb/testsuite/gdb.reverse/sigall-reverse.c	28 Feb 2012 09:14:11 -0000
@@ -18,9 +18,6 @@
 #include <signal.h>
 #include <unistd.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#endif
 
 /* Signal handlers, we set breakpoints in them to make sure that the
    signals really get delivered.  */


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [PATCH] [SH] ... can do this signal stuff!
  2012-02-28 10:03 [PATCH] [SH] ... can do this signal stuff! Thomas Schwinge
@ 2012-02-28 13:43 ` Pedro Alves
  2012-02-28 16:05 ` Testsuite regression for annota1.exp and annota3.exp [Re: [PATCH] [SH] ... can do this signal stuff!] Jan Kratochvil
  1 sibling, 0 replies; 6+ messages in thread
From: Pedro Alves @ 2012-02-28 13:43 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gdb-patches, Kevin Buettner

On 02/28/2012 09:23 AM, Thomas Schwinge wrote:
> Hi!
> 
> An oldie -- this code has been there as of its initial import in April
> 1999, but the world has changed a bit in the mean time...
> 
> This fixes another 223 testsuite FAILs for sh-linux-gnu; no effect for
> sh-elf (tests are not run there).

This is certainly okay.  Even if it affected, the right way to skip the
tests would be by setting "gdb,nosignals" in the board file.

-- 
Pedro Alves


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

* Testsuite regression for annota1.exp and annota3.exp  [Re: [PATCH] [SH] ... can do this signal stuff!]
  2012-02-28 10:03 [PATCH] [SH] ... can do this signal stuff! Thomas Schwinge
  2012-02-28 13:43 ` Pedro Alves
@ 2012-02-28 16:05 ` Jan Kratochvil
  2012-02-28 19:42   ` Thomas Schwinge
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2012-02-28 16:05 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gdb-patches, Kevin Buettner

On Tue, 28 Feb 2012 10:23:49 +0100, Thomas Schwinge wrote:
> gdb/testsuite/
> 2012-02-28  Thomas Schwinge  <thomas@codesourcery.com>
> 
> 	* gdb.base/annota1.c [__sh__]: Remove any special-casing.
> 	* gdb.base/annota3.c: Likewise.
> 	* gdb.base/sigall.c: Likewise.
> 	* gdb.base/signals.c: Likewise.
> 	* gdb.reverse/sigall-reverse.c: Likewise.

Sorry but it caused regressions.  Please use gdb_get_line_number there.


Thanks,
Jan


-PASS: gdb.base/annota1.exp: breakpoint info
-PASS: gdb.base/annota1.exp: run until main breakpoint
+FAIL: gdb.base/annota1.exp: breakpoint info (timeout)
+FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)
-PASS: gdb.base/annota1.exp: break at 28
+FAIL: gdb.base/annota1.exp: break at 28 (timeout)
-PASS: gdb.base/annota1.exp: annotate ignore count change
-PASS: gdb.base/annota1.exp: breakpoint ignore count
+FAIL: gdb.base/annota1.exp: annotate ignore count change (timeout)
+FAIL: gdb.base/annota1.exp: next to exit loop (timeout)
+FAIL: gdb.base/annota1.exp: breakpoint ignore count (timeout)
-PASS: gdb.base/annota1.exp: signal sent
-PASS: gdb.base/annota1.exp: cleanup core file (removed)
+FAIL: gdb.base/annota1.exp: signal sent (timeout)
+PASS: gdb.base/annota1.exp: cleanup core file (not dumped)
-PASS: gdb.base/annota3.exp: breakpoint info
-PASS: gdb.base/annota3.exp: run until main breakpoint
+FAIL: gdb.base/annota3.exp: breakpoint info (pattern 3 + sentinel)
+FAIL: gdb.base/annota3.exp: run until main breakpoint (pattern 8)
-PASS: gdb.base/annota3.exp: break at 28
+FAIL: gdb.base/annota3.exp: break at 28 (pattern 2 + sentinel)
-PASS: gdb.base/annota3.exp: annotate ignore count change
-PASS: gdb.base/annota3.exp: next to exit loop
-PASS: gdb.base/annota3.exp: breakpoint ignore count
-PASS: gdb.base/annota3.exp: get inferior pid
-PASS: gdb.base/annota3.exp: signal sent
-PASS: gdb.base/annota3.exp: cleanup core file (removed)
+FAIL: gdb.base/annota3.exp: annotate ignore count change (pattern 2)
+FAIL: gdb.base/annota3.exp: next to exit loop (pattern 2)
+FAIL: gdb.base/annota3.exp: breakpoint ignore count (pattern 2)
+FAIL: gdb.base/annota3.exp: get inferior pid (timeout)
+FAIL: gdb.base/annota3.exp: signal sent (pattern 2)
+PASS: gdb.base/annota3.exp: cleanup core file (not dumped)


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

* Re: Testsuite regression for annota1.exp and annota3.exp  [Re: [PATCH] [SH] ... can do this signal stuff!]
  2012-02-28 16:05 ` Testsuite regression for annota1.exp and annota3.exp [Re: [PATCH] [SH] ... can do this signal stuff!] Jan Kratochvil
@ 2012-02-28 19:42   ` Thomas Schwinge
  2012-02-28 19:43     ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Schwinge @ 2012-02-28 19:42 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches, Kevin Buettner

[-- Attachment #1: Type: text/plain, Size: 10530 bytes --]

Hi!

On Tue, 28 Feb 2012 17:03:51 +0100, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> On Tue, 28 Feb 2012 10:23:49 +0100, Thomas Schwinge wrote:
> > gdb/testsuite/
> > 2012-02-28  Thomas Schwinge  <thomas@codesourcery.com>
> > 
> > 	* gdb.base/annota1.c [__sh__]: Remove any special-casing.
> > 	* gdb.base/annota3.c: Likewise.
> > 	* gdb.base/sigall.c: Likewise.
> > 	* gdb.base/signals.c: Likewise.
> > 	* gdb.reverse/sigall-reverse.c: Likewise.
> 
> Sorry but it caused regressions.  Please use gdb_get_line_number there.

Sorry for that.  Fixing this was not as easy as I thought; please have a
look at the following mess, especially in annota3.exp.  From
142db50201b1b1c69ebdc2dcdb1181cde1db3b08 I got the idea of using [concat
...] for building gdb_expect_list's third list argument -- it needs to
expand $main_line, etc.  Any better suggestions (I obviously don't have a
lot of TCL and/or GDB testcase writing experience), or is this
acceptable?

gdb/testsuite/
2012-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	* gdb.base/annota1.exp: Use gdb_get_line_number for retrieveing line
	numbers instead of hardcoding them.
	* gdb.base/annota1.c: Provide suitable markers.
	* gdb.base/annota3.exp: Use gdb_get_line_number for retrieveing line
	numbers instead of hardcoding them.
	* gdb.base/annota3.c: Provide suitable markers.

diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
index 28c9ed1..239ea16 100644
--- a/gdb/testsuite/gdb.base/annota1.c
+++ b/gdb/testsuite/gdb.base/annota1.c
@@ -25,7 +25,7 @@ int
 main ()
 #endif
 {
-  int my_array[3] = { 1, 2, 3 };
+  int my_array[3] = { 1, 2, 3 };  /* break main */
   
   value = 7;
   
@@ -39,9 +39,9 @@ main ()
   {
     int i;
     for (i = 0; i < 5; i++)
-      value++;
+      value++;  /* increment value */
   }
 
-  return 0;
+  return 0;  /* after loop */
 }
 
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 66f96e7..c94f185 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -45,11 +45,6 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-#
-# the line at which break main will put the breakpoint
-#
-set main_line 32
-
 # The commands we test here produce many lines of output; disable "press 
 # <return> to continue" prompts.
 gdb_test_no_output "set height 0"
@@ -57,8 +52,11 @@ gdb_test_no_output "set height 0"
 #
 # break at main
 #
+
+set main_line [gdb_get_line_number "break main"]
+
 gdb_test "break main" \
-    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "Breakpoint.*at.* file .*$srcfile, line $main_line\." \
     "breakpoint main"
 
 
@@ -302,13 +300,13 @@ gdb_test_multiple "delete 3" "delete bp 3" {
 # break at main, after value is initialized. This is in preparation
 # to test the annotate output for the display command.
 #
-gdb_test_multiple "break main" "break at 28" {
+gdb_test_multiple "break main" "break at main" {
     -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*$gdb_prompt$" {
-	pass "break at 28"
+	pass "break at main"
     }
     -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*$gdb_prompt$" {
 	setup_xfail "*-*-*" 1270
-	fail "break at 28"
+	fail "break at main"
     }
 }
 
@@ -351,9 +349,12 @@ gdb_expect {
 # Test that breakpoints-invalid is issued once and only once for
 # breakpoint ignore count changes, after annotation stopped.
 #
-gdb_test_multiple "break 46" "break at 46" {
-    -re "Breakpoint 5 at $hex: file .*$srcfile, line 46.*$gdb_prompt$" {
-	pass "break at 46"
+
+set value_inc_line [gdb_get_line_number "increment value"]
+
+gdb_test_multiple "break $value_inc_line" "break at value++" {
+    -re "Breakpoint 5 at $hex: file .*$srcfile, line $value_inc_line.*$gdb_prompt$" {
+	pass "break at value++"
     }
 }
 
@@ -364,7 +365,7 @@ gdb_test_multiple "ignore 5 4" "ignore 5 4" {
 }
 
 gdb_test_multiple "continue" "annotate ignore count change" {
-    -re ".*$srcfile:46:.*\032\032stopped\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" {
+    -re ".*$srcfile:$value_inc_line:.*\032\032stopped\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" {
 	pass "annotate ignore count change"
     }
 }
@@ -377,8 +378,10 @@ gdb_test_multiple "next" "next to exit loop" {
     }
 }
 
+set after_loop_line [gdb_get_line_number "after loop"]
+
 gdb_test_multiple "next" "breakpoint ignore count" {
-    -re ".*$srcfile:49:.*$gdb_prompt$" {
+    -re ".*$srcfile:$after_loop_line:.*$gdb_prompt$" {
 	pass "breakpoint ignore count"
     }
 }
diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
index 28c9ed1..239ea16 100644
--- a/gdb/testsuite/gdb.base/annota3.c
+++ b/gdb/testsuite/gdb.base/annota3.c
@@ -25,7 +25,7 @@ int
 main ()
 #endif
 {
-  int my_array[3] = { 1, 2, 3 };
+  int my_array[3] = { 1, 2, 3 };  /* break main */
   
   value = 7;
   
@@ -39,9 +39,9 @@ main ()
   {
     int i;
     for (i = 0; i < 5; i++)
-      value++;
+      value++;  /* increment value */
   }
 
-  return 0;
+  return 0;  /* after loop */
 }
 
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
index 82abc0a..95670f9 100644
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -45,11 +45,6 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-#
-# the line at which break main will put the breakpoint
-#
-set main_line 32
-
 # The commands we test here produce many lines of output; disable "press 
 # <return> to continue" prompts.
 gdb_test_no_output "set height 0"
@@ -57,8 +52,11 @@ gdb_test_no_output "set height 0"
 #
 # break at main
 #
+
+set main_line [gdb_get_line_number "break main"]
+
 gdb_test "break main" \
-    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "Breakpoint.*at.* file .*$srcfile, line $main_line\." \
     "breakpoint main"
 
 
@@ -106,11 +104,10 @@ gdb_test_multiple "end" "end if construct" {
 # info break:
 #
 send_gdb "info break\n" 
-gdb_expect_list "breakpoint info" "$gdb_prompt$" {
+gdb_expect_list "breakpoint info" "$gdb_prompt$" [concat {
     "\r\n\032\032post-prompt\r\n"
-    "Num     Type           Disp Enb Address    +What\r\n"
-    "1       breakpoint     keep y   0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:32\r\n"
-}
+    "Num     Type           Disp Enb Address    +What\r\n" } [list \
+    "1       breakpoint     keep y   0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:$main_line\r\n"]]
 
 
 #
@@ -118,18 +115,18 @@ gdb_expect_list "breakpoint info" "$gdb_prompt$" {
 #
 #exp_internal 1
 send_gdb "run\n"
-gdb_expect_list "run until main breakpoint" "$gdb_prompt$" {
+gdb_expect_list "run until main breakpoint" "$gdb_prompt$" [concat {
     "\r\n\032\032post-prompt\r\n"
     "Starting program: .*annota3(|\.exe) \r\n"
     "\r\n\032\032starting\r\n"
     "\r\n\032\032breakpoint 1\r\n"
     "\r\n"
     "Breakpoint 1, "
-    "\r\n\032\032frame-begin 0 0x\[0-9a-z\]+\r\n"
-    "main \\(\\) at .*annota3.c:32\r\n"
-    "\r\n\032\032source.*annota3.c:32:.*:beg:0x\[0-9a-z\]+\r\n"
+    "\r\n\032\032frame-begin 0 0x\[0-9a-z\]+\r\n" } [list \
+    "main \\(\\) at .*annota3.c:$main_line\r\n"] [list \
+    "\r\n\032\032source.*annota3.c:$main_line:.*:beg:0x\[0-9a-z\]+\r\n"] {
     "\r\n\032\032stopped\r\n"
-}
+}]
 #exp_internal 0
 #exit 0
 
@@ -270,10 +267,9 @@ gdb_expect_list "delete bp 3" "$gdb_prompt$" {
 # to test the annotate output for the display command.
 #
 send_gdb "break main\n"
-gdb_expect_list "break at 28" "$gdb_prompt$" {
-    "\r\n\032\032post-prompt\r\n"
-    "Breakpoint 4 at 0x\[0-9a-z\]+: file .*annota3.c, line 32.\r\n"
-}
+gdb_expect_list "break at main" "$gdb_prompt$" [concat {
+    "\r\n\032\032post-prompt\r\n" } [list \
+    "Breakpoint 4 at 0x\[0-9a-z\]+: file .*annota3.c, line $main_line.\r\n"]]
 
 #
 # display the value
@@ -309,11 +305,13 @@ gdb_expect {
 # NOTE: breakpoints-invalid annotations have been removed from
 # level 3 but keep these tests for continuity and comparison
 # with annota1.exp.
-send_gdb "break 46\n"
-gdb_expect_list  "break at 46" "$gdb_prompt$" {
-    "\r\n\032\032post-prompt\r\n"
-    "Breakpoint 5 at 0x\[0-9a-z\]+: file .*annota3.c, line 46.\r\n"
-}
+
+set value_inc_line [gdb_get_line_number "increment value"]
+
+send_gdb "break $value_inc_line\n"
+gdb_expect_list  "break at value++" "$gdb_prompt$" [concat {
+    "\r\n\032\032post-prompt\r\n" } [list \
+    "Breakpoint 5 at 0x\[0-9a-z\]+: file .*annota3.c, line $value_inc_line.\r\n"]]
 
 send_gdb "ignore 5 4\n"
 gdb_expect_list "ignore 5 4" "$gdb_prompt$" {
@@ -323,17 +321,17 @@ gdb_expect_list "ignore 5 4" "$gdb_prompt$" {
 }
 
 send_gdb "continue\n"
-gdb_expect_list "annotate ignore count change" "$gdb_prompt$" {
+gdb_expect_list "annotate ignore count change" "$gdb_prompt$" [concat {
     "\r\n\032\032post-prompt\r\n"
     "\r\n\032\032breakpoint 5\r\n"
     "\r\n"
     "Breakpoint 5, "
-    "\r\n\032\032frame-begin 0 0x\[0-9a-z\]+\r\n"
-    "main \\(\\) at .*annota3.c:46\r\n"
-    "\r\n\032\032source .*annota3.c:46:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
+    "\r\n\032\032frame-begin 0 0x\[0-9a-z\]+\r\n" } [list \
+    "main \\(\\) at .*annota3.c:$value_inc_line\r\n"] [list \
+    "\r\n\032\032source .*annota3.c:$value_inc_line:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"] {
     "1: value = 11\r\n"
     "\r\n\032\032stopped\r\n"
-}
+}]
 
 # check that ignore command is working, or the above can provide
 # misleading assurance ...
@@ -347,14 +345,16 @@ gdb_expect_list "next to exit loop" "$gdb_prompt$"  {
     "\r\n\032\032stopped\r\n"
 }
 
+set after_loop_line [gdb_get_line_number "after loop"]
+
 send_gdb "next\n"
-gdb_expect_list "breakpoint ignore count" "$gdb_prompt$" {
+gdb_expect_list "breakpoint ignore count" "$gdb_prompt$" [concat {
     "\r\n\032\032post-prompt\r\n"
-    "\r\n\032\032starting\r\n"
-    "\r\n\032\032source.*annota3.c:49:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"
+    "\r\n\032\032starting\r\n" } [list \
+    "\r\n\032\032source.*annota3.c:$after_loop_line:\[0-9\]+:beg:0x\[0-9a-z\]+\r\n"] {
     "1: value = 12\r\n"
     "\r\n\032\032stopped\r\n"
-}
+}]
 
 # Get the inferior's PID for later.
 


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: Testsuite regression for annota1.exp and annota3.exp  [Re: [PATCH] [SH] ... can do this signal stuff!]
  2012-02-28 19:42   ` Thomas Schwinge
@ 2012-02-28 19:43     ` Jan Kratochvil
  2012-02-28 23:27       ` Thomas Schwinge
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2012-02-28 19:43 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gdb-patches, Kevin Buettner

On Tue, 28 Feb 2012 20:08:30 +0100, Thomas Schwinge wrote:
> 142db50201b1b1c69ebdc2dcdb1181cde1db3b08 I got the idea of using [concat
> ...] for building gdb_expect_list's third list argument -- it needs to
> expand $main_line, etc.  Any better suggestions (I obviously don't have a
> lot of TCL and/or GDB testcase writing experience), or is this
> acceptable?

I find it OK.

Please edit in your patch:
> +    "Breakpoint.*at.* file .*$srcfile, line $main_line\." \
->
  +    "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \

(as \. is just TCL character . and regex then just gets ., not \.)


I would just write stupid:

gdb_expect_list "break at main" "$gdb_prompt$" [list	\
    "\r\n\032\032post-prompt\r\n"			\
    "Breakpoint 4 at 0x\[0-9a-z\]+: file .*annota3.c, line $main_line.\r\n"]

But fine with me with your / Tom's solution avoiding those backslashes.


Thanks,
Jan


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

* Re: Testsuite regression for annota1.exp and annota3.exp  [Re: [PATCH] [SH] ... can do this signal stuff!]
  2012-02-28 19:43     ` Jan Kratochvil
@ 2012-02-28 23:27       ` Thomas Schwinge
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Schwinge @ 2012-02-28 23:27 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches, Kevin Buettner

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

Hi!

On Tue, 28 Feb 2012 20:41:37 +0100, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> On Tue, 28 Feb 2012 20:08:30 +0100, Thomas Schwinge wrote:
> > 142db50201b1b1c69ebdc2dcdb1181cde1db3b08 I got the idea of using [concat
> > ...] for building gdb_expect_list's third list argument -- it needs to
> > expand $main_line, etc.  Any better suggestions (I obviously don't have a
> > lot of TCL and/or GDB testcase writing experience), or is this
> > acceptable?
> 
> I find it OK.

Thanks for reviewing this quickly.

> Please edit in your patch:
> > +    "Breakpoint.*at.* file .*$srcfile, line $main_line\." \
> ->
>   +    "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \
> 
> (as \. is just TCL character . and regex then just gets ., not \.)

Makes sense; re-tested and then committed with that change.  There are,
of course, other similar inaccuracies, such as an unquoted dot after
expanding $srcfile in the line that you quoted above, but that's a
separate cleanup project.


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

end of thread, other threads:[~2012-02-28 22:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 10:03 [PATCH] [SH] ... can do this signal stuff! Thomas Schwinge
2012-02-28 13:43 ` Pedro Alves
2012-02-28 16:05 ` Testsuite regression for annota1.exp and annota3.exp [Re: [PATCH] [SH] ... can do this signal stuff!] Jan Kratochvil
2012-02-28 19:42   ` Thomas Schwinge
2012-02-28 19:43     ` Jan Kratochvil
2012-02-28 23:27       ` Thomas Schwinge

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