9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] debugging threads
@ 2006-03-03 19:18 andrey mirtchovski
  2006-03-03 20:16 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: andrey mirtchovski @ 2006-03-03 19:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

how does one set a breakpoint in a process started with proccreate? say i have:

someproc()
{
    recv(chan, x);
    somefunc(x);
}

threadmain()
{
    proccreate(someproc,...);
    do_something();
    send(chan, somex);
    ....
}

i want to break just before the call to 'somefunc()' in the process
executing someproc()

i'm trying with:

acid: bpset(do_something)
acid: cont()
/* bp reached */
acid: threads()
/* see pid of someproc */
acid: setproc(pid)
acid: bpset(somefunc)

and here i get 'waiting...' but i can't go back to the main thread and
do a cont(), so the send() never happens...

please unleash your knowledge upon me.

thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] debugging threads
  2006-03-03 19:18 [9fans] debugging threads andrey mirtchovski
@ 2006-03-03 20:16 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2006-03-03 20:16 UTC (permalink / raw)
  To: 9fans

Acid is not so great at debugging multiple processes.
Better than gdb, but not great.

I would try starting a second acid for the new proc
instead of using setproc in the current one.
If you do this, I'm not 100% sure you'll be able to
run procs() (or threads()) in either one, though.

Russ



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-03 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-03 19:18 [9fans] debugging threads andrey mirtchovski
2006-03-03 20:16 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).