Re: [PATCH] rtemsbsd: remove dead code fb.c

2019-08-31 Thread Vijay Kumar Banerjee
ping :-)

On Wed, Aug 28, 2019 at 6:13 PM Vijay Kumar Banerjee <
vijaykumar9...@gmail.com> wrote:

> ---
>  freebsd/sys/dev/fb/fb.c  | 762 ---
>  libbsd.py|   1 -
>  rtemsbsd/include/bsp/nexus-devices.h |   2 -
>  3 files changed, 765 deletions(-)
>  delete mode 100644 freebsd/sys/dev/fb/fb.c
>
> diff --git a/freebsd/sys/dev/fb/fb.c b/freebsd/sys/dev/fb/fb.c
> deleted file mode 100644
> index a3263c91..
> --- a/freebsd/sys/dev/fb/fb.c
> +++ /dev/null
> @@ -1,762 +0,0 @@
> -#include 
> -
> -/*-
> - * SPDX-License-Identifier: BSD-3-Clause
> - *
> - * Copyright (c) 1999 Kazutaka YOKOTA <
> yok...@zodiac.mech.utsunomiya-u.ac.jp>
> - * All rights reserved.
> - *
> - * 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 as
> - *the first lines of this file unmodified.
> - * 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. The name of the author may not be used to endorse or promote
> products
> - *derived from this software without specific prior written
> permission.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
> - */
> -
> -#include 
> -__FBSDID("$FreeBSD$");
> -
> -#include 
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -#include 
> -
> -#include 
> -
> -SET_DECLARE(videodriver_set, const video_driver_t);
> -
> -/* local arrays */
> -
> -/*
> - * We need at least one entry each in order to initialize a video card
> - * for the kernel console.  The arrays will be increased dynamically
> - * when necessary.
> - */
> -
> -static int vid_malloc;
> -static int adapters = 1;
> -static video_adapter_t *adp_ini;
> -static video_adapter_t **adapter = &adp_ini;
> -static video_switch_t  *vidsw_ini;
> -   video_switch_t  **vidsw = &vidsw_ini;
> -
> -#ifdef FB_INSTALL_CDEV
> -static struct cdevsw   *vidcdevsw_ini;
> -static struct cdevsw   **vidcdevsw = &vidcdevsw_ini;
> -#endif
> -
> -#define ARRAY_DELTA4
> -
> -static int
> -vid_realloc_array(void)
> -{
> -   video_adapter_t **new_adp;
> -   video_switch_t **new_vidsw;
> -#ifdef FB_INSTALL_CDEV
> -   struct cdevsw **new_cdevsw;
> -#endif
> -   int newsize;
> -   int s;
> -
> -   if (!vid_malloc)
> -   return ENOMEM;
> -
> -   s = spltty();
> -   newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA);
> -   new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK |
> M_ZERO);
> -   new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
> -   M_WAITOK | M_ZERO);
> -#ifdef FB_INSTALL_CDEV
> -   new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,
> -   M_WAITOK | M_ZERO);
> -#endif
> -   bcopy(adapter, new_adp, sizeof(*adapter)*adapters);
> -   bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);
> -#ifdef FB_INSTALL_CDEV
> -   bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters);
> -#endif
> -   if (adapters > 1) {
> -   free(adapter, M_DEVBUF);
> -   free(vidsw, M_DEVBUF);
> -#ifdef FB_INSTALL_CDEV
> -   free(vidcdevsw, M_DEVBUF);
> -#endif
> -   }
> -   adapter = new_adp;
> -   vidsw = new_vidsw;
> -#ifdef FB_INSTALL_CDEV
> -   vidcdevsw = new_cdevsw;
> -#endif
> -   adapters = newsize;
> -   splx(s);
> -
> -   if (bootverbose)
> -   printf("fb: new array size %d\n", adapters);
> -
> -   return 0;
> -}
> -
> -static void
> -vid_malloc_init(void *arg)
> -{
> -   vid_malloc = TRUE;
> -}
> -
> -SYSINIT(vid_mem, SI_SUB_KMEM, SI_ORDER_ANY, vid_malloc_init, NULL);
> -
> -/*
> - * Low-level frame buffer driver functions
> - * frame buffer subdrivers, such as the VGA driver, call these functions
> - * to initialize the video_adapter st

Re: [PATCH] rtemsbsd: remove dead code fb.c

2019-08-31 Thread Christian Mauderer
Sorry. I've been lazy and hadn't tested it yet. After a short test I
just pushed it. Thanks for the patch.

Best regards

Christian

On 31/08/2019 20:20, Vijay Kumar Banerjee wrote:
> 
> ping :-)
> 
> On Wed, Aug 28, 2019 at 6:13 PM Vijay Kumar Banerjee
> mailto:vijaykumar9...@gmail.com>> wrote:
> 
> ---
>  freebsd/sys/dev/fb/fb.c              | 762 ---
>  libbsd.py                            |   1 -
>  rtemsbsd/include/bsp/nexus-devices.h |   2 -
>  3 files changed, 765 deletions(-)
>  delete mode 100644 freebsd/sys/dev/fb/fb.c
> 
> diff --git a/freebsd/sys/dev/fb/fb.c b/freebsd/sys/dev/fb/fb.c
> deleted file mode 100644
> index a3263c91..
> --- a/freebsd/sys/dev/fb/fb.c
> +++ /dev/null
> @@ -1,762 +0,0 @@
> -#include 
> -
> -/*-
> - * SPDX-License-Identifier: BSD-3-Clause
> - *
> - * Copyright (c) 1999 Kazutaka YOKOTA
>  >
> - * All rights reserved.
> - *
> - * 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 as
> - *    the first lines of this file unmodified.
> - * 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. The name of the author may not be used to endorse or promote
> products
> - *    derived from this software without specific prior written
> permission.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
> - */
> -
> -#include 
> -__FBSDID("$FreeBSD$");
> -
> -#include 
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -#include 
> -
> -#include 
> -
> -SET_DECLARE(videodriver_set, const video_driver_t);
> -
> -/* local arrays */
> -
> -/*
> - * We need at least one entry each in order to initialize a video card
> - * for the kernel console.  The arrays will be increased dynamically
> - * when necessary.
> - */
> -
> -static int             vid_malloc;
> -static int             adapters = 1;
> -static video_adapter_t *adp_ini;
> -static video_adapter_t **adapter = &adp_ini;
> -static video_switch_t  *vidsw_ini;
> -       video_switch_t  **vidsw = &vidsw_ini;
> -
> -#ifdef FB_INSTALL_CDEV
> -static struct cdevsw   *vidcdevsw_ini;
> -static struct cdevsw   **vidcdevsw = &vidcdevsw_ini;
> -#endif
> -
> -#define ARRAY_DELTA    4
> -
> -static int
> -vid_realloc_array(void)
> -{
> -       video_adapter_t **new_adp;
> -       video_switch_t **new_vidsw;
> -#ifdef FB_INSTALL_CDEV
> -       struct cdevsw **new_cdevsw;
> -#endif
> -       int newsize;
> -       int s;
> -
> -       if (!vid_malloc)
> -               return ENOMEM;
> -
> -       s = spltty();
> -       newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA);
> -       new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF,
> M_WAITOK | M_ZERO);
> -       new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
> -           M_WAITOK | M_ZERO);
> -#ifdef FB_INSTALL_CDEV
> -       new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF,
> -           M_WAITOK | M_ZERO);
> -#endif
> -       bcopy(adapter, new_adp, sizeof(*adapter)*adapters);
> -       bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters);
> -#ifdef FB_INSTALL_CDEV
> -       bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters);
> -#endif
> -       if (adapters > 1) {
> -               free(adapter, M_DEVBUF);
> -          

Re: [PATCH] rtemsbsd: remove dead code fb.c

2019-08-31 Thread Vijay Kumar Banerjee
On Sun, Sep 1, 2019 at 12:04 AM Christian Mauderer 
wrote:

> Sorry. I've been lazy and hadn't tested it yet. After a short test I
> just pushed it. Thanks for the patch.
>
> Thanks!
I was just making sure that you saw it, that's why CC'd the other address.
:-)

> Best regards
>
> Christian
>
> On 31/08/2019 20:20, Vijay Kumar Banerjee wrote:
> >
> > ping :-)
> >
> > On Wed, Aug 28, 2019 at 6:13 PM Vijay Kumar Banerjee
> > mailto:vijaykumar9...@gmail.com>> wrote:
> >
> > ---
> >  freebsd/sys/dev/fb/fb.c  | 762
> ---
> >  libbsd.py|   1 -
> >  rtemsbsd/include/bsp/nexus-devices.h |   2 -
> >  3 files changed, 765 deletions(-)
> >  delete mode 100644 freebsd/sys/dev/fb/fb.c
> >
> > diff --git a/freebsd/sys/dev/fb/fb.c b/freebsd/sys/dev/fb/fb.c
> > deleted file mode 100644
> > index a3263c91..
> > --- a/freebsd/sys/dev/fb/fb.c
> > +++ /dev/null
> > @@ -1,762 +0,0 @@
> > -#include 
> > -
> > -/*-
> > - * SPDX-License-Identifier: BSD-3-Clause
> > - *
> > - * Copyright (c) 1999 Kazutaka YOKOTA
> >  > >
> > - * All rights reserved.
> > - *
> > - * 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
> as
> > - *the first lines of this file unmodified.
> > - * 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. The name of the author may not be used to endorse or promote
> > products
> > - *derived from this software without specific prior written
> > permission.
> > - *
> > - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
> > - */
> > -
> > -#include 
> > -__FBSDID("$FreeBSD$");
> > -
> > -#include 
> > -
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -#include 
> > -
> > -#include 
> > -#include 
> > -
> > -#include 
> > -
> > -SET_DECLARE(videodriver_set, const video_driver_t);
> > -
> > -/* local arrays */
> > -
> > -/*
> > - * We need at least one entry each in order to initialize a video
> card
> > - * for the kernel console.  The arrays will be increased dynamically
> > - * when necessary.
> > - */
> > -
> > -static int vid_malloc;
> > -static int adapters = 1;
> > -static video_adapter_t *adp_ini;
> > -static video_adapter_t **adapter = &adp_ini;
> > -static video_switch_t  *vidsw_ini;
> > -   video_switch_t  **vidsw = &vidsw_ini;
> > -
> > -#ifdef FB_INSTALL_CDEV
> > -static struct cdevsw   *vidcdevsw_ini;
> > -static struct cdevsw   **vidcdevsw = &vidcdevsw_ini;
> > -#endif
> > -
> > -#define ARRAY_DELTA4
> > -
> > -static int
> > -vid_realloc_array(void)
> > -{
> > -   video_adapter_t **new_adp;
> > -   video_switch_t **new_vidsw;
> > -#ifdef FB_INSTALL_CDEV
> > -   struct cdevsw **new_cdevsw;
> > -#endif
> > -   int newsize;
> > -   int s;
> > -
> > -   if (!vid_malloc)
> > -   return ENOMEM;
> > -
> > -   s = spltty();
> > -   newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA);
> > -   new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF,
> > M_WAITOK | M_ZERO);
> > -   new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF,
> > -   M_WAITOK | M_ZERO);
> > -#ifdef FB_INSTALL_CDEV
> > -   new_cdevsw = malloc(s

Re: LibBSD is not linking for the BBB BSP

2019-08-31 Thread Vijay Kumar Banerjee
Hello Chris,

The libcurl is now building for BBB with libbsd HEAD on master after the
following commit :
https://git.rtems.org/rtems-libbsd/commit/?id=951c4b92cf8082272f998c02d9b79e664d6f1599

Best regards,
Vijay

On Wed, Aug 28, 2019 at 1:44 AM Vijay Kumar Banerjee <
vijaykumar9...@gmail.com> wrote:

>
>
>
> On Wed, Aug 28, 2019 at 1:42 AM Christian Mauderer 
> wrote:
>
>> On 27/08/2019 21:43, Vijay Kumar Banerjee wrote:
>> > Hello,
>> >
>> > I have sent a patch that fixes this issue:
>> > https://lists.rtems.org/pipermail/devel/2019-August/027540.html
>> >
>> > Please try it with this patch.
>> >
>> > Christian: I have tested it with the sample app on BBB, can you please
>> > review it? :)
>> >
>> > Best regards
>> >
>>
>> Hello Vijay,
>>
>> I agree that it still works. But it is a bit odd. I'm quite sure that it
>> was necessary at some point to pull in the fb module to get the
>> initialization. Now the fb_attach and fb_detach functions are not pulled
>> in. It seems that the whole sys/dev/fb/fb.c file isn't necessary any
>> more. Maybe it would be good to try to remove that too? Otherwise it's
>> only dead code in libbsd.
>>
>> OK. I'll try that and report.
>
>> Best regards
>>
>> Christian
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] rtemsbsd: remove dead code fb.c

2019-08-31 Thread Christian Mauderer
On 31/08/2019 20:37, Vijay Kumar Banerjee wrote:
> 
> 
> On Sun, Sep 1, 2019 at 12:04 AM Christian Mauderer  > wrote:
> 
> Sorry. I've been lazy and hadn't tested it yet. After a short test I
> just pushed it. Thanks for the patch.
> 
> Thanks! 

No problem.

> I was just making sure that you saw it, that's why CC'd the other
> address. :-) 

Normally it's enough to CC one of my mail addresses. I managed to get
the mail filters on my private address up and running again so that I
see mails addressed to me.

> 
> Best regards
> 
> Christian
> 
> On 31/08/2019 20:20, Vijay Kumar Banerjee wrote:
> >
> > ping :-)
> >
> > On Wed, Aug 28, 2019 at 6:13 PM Vijay Kumar Banerjee
> > mailto:vijaykumar9...@gmail.com>
> >>
> wrote:
> >
> >     ---
> >      freebsd/sys/dev/fb/fb.c              | 762
> ---
> >      libbsd.py                            |   1 -
> >      rtemsbsd/include/bsp/nexus-devices.h |   2 -
> >      3 files changed, 765 deletions(-)
> >      delete mode 100644 freebsd/sys/dev/fb/fb.c
> >
> >     diff --git a/freebsd/sys/dev/fb/fb.c b/freebsd/sys/dev/fb/fb.c
> >     deleted file mode 100644
> >     index a3263c91..
> >     --- a/freebsd/sys/dev/fb/fb.c
> >     +++ /dev/null
> >     @@ -1,762 +0,0 @@
> >     -#include 
> >     -
> >     -/*-
> >     - * SPDX-License-Identifier: BSD-3-Clause
> >     - *
> >     - * Copyright (c) 1999 Kazutaka YOKOTA
> >      
> >      >>
> >     - * All rights reserved.
> >     - *
> >     - * 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 as
> >     - *    the first lines of this file unmodified.
> >     - * 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. The name of the author may not be used to endorse or
> promote
> >     products
> >     - *    derived from this software without specific prior written
> >     permission.
> >     - *
> >     - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
> >     - */
> >     -
> >     -#include 
> >     -__FBSDID("$FreeBSD$");
> >     -
> >     -#include 
> >     -
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -#include 
> >     -
> >     -#include 
> >     -#include 
> >     -
> >     -#include 
> >     -
> >     -SET_DECLARE(videodriver_set, const video_driver_t);
> >     -
> >     -/* local arrays */
> >     -
> >     -/*
> >     - * We need at least one entry each in order to initialize a
> video card
> >     - * for the kernel console.  The arrays will be increased
> dynamically
> >     - * when necessary.
> >     - */
> >     -
> >     -static int             vid_malloc;
> >     -static int             adapters = 1;
> >     -static video_adapter_t *adp_ini;
> >     -static video_adapter_t **adapter = &adp_ini;
> >     -static video_switch_t  *vidsw_ini;
> >     -       video_switch_t  **vidsw = &vidsw_ini;
> >     -
> >     -#ifdef FB

Re: [PATCH] record: Add wrappers for malloc() functions

2019-08-31 Thread Chris Johns
On 30/8/19 11:07 pm, Sebastian Huber wrote:
> Introduce new library librtemsrecordwrap.a which contains wrappers for
> operating system functions which produce entry/exit events.

Why not enhance the trace linker to handle the recorder you have developed? It
has been able to wrap malloc and friends for a while now, it is just lacking
support for your recent tracing effort.

Currently the trace linker does not uses the DWARF information to determine the
function signature as the DWARF support was added to the tool kit after it was
created and it has not been updated. The idea is to have DWARF provide the
signature of any suitable function so it can be wrapped.

I do not see any upside adding this library or wrapping specific functions this 
way.

Chris

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


Re: Convert rtems-record-lttng program to C++

2019-08-31 Thread Chris Johns
On 31/8/19 5:29 am, Sebastian Huber wrote:
> attached are two patches which convert the rtems-record-lttng client program 
> from C to C++.

Is this a step to a full C++ app?

The following are some observations about the C++ piece of code...

Why in this code ..

+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#ifndef RTEMS_TOOLS_TRACE_RECORD_CLIENT_H_
+#define RTEMS_TOOLS_TRACE_RECORD_CLIENT_H_
+

are the includes not protected as well? I think the inlines in Client are too
big and would be better in a .cc or .cpp file. Why use an assert when you can
throw an exception?


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