This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] GDB testsuite patch. (revised version)
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: manjo at austin dot ibm dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 27 Aug 2004 10:48:26 -0400
- Subject: Re: [RFC] GDB testsuite patch. (revised version)
- References: <Pine.LNX.4.58.0408191014360.21237@lazy><41251A45.nail58D215HD7@mindspring.com><Pine.LNX.4.58.0408191637370.21237@lazy><4125BB8B.nailJWP1FZGHJ@mindspring.com><Pine.LNX.4.58.0408242319060.7065@lazy><20040825124945.GA25217@nevyn.them.org><412C98BD.nail10P1YTPHK@mindspring.com><Pine.LNX.4.58.0408261009010.27764@lazy>
Ouch, copying the whole text of gdb_file_cmd is no good, either!
That much duplicate code is bad.
Here is my plan.
gdb_file_cmd has a return value. None of the callers of gdb_file_cmd
uses the return vale, except for gdb_load, which simply returns the same
value.
There are about 300 callers of gdb_load. Most of them don't use the
return value either. The exceptions are:
gdb.base/remote.exp
gdb.base/sepdebug.exp
# does not use the return value but it wants to
gdb.gdb/complaints.exp
gdb.gdb/observer.exp
gdb.gdb/selftest.exp
gdb.gdb/xfullpath.exp
gdb.stabs/weird.exp
# does not use the return value but it wants to
lib/gdb.exp:
proc gdb_run_cmd
So, I will do some infrastructure work: I will make gdb_load return
a better return value that includes more information, like a list
with more status information:
success indicator
whatever sepdebug.exp is looking for
whatever weird.exp is looking for
indicator of whether debug symbols found or not
While I am in there, I will see if I can get back any commonality
with mi_gdb_file_cmd. But that's optional.
I expect to commit the new gdb_file_cmd sometime on Saturday. After
that, it will be easy for you to change gdb.gdb/*.exp to just use the
new information in the return value from gdb_load.
Michael
2004-08-26 Manoj Iyer <manjo@austin.ibm.com
* lib/gdb.exp (gdb_check_debuginfo): New procedure
* gdb.gdb/complaints.exp: check if gdb has debug information.
* gdb.gdb/observer.exp: check if gdb has debug information.
* gdb.gdb/selftest.exp: check if gdb has debug information.
* gdb.gdb/xfullpath.exp: check if gdb has debug information.