Re: [PATCH v1] Port ndbm

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 1:42 PM Vaibhav Gupta  wrote:
>
>
>
> On Fri, Jun 21, 2019 at 11:38 PM Gedare Bloom  wrote:
>>
>> On Fri, Jun 21, 2019 at 11:03 AM Vaibhav Gupta  
>> wrote:
>> >
>> >
>> >
>> > On Fri, Jun 21, 2019, 9:46 PM Gedare Bloom  wrote:
>> >>
>> >> On Fri, Jun 21, 2019 at 4:25 AM Vaibhav Gupta  
>> >> wrote:
>> >> >
>> >> > Hello Gedare,
>> >> > As you suggested, I have placed   nbm.cinlibc/search   
>> >> > directory. This directory contains   hash.h, db_local.h, hash.c. And 
>> >> > all these are required by ndbm.
>> >> > .
>> >> > Here newlib got successfully compiled and It was generating function 
>> >> > symbols.
>> >> > .
>> >> > After that when i added the patch to RSB, and tried to compile a test 
>> >> > to check if ndbm is ported successfully or not.
>> >> > It gave me error:
>> >> > 
>> >> > 
>> >> > mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
>> >> > sparc-rtems5-gcc -DHAVE_CONFIG_H -I. 
>> >> > -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples
>> >> >-I. 
>> >> > -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include
>> >> >  -I/home/varodek/development/rtems/kernel/rtems/cpukit/include 
>> >> > -I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include
>> >> >  
>> >> > -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
>> >> >  -I/home/varodek/development/rtems/kernel/rtems/bsps/include 
>> >> > -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include 
>> >> > -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include 
>> >> > -DT_FILE_NAME='"init.c"'  
>> >> > -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
>> >> >-mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall 
>> >> > -Wmissing-prototypes -Wimplicit-function-declaration 
>> >> > -Wstrict-prototypes -Wnested-externs -MT hello/hello-init.o -MD -MP -MF 
>> >> > hello/.deps/hello-init.Tpo -c -o hello/hell
 o-init.o `test -f 'hello/init.c' || echo 
'/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
>> >> > In file included from 
>> >> > /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
>> >> > /home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10: 
>> >> > fatal error: db_local.h: No such file or directory
>> >> >  #include 
>> >> >   ^~~~
>> >> >
>> >> > .
>> >> > I found that db_local.his not present inrtems/5
>> >> > directory.
>> >> >
>> >>
>> >> I suspect that the headers in search/ are not installed, they are only
>> >> to be included during compilation of newlib, and probably should be
>> >> included by #include "db_local.h" for example. I also find it likely
>> >
>> > ndbm.h is in   libc/include,   db_local.his in libc/search.
>> > I will have to use   #include"../search/db_local.h"  which itself is a 
>> > very bad way to do so.
>>
>> Definitely shouldn't do that.
>>
>> >>
>> >> that you should not be including these non-installed headers from
>> >> installed headers inside of libc/include.
>> >>
>> >> So, you might need to rewrite the ndbm.h so that it does not rely on
>> >> some internal headers of newlib Just my two cents. Not sure if I'm
>> >> right. :)
>> >
>> > I can do one thing. db_local.hcontains some data structures. Also it 
>> > contains some function declarations, definitions of which are present in 
>> > hash.h.
>> >.
>> > So i can put those declarations and data structures directly inndbm.h, 
>> > so won't need to calldb_local.h
>> >
>>
>> It would be better if you can remove anything requiring db_local.h
>> from ndbm.h so that you don't have to #include db_local.h. You could
>> put those things into maybe db_local.h, or into some new file like
>> search/ndbm_local.h or something. you might need some guidance from
>> newlib maintainers about what is the right way to split the
>> public/private sides of headers like this.
>
> Actually ndbm.h has declarations of database functions. And all of them 
> require a data-type (structure)
> defined in db_local.h  . So there is nothing in ndbm.h which I can shift to 
> db_local.h
> or ndbm_local.h . If I transfer anything, ndbm.h will lose its meaning.
> .

What about forward declare the structures?

> Okay I will ask in newlib. Haven't got reply from them for my previous mail 
> though.
>>
>>
>> The basic idea is, how to make it so that #include  doesn't
>> need to include db_local.h? Instead, you can modify ndbm.c to do
>> something lilke #include "db_local.h" and #include "ndbm_local.h"
>> itself. This way, the ndbm.h header file does not need to "leak" the
>> details of db_local.h to userland.
>>
>> Gedare
>>  .
>> > Will this be practical?
>> >>
>> >>
>> >>
>> >> > Thank you
>> >> > Vaibhav Gupta
>> >> >
>> >> > On Fri, Jun 21, 2019 at 1:57 AM Vaibhav 

Re: [PATCH v1] Port ndbm

2019-06-21 Thread Vaibhav Gupta
On Fri, Jun 21, 2019 at 11:38 PM Gedare Bloom  wrote:

> On Fri, Jun 21, 2019 at 11:03 AM Vaibhav Gupta 
> wrote:
> >
> >
> >
> > On Fri, Jun 21, 2019, 9:46 PM Gedare Bloom  wrote:
> >>
> >> On Fri, Jun 21, 2019 at 4:25 AM Vaibhav Gupta 
> wrote:
> >> >
> >> > Hello Gedare,
> >> > As you suggested, I have placed   nbm.cinlibc/search
>  directory. This directory contains   hash.h, db_local.h, hash.c. And all
> these are required by ndbm.
> >> > .
> >> > Here newlib got successfully compiled and It was generating function
> symbols.
> >> > .
> >> > After that when i added the patch to RSB, and tried to compile a test
> to check if ndbm is ported successfully or not.
> >> > It gave me error:
> >> > 
> >> > 
> >> > mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
> >> > sparc-rtems5-gcc -DHAVE_CONFIG_H -I.
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples
>  -I.
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/include
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include
> -DT_FILE_NAME='"init.c"'
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
>  -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall
> -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
> -Wnested-externs -MT hello/hello-init.o -MD -MP -MF
> hello/.deps/hello-init.Tpo -c -o hello/hello-init.o `test -f 'hello/init.c'
> || echo
> '/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
> >> > In file included from
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
> >> > /home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10:
> fatal error: db_local.h: No such file or directory
> >> >  #include 
> >> >   ^~~~
> >> >
> >> > .
> >> > I found that db_local.his not present inrtems/5
> directory.
> >> >
> >>
> >> I suspect that the headers in search/ are not installed, they are only
> >> to be included during compilation of newlib, and probably should be
> >> included by #include "db_local.h" for example. I also find it likely
> >
> > ndbm.h is in   libc/include,   db_local.his in libc/search.
> > I will have to use   #include"../search/db_local.h"  which itself is
> a very bad way to do so.
>
> Definitely shouldn't do that.
>
> >>
> >> that you should not be including these non-installed headers from
> >> installed headers inside of libc/include.
> >>
> >> So, you might need to rewrite the ndbm.h so that it does not rely on
> >> some internal headers of newlib Just my two cents. Not sure if I'm
> >> right. :)
> >
> > I can do one thing. db_local.hcontains some data structures. Also it
> contains some function declarations, definitions of which are present in
> hash.h.
> >.
> > So i can put those declarations and data structures directly in
> ndbm.h, so won't need to calldb_local.h
> >
>
> It would be better if you can remove anything requiring db_local.h
> from ndbm.h so that you don't have to #include db_local.h. You could
> put those things into maybe db_local.h, or into some new file like
> search/ndbm_local.h or something. you might need some guidance from
> newlib maintainers about what is the right way to split the
> public/private sides of headers like this.
>
Actually ndbm.h has declarations of database functions. And all of them
require a data-type (structure)
defined in db_local.h  . So there is nothing in ndbm.h which I can shift to
db_local.h
or ndbm_local.h . If I transfer anything, ndbm.h will lose its meaning.
.
Okay I will ask in newlib. Haven't got reply from them for my previous mail
though.

>
> The basic idea is, how to make it so that #include  doesn't
> need to include db_local.h? Instead, you can modify ndbm.c to do
> something lilke #include "db_local.h" and #include "ndbm_local.h"
> itself. This way, the ndbm.h header file does not need to "leak" the
> details of db_local.h to userland.
>
> Gedare
>  .
> > Will this be practical?
> >>
> >>
> >>
> >> > Thank you
> >> > Vaibhav Gupta
> >> >
> >> > On Fri, Jun 21, 2019 at 1:57 AM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> >> >>
> >> >> ---
> >> >>  newlib/libc/include/ndbm.h |  84 +
> >> >>  newlib/libc/search/Makefile.am |   1 +
> >> >>  newlib/libc/search/ndbm.c  | 214
> +
> >> >>  3 files changed, 299 insertions(+)
> >> >>  create mode 100644 newlib/libc/include/ndbm.h
> >> >>  create mode 100644 

Re: [PATCH v1] Port ndbm

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 11:03 AM Vaibhav Gupta  wrote:
>
>
>
> On Fri, Jun 21, 2019, 9:46 PM Gedare Bloom  wrote:
>>
>> On Fri, Jun 21, 2019 at 4:25 AM Vaibhav Gupta  
>> wrote:
>> >
>> > Hello Gedare,
>> > As you suggested, I have placed   nbm.cinlibc/search   directory. 
>> > This directory contains   hash.h, db_local.h, hash.c. And all these are 
>> > required by ndbm.
>> > .
>> > Here newlib got successfully compiled and It was generating function 
>> > symbols.
>> > .
>> > After that when i added the patch to RSB, and tried to compile a test to 
>> > check if ndbm is ported successfully or not.
>> > It gave me error:
>> > 
>> > 
>> > mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
>> > sparc-rtems5-gcc -DHAVE_CONFIG_H -I. 
>> > -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples
>> >-I. 
>> > -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include
>> >  -I/home/varodek/development/rtems/kernel/rtems/cpukit/include 
>> > -I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include
>> >  
>> > -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
>> >  -I/home/varodek/development/rtems/kernel/rtems/bsps/include 
>> > -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include 
>> > -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include 
>> > -DT_FILE_NAME='"init.c"'  
>> > -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
>> >-mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall 
>> > -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes 
>> > -Wnested-externs -MT hello/hello-init.o -MD -MP -MF 
>> > hello/.deps/hello-init.Tpo -c -o hello/hello-i
 nit.o `test -f 'hello/init.c' || echo 
'/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
>> > In file included from 
>> > /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
>> > /home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10: fatal 
>> > error: db_local.h: No such file or directory
>> >  #include 
>> >   ^~~~
>> >
>> > .
>> > I found that db_local.his not present inrtems/5directory.
>> >
>>
>> I suspect that the headers in search/ are not installed, they are only
>> to be included during compilation of newlib, and probably should be
>> included by #include "db_local.h" for example. I also find it likely
>
> ndbm.h is in   libc/include,   db_local.his in libc/search.
> I will have to use   #include"../search/db_local.h"  which itself is a 
> very bad way to do so.

Definitely shouldn't do that.

>>
>> that you should not be including these non-installed headers from
>> installed headers inside of libc/include.
>>
>> So, you might need to rewrite the ndbm.h so that it does not rely on
>> some internal headers of newlib Just my two cents. Not sure if I'm
>> right. :)
>
> I can do one thing. db_local.hcontains some data structures. Also it 
> contains some function declarations, definitions of which are present in 
> hash.h.
>.
> So i can put those declarations and data structures directly inndbm.h, so 
> won't need to calldb_local.h
>

It would be better if you can remove anything requiring db_local.h
from ndbm.h so that you don't have to #include db_local.h. You could
put those things into maybe db_local.h, or into some new file like
search/ndbm_local.h or something. you might need some guidance from
newlib maintainers about what is the right way to split the
public/private sides of headers like this.

The basic idea is, how to make it so that #include  doesn't
need to include db_local.h? Instead, you can modify ndbm.c to do
something lilke #include "db_local.h" and #include "ndbm_local.h"
itself. This way, the ndbm.h header file does not need to "leak" the
details of db_local.h to userland.

Gedare
 .
> Will this be practical?
>>
>>
>>
>> > Thank you
>> > Vaibhav Gupta
>> >
>> > On Fri, Jun 21, 2019 at 1:57 AM Vaibhav Gupta  
>> > wrote:
>> >>
>> >> ---
>> >>  newlib/libc/include/ndbm.h |  84 +
>> >>  newlib/libc/search/Makefile.am |   1 +
>> >>  newlib/libc/search/ndbm.c  | 214 +
>> >>  3 files changed, 299 insertions(+)
>> >>  create mode 100644 newlib/libc/include/ndbm.h
>> >>  create mode 100644 newlib/libc/search/ndbm.c
>> >>
>> >> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>> >> new file mode 100644
>> >> index 0..f89f97dd0
>> >> --- /dev/null
>> >> +++ b/newlib/libc/include/ndbm.h
>> >> @@ -0,0 +1,84 @@
>> >> +/*-
>> >> + * SPDX-License-Identifier: BSD-3-Clause
>> >> + *
>> >> + * Copyright (c) 1990, 1993
>> >> + * The Regents of the University of California.  All rights reserved.
>> >> + *
>> >> + * This code is derived from software contributed to 

Re: [PATCH v1] Port ndbm

2019-06-21 Thread Vaibhav Gupta
On Fri, Jun 21, 2019, 9:46 PM Gedare Bloom  wrote:

> On Fri, Jun 21, 2019 at 4:25 AM Vaibhav Gupta 
> wrote:
> >
> > Hello Gedare,
> > As you suggested, I have placed   nbm.cinlibc/search
>  directory. This directory contains   hash.h, db_local.h, hash.c. And all
> these are required by ndbm.
> > .
> > Here newlib got successfully compiled and It was generating function
> symbols.
> > .
> > After that when i added the patch to RSB, and tried to compile a test to
> check if ndbm is ported successfully or not.
> > It gave me error:
> > 
> > 
> > mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
> > sparc-rtems5-gcc -DHAVE_CONFIG_H -I.
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples
>  -I.
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/include
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include
> -DT_FILE_NAME='"init.c"'
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
>  -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall
> -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
> -Wnested-externs -MT hello/hello-init.o -MD -MP -MF
> hello/.deps/hello-init.Tpo -c -o hello/hello-init.o `test -f 'hello/init.c'
> || echo
> '/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
> > In file included from
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
> > /home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10:
> fatal error: db_local.h: No such file or directory
> >  #include 
> >   ^~~~
> >
> > .
> > I found that db_local.his not present inrtems/5directory.
> >
>
> I suspect that the headers in search/ are not installed, they are only
> to be included during compilation of newlib, and probably should be
> included by #include "db_local.h" for example. I also find it likely
>
ndbm.h is in   libc/include,   db_local.his in libc/search.
I will have to use   #include"../search/db_local.h"  which itself is a
very bad way to do so.

> that you should not be including these non-installed headers from
> installed headers inside of libc/include.
>
> So, you might need to rewrite the ndbm.h so that it does not rely on
> some internal headers of newlib Just my two cents. Not sure if I'm
> right. :)
>
I can do one thing. db_local.hcontains some data structures. Also it
contains some function declarations, definitions of which are present in
hash.h.
.
So i can put those declarations and data structures directly inndbm.h,
so won't need to calldb_local.h
.
Will this be practical?

>
>
> > Thank you
> > Vaibhav Gupta
> >
> > On Fri, Jun 21, 2019 at 1:57 AM Vaibhav Gupta 
> wrote:
> >>
> >> ---
> >>  newlib/libc/include/ndbm.h |  84 +
> >>  newlib/libc/search/Makefile.am |   1 +
> >>  newlib/libc/search/ndbm.c  | 214 +
> >>  3 files changed, 299 insertions(+)
> >>  create mode 100644 newlib/libc/include/ndbm.h
> >>  create mode 100644 newlib/libc/search/ndbm.c
> >>
> >> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
> >> new file mode 100644
> >> index 0..f89f97dd0
> >> --- /dev/null
> >> +++ b/newlib/libc/include/ndbm.h
> >> @@ -0,0 +1,84 @@
> >> +/*-
> >> + * SPDX-License-Identifier: BSD-3-Clause
> >> + *
> >> + * Copyright (c) 1990, 1993
> >> + * The Regents of the University of California.  All rights
> reserved.
> >> + *
> >> + * This code is derived from software contributed to Berkeley by
> >> + * Margo Seltzer.
> >> + *
> >> + * Redistribution and use in source and binary forms, with or without
> >> + * modification, are permitted provided that the following conditions
> >> + * are met:
> >> + * 1. Redistributions of source code must retain the above copyright
> >> + *notice, this list of conditions and the following disclaimer.
> >> + * 2. Redistributions in binary form must reproduce the above copyright
> >> + *notice, this list of conditions and the following disclaimer in
> the
> >> + *documentation and/or other materials provided with the
> distribution.
> >> + * 3. Neither the name of the University nor the names of its
> contributors
> >> + *may be used to endorse or promote products derived from this
> software
> >> + *without specific prior written permission.
> >> + *
> >> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
> AND
> >> + * ANY EXPRESS OR IMPLIED WARRANTIES, 

Re: CTF example

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 10:10 AM Ravindra Kumar Meena
 wrote:
>
> Hi,
>
> Thanks for sharing the example.
>
> I managed to store the RTEMs event stream in a file. I have also written the 
> metada for the same but babeltrace is not able to read CTF because metadata 
> is not compatible with it.
>
> Do you have any example or approach to make metadata compatible with events?
>
> This is CTF event I am storing in event stream file.
>
> typedef struct ctf_event {
>   uint64_t ns;
>  uint32_t cpu;
>   rtems_record_event   event;
>  uint64_t data;
> } ctf_event;

Can you expand the rtems_record_event to its constituent primitive
types? This should make it easier to write the metadata I suspect.
Even you can try writing a yaml that encodes this structure and use
barectf to generate the metadata?
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v1] Port ndbm

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 4:25 AM Vaibhav Gupta  wrote:
>
> Hello Gedare,
> As you suggested, I have placed   nbm.cinlibc/search   directory. 
> This directory contains   hash.h, db_local.h, hash.c. And all these are 
> required by ndbm.
> .
> Here newlib got successfully compiled and It was generating function symbols.
> .
> After that when i added the patch to RSB, and tried to compile a test to 
> check if ndbm is ported successfully or not.
> It gave me error:
> 
> 
> mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
> sparc-rtems5-gcc -DHAVE_CONFIG_H -I. 
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples 
>   -I. 
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include 
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/include 
> -I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include 
> -I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
>  -I/home/varodek/development/rtems/kernel/rtems/bsps/include 
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include 
> -I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include 
> -DT_FILE_NAME='"init.c"'  
> -I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
>-mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall 
> -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes 
> -Wnested-externs -MT hello/hello-init.o -MD -MP -MF 
> hello/.deps/hello-init.Tpo -c -o hello/hello-init
 .o `test -f 'hello/init.c' || echo 
'/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
> In file included from 
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
> /home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10: fatal 
> error: db_local.h: No such file or directory
>  #include 
>   ^~~~
>
> .
> I found that db_local.his not present inrtems/5directory.
>

I suspect that the headers in search/ are not installed, they are only
to be included during compilation of newlib, and probably should be
included by #include "db_local.h" for example. I also find it likely
that you should not be including these non-installed headers from
installed headers inside of libc/include.

So, you might need to rewrite the ndbm.h so that it does not rely on
some internal headers of newlib Just my two cents. Not sure if I'm
right. :)


> Thank you
> Vaibhav Gupta
>
> On Fri, Jun 21, 2019 at 1:57 AM Vaibhav Gupta  
> wrote:
>>
>> ---
>>  newlib/libc/include/ndbm.h |  84 +
>>  newlib/libc/search/Makefile.am |   1 +
>>  newlib/libc/search/ndbm.c  | 214 +
>>  3 files changed, 299 insertions(+)
>>  create mode 100644 newlib/libc/include/ndbm.h
>>  create mode 100644 newlib/libc/search/ndbm.c
>>
>> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>> new file mode 100644
>> index 0..f89f97dd0
>> --- /dev/null
>> +++ b/newlib/libc/include/ndbm.h
>> @@ -0,0 +1,84 @@
>> +/*-
>> + * SPDX-License-Identifier: BSD-3-Clause
>> + *
>> + * Copyright (c) 1990, 1993
>> + * The Regents of the University of California.  All rights reserved.
>> + *
>> + * This code is derived from software contributed to Berkeley by
>> + * Margo Seltzer.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the distribution.
>> + * 3. Neither the name of the University nor the names of its contributors
>> + *may be used to endorse or promote products derived from this software
>> + *without specific prior written permission.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> PURPOSE
>> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
>> CONSEQUENTIAL
>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
>> STRICT
>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN 

Re: CTF example

2019-06-21 Thread Ravindra Kumar Meena
Hi,

Thanks for sharing the example.

I managed to store the RTEMs event stream in a file. I have also written
the metada for the same but babeltrace is not able to read CTF because
metadata is not compatible with it.

Do you have any example or approach to make metadata compatible with events?

This is CTF event I am storing in event stream file.

typedef struct ctf_event {
  uint64_t ns;
 uint32_t cpu;
  rtems_record_event   event;
 uint64_t data;
} ctf_event;
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Add newlib patch to RTEMS RSB

2019-06-21 Thread Vaibhav Gupta
On Fri, Jun 21, 2019, 9:19 PM Gedare Bloom  wrote:

> On Fri, Jun 21, 2019 at 2:37 AM Vaibhav Gupta 
> wrote:
> >
> > Hello,
> > I figured it out.
> > .
> > Below is the output given by shell
> > ..
> > ..
> > ..
> > config: tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> > warning: rtems-gcc-7.4.0-newlib-1d35a003f.cfg:29: invalid format:
> '%setup patch newlib -p'
> > error: gcc-common-1.cfg:80: %patch already setup source: newlib -p1
> > Build FAILED
> > Build Set: Time 0:06:29.257451
> > Build FAILED
> > .
> > .
> > .
> > .
> > I realized, the name of group of my patch and the source of
> newlib-source was same inrtems-gcc-7.4.0-newlib-1d35a003f.cfg.
> Also, I had put "%patch setup" statement before "%patch add" .
> > .
>
> This seems odd. The "rules" around patching need to be clarified in
> the documentation.
>
If there is some technical modification, I am not sure. But some steps are
missing. After successful port and testsuite, I will update the
documentation.

>
> > .
> > .
> > Here is the new git-diff. This got compiled successfully
> > diff --git a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> > index b28a4b1..5c5c346 100644
> > --- a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> > +++ b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> > @@ -23,6 +23,11 @@
> >  %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz
> https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
> >  %hash sha512 newlib-%{newlib_version}.tar.gz
> eb5943b207eca05fde4497c29491bbd3d07624e4becb410640ae8e177bd9212ca06cf726ee3882d6db5758cd03daf1462715e4b9b404abcc8f7cee5f811fd48b
> >
> > +%patch add newlib_ndbm file://0001-Port-ndbm.patch
> > +%hash sha512 0001-Port-ndbm.patch
> 0e05d97d0a6f8a436a233fe4fb3cbda7c0cfeab11cfda1c155d8aa5b80289f386896b0e8c28e5858e1d7409fd22c8d1cbaaccb181bc376845fe6d50b16359db6
> > +
> > +%patch setup newlib_ndbm -p1
> > +
> >  %define isl_version 0.16.1
> >  %hash sha512 isl-%{isl_version}.tar.bz2
> c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
> >
> > @@ -40,3 +45,4 @@
> >  %define with_iconv   1
> >
> >  %include %{_configdir}/gcc-7.2-1.cfg
> >
> >
> > On Fri, Jun 21, 2019 at 4:25 AM Chris Johns  wrote:
> >>
> >> On 21/6/19 4:43 am, Gedare Bloom wrote:
> >> > On Thu, Jun 20, 2019 at 11:32 AM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> >> >> + /bin/cat
> /home/varodek/development/rtems/rsb/rtems/patches/0001-Port-ndbm.patch
> >> >> + /usr/bin/patch -p3
> >> >
> >> > This is the problem, the -p3 is wrong. I don't know where this is
> >> > coming from though.
> >>
> >> This must be from a `%patch` statement. The RSB has no preset patch
> options and
> >> there is no `-p3` in my repo.
> >>
> >> I suggest you run with --trace and then look at the macro maps to see
> where is
> >> it is coming from.
> >>
> >> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 8:51 AM Ravindra Kumar Meena
 wrote:
>>
>> >> I tried to parse the event stream file and metadata file through
>> >> babeltrace gives the following error:
>> >>
>> >> [error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
>> >> [error] Stream index creation error.
>> >> [error] Open file stream error.
>> >> [warning] [Context] Cannot open_trace of format ctf at path ctf.
>> >> [warning] [Context] cannot open trace "ctf" from ctf/ for reading.
>> >> [error] Cannot open any trace for reading.
>> >>
>> >> [error] opening trace "ctf/" for reading.
>> >>
>> >> [error] none of the specified trace paths could be opened.
>> >>
>> >> I think the metadata file is not compatible with event stream generated.
>> >
>> > Yes, indeed. I also think that the metadata doesn't describe the event
>> > stream. The metadata should describe the struct ctf_item.
>>
>> In your current version you have also calls to fprintf() mixed into the
>> fwrite() in print_item().
>
>
> Should I comment the fprintf() and leave it there or just permanently remove 
> it?
>

Don't leave commented-out code in your code submissions.

It would be preferable if you can try to eliminate errors and warnings
as well as you can before you bring code to review, or ask questions
how to resolve some specific error/warning. It will save some mental
energy/time of code reviewers/mentors.

Gedare

>
> --
> Ravindra Kumar Meena,
> B. Tech. Computer Science and Engineering,
> Indian Institute of Technology (Indian School of Mines), Dhanbad
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Add newlib patch to RTEMS RSB

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 2:37 AM Vaibhav Gupta  wrote:
>
> Hello,
> I figured it out.
> .
> Below is the output given by shell
> ..
> ..
> ..
> config: tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> warning: rtems-gcc-7.4.0-newlib-1d35a003f.cfg:29: invalid format: '%setup 
> patch newlib -p'
> error: gcc-common-1.cfg:80: %patch already setup source: newlib -p1
> Build FAILED
> Build Set: Time 0:06:29.257451
> Build FAILED
> .
> .
> .
> .
> I realized, the name of group of my patch and the source of newlib-source was 
> same inrtems-gcc-7.4.0-newlib-1d35a003f.cfg. Also, I had put "%patch 
> setup" statement before "%patch add" .
> .

This seems odd. The "rules" around patching need to be clarified in
the documentation.

> .
> .
> Here is the new git-diff. This got compiled successfully
> diff --git a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg 
> b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> index b28a4b1..5c5c346 100644
> --- a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> +++ b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> @@ -23,6 +23,11 @@
>  %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz 
> https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
>  %hash sha512 newlib-%{newlib_version}.tar.gz 
> eb5943b207eca05fde4497c29491bbd3d07624e4becb410640ae8e177bd9212ca06cf726ee3882d6db5758cd03daf1462715e4b9b404abcc8f7cee5f811fd48b
>
> +%patch add newlib_ndbm file://0001-Port-ndbm.patch
> +%hash sha512 0001-Port-ndbm.patch 
> 0e05d97d0a6f8a436a233fe4fb3cbda7c0cfeab11cfda1c155d8aa5b80289f386896b0e8c28e5858e1d7409fd22c8d1cbaaccb181bc376845fe6d50b16359db6
> +
> +%patch setup newlib_ndbm -p1
> +
>  %define isl_version 0.16.1
>  %hash sha512 isl-%{isl_version}.tar.bz2 
> c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
>
> @@ -40,3 +45,4 @@
>  %define with_iconv   1
>
>  %include %{_configdir}/gcc-7.2-1.cfg
>
>
> On Fri, Jun 21, 2019 at 4:25 AM Chris Johns  wrote:
>>
>> On 21/6/19 4:43 am, Gedare Bloom wrote:
>> > On Thu, Jun 20, 2019 at 11:32 AM Vaibhav Gupta  
>> > wrote:
>> >> + /bin/cat 
>> >> /home/varodek/development/rtems/rsb/rtems/patches/0001-Port-ndbm.patch
>> >> + /usr/bin/patch -p3
>> >
>> > This is the problem, the -p3 is wrong. I don't know where this is
>> > coming from though.
>>
>> This must be from a `%patch` statement. The RSB has no preset patch options 
>> and
>> there is no `-p3` in my repo.
>>
>> I suggest you run with --trace and then look at the macro maps to see where 
>> is
>> it is coming from.
>>
>> Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: GSoC Project | Basic Support for Trace Compass

2019-06-21 Thread Ravindra Kumar Meena
*21 June work summary:*
I have managed to store event streams in the disk. Tried to parse metadata
and event stream file through babeltrace but it showing error as of now
because the metadata file is not compatible with it. Raised a query on
babletrace list asking about the same. It needs bit of research.

>

-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
>
> > I tried to parse the event stream file and metadata file through
> > babeltrace gives the following error:
> >
> > [error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
> > [error] Stream index creation error.
> > [error] Open file stream error.
> > [warning] [Context] Cannot open_trace of format ctf at path ctf.
> > [warning] [Context] cannot open trace "ctf" from ctf/ for reading.
> > [error] Cannot open any trace for reading.
> >
> > [error] opening trace "ctf/" for reading.
> >
> > [error] none of the specified trace paths could be opened.
> >
> > I think the metadata file is not compatible with event stream generated.
>
> Yes, indeed. I also think that the metadata doesn't describe the event
> stream. The metadata should describe the struct ctf_item.
>
Yes. It needs research. I am not sure how I can make event stream generated
compatible with metadata. I have raised a query for the same on lttng.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
>
> > I was able to store the event stream in file. I have sent the patch for
> > the same. It has only one warning that I have to discuss with you.
> >
> > ../misc/record/record-main.c:172:14: warning: ‘ns’ may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> > ctf_item.ns=ns;
> >^
> > ../misc/record/record-main.c:147:12: note: ‘ns’ was declared here
> > uint32_t ns;
>
> This is not a warning. It is an error. The ns variable is not set in the
> else path.
>

Should I remove the inner content of if block? Since we are not using
fprintf() anymore.

>
> It should look like this:
>
> static void print_item( FILE *f, const client_item *item )
> {
>ctf_event ctf_item;
>
>ctf_item.ns = item->ns;
>ctf_item.cpu = item->cpu;
>ctf_item.event = item->event;
>ctf_item.data = item->data;
>
>fwrite( _item, sizeof( ctf_item ), 1, f );
> }
>
Okay


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Add newlib patch to RTEMS RSB

2019-06-21 Thread Vaibhav Gupta
On Fri, Jun 21, 2019, 7:19 PM Joel Sherrill  wrote:

>
>
> On Fri, Jun 21, 2019 at 3:37 AM Vaibhav Gupta 
> wrote:
>
>> Hello,
>> I figured it out.
>> .
>> Below is the output given by shell
>> ..
>> ..
>> ..
>> config: tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
>> warning: rtems-gcc-7.4.0-newlib-1d35a003f.cfg:29: invalid format: '%setup
>> patch newlib -p'
>> *error: gcc-common-1.cfg:80: %patch already setup source: newlib -p1*
>> Build FAILED
>> Build Set: Time 0:06:29.257451
>> Build FAILED
>> .
>> .
>> .
>> .
>> I realized, the name of group of my patch and the source of newlib-source
>> was same inrtems-gcc-7.4.0-newlib-1d35a003f.cfg. Also, I had put
>> "%patch setup" statement before "%patch add" .
>> .
>> .
>> .
>> Here is the new git-diff. This got compiled successfully
>>
>
> Great! How is the testing going?
>
I have placed ndbm.h in newlib/libc/includedirectory.
.
ndbm.h requiresdb.h (named as db_local.h in newlib), which is
present innewlib/libc/search   directory.
This directory also contains hash.h and hash.c  which is
required byndbm.c
.
So gedare suggested me to placendbm.c in this   libc/search
 directory.
.
Here, when I compiled newlib for sparc, it was successful and generates
function symbols.
.
But when I added this patch to RSB, and made a sample program calling ndbm
functions, just to check if it is successful port or not, its showing me
compile time error.

Error: https://lists.rtems.org/pipermail/devel/2019-June/026271.html
.


> For the RSB until the patch is merged upstream in newlib, it is preferred
> to get patches from tickets or mailing list posts. Since there is a ticket
> (2972) for adding ndbm, adding your patch to that and letting the RSB fetch
> it from there is the right approach.
>
> Also there is a ticket #2833 which lists POSIX .h files missing in newlib.
> It should be updated when all is merged.
>
>
>
>
>> diff --git a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
>> b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
>> index b28a4b1..5c5c346 100644
>> --- a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
>> +++ b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
>> @@ -23,6 +23,11 @@
>>  %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz
>> https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
>>  %hash sha512 newlib-%{newlib_version}.tar.gz
>> eb5943b207eca05fde4497c29491bbd3d07624e4becb410640ae8e177bd9212ca06cf726ee3882d6db5758cd03daf1462715e4b9b404abcc8f7cee5f811fd48b
>>
>> +%patch add newlib_ndbm file://0001-Port-ndbm.patch
>> +%hash sha512 0001-Port-ndbm.patch
>> 0e05d97d0a6f8a436a233fe4fb3cbda7c0cfeab11cfda1c155d8aa5b80289f386896b0e8c28e5858e1d7409fd22c8d1cbaaccb181bc376845fe6d50b16359db6
>> +
>> +%patch setup newlib_ndbm -p1
>> +
>>  %define isl_version 0.16.1
>>  %hash sha512 isl-%{isl_version}.tar.bz2
>> c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
>>
>> @@ -40,3 +45,4 @@
>>  %define with_iconv   1
>>
>>  %include %{_configdir}/gcc-7.2-1.cfg
>>
>>
>> On Fri, Jun 21, 2019 at 4:25 AM Chris Johns  wrote:
>>
>>> On 21/6/19 4:43 am, Gedare Bloom wrote:
>>> > On Thu, Jun 20, 2019 at 11:32 AM Vaibhav Gupta <
>>> vaibhavgupt...@gmail.com> wrote:
>>> >> + /bin/cat
>>> /home/varodek/development/rtems/rsb/rtems/patches/0001-Port-ndbm.patch
>>> >> + /usr/bin/patch -p3
>>> >
>>> > This is the problem, the -p3 is wrong. I don't know where this is
>>> > coming from though.
>>>
>>> This must be from a `%patch` statement. The RSB has no preset patch
>>> options and
>>> there is no `-p3` in my repo.
>>>
>>> I suggest you run with --trace and then look at the macro maps to see
>>> where is
>>> it is coming from.
>>>
>>> Chris
>>>
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Add newlib patch to RTEMS RSB

2019-06-21 Thread Joel Sherrill
On Fri, Jun 21, 2019 at 3:37 AM Vaibhav Gupta 
wrote:

> Hello,
> I figured it out.
> .
> Below is the output given by shell
> ..
> ..
> ..
> config: tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> warning: rtems-gcc-7.4.0-newlib-1d35a003f.cfg:29: invalid format: '%setup
> patch newlib -p'
> *error: gcc-common-1.cfg:80: %patch already setup source: newlib -p1*
> Build FAILED
> Build Set: Time 0:06:29.257451
> Build FAILED
> .
> .
> .
> .
> I realized, the name of group of my patch and the source of newlib-source
> was same inrtems-gcc-7.4.0-newlib-1d35a003f.cfg. Also, I had put
> "%patch setup" statement before "%patch add" .
> .
> .
> .
> Here is the new git-diff. This got compiled successfully
>

Great! How is the testing going?

For the RSB until the patch is merged upstream in newlib, it is preferred
to get patches from tickets or mailing list posts. Since there is a ticket
(2972) for adding ndbm, adding your patch to that and letting the RSB fetch
it from there is the right approach.

Also there is a ticket #2833 which lists POSIX .h files missing in newlib.
It should be updated when all is merged.




> diff --git a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> index b28a4b1..5c5c346 100644
> --- a/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> +++ b/rtems/config/tools/rtems-gcc-7.4.0-newlib-1d35a003f.cfg
> @@ -23,6 +23,11 @@
>  %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz
> https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
>  %hash sha512 newlib-%{newlib_version}.tar.gz
> eb5943b207eca05fde4497c29491bbd3d07624e4becb410640ae8e177bd9212ca06cf726ee3882d6db5758cd03daf1462715e4b9b404abcc8f7cee5f811fd48b
>
> +%patch add newlib_ndbm file://0001-Port-ndbm.patch
> +%hash sha512 0001-Port-ndbm.patch
> 0e05d97d0a6f8a436a233fe4fb3cbda7c0cfeab11cfda1c155d8aa5b80289f386896b0e8c28e5858e1d7409fd22c8d1cbaaccb181bc376845fe6d50b16359db6
> +
> +%patch setup newlib_ndbm -p1
> +
>  %define isl_version 0.16.1
>  %hash sha512 isl-%{isl_version}.tar.bz2
> c188667a84dc5bdddb4ab7c35f89c91bf15a8171f4fcaf41301cf285fb7328846d9a367c096012fec4cc69d244f0bc9e95d84c09ec097394cd4093076f2a041b
>
> @@ -40,3 +45,4 @@
>  %define with_iconv   1
>
>  %include %{_configdir}/gcc-7.2-1.cfg
>
>
> On Fri, Jun 21, 2019 at 4:25 AM Chris Johns  wrote:
>
>> On 21/6/19 4:43 am, Gedare Bloom wrote:
>> > On Thu, Jun 20, 2019 at 11:32 AM Vaibhav Gupta <
>> vaibhavgupt...@gmail.com> wrote:
>> >> + /bin/cat
>> /home/varodek/development/rtems/rsb/rtems/patches/0001-Port-ndbm.patch
>> >> + /usr/bin/patch -p3
>> >
>> > This is the problem, the -p3 is wrong. I don't know where this is
>> > coming from though.
>>
>> This must be from a `%patch` statement. The RSB has no preset patch
>> options and
>> there is no `-p3` in my repo.
>>
>> I suggest you run with --trace and then look at the macro maps to see
>> where is
>> it is coming from.
>>
>> Chris
>>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber

On 21/06/2019 14:28, Sebastian Huber wrote:

On 21/06/2019 14:16, Ravindra Kumar Meena wrote:

Hi,

I tried to parse the event stream file and metadata file through 
babeltrace gives the following error:


[error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ctf.
[warning] [Context] cannot open trace "ctf" from ctf/ for reading.
[error] Cannot open any trace for reading.

[error] opening trace "ctf/" for reading.

[error] none of the specified trace paths could be opened.

I think the metadata file is not compatible with event stream generated.


Yes, indeed. I also think that the metadata doesn't describe the event 
stream. The metadata should describe the struct ctf_item.


In your current version you have also calls to fprintf() mixed into the 
fwrite() in print_item().


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber

On 21/06/2019 14:16, Ravindra Kumar Meena wrote:

Hi,

I tried to parse the event stream file and metadata file through 
babeltrace gives the following error:


[error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ctf.
[warning] [Context] cannot open trace "ctf" from ctf/ for reading.
[error] Cannot open any trace for reading.

[error] opening trace "ctf/" for reading.

[error] none of the specified trace paths could be opened.

I think the metadata file is not compatible with event stream generated.


Yes, indeed. I also think that the metadata doesn't describe the event 
stream. The metadata should describe the struct ctf_item.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber

On 21/06/2019 13:20, Ravindra Kumar Meena wrote:

Hi,

I was able to store the event stream in file. I have sent the patch for 
the same. It has only one warning that I have to discuss with you.


../misc/record/record-main.c:172:14: warning: ‘ns’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]

    ctf_item.ns=ns;
               ^
../misc/record/record-main.c:147:12: note: ‘ns’ was declared here
    uint32_t ns;


This is not a warning. It is an error. The ns variable is not set in the 
else path.


It should look like this:

static void print_item( FILE *f, const client_item *item )
{
  ctf_event ctf_item;

  ctf_item.ns = item->ns;
  ctf_item.cpu = item->cpu;
  ctf_item.event = item->event;
  ctf_item.data = item->data;

  fwrite( _item, sizeof( ctf_item ), 1, f );
}

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
Hi,

I tried to parse the event stream file and metadata file through babeltrace
gives the following error:

[error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ctf.
[warning] [Context] cannot open trace "ctf" from ctf/ for reading.
[error] Cannot open any trace for reading.

[error] opening trace "ctf/" for reading.

[error] none of the specified trace paths could be opened.

I think the metadata file is not compatible with event stream generated.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
Hi,

I was able to store the event stream in file. I have sent the patch for the
same. It has only one warning that I have to discuss with you.

../misc/record/record-main.c:172:14: warning: ‘ns’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   ctf_item.ns=ns;
  ^
../misc/record/record-main.c:147:12: note: ‘ns’ was declared here
   uint32_t ns;

The ns value is uninitialized because it is not able to receive the value
from if block. Should I make
uint32_t seconds;
uint32_t nanoseconds;

above the block?

Thanks


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2] Write event stream in file

2019-06-21 Thread Ravindra Meena
---
 misc/record/record-main.c | 30 ++
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/misc/record/record-main.c b/misc/record/record-main.c
index eccf291..9e9eaa3 100644
--- a/misc/record/record-main.c
+++ b/misc/record/record-main.c
@@ -83,6 +83,7 @@ typedef struct client_context {
   uint64_t   counter;
   SLIST_HEAD( , client_item )free_items;
   RB_HEAD( active, client_item ) active_items;
+  FILE   *event_stream;
 } client_context;
 
 static inline int item_cmp( const void *pa, const void *pb )
@@ -142,7 +143,7 @@ static int connect_client( const char *host, uint16_t port )
 
 static void print_item( FILE *f, const client_item *item )
 {
-  ctf_event *ctf_item;
+  ctf_event ctf_item;
   uint32_t ns;
 
   if ( item->ns != 0 ) {
@@ -165,21 +166,13 @@ static void print_item( FILE *f, const client_item *item )
 item->data
   );
 
-  FILE *fptr = fopen("event", "a");
+  ctf_item.cpu=item->cpu;
+  ctf_item.event=item->event;
+  ctf_item.data=item->data;
+  ctf_item.ns=ns;
 
-  if (fptr == NULL) 
-  { 
-   printf("Could not open file"); 
-   return 0; 
-  }
-
-  ctf_item->cpu=item->cpu;
-  ctf_item->event=item->event;
-  ctf_item->data=item->data;
-  ctf_item->ns=ns;
+  fwrite( _item, sizeof( ctf_item ), 1, f );
 
-  fprintf(fptr,ctf_item); 
-  fclose(fptr);
 }
 
 static void flush_items( client_context *cctx )
@@ -215,7 +208,9 @@ static void flush_items( client_context *cctx )
 
 RB_REMOVE( active, >active_items, x );
 SLIST_INSERT_HEAD( >free_items, x, free_node );
-print_item( stdout, x );
+
+print_item( cctx->event_stream, x);
+
   }
 }
 
@@ -337,6 +332,9 @@ int main( int argc, char **argv )
   SLIST_INIT( _items );
   RB_INIT( _items );
 
+  FILE *event_stream=fopen("event","wb");
+  cctx.event_stream=event_stream;
+  
   items = calloc( n, sizeof( *items ) );
   assert( items != NULL );
 
@@ -358,7 +356,7 @@ int main( int argc, char **argv )
   break;
 }
   }
-
+  fclose(event_stream);
   rv = close( fd );
   assert( rv == 0 );
 
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v1] Port ndbm

2019-06-21 Thread Vaibhav Gupta
Hello Gedare,
As you suggested, I have placed   nbm.cinlibc/search   directory.
This directory contains   hash.h, db_local.h, hash.c. And all these are
required by ndbm.
.
Here newlib got successfully compiled and It was generating function
symbols.
.
After that when i added the patch to RSB, and tried to compile a test to
check if ndbm is ported successfully or not.
It gave me error:


mv -f fileio/.deps/fileio-init.Tpo fileio/.deps/fileio-init.Po
sparc-rtems5-gcc -DHAVE_CONFIG_H -I.
-I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples
  -I.
-I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/include
-I/home/varodek/development/rtems/kernel/rtems/cpukit/include
-I/home/varodek/development/rtems/kernel/rtems/cpukit/score/cpu/sparc/include
-I/home/varodek/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/lib/libbsp/sparc/erc32/include
-I/home/varodek/development/rtems/kernel/rtems/bsps/include
-I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/include
-I/home/varodek/development/rtems/kernel/rtems/bsps/sparc/erc32/include
-DT_FILE_NAME='"init.c"'
 
-I/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include
  -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -MT hello/hello-init.o -MD -MP -MF
hello/.deps/hello-init.Tpo -c -o hello/hello-init.o `test -f 'hello/init.c'
|| echo
'/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/'`hello/init.c
In file included from
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:17:0:
/home/varodek/development/rtems/5/sparc-rtems5/include/ndbm.h:43:10: fatal
error: db_local.h: No such file or directory
 #include 
  ^~~~

.
I found that db_local.his not present inrtems/5directory.

Thank you
Vaibhav Gupta

On Fri, Jun 21, 2019 at 1:57 AM Vaibhav Gupta 
wrote:

> ---
>  newlib/libc/include/ndbm.h |  84 +
>  newlib/libc/search/Makefile.am |   1 +
>  newlib/libc/search/ndbm.c  | 214 +
>  3 files changed, 299 insertions(+)
>  create mode 100644 newlib/libc/include/ndbm.h
>  create mode 100644 newlib/libc/search/ndbm.c
>
> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
> new file mode 100644
> index 0..f89f97dd0
> --- /dev/null
> +++ b/newlib/libc/include/ndbm.h
> @@ -0,0 +1,84 @@
> +/*-
> + * SPDX-License-Identifier: BSD-3-Clause
> + *
> + * Copyright (c) 1990, 1993
> + * The Regents of the University of California.  All rights reserved.
> + *
> + * This code is derived from software contributed to Berkeley by
> + * Margo Seltzer.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the University nor the names of its contributors
> + *may be used to endorse or promote products derived from this
> software
> + *without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
> LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
> WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + *
> + * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
> + * $FreeBSD$
> + */
> +
> +#ifndef _NDBM_H_
> +#define_NDBM_H_
> +
> +#define __DBINTERFACE_PRIVATE
> +
> +#include 
> +
> +/* Map dbm interface onto db(3). */
> +#define DBM_RDONLY O_RDONLY
> +
> +/* Flags to dbm_store(). */
> +#define DBM_INSERT  0
> +#define DBM_REPLACE 1
> +
> +/*
> + * The db(3) support for ndbm always appends this suffix to the
> + * file name to avoid overwriting the user's original database.
> + */
> +#defineDBM_SUFFIX  ".db"
> +
> +typedef struct {
> +   void *dptr;
> +   int dsize;  /* XXX Should 

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber

On 21/06/2019 10:33, Ravindra Kumar Meena wrote:


The

static void print_item( FILE *f, const client_item *item )

gets already a file, please use it.

The file is currently stdout.  This should be changed to an event
stream
file.  Add the file pointer to client_context and open the file in
main().

Are you suggesting to change the client_context from

typedef struct client_context {
   uint64_t                       ns_threshold;
   uint64_t                       last_ns;
   uint32_t                       last_cpu;
   bool                           flush;
   bool                           only_one_cpu;
   uint64_t                       counter;
   SLIST_HEAD( , client_item )    free_items;
   RB_HEAD( active, client_item ) active_items;
} client_context;
to

typedef struct client_context {
   uint64_t                       ns_threshold;
   uint64_t                       last_ns;
   uint32_t                       last_cpu;
   bool                           flush;
   bool                           only_one_cpu;
   uint64_t                       counter;
   SLIST_HEAD( , client_item )    free_items;
   RB_HEAD( active, client_item ) active_items;
   FILE                           *fptr;


Yes, but give it a more descriptive name like "event_stream".


} client_context;

In this case, I have to create global client_context variable to store 
the file pointer in it. Is that good?


The context is already there in main():

int main( int argc, char **argv )
{
  rtems_record_client_context ctx;
  client_context cctx;

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
>
>
> The
>
> static void print_item( FILE *f, const client_item *item )
>
> gets already a file, please use it.
>
> The file is currently stdout.  This should be changed to an event stream
> file.  Add the file pointer to client_context and open the file in main().
>
> Are you suggesting to change the client_context from

typedef struct client_context {
  uint64_t   ns_threshold;
  uint64_t   last_ns;
  uint32_t   last_cpu;
  bool   flush;
  bool   only_one_cpu;
  uint64_t   counter;
  SLIST_HEAD( , client_item )free_items;
  RB_HEAD( active, client_item ) active_items;
} client_context;

to

typedef struct client_context {
  uint64_t   ns_threshold;
  uint64_t   last_ns;
  uint32_t   last_cpu;
  bool   flush;
  bool   only_one_cpu;
  uint64_t   counter;
  SLIST_HEAD( , client_item )free_items;
  RB_HEAD( active, client_item ) active_items;
  FILE   *fptr;
} client_context;

In this case, I have to create global client_context variable to store the
file pointer in it. Is that good?


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber

On 21/06/2019 08:57, Ravindra Kumar Meena wrote:

 >     seconds = (uint32_t) ( item->ns / 10 );
 >     nanoseconds = (uint32_t) ( item->ns % 10 );
 > +    ns=nanoseconds;

Why not move the nanoseconds variable into the upper block?

Okay


 >     fprintf( f, "%" PRIu32 ".%09" PRIu32 ":", seconds, nanoseconds );
 >   } else {

Which value has "ns" in this path?

na does not have a unique value. It is changing eveytime print_item() is 
called upon



 >     fprintf( f, "*:" );
 > @@ -153,6 +164,22 @@ static void print_item( FILE *f, const
client_item *item )
 >     rtems_record_event_text( item->event ),
 >     item->data
 >   );
 > +
 > +  FILE *fptr = fopen("event", "a");

How often gets this file opened and closed? Do you think that
opening and closing a file is a cheap operation? Could there be a
more efficient solution?

I would like to know your approach. I will implement that only. It's 
better to implement your approach instead of mine. It will save some time.



The

static void print_item( FILE *f, const client_item *item )

gets already a file, please use it.

The file is currently stdout.  This should be changed to an event stream 
file.  Add the file pointer to client_context and open the file in main().





 > +
 > +  if (fptr == NULL)
 > +  {
 > +       printf("Could not open file");
 > +       return 0;

Can void functions return something?

Ooops. I didn't see the void.


You get also a compiler warning for this.

../misc/record/record-main.c: In function ‘print_item’:
../misc/record/record-main.c:173:15: warning: ‘return’ with a value, in 
function returning void

return 0;
   ^




 > +  }
 > +
 > +  ctf_item->cpu=item->cpu;

To which object points the the ctf_item pointer here?

Are you expecting pointer here?


The ctf_item pointer points to a random memory location. You get also a 
warning for this:


../misc/record/record-main.c: In function ‘handler’:
../misc/record/record-main.c:181:3: warning: ‘ctf_item’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]

   fprintf(fptr,ctf_item);
   ^~

It must be:

ctf_event ctf_item;




 > +  ctf_item->event=item->event;
 > +  ctf_item->data=item->data;
 > +  ctf_item->ns=ns;
 > +
 > +  fprintf(fptr,ctf_item);
 > +  fclose(fptr);
 > }
 >
 > static void flush_items( client_context *cctx )
 > --
 > 2.7.4

Did you compile and run the program with this patch?


Yes the rtems-tools was building successfully but I was getting nothing 
in file.


A build with such warnings is not successful. You can use GDB to debug 
your program.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
> > seconds = (uint32_t) ( item->ns / 10 );
> > nanoseconds = (uint32_t) ( item->ns % 10 );
> > +ns=nanoseconds;
>
> Why not move the nanoseconds variable into the upper block?
>
Okay

>
> > fprintf( f, "%" PRIu32 ".%09" PRIu32 ":", seconds, nanoseconds );
> >   } else {
>
> Which value has "ns" in this path?
>
na does not have a unique value. It is changing eveytime print_item() is
called upon

>
> > fprintf( f, "*:" );
> > @@ -153,6 +164,22 @@ static void print_item( FILE *f, const client_item
> *item )
> > rtems_record_event_text( item->event ),
> > item->data
> >   );
> > +
> > +  FILE *fptr = fopen("event", "a");
>
> How often gets this file opened and closed? Do you think that opening and
> closing a file is a cheap operation? Could there be a more efficient
> solution?
>
I would like to know your approach. I will implement that only. It's better
to implement your approach instead of mine. It will save some time.

>
> > +
> > +  if (fptr == NULL)
> > +  {
> > +   printf("Could not open file");
> > +   return 0;
>
> Can void functions return something?
>
Ooops. I didn't see the void.

>
> > +  }
> > +
> > +  ctf_item->cpu=item->cpu;
>
> To which object points the the ctf_item pointer here?
>
Are you expecting pointer here?

>
> > +  ctf_item->event=item->event;
> > +  ctf_item->data=item->data;
> > +  ctf_item->ns=ns;
> > +
> > +  fprintf(fptr,ctf_item);
> > +  fclose(fptr);
> > }
> >
> > static void flush_items( client_context *cctx )
> > --
> > 2.7.4
>
> Did you compile and run the program with this patch?
>

Yes the rtems-tools was building successfully but I was getting nothing in
file.

-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel