Porting gdb to Cyclops64

Michael Snyder msnyder@vmware.com
Fri Jul 30 22:54:00 GMT 2010

Brian Heilig wrote:
> On Fri, 2010-07-30 at 11:57 -0700, Michael Snyder wrote:
>> The default mode is synchronous debugging, which means that any time
>> you are looking at the gdb prompt, the target is stopped.
>> It would probably be easiest to implement that first and get it working,
>> before attempting asynchronous mode.
>> So yes, attaching with gdb should stop the target.
> Thanks again Michael.
> Since all threads execute in parallel, more than one thread can hit a
> breakpoint. In stop mode I should stop all threads when the first thread
> hits a breakpoint. While stopping all threads other threads might hit a
> breakpoint. My intention is to queue these "events" and report them in
> sequential order to gdb. So that, in stop mode, when gdb tells the
> target to continue it will actually dequeue the next event. If there are
> no events then it will continue. Does this sound correct?

That's very similar to the way it works on native Linux.
Not because of true parallelism, but because we can't really
stop all the threads and start them again simultaneously.

> I guess I will have to implement non-stop mode as well since many
> threads can hit a breakpoint. It would be very inconvenient for my user
> to have to continue each thread individually. In this case I will not
> queue events but rather just send them to gdb and let gdb sort them out.
> Is this correct as well?

I'm not sure -- maybe someone else will care to jump in.

More information about the Gdb mailing list