This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [RFA] rs6000-nat.c fix for large symtabs.
- To: glen mccready <gkm at cygnus dot com>
- Subject: Re: [RFA] rs6000-nat.c fix for large symtabs.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 10 Apr 2000 02:05:02 +1000
- CC: Chris Faylor <cgf at cygnus dot com>, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200004080037.RAA09980@cygint.cygnus.com>
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.