mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
ef9866970c
This fixes a TODO item and also fixes an error which we get when building with no optimizations (-O0) in at least gcc 8.2.1. Tested with sims that use cgen code lm32, or1k, cris, m32r and inlining is working corretly. Reference Error: gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_MODEL='"or1200"' -DWITH_ALIGNMENT=STRICT_ALIGNMENT \ -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31 -DWITH_TARGET_ADDRESS_BITSIZE=32 \ -DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG -DDEFAULT_INLINE=0 -DWITH_SCACHE=16384 \ -I. -I../../../binutils-gdb/sim/or1k -I../common -I../../../binutils-gdb/sim/or1k/../common \ -I../../include -I../../../binutils-gdb/sim/or1k/../../include -I../../bfd \ -I../../../binutils-gdb/sim/or1k/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/or1k/../../opcodes \ -g -o run nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a \ -ldl -lz -lm /usr/bin/ld: libsim.a(mloop.o): in function `extract': /home/shorne/work/openrisc/gdb-musl/sim/or1k/mloop.c:82: undefined reference to `sim_addr_range_hit_p' /usr/bin/ld: /home/shorne/work/openrisc/gdb-musl/sim/or1k/mloop.c:83: undefined reference to `sim_addr_range_hit_p' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:305: run] Error 1 sim/common/ChangeLog: * Make-common.in (sim-arange_h): Remove sim-arange.c * sim-arange.c: Remove SIM_ARANGE_C. Add ifdef for _SIM_ARANGE_C_. Include "sim-arange.h". Remove include for unused "sim-assert.h". Remove DEFINE_INLINE_P. Remove DEFINE_NON_INLINE_P. (sim_addr_range_add): Declare as INLINE_SIM_ARANGE. (sim_addr_range_delete): Declare as INLINE_SIM_ARANGE. (sim_addr_range_hit_p): Change from SIM_ARANGE_INLINE to INLINE_SIM_ARANGE. * sim-arange.h (sim_addr_range_add): Declare as INLINE_SIM_ARANGE. (sim_addr_range_delete): Declare as INLINE_SIM_ARANGE. (sim_addr_range_hit_p) Declare as INLINE_SIM_ARANGE. Remove definition of SIM_ARANGE_INLINE. Remove [HAVE_INLINE]. Wrap include "sim-arange.c" in H_REVEALS_MODULE_P. * sim-base.h: Include "sim-arange.h" * sim-basics.h: Remove include of "sim-arange.h" * sim-inline.c: Include "sim-arange.c" * sim-inline.h: Define INLINE_SIM_ARANGE. Define SIM_ARANGE_INLINE. Define EXTERN_SIM_ARANGE_P. Define STATIC_INLINE_SIM_ARANGE. Define STATIC_SIM_ARANGE.
100 lines
2.1 KiB
C
100 lines
2.1 KiB
C
/* The common simulator framework for GDB, the GNU Debugger.
|
|
|
|
Copyright 2002-2019 Free Software Foundation, Inc.
|
|
|
|
Contributed by Andrew Cagney and Red Hat.
|
|
|
|
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 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, see <http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
#ifndef SIM_INLINE_C
|
|
#define SIM_INLINE_C
|
|
|
|
#undef SIM_INLINE_P
|
|
#define SIM_INLINE_P 1
|
|
|
|
#include "sim-inline.h"
|
|
#include "sim-main.h"
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_ARANGE_INLINE)
|
|
#include "sim-arange.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_BITS_INLINE)
|
|
#include "sim-bits.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_CORE_INLINE)
|
|
#include "sim-core.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_ENDIAN_INLINE)
|
|
#include "sim-endian.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_EVENTS_INLINE)
|
|
#include "sim-events.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_FPU_INLINE)
|
|
#include "sim-fpu.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_TYPES_INLINE)
|
|
#include "sim-types.c"
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SIM_MAIN_INLINE)
|
|
#include "sim-main.c"
|
|
#endif
|
|
|
|
#if C_REVEALS_MODULE_P (ENGINE_INLINE)
|
|
/* #include "engine.c" - handled by generator */
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (ICACHE_INLINE)
|
|
/* #include "icache.c" - handled by generator */
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (IDECODE_INLINE)
|
|
/* #include "idecode.c" - handled by generator */
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SEMANTICS_INLINE)
|
|
/* #include "semantics.c" - handled by generator */
|
|
#endif
|
|
|
|
|
|
#if C_REVEALS_MODULE_P (SUPPORT_INLINE)
|
|
/* #include "support.c" - handled by generator */
|
|
#endif
|
|
|
|
|
|
#undef SIM_INLINE_P
|
|
#define SIM_INLINE_P 0
|
|
|
|
#endif
|