This is the mail archive of the rda@sources.redhat.com mailing list for the rda 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]

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


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