This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] Make continuations per-thread.


On Fri, May 02, 2008 at 12:34:11PM +0100, Pedro Alves wrote:
> to not make it centralized.  This is one of the things that gets much
> better looking when we switch completelly to always-a-thread, and
> get rid of context-switching.  I'm introducing another variable, instead of

So maybe we should do that in the FSF tree before the attached patch -
is that feasible?

On Fri, May 02, 2008 at 03:51:10PM +0400, Vladimir Prus wrote:
> This is only for intermediate continations. For ordinary continuations, not
> running them when we hit a breakpoint in another thread is desirable. Why should
> a breakpoint in some other thread abort "finish"? Note that in current gdb,
> hitting a breakpoint in unrelated thread does not abort "next" -- say we
> did next, inserted step resume breakpoint, and then hit breakpoint in some other
> thread. Then, the step resume breakpoint will not be removed. If we decide to
> continue the program, we'll eventually hit it. 
> 
> I don't see any problem with continuations been kept for a given thread
> for a long time. It's not an unbounded amount of continuations -- if we get an
> event in this thread, continuation will run, and if we don't get an event,
> we won't add any futher continuations.

In non-stop mode, the continuation will run the first time that thread
stops because threads only stop when there is an event.  But in
all-stop mode the thread will be stopped with its continuations not
yet run.

[Current thread is 1]
finish
[Switching to thread 2]
Breakpoint at....
thread 1
finish

Now thread 1 has two finish continuations and they're at different
threads... is it going to do something sensible?  What's sensible?

-- 
Daniel Jacobowitz
CodeSourcery


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