From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Michael Elizabeth Chastain Cc: ac131313@cygnus.com, gdb-patches@sources.redhat.com, keiths@cygnus.com Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp Date: Thu, 15 Feb 2001 07:32:00 -0000 Message-id: <3A8BF606.47DA129A@redhat.com> References: <200102151506.HAA16988@bosch.cygnus.com> X-SW-Source: 2001-02/msg00251.html Michael Elizabeth Chastain wrote: > > So, suppose that next month someone changes call_function_by_hand so > that it always calls value_allocate_space_in_inferior. callfuncs.exp > will not complain at all, but callfwmall.exp will raise a bunch of > FAILs. > Only if GDB does not find a malloc() in there. If malloc() is available, it doesn't matter if if was linked in because of the program or not. In any case, callfuncs.exp already test that case. The other case to be tested is when there isn't a malloc() available at all (that is why the test Keith and you proposed is so nice). But the FAILs are wrong. Not having malloc() available is not GDB's fault and it may be just a limitation of the target environment. In this second case what we have to test (only when malloc is not available) is the GDB's reaction to this situation, i.e., the issue of an appropriate error message. It should not crash, silently return without telling the user, etc. > That's what the test is for. It tests that gdb can do "call foo(10)" > in a program that does not use malloc. callfuncs.exp cannot test that. > If someone has changed it to use malloc() as you said, it should fail. Again, we are looking for an error message here. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9