Since you are getting a segmentation fault you must be building TOSSIM or
something.   Would have helped if you stated that.

Since you are running on a non-embedded host.   Why don't you build TOSSIM
with debugging symbols, and then use native gdb to see where the
segmentation fault is occuring.   Then you can figure out how to fix it or
what is going on.




On Tue, Dec 24, 2013 at 11:49 AM, Noor <n.alnakh...@gmail.com> wrote:

> Hi,
> I'm trying to define array in my data message with a size, but I got
> segmentation fault.
> But when I remove the size and make the array without size it works fine.
>
> Although I know that there should be a size for the array.
>
> Hope someone can help !
>
> This is the datamessgae
>
> enum{
> AM_DATAMSG=7,
> };
>
> typedef nx_struct datamsg{
> nx_uint16_t junk;
> nx_uint16_t state;
> nx_uint16_t packet_type;
> nx_uint16_t cluster_type;
> nx_uint16_t mytotal;
> nx_uint16_t info[];// when I put the size, it gives me segmentation fault
> }datamsg_t;
>
> Thanks,
> Noor
>
>
>
> --
> View this message in context:
> http://tinyos-help.10906.n7.nabble.com/segmentation-fault-tp23980.html
> Sent from the TinyOS - Help mailing list archive at Nabble.com.
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to