Re: Auto update ChangeLog for binutils+gdb commits?

Tom Tromey
2020-05-30T19:41:41Z

>> Could you run it on some recent gdb commits and show the output?

I tried it out a little as well.

It seems promising. However, I noticed some issues.

First, in the basic output:

Martin> * gdb/Makefile.in:

It would be more convenient for editing if the ":" were followed by a
space, since I'm normally going to have to add one anyway.

Next, try it like:

$ git show af0b2a3e85df9f49a3528e5b7578fcf9412f1acc | ./contrib/mklog.py

I get:

gdb/ChangeLog:

* ChangeLog:
* dwarf2/abbrev.c (hash_abbrev):
(abbrev_table::add_abbrev):
(struct abbrev_info):
(abbrev_table::lookup_abbrev):
(abbrev_table::read):
* dwarf2/abbrev.h (GDB_DWARF2_ABBREV_H):
(struct abbrev_table):

abbrev.c says:

(struct abbrev_info):

... but I didn't see anything that would be relevant in the patch.

abbrev.h says:

* dwarf2/abbrev.h (GDB_DWARF2_ABBREV_H):

... but this is very incorrect. In gdb we normally ignore changes to
the #includes, but if needed I suppose this could mention the addition
of one; but either way mentioning the include guard name is wrong --
macros should be ignored unless each preceding line ends with a
backslash.

If you try 89bcba74f89baceba3fa7387622e3d60e1de02e8, you'll see that
mklog ignores namespaces.

Martin> Sure. You're a skilled GDB developer with long experience. But for newcomers or
Martin> people without the scripts, this can simplify their workflow.

IMO we should optimize for reducing the overhead for regular
contributors. Newcomers normally have many things to learn.

Tom