This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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
 > 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]