Re: [RFA] Assuming malloc exists in callfwmall.exp

Michael Elizabeth Chastain
2001-02-14T16:29:00Z

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
<chastain@redhat.com>
"love without fear"