This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [Patch]: grep ^func
On Jan 25, 2:33pm, Don Howard wrote:
> 2001-01-25 Don Howard <dhoward@redhat.com>
>
> * ch-lang.h: Whitespace fixes so that function names appear at the
> very start of a line. This is so that ``grep ^func'' works.
You need to move the line beginning with "very" so that the 'v' lines
up under the "*".
> * config/alpha/tm-alpha.h: ""
Instead of "", the convention is to use ``Likewise.'' or ``Ditto.'' E.g,
* config/alpha/tm-alpha.h: Likewise.
> Index: ch-lang.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/ch-lang.h,v
> retrieving revision 1.2
> diff -p -u -w -r1.2 ch-lang.h
> --- ch-lang.h 2000/05/28 01:12:26 1.2
> +++ ch-lang.h 2001/01/25 20:55:18
> @@ -1,5 +1,5 @@
> /* Chill language support definitions for GDB, the GNU debugger.
> - Copyright 1992, 2000 Free Software Foundation, Inc.
> + Copyright 1992, 2000, 2001 Free Software Foundation, Inc.
>
> This file is part of GDB.
>
> @@ -36,5 +36,4 @@ extern int chill_val_print (struct type
> extern int chill_value_print (struct value *, struct ui_file *,
> int, enum val_prettyprint);
>
> -extern LONGEST
> -type_lower_upper (enum exp_opcode, struct type *, struct type **);
> +extern LONGEST type_lower_upper (enum exp_opcode, struct type *, struct type **);
I think it'd also be nice to reindent these declarations so that
individual lines do not exceed 80 characters. For something like
this, I usually run GNU indent on the line in question (and no more).
So, the above changes from...
extern LONGEST type_lower_upper (enum exp_opcode, struct type *, struct type **);
to...
extern LONGEST type_lower_upper (enum exp_opcode, struct type *,
struct type **);
Oddly enough, you have to put ``extern LONGEST'' on the same line as
``type_lower_upper'' for indent to do anything.
There are a number of other declarations that you've reformatted
which need the same treatment. I'll leave it to you to find the
rest of them.
> Index: go32-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/go32-nat.c,v
> retrieving revision 1.6
> diff -p -u -w -r1.6 go32-nat.c
> --- go32-nat.c 2000/08/06 07:19:38 1.6
> +++ go32-nat.c 2001/01/25 20:55:29
> @@ -1,6 +1,6 @@
> /* Native debugging support for Intel x86 running DJGPP.
> - Copyright 1997, 1999 Free Software Foundation, Inc.
> - Written by Robert Hoehne.
> + Copyright 1997, 1999, 2001 Free Software Foundation, Inc. Written
> + by Robert Hoehne.
>
> This file is part of GDB.
>
> @@ -118,20 +118,31 @@ typedef struct {
> int redirected;
> } cmdline_t;
>
> -void redir_cmdline_delete (cmdline_t *ptr) {ptr->redirected = 0;}
> -int redir_cmdline_parse (const char *args, cmdline_t *ptr)
> +void
> +redir_cmdline_delete (cmdline_t *ptr)
> {
> + ptr->redirected = 0;
> +}
> +int
> +redir_cmdline_parse (const char *args, cmdline_t *ptr)
> +{
> return -1;
> }
> -int redir_to_child (cmdline_t *ptr)
> +int
> +redir_to_child (cmdline_t *ptr)
> {
> return 1;
> }
> -int redir_to_debugger (cmdline_t *ptr)
> +int
> +redir_to_debugger (cmdline_t *ptr)
> {
> return 1;
> +}
> +int
> +redir_debug_init (cmdline_t *ptr)
> +{
> + return 0;
> }
> -int redir_debug_init (cmdline_t *ptr) { return 0; }
> #endif /* __DJGPP_MINOR < 3 */
>
> extern void _initialize_go32_nat (void);
For the above, I think it'd be nice to put a blank line between functions.
> Index: somsolib.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/somsolib.h,v
> retrieving revision 1.2
> diff -p -u -w -r1.2 somsolib.h
> --- somsolib.h 2000/05/28 01:12:29 1.2
> +++ somsolib.h 2001/01/25 20:55:53
> @@ -1,5 +1,5 @@
> /* HP SOM Shared library declarations for GDB, the GNU Debugger.
> - Copyright (C) 1992 Free Software Foundation, Inc.
> + Copyright (C) 1992, 2001 Free Software Foundation, Inc.
I think you should nuke the (C) while you're at it.
> Index: stabsread.c
[...]
> -static void
> -read_one_struct_field (struct field_info *, char **, char *,
> +static void read_one_struct_field (struct field_info *, char **, char *,
> struct type *, struct objfile *);
Another note on reindenting... declarations like the above (which already
spanned multiple lines) should be reindented too.