This is the mail archive of the gdb-patches@sourceware.cygnus.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] rs6000-nat.c fix for large symtabs.


glen mccready wrote:
> 
> >On Fri, Apr 07, 2000 at 02:42:45PM -0700, glen mccready wrote:
> >>
> >>Some processes have more than 64 load segments; in the past gdb
> >>would fail under these circumstances.  This patch should alleviate
> >>that problem by expanding the buffer if the ld_info won't fit.
> >
> >Would it be feasible to do this with malloc/realloc instead of alloca in
> >this case?  Otherwise you could be wasting a lot of stack space.
> 
> I was considering that, but that's why the alloca() and ldi pointer
> are defined within the do-while scope; the space should be recovered
> each time through the loop.

Not thinking of C++?  The alloca() implementations I've seen never free
the stack until the final return.  If you can avoid it please do (the
elimination of alloca from remote.c is on my list of things to do one
day).

Enjoy,
	Andrew

PS: Watch out for the GNU indentation standard.

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