public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [Fwd: How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?]
@ 2001-02-17 10:51 Andrew Cagney
  0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2001-02-17 10:51 UTC (permalink / raw)
  To: GDB Discussion

Given the recent discussion, the attatched is very relevant.
	Andrew


To : Jim Blandy <jimb at cygnus dot com>
Subject : Re: How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?
From : Jimmy Guo <guo at cup dot hp dot com>
Date : Tue, 25 Apr 2000 11:31:27 -0700 (PDT)
Cc : gdb at sourceware dot cygnus dot com

Here is the test creation comment from an HP engineer back in 3/97:

     This is essentially a carbon-copy of the callfuncs test, except
     that the inferior being tested doesn't call malloc.  (On HPUX, at
     least, gdb calls malloc in the inferior's space before evaluating
     inferior functions that take pointers.  The path that gdb follows
     to setup the malloc call varies depending upon whether the inferior
     itself calls malloc.  It seems there's a bug currently in HPUX,
     both for 10.20 and 10.30, in that the very first such malloc call
     fails. Needs investigating.)

I will let someone at HP WDB team who is more familiar with this topic
jump in and share thoughts ...

- Jimmy Guo, guo@cup.hp.com

>The stated point of callfwmall.exp is to try debugging programs which
>don't explicitly use `malloc'.  However, some of the tests have GDB
>evaluate expressions containing string literals; GDB implements string
>literals by calling malloc to reserve some space in the inferior, and
>then copying the literal text into that space.
>
>It seems to me that those tests can only pass if malloc has somehow
>been linked into the inferior, but I don't see any reason to assume
>this must necessarily happen, since callfwmall.c makes no explicit
>calls to malloc, or indeed to any library routines whatsoever.
>
>So aren't these tests fundamentally misconceived?  Why are they
>supposed to work?  How have people dealt with them in the past?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-17 10:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-17 10:51 [Fwd: How is gdb/testsuite/gdb.base/callfwmall.exp supposed to work?] Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).