This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] dwarf2read.c: complain() -> complaint()


In a recently submitted patch, I added a new complaint to dwarf2read.c
using the old (deprecated) interface. Andrew asked me to use the new
interface. I've generated a patch for dwarf2read.c which converts all
calls to complain() to complaint().

I've written a script to do this transformation. It finds all of the
deprecated_complaint structs and counts the uses of these structs. (Surprisingly, some were unused!) For cases where there's more than
one occurrence, it creates a new function as suggested in
complaints.h. For the rest, it performs the obvious transformation.

The script also uses GNU indent to perform localized reindentations of
the affected text.

If this patch is accepted (and this approach is deemed acceptable), I'll
generate patches for the other files which still use complain().
Definitly fine with the theory. Two reservations (really just one).

- how is the result with -Wformat? The reason behind switching from complain() to complaint was to get the parameters checked and hence find some nasty address printing bugs.

- I suspect it will need a visual audit to check for any cases of:
"%08lx", (long) core_addr_variable

Looking through this specific patch, though, turned up no cases where this occured. So you must have that those problems covered.

Symtab maintainers?

Andrew

(PS, yes, I'd noticed that some of the complaints were unused).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]