This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] GDB testsuite patch.


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: gdb.testsuite.patch
Description: GDB testsuite patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]