All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodolfo Bamberg <rolfetas@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] [Newbie question]Segmentation fault with user-space binary
Date: Wed, 30 May 2007 10:05:39 +0200	[thread overview]
Message-ID: <465D3053.2040002@domain.hid> (raw)
In-Reply-To: <465D2BE1.1080302@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

Rodolfo Bamberg wrote:
> Hi
> I get a segmentation fault when I run my user-space RT app (native skin).
> I did the following steps:
> - Cross-Compiled the Kernel with Xenomai support for an i386 target.
> - I Cross - Compiled Xenomai with uClibc: run ./configure using the
> --host=i386-linux-uclibc option, and using the new configure.in I read
> about in the uClibC discussion.
> - I wrote a test program that includes <native/task.h> and
> <native/timer.h>.
> - I then got this segmentation faults and I reduced my program to not
> using xenomai and only printing something. I igured out that the
> "-lnative" lib directive in the makefile was causing the problem.

Looks like the init code of libnative that is executed automatically on
program start is involved here.

> Do you know what might be the problem??

Could you attach gdb to your program and check where it segfaults
precisely? Also, does the same crash happens with "latency", the Xenomai
benchmark tool based on Native services?

> Thanks!
> 
> Rodolfo Bamberg
> 
> Here's my makefile:
> 
>     obj-m            := hallo.o    rt_process.o
>     RTAI_INCLUDE_DIR

That looks like legacy. ;)

> :=/home/rodolfo/kernel/linux-2.6.20-xenomai/include/xenomai
>     XENOMAI_INCLUDE_DIR_USP
> :=/home/rodolfo/xenomai/xenomai-2.3.1/src/include
>     XENOMAI_INCLUDE_DIR_USP2:=/home/rodolfo/xenomai/xenomai-2.3.1/include
>     XENOMAI_INCLUDE_LIB_USP :=/tftpboot/192.168.0.2/usr/xenomai/lib
> 
> 
> default:
> 
>     i386-linux-uclibc-gcc -I$(XENOMAI_INCLUDE_DIR_USP)
> -I$(XENOMAI_INCLUDE_DIR_USP2) -lnative -L$(XENOMAI_INCLUDE_LIB_USP) -o
> rt_process_user rt_process_user.c
>     chmod a+x rt_process_user
> 
> clean:
>     rm -f *.mod.c *.o *.ko rt_process
> 
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2007-05-30  8:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30  7:46 [Xenomai-help] [Newbie question]Segmentation fault with user-space binary Rodolfo Bamberg
2007-05-30  8:05 ` Jan Kiszka [this message]
2007-05-30  8:39   ` Rodolfo Bamberg
2007-05-30  8:52     ` Jan Kiszka
2007-05-30  9:19       ` Rodolfo Bamberg
2007-05-30  9:26       ` Rodolfo Bamberg
2007-05-30 11:56         ` Jan Kiszka
2007-05-30 12:29           ` Rodolfo Bamberg
2007-05-30 12:00         ` Dmitry Adamushko
2007-05-30 12:25           ` Rodolfo Bamberg
  -- strict thread matches above, loose matches on Subject: below --
2007-05-30  8:11 Rodolfo Bamberg

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=465D3053.2040002@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=rolfetas@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.