From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: Kevin Buettner Cc: Elena Zannoni , Michael Snyder , Fernando Nasser , Keith Seitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] Assuming malloc exists in callfwmall.exp Date: Wed, 14 Feb 2001 14:00:00 -0000 Message-id: <14986.65531.377949.750299@kwikemart.cygnus.com> References: <3A8ABA01.C25B0FD2@cygnus.com> <3A8AEFEA.A2E2A61E@cygnus.com> <1010214211043.ZM6538@ocotillo.lan> <14986.63606.73968.332165@kwikemart.cygnus.com> <1010214214059.ZM6607@ocotillo.lan> X-SW-Source: 2001-02/msg00228.html Kevin Buettner writes: > On Feb 14, 4:28pm, Elena Zannoni wrote: > > > > 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. > > Do you have any idea how this functionality is implemented? > > There are a number of platforms which pass these tests, but only > because malloc() is sneaks in because it's required by the dynamic > linker. If HPUX passes for a similar reason, this is cheating. OTOH, > if the HPUX port uses some other mechanism entirely, it might be a > good idea for us to adapt this mechanism so that other targets can > use it too. > I think it looked up the malloc function using some hp linker specific functions. Looking at hppa-tdep.c it seems like the code has changed, so I am not sure anymore. But yes, I think it would fall into the 'cheating' category. Malloc is there. You just don't need to have a call to it in the inferior. > Kevin >