forked from Imagelibrary/binutils-gdb
Move 'enum bfd_endian' to a non-generated header
Because: - GDB uses enum bfd_endian extensively. - gdbserver does not build/link-with bfd. - We'd like to share more code between gdb and gdbserver. It'd make our lives easier if we could just use bfd_endian in gdbserver as well. The problem is that bfd_endian is defined in a header that only exists if bfd is built/configured. Thus this moves bfd_endian to a separate header, so gdbserver can include it. bfd/ChangeLog: 2016-02-11 Pedro Alves <palves@redhat.com> * bfd-in.h: Include bfd-types.h * bfd-in2.h: Regenerate. * targets.c (enum bfd_endian): Moved to include/bfd-types.h. include/ChangeLog: 2016-02-11 Pedro Alves <palves@redhat.com> * bfd-types.h: New file.
This commit is contained in:
@@ -35,6 +35,7 @@ extern "C" {
|
||||
#include "ansidecl.h"
|
||||
#include "symcat.h"
|
||||
#include <sys/stat.h>
|
||||
#include "bfd-types.h"
|
||||
|
||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
||||
#ifndef SABER
|
||||
|
||||
@@ -42,6 +42,7 @@ extern "C" {
|
||||
#include "ansidecl.h"
|
||||
#include "symcat.h"
|
||||
#include <sys/stat.h>
|
||||
#include "bfd-types.h"
|
||||
|
||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
||||
#ifndef SABER
|
||||
@@ -7124,8 +7125,6 @@ enum bfd_flavour
|
||||
bfd_target_sym_flavour
|
||||
};
|
||||
|
||||
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
||||
|
||||
/* Forward declaration. */
|
||||
typedef struct bfd_link_info _bfd_link_info;
|
||||
|
||||
|
||||
@@ -171,8 +171,6 @@ DESCRIPTION
|
||||
. bfd_target_sym_flavour
|
||||
.};
|
||||
.
|
||||
.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
||||
.
|
||||
.{* Forward declaration. *}
|
||||
.typedef struct bfd_link_info _bfd_link_info;
|
||||
.
|
||||
|
||||
26
include/bfd-types.h
Normal file
26
include/bfd-types.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* bfd core types that do not depend on configuration.
|
||||
|
||||
Copyright (C) 1990-2016 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
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 3 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef BFD_TYPES_H
|
||||
#define BFD_TYPES_H
|
||||
|
||||
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user