From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Stephan Zimmermann <s.zimmermann@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Debugging
Date: Thu, 17 Aug 2006 14:35:12 +0200 [thread overview]
Message-ID: <17636.25216.681949.487750@domain.hid> (raw)
In-Reply-To: <200608171405.44978.s.zimmermann@domain.hid>
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1313 bytes --]
Stephan Zimmermann wrote:
> Hello List,
> I am facing some trouble debugging my Xenomai application. When I set a
> breakpoint in my main() task, everything works fine. If I set a breakpoint in
> another task, the debugger won't stop the application. Is this a known
> problem, or am I doing something wrong (compiler/debugger options)? I tryed
> it within Eclipse and gdb commandline interface, both gave me the same
> results. Can someone give me a Hint?
I tested putting a breakpoint on the function "thread_routine" of the
attached program, and it works. Could you send us a minimal program
where this does not work ?
Another detail: in order to correctly debug threaded programs, gdb needs
the libthread_db library, do you see the following line when starting
gdb:
Using host libthread_db library "/lib/libthread_db.so.1".
>
> My System:
> Debian 3.1 on AMD X2, running in 32bit mode
> Xenomai 2.2 on Kernel 2.6.17.6, with no other patches
> debian standard gcc 3.3.5
> (same problem on intel notebook)
> The program I'm working on is written in C++, wrapping classes around the
> native skin.
You may be reinventing the wheel, there is a xenomm projects which
provides a C++ interface to the native skin, see:
https://gna.org/projects/xenomm
--
Gilles Chanteperdrix.
[-- Attachment #2: test_thread_bpt.c --]
[-- Type: text/plain, Size: 360 bytes --]
#include <pthread.h>
#include <semaphore.h>
void *thread_routine(void *cookie)
{
sem_t *sem = (sem_t *) cookie;
sem_wait(sem);
return NULL;
}
int main(int argc, const char *argv[])
{
pthread_t thread;
sem_t sem;
sem_init(&sem, 0, 0);
pthread_create(&thread, NULL, &thread_routine, &sem);
sem_post(&sem);
pthread_join(thread, NULL);
return 0;
}
next prev parent reply other threads:[~2006-08-17 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-17 12:05 [Xenomai-help] Debugging Stephan Zimmermann
2006-08-17 12:35 ` Gilles Chanteperdrix [this message]
2006-08-17 12:41 ` Philippe Gerum
2006-08-17 12:52 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2006-01-17 19:28 Kent Borg
2006-01-18 9:49 ` Gilles Chanteperdrix
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=17636.25216.681949.487750@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=s.zimmermann@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.