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] Move alloca(0) to wait_for_inferior() from registers_changed()


Nick Duffek wrote:
> 
> On 14-Dec-2000, Andrew Cagney wrote:
> 
> >Shouldn't such a thing be part of the event loop (or very close to it?).
> 
> I'm not familiar enough with the event loop to know.  The "Memory
> Allocation" documentation patch I posted says this:
> 
>   Each interface to the GDB core -- for example, GDBTK, libgdb, and the
>   text console -- should ensure that `alloca (0)' is called periodically.
>   In addition, GDB calls `alloca (0)' once per inferior wait.
> 
> Are you suggesting that alloca(0) be called somewhere other than the
> bottom of the wait-for-inferior loop?  Or are you suggesting that it be
> called somewhere in addition to there?
> 

Nick,

I does not make much sense calling it from there.  It only cleans up
things that are inner in the stack.  At that point, gdb is deep down in its
stack so there are high chances that not much will be cleaned up.

The event loop (or the interpreter's loop for the ones not using the event loop)
and the libgdb calls are the best places for those alloca(0).
They are up in the stack.

Fernando



-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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