Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Chastain <mec.gnu@mindspring.com>
To: manjo@austin.ibm.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] GDB testsuite patch. (revised version)
Date: Fri, 27 Aug 2004 16:01:00 -0000	[thread overview]
Message-ID: <412F5AC5.nail34Y11MNPE@mindspring.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0408270947150.30583@lazy>

Manoj Iyer <manjo@austin.ibm.com> wrote:
> The problem is that there are other tests that run just fine even if no
> debugging symbols are found. This means if you change gdb_load to check if
> no debugging symbols are found and return a -ive value this might harm the
> other testcase.

Right.  You tried that, and Daniel pointed out that it was wrong,
and I agreed.

> I will be happy to submit that patch, and see if you like my idea.

It's such a good idea, I already started implementing something
like that.

Here is the new header for gdb_file_cmd:

  # Load a file into the debugger.
  # The return value is a list with the following information:
  #
  #  { message word ... }
  #
  # MESSAGE has the following values:
  #
  #   ""     file was loaded successfully
  #   "..."  file was not loaded successfully.
  #          An error or perror has been generated with MESSAGE.
  #
  # If the MESSAGE is "", then there is an optional set of words.
  # The words may be:
  #
  #  nodebug  this file does not contain debug information
  #
  # TODO: gdb.base/sepdebug.exp and gdb.stabs/weird.exp might
  # be able to use this if they can get more information
  # in the return value.

TCL is all about lists and strings, and it makes life a lot
easier to return a nice list of strings.

If this still looks like a good idea in a few hours, and I commit it,
then you can write gdb.gdb/*.exp like this:

  set oldtimeout $timeout
  set timeout 600
  verbose "Timeout is now $timeout seconds" 2

  set status [gdb_load $executable]

  set timeout $oldtimeout
  verbose "Timeout is now $timeout seconds" 2

  if { [lindex $status 0] != "" } then {
    # Error has already been printed.
    return -1
  }

  if { [lsearch -exact [lreplace $status 0 0] "nodebug"] } then {
    untested "no debugging information for $executable"
    return -1
  }

Or something like that.

How does that look?


  reply	other threads:[~2004-08-27 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.58.0408191014360.21237@lazy>
     [not found] ` <41251A45.nail58D215HD7@mindspring.com>
     [not found]   ` <Pine.LNX.4.58.0408191637370.21237@lazy>
     [not found]     ` <4125BB8B.nailJWP1FZGHJ@mindspring.com>
     [not found]       ` <Pine.LNX.4.58.0408242319060.7065@lazy>
     [not found]         ` <20040825124945.GA25217@nevyn.them.org>
     [not found]           ` <412C98BD.nail10P1YTPHK@mindspring.com>
2004-08-27  0:00             ` Manoj Iyer
2004-08-27 14:48               ` Michael Chastain
2004-08-27 15:28                 ` Manoj Iyer
2004-08-27 16:01                   ` Michael Chastain [this message]
2004-08-28  5:50                     ` Manoj Iyer
2004-08-28  5:48                   ` 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=412F5AC5.nail34Y11MNPE@mindspring.com \
    --to=mec.gnu@mindspring.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=manjo@austin.ibm.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