diff options
author | Pedro Alves <palves@redhat.com> | 2015-02-12 09:59:03 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-02-19 22:45:47 +0000 |
commit | f63c17760fab6fbf56ba500f7a8c746aa15b34a4 (patch) | |
tree | 7bba01d309f4181669a16387647f39b1884dca9b /include/opcode | |
parent | 07df97c8578023d1c9313bcec8aceef14de3e90b (diff) | |
download | gdb-f63c17760fab6fbf56ba500f7a8c746aa15b34a4.zip gdb-f63c17760fab6fbf56ba500f7a8c746aa15b34a4.tar.gz gdb-f63c17760fab6fbf56ba500f7a8c746aa15b34a4.tar.bz2 |
Wrap a few opcodes headers in extern "C" for C++
These are sufficient to link an --enable-targets=all GDB build in C++
mode, on x86_64 Fedora 20.
include/opcode/
2015-02-19 Pedro Alves <palves@redhat.com>
* cgen.h [__cplusplus]: Wrap in extern "C".
* msp430-decode.h [__cplusplus]: Likewise.
* nios2.h [__cplusplus]: Likewise.
* rl78.h [__cplusplus]: Likewise.
* rx.h [__cplusplus]: Likewise.
* tilegx.h [__cplusplus]: Likewise.
opcodes/
2015-02-19 Pedro Alves <palves@redhat.com>
* microblaze-dis.h [__cplusplus]: Wrap in extern "C".
Diffstat (limited to 'include/opcode')
-rw-r--r-- | include/opcode/ChangeLog | 9 | ||||
-rw-r--r-- | include/opcode/cgen.h | 8 | ||||
-rw-r--r-- | include/opcode/msp430-decode.h | 8 | ||||
-rw-r--r-- | include/opcode/nios2.h | 8 | ||||
-rw-r--r-- | include/opcode/rl78.h | 8 | ||||
-rw-r--r-- | include/opcode/rx.h | 8 | ||||
-rw-r--r-- | include/opcode/tilegx.h | 8 |
7 files changed, 57 insertions, 0 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 52fd462..36bc335 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,12 @@ +2015-02-19 Pedro Alves <palves@redhat.com> + + * cgen.h [__cplusplus]: Wrap in extern "C". + * msp430-decode.h [__cplusplus]: Likewise. + * nios2.h [__cplusplus]: Likewise. + * rl78.h [__cplusplus]: Likewise. + * rx.h [__cplusplus]: Likewise. + * tilegx.h [__cplusplus]: Likewise. + 2015-01-28 James Bowman <james.bowman@ftdichip.com> * ft32.h: New file. diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h index a23f0fd..0efbe79 100644 --- a/include/opcode/cgen.h +++ b/include/opcode/cgen.h @@ -27,6 +27,10 @@ /* ??? IWBN to replace bfd in the name. */ #include "bfd_stdint.h" +#ifdef __cplusplus +extern "C" { +#endif + /* ??? This file requires bfd.h but only to get bfd_vma. Seems like an awful lot to require just to get such a fundamental type. Perhaps the definition of bfd_vma can be moved outside of bfd.h. @@ -1476,4 +1480,8 @@ extern void cgen_clear_signed_overflow_ok (CGEN_CPU_DESC); /* Will an error message be generated if a signed field in an instruction overflows ? */ extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC); +#ifdef __cplusplus +} +#endif + #endif /* OPCODE_CGEN_H */ diff --git a/include/opcode/msp430-decode.h b/include/opcode/msp430-decode.h index 3960278..3edd3f2 100644 --- a/include/opcode/msp430-decode.h +++ b/include/opcode/msp430-decode.h @@ -19,6 +19,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { MSO_unknown, @@ -128,3 +132,7 @@ typedef struct } MSP430_Opcode_Decoded; int msp430_decode_opcode (unsigned long, MSP430_Opcode_Decoded *, int (*)(void *), void *); + +#ifdef __cplusplus +} +#endif diff --git a/include/opcode/nios2.h b/include/opcode/nios2.h index 44dffb7..cbd2b8c 100644 --- a/include/opcode/nios2.h +++ b/include/opcode/nios2.h @@ -25,6 +25,10 @@ #include "bfd.h" +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************** * This file contains structures, bit masks and shift counts used * by the GNU toolchain to define the Nios II instruction set and @@ -153,4 +157,8 @@ extern int nios2_num_regs; extern const struct nios2_opcode * nios2_find_opcode_hash (unsigned long, unsigned long); +#ifdef __cplusplus +} +#endif + #endif /* _NIOS2_H */ diff --git a/include/opcode/rl78.h b/include/opcode/rl78.h index 5495c4c..72adf14 100644 --- a/include/opcode/rl78.h +++ b/include/opcode/rl78.h @@ -26,6 +26,10 @@ #ifndef RL78_OPCODES_H_INCLUDED #define RL78_OPCODES_H_INCLUDED +#ifdef __cplusplus +extern "C" { +#endif + /* For the purposes of these structures, the RL78 registers are as follows, despite most of these being memory-mapped and bank-switched: */ @@ -164,4 +168,8 @@ typedef struct int rl78_decode_opcode (unsigned long, RL78_Opcode_Decoded *, int (*)(void *), void *); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/opcode/rx.h b/include/opcode/rx.h index e4fe05d..41557b2 100644 --- a/include/opcode/rx.h +++ b/include/opcode/rx.h @@ -23,6 +23,10 @@ analyzer, and the disassembler. Given an opcode data source, it decodes the next opcode into the following structures. */ +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { RX_AnySize = 0, @@ -212,3 +216,7 @@ typedef struct registers. 32..47 are condition codes. */ int rx_decode_opcode (unsigned long, RX_Opcode_Decoded *, int (*)(void *), void *); + +#ifdef __cplusplus +} +#endif diff --git a/include/opcode/tilegx.h b/include/opcode/tilegx.h index e0d8aee..ae8f95b 100644 --- a/include/opcode/tilegx.h +++ b/include/opcode/tilegx.h @@ -21,6 +21,10 @@ #ifndef opcode_tile_h #define opcode_tile_h +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned long long tilegx_bundle_bits; @@ -1301,4 +1305,8 @@ typedef tilegx_bundle_bits tile_bundle_bits; #define TILE_LOG2_BUNDLE_ALIGNMENT_IN_BYTES \ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES +#ifdef __cplusplus +} +#endif + #endif /* opcode_tilegx_h */ |