From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.
Date: Mon, 19 Apr 2010 22:33:04 +0200 [thread overview]
Message-ID: <4BCCBE00.7090208@domain.hid> (raw)
In-Reply-To: <4BCCB828.4070506@domain.hid>
Jan Kiszka wrote:
>>>>> diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
>>>>> index 24b1f17..d8038e0 100755
>>>>> Please let me know what precisely you dislike in this approach.
>>>> You have to re-run prepare-kernel when you modify the source.
>>> Normally, you have to anyway as you add some header or some other source
>>> file during this process.
>> Not necessarily.
>
> At worst, you run into a build error and repeat the step. Otherwise, the
> next installation will fix it silently. It's much like the missing
> DECLARE_ASSERT_SYMBOL detection and resolution, IMO even more convenient.
I do not see in what way it is more convenient. I would now have to run
prepare-kernel.sh in a case when I did not have to run it. Adding
DECLARE_ASSERT_SYMBOL to one .c file just triggers the recompilation of
the file, and relinking of the kernel.
>
>>>> I do not like dynamic sources generation. Especially when we have a
>>>> working solution based on C pre-processor macros.
>>>>
>>> My prepare-kernel approach also detects stall debug stuff: The uitron
>>> use of XENO_DEBUG is not backed by any config option.
>> The current candidate would also detect the missing
>> DECLARE_ASSERT_SYMBOL in that case.
>>
>
> But not
>
> #if XENO_DEBUG(DOES_NOT_EXIST)
This can be made during the build-test and thus avoided during a normal
compilation.
I am really, strongly opposed to dynamic code generation. Especially
which greps the whole source tree, this is a waste of cpu power. Most
shell scripts are wrong when first written and do not handle errors
correctly. I already see two or three pitfalls in the script you
proposed. Globally, this is really overkill and risky.
The alternative, a 3 lines C macro, has the inconvenient of requiring
that we declare the symbol, but after all the original solution had the
same, and nobody complained. We do not add debug symbols that often.
What is important however, is that we avoid the current mess which
happened in pod.h and pod.c because they used #ifdef
CONFIG_XENO_OPT_DEBUG_NUCLEUS, and this macro solution allows to detect
such issues..
We can add the missing features of this solution in the build-test
script. This way there is 0 impact on the compilation for end-users. And
since we do run the build-test script, we are sure not to miss any
error. And if the scripts erases xenomai sources directory because of
flaky error checking, it will only erase my xenomai sources.
--
Gilles.
next prev parent reply other threads:[~2010-04-19 20:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 13:58 [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs Gilles Chanteperdrix
2010-04-19 14:00 ` [Xenomai-core] [PATCH] debug: fix direct references to CONFIG_XENO_OPT_DEBUG_* Gilles Chanteperdrix
2010-04-19 14:05 ` [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs Gilles Chanteperdrix
2010-04-19 14:47 ` Jan Kiszka
2010-04-19 14:52 ` Gilles Chanteperdrix
2010-04-19 15:02 ` Jan Kiszka
2010-04-19 15:07 ` Gilles Chanteperdrix
2010-04-19 15:33 ` Jan Kiszka
2010-04-19 15:37 ` Gilles Chanteperdrix
2010-04-19 15:58 ` Jan Kiszka
2010-04-19 16:10 ` Philippe Gerum
2010-04-19 16:14 ` Jan Kiszka
2010-04-19 16:25 ` Philippe Gerum
2010-04-19 16:43 ` Philippe Gerum
2010-04-19 17:22 ` Jan Kiszka
2010-04-19 17:23 ` Philippe Gerum
2010-04-19 17:27 ` Philippe Gerum
2010-04-19 16:27 ` Gilles Chanteperdrix
2010-04-19 17:21 ` Jan Kiszka
2010-04-19 17:26 ` Gilles Chanteperdrix
2010-04-19 17:43 ` Jan Kiszka
2010-04-19 17:56 ` Gilles Chanteperdrix
2010-04-19 18:03 ` Gilles Chanteperdrix
2010-04-19 18:14 ` Gilles Chanteperdrix
2010-04-19 18:18 ` Jan Kiszka
2010-04-19 18:22 ` Gilles Chanteperdrix
2010-04-19 18:38 ` Jan Kiszka
2010-04-19 18:41 ` Gilles Chanteperdrix
2010-04-19 19:08 ` Jan Kiszka
2010-04-19 19:21 ` Gilles Chanteperdrix
2010-04-19 19:37 ` Jan Kiszka
2010-04-19 19:47 ` Gilles Chanteperdrix
2010-04-19 20:08 ` Jan Kiszka
2010-04-19 20:33 ` Gilles Chanteperdrix [this message]
2010-04-19 19:55 ` Gilles Chanteperdrix
2010-04-20 12:48 ` Gilles Chanteperdrix
2010-04-20 14:02 ` Gilles Chanteperdrix
2010-04-19 15:06 ` Philippe Gerum
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=4BCCBE00.7090208@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@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.