From: Manoj Iyer <manjo@austin.ibm.com>
To: Michael Chastain <mec.gnu@mindspring.com>
Cc: gdb@sources.redhat.com
Subject: [RFC] GDB testsuite patch.
Date: Wed, 25 Aug 2004 05:03:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.58.0408242319060.7065@lazy> (raw)
In-Reply-To: <4125BB8B.nailJWP1FZGHJ@mindspring.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4264 bytes --]
Hi all,
Here is a patch to gdb/lib/gdb.exp, this patch handles the case when the
GDB that is tested is stripped and has no debugging information.
I have created this patch according to Michael's recomendations (see
below).
I tested this with gdb.gdb/complaints.exp and below are the new output.
New output on screen
----------------
======================= start paste ========================
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/complaints.exp ...
=== gdb Summary ===
# of untested testcases 1
/usr/bin/gdb version 6.1 -nx
0
======================= end paste ======================
New output to gdb.log
-----------------
================== start paste ========================
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/complaints.exp ...
GNU gdb 6.1^M
Copyright 2004 Free Software Foundation, Inc.^M
GDB is free software, covered by the GNU General Public License, and you
are^M
welcome to change it and/or distribute copies of it under certain
conditions.^M
Type "show copying" to see the conditions.^M
There is absolutely no warranty for GDB. Type "show warranty" for
details.^M
This GDB was configured as "ppc-suse-linux".^M
(gdb) set height 0^M
(gdb) set width 0^M
(gdb) file xgdb^M
Reading symbols from xgdb...(no debugging symbols found)...done.^M
Using host libthread_db library "/lib/tls/libthread_db.so.1".^M
(gdb) UNTESTED: gdb.gdb/complaints.exp: skip tests no debugging
information found.
testcase ./gdb.gdb/complaints.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^M
Copyright 2004 Free Software Foundation, Inc.^M
GDB is free software, covered by the GNU General Public License, and you
are^M
welcome to change it and/or distribute copies of it under certain
conditions.^M
Type "show copying" to see the conditions.^M
There is absolutely no warranty for GDB. Type "show warranty" for
details.^M
This GDB was configured as "ppc-suse-linux".^M
/usr/bin/gdb version 6.1 -nx
runtest completed at Tue Aug 24 18:23:46 2004
========================= end paste =================================
-----
Manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cognito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On Fri, 20 Aug 2004, Michael Chastain wrote:
> Manoj Iyer <manjo@austin.ibm.com> wrote:
> > Will get back to you on that.
>
> Okay. I can't accept any patches larger than trivial without
> a copyright assignment, though.
>
> > The reason is, the GDB that is shipped in a distro is stripped, and I used
> > the --tool_exec= option to use this GDB that is installed in /usr/bin.
>
> Ah, that is a valid use case for testing a stripped gdb.
>
> First it would help to file a PR to track this issue.
>
> It would be nice to have some common code for this.
>
> Three of the four test scripts in gdb.gdb have their own 'setup_test',
> and the fourth script has another copy of the same code. I would like
> to see the common code factored into one place, lib/self-support.exp.
>
> Then setup_test calls gdb_load which calls gdb_file_cmd. You could get
> into gdb_file_cmd and detect "(no debugging symbols found)" and add a
> channel to return that information. Or, in setup_test, you could
> do something right after the call to gdb_load to check for debugging
> symbols.
>
> If there are no debugging symbols, then I think that the test script
> should return one UNRESOLVED result and not continue testing.
>
> I'm not sure UNRESOLVED is the right result. Perhaps UNTESTED would
> be better. But not UNSUPPORTED -- UNSUPPORTED means that a feature
> is missing in the system under test.
>
> Michael
>
[-- Attachment #2: GDB testsuite patch --]
[-- Type: TEXT/PLAIN, Size: 599 bytes --]
diff -Naur ./old/src/gdb/testsuite/lib/gdb.exp ./new/src/gdb/testsuite/lib/gdb.exp
--- ./old/src/gdb/testsuite/lib/gdb.exp 2004-08-24 18:16:00.892190792 -0500
+++ ./new/src/gdb/testsuite/lib/gdb.exp 2004-08-24 18:16:49.542249312 -0500
@@ -975,6 +975,10 @@
send_gdb "file $arg\n"
gdb_expect 120 {
+ -re "Reading symbols from.*no debugging symbols found.* $" {
+ untested "skip tests no debugging information found."
+ return -1
+ }
-re "Reading symbols from.*done.*$gdb_prompt $" {
verbose "\t\tLoaded $arg into the $GDB"
return 0
next prev parent reply other threads:[~2004-08-25 5:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 18:10 gdb.gdb/ testcase issues Manoj Iyer
2004-08-19 21:23 ` Michael Chastain
2004-08-19 22:16 ` Manoj Iyer
2004-08-20 8:51 ` Michael Chastain
2004-08-25 5:03 ` Manoj Iyer [this message]
2004-08-25 12:49 ` [RFC] GDB testsuite patch Daniel Jacobowitz
2004-08-25 13:48 ` Michael Chastain
2004-08-25 13:44 ` Michael Chastain
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.0408242319060.7065@lazy \
--to=manjo@austin.ibm.com \
--cc=gdb@sources.redhat.com \
--cc=mec.gnu@mindspring.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).