[RFC] GDB testsuite patch. (revised version)

Michael Chastain mec.gnu@mindspring.com
Fri Aug 27 14:48:00 GMT 2004


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.



More information about the Gdb-patches mailing list