[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] SIGNAL / INTERRUPT checking
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] SIGNAL / INTERRUPT checking |
Date: |
Fri, 27 Feb 2004 15:50:27 +0100 |
User-agent: |
Mutt/1.2.5i |
As Colin O'Flynn wrote:
> Would there be any interest in a program to check for legal SIGNAL /
> INTERRUPT names?
Something like:
sigcheck: $(TARGET).elf
nm $(TARGET).elf | grep SIG_ >/dev/null && \
echo "Warning: it is likely that there are misspelled SIG_* names"
?
:-)
Normally, all SIG_* names are supposed to be resolved into _vector_N
names by the preprocessor magic. So if any SIG_ survived into the
output symbol table, that is most likely the programmer's fault.
Of course, the programmer could legally use constructs like
int SIG_FOO_ARRIVED;
which will be mistaken by the above simple grep command as well,
that's why I made the message a bit vague. A check using awk could be
more sophisticated here, and verify the SIG_* names are actually
referring to functions.
I hope the >/dev/null redirection also works in the WinAVR (MinSYS?)
environment. Otherwise, as long as you've got GNU grep (or 4.4BSD
grep), you can replace it by »grep -q«, but that is not portable to
older Unix grep utilities.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
- [avr-libc-dev] patch for iom162.h - signal name consistency, Artur Lipowski, 2004/02/17
- Re: [avr-libc-dev] patch for iom162.h - signal name consistency, Theodore A. Roth, 2004/02/26
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking,
Joerg Wunsch <=
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, E. Weddington, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, E. Weddington, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, Colin O'Flynn, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, Colin O'Flynn, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, E. Weddington, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, Colin O'Flynn, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, E. Weddington, 2004/02/27
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, Colin O'Flynn, 2004/02/28
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, E. Weddington, 2004/02/28
- Re: [avr-libc-dev] SIGNAL / INTERRUPT checking, Clemens Buchacher, 2004/02/29