From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4225 invoked by alias); 19 Oct 2004 19:47:31 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 4212 invoked from network); 19 Oct 2004 19:47:30 -0000 To: rda@sources.redhat.com Subject: RFA: use enum type for struct symbol_cache definition From: Jim Blandy Date: Tue, 19 Oct 2004 19:47:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-q4/txt/msg00014.txt.bz2 2004-10-19 Jim Blandy * thread-db.c (enum symbol_cache_defined): Move this definition above that of (struct symbol_cache), and give it a name. (struct symbol_cache): Use that enum as the type of 'defined_p', so the debugger will print symbol cache entries more helpfully. *** thread-db.c.~1.5.~ 2004-09-22 14:29:41.000000000 -0500 --- thread-db.c 2004-10-19 14:42:28.000000000 -0500 *************** *** 53,68 **** * in an "undefined" state, and then defined later. */ struct symbol_cache { char *name; paddr_t value; ! int defined_p; struct symbol_cache *next; } *symbol_list; - /* The "defined_p" field may have one of the following three values. */ - enum { UNDEFINED, REQUESTED, DEFINED }; - /* Function: add_symbol_to_list Add a symbol to the symbol cache. First checks to see if an entry is already in there, and re-uses it if so. This way --- 53,68 ---- * in an "undefined" state, and then defined later. */ + /* The "defined_p" field may have one of the following three values. */ + enum symbol_cache_defined { UNDEFINED, REQUESTED, DEFINED }; + struct symbol_cache { char *name; paddr_t value; ! enum symbol_cache_defined defined_p; struct symbol_cache *next; } *symbol_list; /* Function: add_symbol_to_list Add a symbol to the symbol cache. First checks to see if an entry is already in there, and re-uses it if so. This way