Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Manoj Iyer <manjo@austin.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] changes to gdb.gdb to use new gdb.exp
Date: Wed, 01 Sep 2004 17:44:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.58.0409011150491.30693@lazy> (raw)
In-Reply-To: <4135FAAA.nail59915B4OV@mindspring.com>

[-- 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

  reply	other threads:[~2004-09-01 17:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 20:38 Manoj Iyer
2004-09-01 16:38 ` Michael Chastain
2004-09-01 17:44   ` Manoj Iyer [this message]
2004-09-01 19:38     ` Michael Chastain
2004-09-02  1:27       ` [COMMIT] " Manoj Iyer

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=Pine.LNX.4.58.0409011150491.30693@lazy \
    --to=manjo@austin.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    /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