public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* New ARI warning Wed Apr 21 01:54:25 UTC 2010
@ 2010-04-21  1:54 GDB Administrator
  2010-04-21  7:40 ` Explanation: " Pierre Muller
  0 siblings, 1 reply; 4+ messages in thread
From: GDB Administrator @ 2010-04-21  1:54 UTC (permalink / raw)
  To: gdb-patches

266,267d265
< gdb/defs.h:119: code: long long: Do not use 'long long', instead use LONGEST
gdb/defs.h:119:#define LONGEST long long
< gdb/defs.h:120: code: long long: Do not use 'long long', instead use LONGEST
gdb/defs.h:120:#define ULONGEST unsigned long long
1072a1071
> gdb/procfs.c:4090: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/procfs.c:4090:      sprintf (name, ', pi->pid, map->pr_mapname);
1100d1098
< gdb/procfs.c:5659: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/procfs.c:5659:      sprintf (name, ', pi->pid, map->pr_mapname);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Explanation: New ARI warning Wed Apr 21 01:54:25 UTC 2010
  2010-04-21  1:54 New ARI warning Wed Apr 21 01:54:25 UTC 2010 GDB Administrator
@ 2010-04-21  7:40 ` Pierre Muller
  2010-04-21  8:01   ` Pierre Muller
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2010-04-21  7:40 UTC (permalink / raw)
  To: gdb-patches; +Cc: 'Joel Brobecker'

  Just to explain this email again:

  This is an automatic email generated by the 
script update-web-ari that regenerates every night the ARI page.
http://sourceware.org/gdb/current/ari/

  Recently, 
http://sourceware.org/ml/gdb-patches/2010-04/msg00149.html
Tom agreed that we should try to
send these email to gdb-patches directly.
  I committed this change to update-web-ari 
in revision 1.148 date 2010/04/08.
  Since that date, this is the first email.

  Let me try to explain its content.
> Objet : New ARI warning Wed Apr 21 01:54:25 UTC 2010
  This title indicates that the script believes
that a recent change to either ARI handling in the ss directory
or in the sources of GDB repository generated
an additional ARI warning.
  Reminder: ARI stands for Awk Regression Index
The name is probably due to the fact that it is mainly a
awk language script meant to list a series
of problems in the GDB sources.
See the link above.

> 266,267d265
> < gdb/defs.h:119: code: long long: Do not use 'long long', instead use
> LONGEST
> gdb/defs.h:119:#define LONGEST long long
> < gdb/defs.h:120: code: long long: Do not use 'long long', instead use
> LONGEST
> gdb/defs.h:120:#define ULONGEST unsigned long long

  These two lines by themselves would not have generated an
email to gdb-patches, because these correspond to two warnings
that disappeared.
  The reason of this is that I change gdb_ari.sh yesterday.
----------------------------
revision 1.102
date: 2010/04/20 09:39:21;  author: muller;  state: Exp;  lines: +2 -0
* Allow two "long long" in defs.h
----------------------------
  This is because defs.h has two
occurrences of "long long" that are necessary,
and as such should not generate a warning.


> 1072a1071
> > gdb/procfs.c:4090: code: sprintf: Do not use sprintf, instead use
> xstrprintf
> gdb/procfs.c:4090:      sprintf (name, ', pi->pid, map->pr_mapname);
> 1100d1098
> < gdb/procfs.c:5659: code: sprintf: Do not use sprintf, instead use
> xstrprintf
> gdb/procfs.c:5659:      sprintf (name, ', pi->pid, map->pr_mapname);

  This is the part that triggered the email to gdb-patches
In the series of patches committed by Joel tonight,
he added some uses of sprint function, 
which is banned by those ARI rules.
 Note that today procfs.c has 25 uses of sprint
instead of 23 yesterday.

  With this new automated email generation,
people committing patches that increase the number of
ARI warnings will at least get some information about it.
  Any simple patch that removes those warnings
should probably be considered as obvious.

Pierre Muller
as ARI maintainer.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Explanation: New ARI warning Wed Apr 21 01:54:25 UTC 2010
  2010-04-21  7:40 ` Explanation: " Pierre Muller
@ 2010-04-21  8:01   ` Pierre Muller
  2010-04-21 14:22     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2010-04-21  8:01 UTC (permalink / raw)
  To: gdb-patches; +Cc: 'Joel Brobecker'

  Whoops, I forgot ONE big limitation
that might apply to today's email.

> > 1072a1071
> > > gdb/procfs.c:4090: code: sprintf: Do not use sprintf, instead use
> > xstrprintf
> > gdb/procfs.c:4090:      sprintf (name, ', pi->pid, map->pr_mapname);
> > 1100d1098
> > < gdb/procfs.c:5659: code: sprintf: Do not use sprintf, instead use
> > xstrprintf
> > gdb/procfs.c:5659:      sprintf (name, ', pi->pid, map->pr_mapname);

   I wasn't careful enough:
The first 1072 is with '>' meaning new,
but the second is '<' meaning removal.
  Moreover the two lines are identical which probably means that
this is just due to reordering.

  Thus the total number of 'sprintf' uses did not change
but the reordering of the functions that Joel
made lead to this email.

  My apologies to Joel.

  So this reveals already a limitation
of the script: If you move function around, 
it becomes difficult to realize for the script that this is 
only a move, and no new warning.

  Sorry for my wrong first explanation,


Pierre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Explanation: New ARI warning Wed Apr 21 01:54:25 UTC 2010
  2010-04-21  8:01   ` Pierre Muller
@ 2010-04-21 14:22     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2010-04-21 14:22 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

>   Whoops, I forgot ONE big limitation
> that might apply to today's email.
> 
> > > 1072a1071
> > > > gdb/procfs.c:4090: code: sprintf: Do not use sprintf, instead use
> > > xstrprintf
> > > gdb/procfs.c:4090:      sprintf (name, ', pi->pid, map->pr_mapname);
> > > 1100d1098
> > > < gdb/procfs.c:5659: code: sprintf: Do not use sprintf, instead use
> > > xstrprintf
> > > gdb/procfs.c:5659:      sprintf (name, ', pi->pid, map->pr_mapname);

Not to worry - that's what I deduced when I read your email yesterday
night. If anything, it draws our attention to a known issue that has
probably been ignored for years...

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-21 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21  1:54 New ARI warning Wed Apr 21 01:54:25 UTC 2010 GDB Administrator
2010-04-21  7:40 ` Explanation: " Pierre Muller
2010-04-21  8:01   ` Pierre Muller
2010-04-21 14:22     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).