This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Splint report and scripts for gdb (was: Expand bitpos and type.length)
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>, Sergio Durigan <sdurigan at redhat dot com>
- Date: Mon, 2 Jul 2012 08:19:23 +0530
- Subject: Re: Splint report and scripts for gdb (was: Expand bitpos and type.length)
- References: <20120628184814.30a8977f@spoyarek> <20120701193755.GA8904@host2.jankratochvil.net>
On Sun, 1 Jul 2012 21:37:55 +0200, Jan wrote:
> While you now consider it as two different records. But this should
> not miss any record, it just adds more records to process - although
> you discard these in splint-siddhesh-process-locdiff by rules like so
> it does not matter: if (/Previous definition of \w+: \w+/) {
> Not sure if it was all intentional or not.
It was intentional, because the extra spaces are also used in cases
where there are two warnings for one line.
> # If the TYPE_LENGTH expression is a builtin_type then we're
> safe. $_ = $expr;
> return 1 if (/builtin_type[^ ]+->length/);
> - I would not call it safe, it can be a part of an arbitrary large
> expression. But the 6 cases where it applies are OK.
Yes, this was hard-coding on my part based on the input.
> if (/^ (Right)|(Left) operand of \W+ /) {
> - it did not discard any important line but the regex is dangerously
> wrong, it does:
> if (/^ Right/ || /Left operand of \W+ /) {
This should have been:
if (/^ ((Right)|(Left)) operand of \W+ /) {
>
> Otherwise I have made comments to your .report file. I believe we
> should follow now the 'compact' form instead. It is a lot of work as
> I see.
Thanks, that was the report before I did further work on the script.
I'll work on the rest and post the report with the compact form next.
Regards,
Siddhesh