From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: Michael Snyder , shebs@apple.com Cc: Elena Zannoni , Kevin Buettner , Fernando Nasser , Keith Seitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp Date: Wed, 14 Feb 2001 14:49:00 -0000 Message-id: <14987.2963.271054.951247@kwikemart.cygnus.com> References: <3A8ABA01.C25B0FD2@cygnus.com> <3A8AEFEA.A2E2A61E@cygnus.com> <1010214211043.ZM6538@ocotillo.lan> <14986.63606.73968.332165@kwikemart.cygnus.com> <3A8B07CA.382E04F8@cygnus.com> X-SW-Source: 2001-02/msg00234.html Michael Snyder writes: > Elena Zannoni wrote: > > > > Kevin Buettner writes: > > > On Feb 14, 12:51pm, Michael Snyder wrote: > > > > > > > Fernando Nasser wrote: > > > > > > > > > > Sounds reasonable. Check it in (assuming you have already added yourself to the write after approval list). > > > > > > > > Hold on -- aren't you defeating the purpose of this test? > > > > The test was added by HP precisely because these calls > > > > fail when malloc isn't included in the target program. > > > > The test is a duplicate of callfuncs.exp, except that it > > > > doesn't link malloc. > > > > > > I sort of agree with Michael. (I almost posted a similar remark.) > > > > > > > Yes, in callfwmall.c there is this comment: > > /* Support program for testing gdb's ability to call functions > > in an inferior which doesn't itself call malloc, pass appropriate > > arguments to those functions, and get the returned result. */ > > > > > OTOH, given that GDB's mechanism for performing these tests is to > > > use malloc(), I'm not sure how these are supposed to succeed. (As > > > someone else pointed out, they do succeed on some platforms because > > > malloc() sneaks into the picture through the dynamic loader.) > > > > > > Does anyone know of any host/target combinations which manage to pass > > > these tests without using malloc()? > > > > HPUX should pass. That's why those tests were added in the first > > place, I think. > > > > > > > > If there are some, or if this is a feature that we expect to work (in > > > the fullness of time), then perhaps the FAILing tests ought to be > > > XFAIL'd. Otherwise, I think Keith's patch is reasonable. > > > > > > > Maybe this file should be moved to the gdb.hp directory. But I think > > there must have been a reason for which it wasn't put there in the > > first place. So I would think it used to pass at some point. > > I don't see anything interesting in the ChangeLog. > > There was no gdb.hp directory at the time. > True, but I remember Stan going through and getting files moved around. Was this file just forgotten? Stan, do you recall anything about this? Elena