public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
* RFA: use enum type for struct symbol_cache definition
@ 2004-10-19 19:47 Jim Blandy
  2004-10-19 20:05 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-10-19 19:47 UTC (permalink / raw)
  To: rda


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-19 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 19:47 RFA: use enum type for struct symbol_cache definition Jim Blandy
2004-10-19 20:05 ` Kevin Buettner
2004-10-19 21:20   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).