Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] changes to gdb.gdb to use new gdb.exp
@ 2004-08-31 20:38 Manoj Iyer
  2004-09-01 16:38 ` Michael Chastain
  0 siblings, 1 reply; 5+ messages in thread
From: Manoj Iyer @ 2004-08-31 20:38 UTC (permalink / raw)
  To: gdb-patches; +Cc: mec.gnu

[-- Attachment #1: Type: TEXT/PLAIN, Size: 370 bytes --]


Attached is a patch to testcases under gdb.gdb, modified to use the new
report scheme from gdb.exp.

Ok to commit??

Thanks
-----
Manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[-- Attachment #2: PATCH: testcases under gdb.gdb/ --]
[-- Type: TEXT/PLAIN, Size: 2402 bytes --]

diff -paruN old/src/gdb/testsuite/gdb.gdb/complaints.exp new/src/gdb/testsuite/gdb.gdb/complaints.exp
--- old/src/gdb/testsuite/gdb.gdb/complaints.exp	2004-08-28 18:55:48.000000000 -0500
+++ new/src/gdb/testsuite/gdb.gdb/complaints.exp	2004-08-31 14:56:21.000000000 -0500
@@ -55,6 +55,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lindex $result 1] == "nodebug"} then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main
diff -paruN old/src/gdb/testsuite/gdb.gdb/observer.exp new/src/gdb/testsuite/gdb.gdb/observer.exp
--- old/src/gdb/testsuite/gdb.gdb/observer.exp	2004-08-28 18:55:48.000000000 -0500
+++ new/src/gdb/testsuite/gdb.gdb/observer.exp	2004-08-31 14:57:34.000000000 -0500
@@ -53,6 +53,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lindex $result 1] == "nodebug"} then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main
diff -paruN old/src/gdb/testsuite/gdb.gdb/selftest.exp new/src/gdb/testsuite/gdb.gdb/selftest.exp
--- old/src/gdb/testsuite/gdb.gdb/selftest.exp	2004-08-28 18:55:48.000000000 -0500
+++ new/src/gdb/testsuite/gdb.gdb/selftest.exp	2004-08-31 14:58:20.000000000 -0500
@@ -247,6 +247,11 @@ proc test_with_self { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lindex $result 1] == "nodebug"} then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # disassemble yourself
diff -paruN old/src/gdb/testsuite/gdb.gdb/xfullpath.exp new/src/gdb/testsuite/gdb.gdb/xfullpath.exp
--- old/src/gdb/testsuite/gdb.gdb/xfullpath.exp	2004-08-28 18:55:48.000000000 -0500
+++ new/src/gdb/testsuite/gdb.gdb/xfullpath.exp	2004-08-31 14:58:46.000000000 -0500
@@ -54,6 +54,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lindex $result 1] == "nodebug"} then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main

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

* Re: [RFC] changes to gdb.gdb to use new gdb.exp
  2004-08-31 20:38 [RFC] changes to gdb.gdb to use new gdb.exp Manoj Iyer
@ 2004-09-01 16:38 ` Michael Chastain
  2004-09-01 17:44   ` Manoj Iyer
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Chastain @ 2004-09-01 16:38 UTC (permalink / raw)
  To: manjo, gdb-patches

Hi Manoj,

Three things:

. Use "lsearch" rather than "lindex".  The spec for gdb_file_cmd says
  that it can return several words after the MESSAGE.  So something
  like:

    if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 }

  That way, the caller will keep working after gdb_file_cmd adds more words.

. Include a ChangeLog entry with the patch.

. Say what system you tested the patch on, and how you tested it.

Michael


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

* Re: [RFC] changes to gdb.gdb to use new gdb.exp
  2004-09-01 16:38 ` Michael Chastain
@ 2004-09-01 17:44   ` Manoj Iyer
  2004-09-01 19:38     ` Michael Chastain
  0 siblings, 1 reply; 5+ messages in thread
From: Manoj Iyer @ 2004-09-01 17:44 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 963 bytes --]


Michael,

Attached is a patch with changes, I tested this patch on X86 (debian
sarge) and PowerPC 64bit (SLES 9). Attached is a sample gdb.log from my
PowerPC testing.

this is ok to apply?

Thanks a ton
-----
Manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On Wed, 1 Sep 2004, Michael Chastain wrote:

> Hi Manoj,
>
> Three things:
>
> . Use "lsearch" rather than "lindex".  The spec for gdb_file_cmd says
>   that it can return several words after the MESSAGE.  So something
>   like:
>
>     if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 }
>
>   That way, the caller will keep working after gdb_file_cmd adds more words.
>
> . Include a ChangeLog entry with the patch.
>
> . Say what system you tested the patch on, and how you tested it.
>
> Michael
>

[-- Attachment #2: PATCH for gdb.gdb testcases --]
[-- Type: TEXT/PLAIN, Size: 3102 bytes --]

2004-09-01  Manoj Iyer  <manjo@austin.ibm.com

	* gdb.gdb/complaints.exp (setup_test): use new gdb.exp functionality 
	to check for nodebug in executable.
	* gdb.gdb/observer.exp (setup_test): use new gdb.exp functionality 
	to check for nodebug in executable.
	* gdb.gdb/selftest.exp (test_with_self): use new gdb.exp functionality 
	to check for nodebug in executable.
	* gdb.gdb/xfullpath.exp (setup_test): use new gdb.exp functionality 
	to check for nodebug in executable.

--------------------------------------------------------------------------------
diff -paurN ./old/src/gdb/testsuite/gdb.gdb/complaints.exp ./new/src/gdb/testsuite/gdb.gdb/complaints.exp
--- ./old/src/gdb/testsuite/gdb.gdb/complaints.exp	2004-08-28 18:55:48.000000000 -0500
+++ ./new/src/gdb/testsuite/gdb.gdb/complaints.exp	2004-09-01 11:53:45.000000000 -0500
@@ -55,6 +55,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 } then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main
diff -paurN ./old/src/gdb/testsuite/gdb.gdb/observer.exp ./new/src/gdb/testsuite/gdb.gdb/observer.exp
--- ./old/src/gdb/testsuite/gdb.gdb/observer.exp	2004-08-28 18:55:48.000000000 -0500
+++ ./new/src/gdb/testsuite/gdb.gdb/observer.exp	2004-09-01 11:54:20.000000000 -0500
@@ -53,6 +53,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 } then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main
diff -paurN ./old/src/gdb/testsuite/gdb.gdb/selftest.exp ./new/src/gdb/testsuite/gdb.gdb/selftest.exp
--- ./old/src/gdb/testsuite/gdb.gdb/selftest.exp	2004-08-28 18:55:48.000000000 -0500
+++ ./new/src/gdb/testsuite/gdb.gdb/selftest.exp	2004-09-01 11:54:53.000000000 -0500
@@ -247,6 +247,11 @@ proc test_with_self { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 } then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # disassemble yourself
diff -paurN ./old/src/gdb/testsuite/gdb.gdb/xfullpath.exp ./new/src/gdb/testsuite/gdb.gdb/xfullpath.exp
--- ./old/src/gdb/testsuite/gdb.gdb/xfullpath.exp	2004-08-28 18:55:48.000000000 -0500
+++ ./new/src/gdb/testsuite/gdb.gdb/xfullpath.exp	2004-09-01 11:55:17.000000000 -0500
@@ -54,6 +54,11 @@ proc setup_test { executable } {
 
     if { [lindex $result 0] != "" } then {
 	return -1
+    } else {
+        if { [lsearch -exact [lrange $result 1 end] "nodebug"] >= 0 } then {
+            untested "No debug information, skipping testcase."
+            return -1
+        }
     }
 
     # Set a breakpoint at main

[-- Attachment #3: gdb.log (sample) --]
[-- Type: TEXT/PLAIN, Size: 1793 bytes --]

Test Run By manjo on Wed Sep  1 06:50:51 2004
Native configuration is powerpc64-unknown-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix/-m32

Running target unix/-m32
Using ./dejagnu/baseboards/unix.exp as board description file for target.
Using ./dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.gdb/xfullpath.exp ...
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux".
(gdb) set height 0
(gdb) set width 0
(gdb) file xgdb
Reading symbols from xgdb...(no debugging symbols found)...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) UNTESTED: gdb.gdb/xfullpath.exp: No debug information, skipping testcase.
WARNING: Couldn't test self
testcase ./gdb.gdb/xfullpath.exp completed in 0 seconds

		=== gdb Summary ===

# of untested testcases		1
Executing on host: /usr/bin/gdb -nw --command gdb_cmd    (timeout = 300)
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux".
/usr/bin/gdb version  6.1 -nx

runtest completed at Wed Sep  1 06:50:51 2004

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

* Re: [RFC] changes to gdb.gdb to use new gdb.exp
  2004-09-01 17:44   ` Manoj Iyer
@ 2004-09-01 19:38     ` Michael Chastain
  2004-09-02  1:27       ` [COMMIT] " Manoj Iyer
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Chastain @ 2004-09-01 19:38 UTC (permalink / raw)
  To: manjo, gdb-patches

All right.  This patch is approved, after some formatting changes to
the ChangeLog entry.

Your entry:

  2004-09-01  Manoj Iyer  <manjo@austin.ibm.com

	  * gdb.gdb/complaints.exp (setup_test): use new gdb.exp functionality 
	  to check for nodebug in executable.
	  * gdb.gdb/observer.exp (setup_test): use new gdb.exp functionality 
	  to check for nodebug in executable.
	  * gdb.gdb/selftest.exp (test_with_self): use new gdb.exp functionality 
	  to check for nodebug in executable.
	  * gdb.gdb/xfullpath.exp (setup_test): use new gdb.exp functionality 
	  to check for nodebug in executable.

Change it to:

  2004-09-01  Manoj Iyer  <manjo@austin.ibm.com>

	  * gdb.gdb/complaints.exp (setup_test): Use new gdb.exp functionality 
	  to check for nodebug in executable.
	  * gdb.gdb/observer.exp (setup_test): Likewise.
	  * gdb.gdb/selftest.exp (test_with_self): Likewise.
	  * gdb.gdb/xfullpath.exp (setup_test): Likewise.

. Typo on email address.
. Capitalize the sentence "Use new gdb.exp functionality ..."
. Use "Likewise" to make it easier to read.

We're picky about ChangeLog formatting because some people have emacs
macros and stuff that scan ChangeLog files.

With that ChangeLog entry, your patch is approved.  Thanks!

Michael


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

* [COMMIT] changes to gdb.gdb to use new gdb.exp
  2004-09-01 19:38     ` Michael Chastain
@ 2004-09-02  1:27       ` Manoj Iyer
  0 siblings, 0 replies; 5+ messages in thread
From: Manoj Iyer @ 2004-09-02  1:27 UTC (permalink / raw)
  To: Michael Chastain; +Cc: gdb-patches


Commited with changes.

-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum                                                          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On Wed, 1 Sep 2004, Michael Chastain wrote:

> All right.  This patch is approved, after some formatting changes to
> the ChangeLog entry.
>
> Your entry:
>
>   2004-09-01  Manoj Iyer  <manjo@austin.ibm.com
>
> 	  * gdb.gdb/complaints.exp (setup_test): use new gdb.exp functionality
> 	  to check for nodebug in executable.
> 	  * gdb.gdb/observer.exp (setup_test): use new gdb.exp functionality
> 	  to check for nodebug in executable.
> 	  * gdb.gdb/selftest.exp (test_with_self): use new gdb.exp functionality
> 	  to check for nodebug in executable.
> 	  * gdb.gdb/xfullpath.exp (setup_test): use new gdb.exp functionality
> 	  to check for nodebug in executable.
>
> Change it to:
>
>   2004-09-01  Manoj Iyer  <manjo@austin.ibm.com>
>
> 	  * gdb.gdb/complaints.exp (setup_test): Use new gdb.exp functionality
> 	  to check for nodebug in executable.
> 	  * gdb.gdb/observer.exp (setup_test): Likewise.
> 	  * gdb.gdb/selftest.exp (test_with_self): Likewise.
> 	  * gdb.gdb/xfullpath.exp (setup_test): Likewise.
>
> . Typo on email address.
> . Capitalize the sentence "Use new gdb.exp functionality ..."
> . Use "Likewise" to make it easier to read.
>
> We're picky about ChangeLog formatting because some people have emacs
> macros and stuff that scan ChangeLog files.
>
> With that ChangeLog entry, your patch is approved.  Thanks!
>
> Michael
>


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

end of thread, other threads:[~2004-09-02  1:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 20:38 [RFC] changes to gdb.gdb to use new gdb.exp Manoj Iyer
2004-09-01 16:38 ` Michael Chastain
2004-09-01 17:44   ` Manoj Iyer
2004-09-01 19:38     ` Michael Chastain
2004-09-02  1:27       ` [COMMIT] " Manoj Iyer

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