aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-module.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18sim: info: convert verbose field to a boolMike Frysinger1-1/+1
The verbose argument has always been an int treated as a bool, so convert it to an explicit bool. Further, update the API docs to match the reality that the verbose value is actually used by some of the internal modules.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-12-04sim: reorder header includesMike Frysinger1-4/+4
We're including system headers after local headers in a bunch of places, but this leads to conflicts when our local headers happen to define symbols that show up in the system headers. Use the more standard order of: * config.h (via defs.h) * system headers * local library headers (e.g. bfd & libiberty) * sim specific headers
2021-06-30sim: move scache init to dynamic modules.cMike Frysinger1-3/+0
Use the new modules.c framework to find & initialize this module.
2021-06-30sim: move profile init to dynamic modules.cMike Frysinger1-3/+0
Use the new modules.c framework to find & initialize this module.
2021-06-30sim: move trace init to dynamic modules.cMike Frysinger1-3/+0
Use the new modules.c framework to find & initialize this module.
2021-06-30sim: move engine init to dynamic modules.cMike Frysinger1-1/+0
Use the new modules.c framework to find & initialize this module.
2021-05-16sim: switch config.h usage to defs.hMike Frysinger1-1/+3
The defs.h header will take care of including the various config.h headers. For now, it's just config.h, but we'll add more when we integrate gnulib in. This header should be used instead of config.h, and should be the first include in every .c file. We won't rely on the old behavior where we expected files to include the port's sim-main.h which then includes the common sim-basics.h which then includes config.h. We have a ton of code that includes things before sim-main.h, and it sometimes needs to be that way. Creating a dedicated header avoids the ordering mess and implicit inclusion that shows up otherwise.
2021-05-04sim: hw: localize init callbackMike Frysinger1-7/+0
Now that we don't need to hardcode the module init list in a single place, move the hw init logic out to the sim-hw file.
2021-05-01sim: dv-sockser: localize init callbackMike Frysinger1-9/+0
Now that we don't need to hardcode the module init list in a single place, move the dv-sockser logic to the place to the one file.
2021-05-01sim: add framework for declaring init callbacks locallyMike Frysinger1-15/+36
To facilitate decentralized module initialization/registration with an eye towards multi-target support, add a framework to detect init calls declared in the source and automatically call them. This is akin to gdb's _initialize_xxx framework for letting modules autodiscover.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-01-19sim: add some stdlib.h includesSimon Marchi1-0/+2
When trying to compile GDB with --target=avr, with gcc 9.2.0, I am getting a bunch of: /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: implicit declaration of function ‘abort’ [-Werror=implicit-function-declaration] 94 | abort (); | ^~~~~ /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: incompatible implicit declaration of built-in function ‘abort’ [-Werror] /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘abort’ I did what the compiler told me and added the relevant includes in the problematic files. sim/common/ChangeLog: * nrun.c: Include stdlib.h. * sim-core.c: Likewise. * sim-engine.c: Likewise. * sim-io.c: Likewise. * sim-module.c: Likewise. * sim-reason.c: Likewise.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-12-30sim: simplify STATE_MY_NAME setupMike Frysinger1-3/+1
No point in writing basename ourselves when libiberty provides one.
2015-12-25sim: drop WITH_ENGINE defineMike Frysinger1-2/+0
We enable this everywhere already, and all new ports should use the engine logic, so no point in making it an option to disable.
2015-12-25sim: sim-model: build for everyoneMike Frysinger1-2/+0
Rather than include this for some targets, set it up so we can build it all the time via the common code. This makes it easier for targets to opt into it when they're ready, increases build coverage, and allows us to centralize much of the logic. We also get to delete tconfig.h from two more targets -- they were setting WITH_DEVICES to 0 which has the same behavior as not defining it at all. While the SIM_HAVE_MODEL knob is gone, we now have WITH_MODEL_P, but it is only used by the common sim-model code. We use it to declare dummy model lists when the arch hasn't created its own.
2015-12-24sim: cris: move option install to sim_openMike Frysinger1-4/+0
We've moved custom option install for other targets to sim_open, so update cris too. It's the last one using MODULE_LIST, so we can drop that from the common code too.
2015-12-24sim: enable watchpoint module everywhereMike Frysinger1-2/+0
We build & bundle the watchpoint module everywhere, but we don't make the command line flags available by default. A few targets opted in, but most did not. Just enable the flag for everyone. Not all targets will respect the flags (making them nops), but shouldn't be a big deal. This is how we handle other common modules already.
2015-12-24sim: delete SIM_HAVE_FLATMEM supportMike Frysinger1-3/+0
No target has used this, and it's a cheap hack in place in using the common memory module. We want everyone using that though, so drop support for flatmem entirely.
2015-06-12sim: trace: add WITH_TRACE_ANY_P helperMike Frysinger1-1/+1
We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill out the API. This lets us wrap the internal configure symbol.
2015-03-15sim: dv-sockser: push module init prototype downMike Frysinger1-0/+10
Pull out the duplicated dv_sockser_install prototype from the tconfig.in files and put it in the one place it gets used -- sim-module.c. This is still arguably incorrect, but it's better than the status quo where the tconfig.in has to include header files and duplicate the dv-sockser func. The tconfig header is meant to be simple and contain a target defines.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-02-14sim: punt zfree()Mike Frysinger1-6/+6
The sim keeps track of which allocations are zero-ed internally (via zalloc) and then calls a helper "zfree" function rather than "free". But this "zfree" function simply calls "free" itself. Since I can see no point in this and it is simply useless overhead, punt it. The only real change is in hw-alloc.c where we remove the zalloc_p tracking, and sim-utils.c where zfree is delete. The rest of the changes are a simple `sed` from "zfree" to "free". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-12sim: check asprintf return valuesMike Frysinger1-1/+2
These are the last sources of build warnings (asprintf usage) that I see. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-01-01Update copyright notices to add year 2010.Joel Brobecker1-1/+1
2009-01-14 Update the copyright notice of some of the files I missedJoel Brobecker1-1/+2
in the previous copyright update.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-5/+4
to GPLv3.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2003-02-20Index: include/gdb/ChangeLogAndrew Cagney1-4/+3
2003-02-20 Andrew Cagney <ac131313@redhat.com> * remote-sim.c (gdbsim_insert_breakpoint) (gdbsim_remove_breakpoint): Delete #ifdef SIM_HAS_BREAKPOINTS code. Index: include/gdb/ChangeLog 2003-02-20 Andrew Cagney <ac131313@redhat.com> * remote-sim.h (SIM_RC): Delete unused SIM_RC_UNKNOWN_BREAKPOINT, SIM_RC_INSUFFICIENT_RESOURCES and SIM_RC_DUPLICATE_BREAKPOINT. (sim_set_breakpoint, sim_clear_breakpoint): Delete declarations. (sim_clear_all_breakpoints, sim_enable_breakpoint): Ditto. (sim_enable_all_breakpoints, sim_disable_breakpoint): Ditto. (sim_disable_all_breakpoints): Ditto. Index: sim/common/ChangeLog 2003-02-20 Andrew Cagney <ac131313@redhat.com> * Make-common.in (SIM_NEW_COMMON_OBJS): Remove sim-break.o (sim-break_h): Delete macro. (sim-break.o): Delete rule. * sim-break.c: Delete file. * sim-break.h: Delete file. * sim-base.h [SIM_HAVE_BREAKPOINTS]: Don't include "sim-break.h". (STATE_BREAKPOINTS): Delete macro. (sim_state_base): Delete field breakpoints. * sim-module.c (modules) [SIM_HAVE_BREAKPOINTS]: Don't add sim_break_install to array.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+399
1999-04-16Initial creation of sourceware repositoryStan Shebs1-399/+0
1999-01-06 * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.Doug Evans1-10/+6
(CGEN_MAIN_SCM): Add rtx-funcs.scm. (cgen-arch): Pass $(mach) to cgen.sh. * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated. (SEM_BRANCH_INIT_EXTRACT): New macro. (SEM_BRANCH_INIT): Add taken_p. (TARGET_SEM_BRANCH_FINI): Provide default definition. (SEM_BRANCH_FINI): Use it. (SEM_INSN): Update. * cgen-run.c (sim_resume): Handle tracing of last insn. * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined. * cgen-trace.c (current_abuf): New static global. (trace_insn_init): Initialize it. (trace_insn_fini): Use it. (trace_insn): Set it. * cgen.sh (arch case): Pass -m ${mach} to cgen. * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB. (@cpu@_emit_after): Ditto. (simple @cpu@_engine_run_full): New local `pc'. Initialize semantic labels if WITH_SEM_SWITCH_FULL. * sim-model.c: Include bfd.h. (sim_model_init): New function. (sim_model_install): Record init fn. * sim-model.h (MACH): New member bfd_name. * sim-module.c (modules): Initialize model before scache.
1998-05-21* sim-hw.c: Include ctype.h.Andrew Cagney1-1/+12
(do_hw_poll_read): Do not assume EAGAIN.
1998-03-27Define CPU_INDEX. Initialize.Andrew Cagney1-1/+6
For mips_options, iterate over MAX_NR_PROCESSORS when setting options.
1998-02-28 * sim-module.c (*): Fix typos in assertion tests.Doug Evans1-11/+11
1998-02-28Pacify GCC: const char * passed to asprintf; int function returningAndrew Cagney1-1/+1
void; unused variable.
1998-02-28Add generic sim-info.c:sim_info() function using module mechanism.Andrew Cagney1-15/+138
Clean up compile probs in mips/vr5400.
1998-02-27 * sim-base.h (sim_cpu_base): New members name, options.Doug Evans1-0/+11
(sim_cpu_lookup): Add prototype. * sim-module.c (sim_pre_argv_init): Provide default names for cpus. * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'. (sim_add_option_table): Update prototype. * sim-options.c (sim_add_option_table): New argument `cpu'. (standard_option_handler,standard_install): Update. (sim_parse_args): Handle cpu specific options. (print_help): New static function. (sim_print_help): Call it. Print cpu specific options. (find_match): New static function. (sim_args_command): Call it. Handle cpu specific options. * sim-utils.c (sim_cpu_lookup): New function. * sim-memopt.c (memory_option_handler): Update. (sim_memopt_install): Update. * sim-model.c (model_option_handler): Update. (model_install): Update. * sim-profile.c (profile_option_handler): Update. (profile_install): Update. * sim-trace.c (trace_option_handler): Update. (trace_install): Update. * sim-watch.c (watchpoint_option_handler): Update. (sim_watchpoint_install): Update. * cgen-scache.c (scache_option_handler): Update. (scache_install): Update.
1998-02-25delete FIXMEDoug Evans1-4/+11