From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Elizabeth Chastain To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp Date: Wed, 14 Feb 2001 16:29:00 -0000 Message-id: <200102150029.QAA30159@bosch.cygnus.com> X-SW-Source: 2001-02/msg00236.html Another hour, another change of mind. The point of callfwmall.exp is to show that gdb can call functions in the inferior even if the inferior does not have "malloc". callfuncs.exp will never be able to do that. So I think the right thing to do in callfwmall.exp is: (1) Test for the presence of malloc the way Keith Seitz is doing (but put the test after runto_main). (2) If malloc is present, disable the test script. (3) If malloc is absent, go ahead and run the whole test script. (4) Those lines like "call foo ("bar")" that do not work without malloc: send_gdb "call foo ("bar")\n" gdb_expect { -re "... works ok" ... { pass ... } -re "unable to call target function 'malloc'" ... { pass ... } default { fail ... } timeout { fail ... (timeout) } In the interim, I'm in favor of Keith's patch (with the test after runto_main). Michael Elizabeth Chastain "love without fear"