Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <chastain@cygnus.com>
To: jimb@cygnus.com, Stephane.Carrez@worldnet.fr
Cc: gdb-patches@sources.redhat.com, keiths@cygnus.com, msnyder@cygnus.com
Subject: Re: [RFA]: Fix gdb.base/callfwmall.exp for platforms without malloc
Date: Tue, 22 May 2001 09:16:00 -0000	[thread overview]
Message-ID: <200105221621.JAA12031@bosch.cygnus.com> (raw)

As other people have pointed out, gdb needs a way to allocate memory in
the inferior.  The chosen way is: call "malloc".

If the inferior program truly has no function named "malloc",
then gdb will produce this error:

  evaluation of this expression requires the program to have a function "malloc"

If the inferior program has a function named "malloc", then gdb will
call it.  Sometimes this is non-trivial.  In particular, on hppa*-*-hpux*
targets, the inferior program uses a pair of function stubs for each
call to a shared library function.  These stubs do some bookkeeping
for the address space change from the program text to the shared library
text.

Ordinarily the inferior program sets up these stubs and gdb piggybacks on
that work.  But if a function is available in a shared library, but the
inferior does not call it, then gdb has to do additional work to find the
right place to call.  There are actually different code paths for "call an
inferior function which the inferior itself calls" and "call an inferior
function which the inferior itself does not call".  This is a feature,
and it needs testing.

Also, callfwmall.exp has 11 FAILs on native Red Hat Linux 6.2:

  FAIL: gdb.base/callfwmall.exp: p t_float_values(3.14159,-2.3765)
  FAIL: gdb.base/callfwmall.exp: p t_float_values(float_val1,float_val2)
  FAIL: gdb.base/callfwmall.exp: p t_float_values(3.14159,float_val2)
  FAIL: gdb.base/callfwmall.exp: p t_float_values(float_val1,-2.3765)
  FAIL: gdb.base/callfwmall.exp: p t_float_values2(3.14159,float_val2)
  FAIL: gdb.base/callfwmall.exp: p t_double_values(45.654,-67.66)
  FAIL: gdb.base/callfwmall.exp: p t_double_values(double_val1,double_val2)
  FAIL: gdb.base/callfwmall.exp: p t_double_values(45.654,double_val2)
  FAIL: gdb.base/callfwmall.exp: p t_double_values(double_val1,-67.66)
  FAIL: gdb.base/callfwmall.exp: call inferior func with struct - returns float
  FAIL: gdb.base/callfwmall.exp: call inferior func with struct - returns double

The same tests in callfuncs.exp PASS.

Michael


             reply	other threads:[~2001-05-22  9:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-22  9:16 Michael Elizabeth Chastain [this message]
     [not found] <3B07B042.6BAD93A0@worldnet.fr>
2001-05-21 10:43 ` Michael Snyder
2001-05-21 10:56   ` Keith Seitz
2001-05-21 11:10     ` Michael Snyder
2001-05-21 14:20       ` Stephane Carrez
2001-05-21 14:58         ` Michael Snyder
2001-05-21 22:45         ` Jim Blandy
2001-06-06  9:07         ` Andrew Cagney

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=200105221621.JAA12031@bosch.cygnus.com \
    --to=chastain@cygnus.com \
    --cc=Stephane.Carrez@worldnet.fr \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@cygnus.com \
    --cc=keiths@cygnus.com \
    --cc=msnyder@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