This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] The birth of regcache.h
- To: Steven Johnson <sbjohnson at ozemail dot com dot au>,Michael Snyder <msnyder at cygnus dot com>
- Subject: Re: [PATCH] The birth of regcache.h
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 26 Oct 2000 00:13:04 +1100
- Cc: Fernando Nasser <fnasser at cygnus dot com>,gdb-patches at sourceware dot cygnus dot com
- References: <39BE2829.4457A12F@cygnus.com>
Fernando Nasser wrote:
> I have finished creating regcache.h see below:
>
> 2000-09-12 Steven Johnson <sbjohnson@ozemail.com.au>
>
> * regcache.h : New header. Collates definitions that used to be
> scattered throughout GDB.
FYI, you don't need no fancy formatting :-) Something like:
* regcache.h: New header. Collates definitions that used to be
scattered throughout GDB.
is sufficient. Also, remember to use complete sentences (leading
capital letter, fullstop) and an indentation style consistent with the
rest of the file. In emacs, M-Q helps a lot.
> diff -C2 -r -b -N ../gdb_cvs/src/gdb/regcache.h src/gdb/regcache.h
> *** ../gdb_cvs/src/gdb/regcache.h Thu Jan 1 10:00:00 1970
> --- src/gdb/regcache.h Tue Sep 12 20:54:18 2000
> ***************
> *** 0 ****
> --- 1,113 ----
> + /* Definitions for operations in regcache.c, for GDB.
> + Copyright 1986, 1987, 1989, 1992-1996, 2000 Free Software Foundation, Inc.
(C) dates like ``1992-1996'' now need to be expanded.
> + #if !defined (REGCACHE_H)
> + #define REGCACHE_H 1
> +
> + #include "defs.h"
I can't think of a reason for including "defs.h", everything already
includes it.
> + /* Definitions of register validity states. (As recorded by register_valid) */
> + #define REGISTER_CACHE_UNAVAILABLE (1)
> + #define REGISTER_CACHE_VALID (0)
> + #define REGISTER_CACHE_INVALID (-1)
This should be an enum rather than macros. Probably ``REGCACHE_*'' so
the name is consistent with the file. Perhaphs we should make things
use this :-)
Assuming Michael Snyder has no objections, (and the above are fixed)
this can go in.
Andrew