Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <chastain@cygnus.com>
To: chastain@cygnus.com, fnasser@redhat.com
Cc: ac131313@cygnus.com, gdb-patches@sources.redhat.com, keiths@cygnus.com
Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp
Date: Thu, 15 Feb 2001 07:54:00 -0000	[thread overview]
Message-ID: <200102151553.HAA17146@bosch.cygnus.com> (raw)

Hi Fernando,

> The other case to be tested is when there isn't a malloc() available at
> all (that is why the test Keith and you proposed is so nice).  But the
> FAILs are wrong.  Not having malloc() available is not GDB's fault and
> it may be just a limitation of the target environment.

I think there are four use cases.

Use case #1:

  . malloc is available
  . the user types: call abs(-10)
  . gdb expected response: "$1 = 10"

Use case #2:

  . malloc is available
  . the user types: call strlen("foo")
  . gdb expected response: "$1 = 3"

Use case #3:

  . malloc is not available
  . the user types: call abs(-10)
  . gdb expected response: "$1 = 10"

Use case #4:

  . malloc is not available
  . the user types: call strlen("foo")
  . gdb expected responses: either one of
    . "$1 = 3"
    . error: evaluation of this expression requires the program to have a function "malloc"

callfuncs.exp tests #1 and #2.
callfuncs.exp can never test #3 or #4.

callfwmall.exp, as written, tests use case #3 (on some platforms).

callfwmall.exp, as written, has an incorrect test for #4.  It accepts only
the first response, but gdb can produce either response, and the current
gdb produces the second response.

Keith's patch removes use case #4 from the test coverage.

Michael's patch makes callfwmall.exp verify that it gdb+inferior is in the
regime of #3 and #4.  If gdb+inferior is not, then callfwmall.exp returns
UNTESTED.  If gdb+inferior is in that regime (inferior has no malloc),
then it tests #3 only.  I could make it test #4 properly by adding more RE's.

Fernando's proposal is to remove coverage of #3 and #4.

Kevin's evidence is that Linux native, and probably every glibc platform,
never enters the regime of #3 and #4 anyways.

Michael


             reply	other threads:[~2001-02-15  7:54 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-15  7:54 Michael Elizabeth Chastain [this message]
2001-02-15  8:09 ` Fernando Nasser
  -- strict thread matches above, loose matches on Subject: below --
2001-02-16  9:48 Michael Elizabeth Chastain
2001-02-16  8:55 Michael Elizabeth Chastain
2001-02-16  8:41 Michael Elizabeth Chastain
2001-02-15 19:05 Michael Elizabeth Chastain
2001-02-16  8:36 ` Jim Blandy
2001-02-15 12:58 Michael Elizabeth Chastain
2001-02-15 12:56 Michael Elizabeth Chastain
2001-02-16  8:51 ` Jim Blandy
2001-02-15 12:30 Michael Elizabeth Chastain
2001-02-15 12:48 ` Fernando Nasser
2001-02-15 12:16 Michael Elizabeth Chastain
2001-02-15 23:36 ` Eli Zaretskii
2001-02-15 12:08 Michael Elizabeth Chastain
2001-02-15 12:41 ` Fernando Nasser
2001-02-15  9:00 Michael Elizabeth Chastain
2001-02-15 11:53 ` Fernando Nasser
2001-02-15 11:56 ` Jim Blandy
2001-02-15  8:30 Michael Elizabeth Chastain
2001-02-15  8:45 ` Fernando Nasser
2001-02-15  7:09 Michael Elizabeth Chastain
2001-02-15  7:06 Michael Elizabeth Chastain
2001-02-15  7:32 ` Fernando Nasser
2001-02-14 19:27 Michael Elizabeth Chastain
2001-02-15  1:06 ` Fernando Nasser
2001-02-15  1:22   ` Fernando Nasser
2001-02-15  6:54     ` Kevin Buettner
2001-02-14 18:35 Michael Elizabeth Chastain
2001-02-14 16:29 Michael Elizabeth Chastain
2001-02-14 18:17 ` Andrew Cagney
2001-02-14 15:12 Michael Elizabeth Chastain
2001-02-14 14:17 Michael Elizabeth Chastain
2001-02-14 14:37 ` Kevin Buettner
2001-02-14 13:41 Michael Elizabeth Chastain
2001-02-14  9:06 Michael Elizabeth Chastain
2001-02-14  9:07 ` Keith Seitz
2001-02-14  9:11 ` Fernando Nasser
     [not found] <Pine.SOL.3.91.1010214082014.13194C-100000@ryobi.cygnus.com>
2001-02-14  9:02 ` Fernando Nasser
2001-02-14 12:52   ` Michael Snyder
2001-02-14 13:10     ` Kevin Buettner
2001-02-14 13:28       ` Elena Zannoni
2001-02-14 13:41         ` Kevin Buettner
2001-02-14 14:00           ` Elena Zannoni
2001-02-14 20:13           ` Andrew Cagney
2001-02-15  1:14             ` Fernando Nasser
2001-02-15 10:34               ` Andrew Cagney
2001-02-14 14:33         ` Michael Snyder
2001-02-14 14:49           ` Elena Zannoni
2001-02-14 14:34       ` Michael Snyder
2001-02-14 13:12     ` Keith Seitz
2001-02-14 13:20     ` Fernando Nasser
2001-02-14 13:37       ` Stan Shebs
2001-02-14 13:46         ` Fernando Nasser
2001-02-14 14:35         ` Michael Snyder

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=200102151553.HAA17146@bosch.cygnus.com \
    --to=chastain@cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=keiths@cygnus.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