From: Mike Cvet <mcvet@redhat.com>
To: frysk@sourceware.org
Subject: Multi-Task Procs in the SourceWindow
Date: Wed, 04 Oct 2006 16:15:00 -0000 [thread overview]
Message-ID: <1159978682.2010.10.camel@Warbird.Northern> (raw)
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
I've just committed a large patch which allows the SourceWindow to
handle processes with multiple threads. That is, it properly blocks and
unblocks them, and if the source code is available, should display the
source from each thread and highlight the appropriate lines properly.
Thanks to Tom's idea, it uses a TreeView widget to list each thread and
their respective frames on the call stack.
I'm pretty sure that bugs exist! If you have some free time and want to
check it out, I've attached an example test program. Please assign any
breakage to me.
- Mike
[-- Attachment #2: tester2.c --]
[-- Type: text/x-csrc, Size: 832 bytes --]
// gcc -g -o test -lpthread tester2.c
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
pthread_t tester_thread;
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
void
*do_it ()
{
int t = 34543;
while (t > 0)
t--;
fprintf (stderr,"tester_thread: looping\n");
while (1);
return NULL;
}
void
bak ()
{
while (1)
{
fprintf (stderr,"main: looping\n");
while (1);
}
}
void
baz ()
{
int a;
int b = 0;
bak ();
}
void
bar ()
{
close (-1);
close (-1);
baz ();
/*Comment */
}
void
foo ()
{
bar ();
}
int main (char **argv, int argc)
{
pthread_attr_t attr;
pthread_attr_init (&attr);
pthread_create (&tester_thread, &attr, do_it, NULL);
/* This is a comment */
foo ();
int t = 30;
exit (0);
}
next reply other threads:[~2006-10-04 16:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 16:15 Mike Cvet [this message]
2006-10-10 1:47 ` Yao Qi
2006-10-10 19:13 ` Andrew Cagney
2006-10-10 19:46 ` Rick Moseley
2006-10-10 20:26 ` Mike Cvet
2006-10-16 11:59 ` Mark Wielaard
2006-10-16 13:45 ` Mike Cvet
2006-10-16 11:52 ` Mark Wielaard
2006-10-16 13:43 ` Mike Cvet
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=1159978682.2010.10.camel@Warbird.Northern \
--to=mcvet@redhat.com \
--cc=frysk@sourceware.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).