Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Replace some literal consts with enums.
Date: Fri, 01 Feb 2002 14:35:00 -0000	[thread overview]
Message-ID: <3C5B1695.572ADB06@redhat.com> (raw)
In-Reply-To: <15449.62447.668648.375754@localhost.cygnus.com>

Elena Zannoni wrote:
> 
> Cool, I like enums. But the formatting of the enum in the .h file is
> non-GNU.  Is symfile.c the only place where these are used? Would it
> be possible to pull the enum inside symfile.c, if this is the case?
> 
> Thanks
> Elena

The problem is that the variable itself is referred to 
by other files.  It would require some jumping thru hoops
to declare the variable in the header file, but not the 
enum.

> 
> Michael Snyder writes:
>  >
>  > 2002-01-31  Michael Snyder  <msnyder@redhat.com>
>  >
>  >      * symfile.h (enum overlay_debugging_state):
>  >      Define enum constant values for overlay mode.
>  >      * symfile.c (overlay_debugging): Use enums instead of literals.
>  >      (overlay_is_mapped, overlay_auto_command,
>  >      overlay_manual_command): Ditto.
>  >
> 
>  > Index: symfile.h
>  > ===================================================================
>  > RCS file: /cvs/src/src/gdb/symfile.h,v
>  > retrieving revision 1.11
>  > diff -p -r1.11 symfile.h
>  > *** symfile.h        2001/12/07 12:10:15     1.11
>  > --- symfile.h        2002/02/01 01:10:58
>  > *************** extern void find_lowest_section (bfd *,
>  > *** 253,259 ****
>  >   extern bfd *symfile_bfd_open (char *);
>  >
>  >   /* Utility functions for overlay sections: */
>  > ! extern int overlay_debugging;
>  >   extern int overlay_cache_invalid;
>  >
>  >   /* return the "mapped" overlay section  containing the PC */
>  > --- 253,263 ----
>  >   extern bfd *symfile_bfd_open (char *);
>  >
>  >   /* Utility functions for overlay sections: */
>  > ! extern enum overlay_debugging_state {
>  > !   ovly_off,
>  > !   ovly_on,
>  > !   ovly_auto
>  > ! } overlay_debugging;
>  >   extern int overlay_cache_invalid;
>  >
>  >   /* return the "mapped" overlay section  containing the PC */


      reply	other threads:[~2002-02-01 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31 17:15 Michael Snyder
2002-01-31 17:23 ` Andrew Cagney
2002-01-31 18:45 ` Elena Zannoni
2002-02-01 14:35   ` Michael Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C5B1695.572ADB06@redhat.com \
    --to=msnyder@redhat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox