This is the mail archive of the
rda@sources.redhat.com
mailing list for the rda project.
RFA: use enum type for struct symbol_cache definition
- From: Jim Blandy <jimb at redhat dot com>
- To: rda at sources dot redhat dot com
- Date: 19 Oct 2004 14:45:27 -0500
- Subject: RFA: use enum type for struct symbol_cache definition
2004-10-19 Jim Blandy <jimb@redhat.com>
* 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