9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "andrey mirtchovski" <mirtchovski@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: [9fans] debugging threads
Date: Fri,  3 Mar 2006 12:18:55 -0700	[thread overview]
Message-ID: <14ec7b180603031118m48af4e93k1a9b3aada880a4e@mail.gmail.com> (raw)

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.


             reply	other threads:[~2006-03-03 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 19:18 andrey mirtchovski [this message]
2006-03-03 20:16 ` Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14ec7b180603031118m48af4e93k1a9b3aada880a4e@mail.gmail.com \
    --to=mirtchovski@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).