From: Elena Zannoni <ezannoni@redhat.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: Elena Zannoni <ezannoni@redhat.com>,
GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] dwarf2cfi cleanup + new file
Date: Fri, 17 May 2002 07:37:00 -0000 [thread overview]
Message-ID: <15589.5531.423925.941457@localhost.redhat.com> (raw)
In-Reply-To: <3CE50246.1050903@suse.cz>
Michal Ludvig writes:
> Hi,
> I have created new header file dwarf2read.h and put all extern
> declarations from dwarf2read.c there. This eliminates the need of having
> them in dwarf2cfi.c, so I deleted them from there as well.
>
> OK to commit?
Almost. If we decide to introduce a dwarf2read.h file (I think this
is a good idea) then we should also eliminate the extern's that are in
symfile.h. I.e.:
/* From dwarf2read.c */
extern int dwarf2_has_info (bfd * abfd);
extern void dwarf2_build_psymtabs (struct objfile *, int);
extern void dwarf2_build_frame_info (struct objfile *);
The dwarf2_build_frame_info should definitely go in dwarf2cfi.h, since
it's coming from dwarf2cfi.c, not dwarf2read.c. Then we should add
the appropriate #include's to all the files that need these functions
(not too many, luckily) and update the makefile dependencies.
As far as dwarf2read.h, below:
#include "bfd.h"
#include "objfiles.h"
Gdb is trying to get away from nested includes. These should go in the
files that include dwarf2read.h.
Thanks
Elena
>
> 2002-05-17 Michal Ludvig <mludvig@suse.cz>
> * dwarf2read.h: New file
> * dwarf2read.c: Included dwarf2read.h
> * dwarf2cfi.c: Ditto, removed extern declarations.
>
> Michal Ludvig
> --
> * SuSE CR, s.r.o * mludvig@suse.cz
> * +420 2 9654 5373 * http://www.suse.cz
> /* Declarations of symbols exported from dwarf2read.c.
> Copyright 2001, 2002
> Free Software Foundation, Inc.
> Contributed by Michal Ludvig, SuSE Labs.
>
> This file is part of GDB.
>
> This program is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2 of the License, or
> (at your option) any later version.
>
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with this program; if not, write to the Free Software
> Foundation, Inc., 59 Temple Place - Suite 330,
> Boston, MA 02111-1307, USA. */
>
>
> #ifndef DWARF2READ_H
> #define DWARF2READ_H
>
> #include "bfd.h"
> #include "objfiles.h"
>
> extern file_ptr dwarf_frame_offset;
> extern unsigned int dwarf_frame_size;
> extern file_ptr dwarf_eh_frame_offset;
> extern unsigned int dwarf_eh_frame_size;
>
> void dwarf2_build_psymtabs (struct objfile *objfile, int mainline);
> int dwarf2_has_info (bfd *abfd);
> char * dwarf2_read_section (struct objfile *objfile, file_ptr offset,
> unsigned int size);
>
> #endif /* DWARF2READ_H */
> Index: dwarf2read.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2read.c,v
> retrieving revision 1.49
> diff -c -3 -p -r1.49 dwarf2read.c
> *** dwarf2read.c 28 Feb 2002 11:21:16 -0000 1.49
> --- dwarf2read.c 17 May 2002 13:09:18 -0000
> ***************
> *** 37,42 ****
> --- 37,43 ----
> #include "demangle.h"
> #include "expression.h"
> #include "filenames.h" /* for DOSish file names */
> + #include "dwarf2read.h"
>
> #include "language.h"
> #include "complaints.h"
> Index: dwarf2cfi.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
> retrieving revision 1.1.2.2
> diff -c -3 -p -r1.1.2.2 dwarf2cfi.c
> *** dwarf2cfi.c 14 May 2002 09:50:39 -0000 1.1.2.2
> --- dwarf2cfi.c 17 May 2002 13:09:18 -0000
> ***************
> *** 28,33 ****
> --- 28,34 ----
> #include "elf/dwarf2.h"
> #include "inferior.h"
> #include "regcache.h"
> + #include "dwarf2read.h"
> #include "dwarf2cfi.h"
>
> /* Common Information Entry - holds information that is shared among many
> *************** static struct fde_array fde_chunks;
> *** 184,199 ****
> /* Obstack for allocating temporary storage used during unwind operations. */
> static struct obstack unwind_tmp_obstack;
>
> - extern file_ptr dwarf_frame_offset;
> - extern unsigned int dwarf_frame_size;
> - extern file_ptr dwarf_eh_frame_offset;
> - extern unsigned int dwarf_eh_frame_size;
> -
> static char *dwarf_frame_buffer;
> - \f
> -
> - extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
> - unsigned int size);
>
> static struct fde_unit *fde_unit_alloc (void);
> static struct cie_unit *cie_unit_alloc (void);
> --- 185,191 ----
next prev parent reply other threads:[~2002-05-17 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-17 6:14 Michal Ludvig
2002-05-17 7:37 ` Elena Zannoni [this message]
2002-05-17 10:51 ` Andrew Cagney
2002-05-17 13:36 ` Andrew Cagney
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=15589.5531.423925.941457@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mludvig@suse.cz \
/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