This is the mail archive of the gdb-patches@sourceware.org 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 10/42] Move some code from buildsym to stabsread


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)
>      }
>  }
>  
> +
> +
> +/* Compute a small integer hash code for the given name.  */
> +
> +int
> +hashname (const char *name)
> +{
> +  return hash (name, strlen (name)) % HASHSIZE;
> +}
> +
> +
> +
>  /* Initializer for this module.  */
>  
>  void

Seems some superfluous newlines got pasted in here?
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


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