Re: [RFA 10/42] Move some code from buildsym to stabsread

Simon Marchi
2018-07-08T16:35:31Z

On 2018-07-05 03:16 PM, Keith Seitz wrote:
> I just have one comment:
>
> On 05/22/2018 09:58 PM, Tom Tromey wrote:
>> diff --git a/gdb/stabsread.c b/gdb/stabsread.c
>> index 4cfefaa3e0..13663106dc 100644
>> --- a/gdb/stabsread.c
>> +++ b/gdb/stabsread.c
>> @@ -44,6 +44,7 @@
>> #include "target-float.h"
>> #include "cp-abi.h"
>> #include "cp-support.h"
>> +#include "bcache.h"
>> #include <ctype.h>
>>
>> /* Ask stabsread.h to define the vars it normally declares `extern'. */
>> @@ -4839,6 +4840,18 @@ find_name_end (const char *name)
>> }
>> }
>>
>> +\f
>> +
>> +/* Compute a small integer hash code for the given name. */
>> +
>> +int
>> +hashname (const char *name)
>> +{
>> + return hash (name, strlen (name)) % HASHSIZE;
>> +}
>> +
>> +\f
>> +
>> /* Initializer for this module. */
>>
>> void
>
> Seems some superfluous newlines got pasted in here?

The newline in the middle is actually a form feed character, as recommended in the
GNU coding standards [1]:

"Please use formfeed characters (control-L) to divide the program into pages at logical
places (but not within a function). It does not matter just how long the pages are,
since they do not have to fit on a printed page. The formfeeds should appear alone on
lines by themselves."

I'd be really curious to know if anybody cares about them today. I know in some
editors you can jump from on to the other. In my editor, they just appear as the
little "special character" box with the ascii/unicode in it.

[1] https://www.gnu.org/prep/standards/html_node/Formatting.html

> Please use "See stabsread.h" and move the comment into the header.
>
> Okay, that's actually two comments, but one is so trivial, I didn't count it.
>
> Keith
>

LGTM with Keith's comment about the comment addressed.

Simon