From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5456 invoked by alias); 1 Feb 2002 22:35:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5420 invoked from network); 1 Feb 2002 22:35:28 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 1 Feb 2002 22:35:28 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA19077; Fri, 1 Feb 2002 14:35:26 -0800 (PST) Message-ID: <3C5B1695.572ADB06@redhat.com> Date: Fri, 01 Feb 2002 14:35:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Elena Zannoni CC: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Replace some literal consts with enums. References: <200202010108.g1118GN31973@reddwarf.cygnus.com> <15449.62447.668648.375754@localhost.cygnus.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00014.txt.bz2 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 > > > > * 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 */