aboutsummaryrefslogtreecommitdiff
path: root/sim/README-HACKING
AgeCommit message (Collapse)AuthorFilesLines
2023-01-13sim: build: delete Make-common.in logicMike Frysinger1-44/+1
Now that all (other than ppc) build in the top-level, this logic is unused, so punt it all.
2023-01-10sim: build: drop support for creating libsim.a in subdirsMike Frysinger1-4/+0
Now that all ports have moved to creating libsim.a in the top-level, drop all the support code to create it in a subdir.
2023-01-10sim: build: drop support for subdir extra depsMike Frysinger1-3/+0
Nothing uses this hook anymore, so punt it. It was largely used to track generated files (which we do in the top-level now) and extra header files (which we use automake depgen for now).
2023-01-01sim: build: drop unused SIM_EXTRA_LIBSMike Frysinger1-2/+0
Now that all run binaries are linked in the topdir, this subdir libs variable isn't used anywhere, so punt it.
2023-01-01sim: drop mention of & support for subdir configureMike Frysinger1-48/+2
Now that no ports use these common configure APIs, delete the logic and remove it from the documentation.
2022-11-05sim: build: move install steps to the top-levelMike Frysinger1-2/+0
We still have to maintain custom install rules due to how we rename arch-specific files with an arch prefix in their name, but we can at least unify the logic in the common dir.
2021-11-28sim: nltvals: pull target syscalls out into a dedicated source fileMike Frysinger1-17/+6
Like we just did for pulling out the errno map, pull out the syscall maps into a dedicated common file. Most newlib ports are using the same syscall map, but not all, which means we have to do a bit more work to migrate. This commit adds the maps and switches the ports using the common default syscall table over to it. Ports using unique syscall tables are still using the old targ-map.c logic. Switching common ports over is easy by checking NL_TARGET, but the ppc code needs a bit more cleanup here hence its larger diff.
2021-06-21sim: hw: rework configure option & device selectionMike Frysinger1-2/+2
The sim-hardware configure option allows builders to select a set of device models to enable. But this seems like unnecessary overkill: the existence of individual device models doesn't affect performance at all as they are only enabled at runtime if the config uses them, and individually these are all <5KB a piece. Stripping off a total of ~50KB from a ~1MB binary doesn't seem useful, and it's extremely unlikely anyone will ever bother. So let's simplify the configure/make logic by turning sim-hardware into a boolean option like many of the other sim options. Any ports that have unique device models will declare them in their Makefile instead of at configure time. This will allow us to (eventually) unify the setting into the common dir.
2021-06-20sim: delete SIM_AC_COMMON macroMike Frysinger1-9/+0
Now that we've moved all content out to the common file, this is empty and can be deleted it entirely.
2021-05-14sim: create header namespaceMike Frysinger1-1/+1
The gdb/callback.h & gdb/remote-sim.h headers have nothing to do with gdb and are really definitions for the libsim API under the sim/ tree. While gdb uses those headers as a client, it's not specific to it. So create a new sim/ namespace and move the headers there.
2021-05-12sim: clean up explicit environment build callsMike Frysinger1-2/+2
This was enabled by default for all targets, but a few ports still include an explicit call. Clean that up, and update the docs.
2021-04-26sim: nltvals: unify common syscall tablesMike Frysinger1-3/+4
Since libgloss provides a default syscall table for arches, use that to provide the default syscall table for ports. Only the exceptions need to be enumerated now with the common logic as the default.
2021-04-23sim: simplify hardware m4 macroMike Frysinger1-1/+1
Every port using this sets the 1st arg to yes and the 2nd arg to "". These are the defaults we probably want anyways in order to unify the codebase, so move them to the macro and only allow ports to declare extra hardware models.
2021-02-28sim: delete unused SIM_EXTRA_LIBDEPSMike Frysinger1-2/+0
This was last used 15 years ago, so clearly not important enough to keep around. Punt it.
2021-02-27sim: delete redundant SIM_EXTRA_ALLMike Frysinger1-2/+0
We don't need a variable to add a dependency to the "all" target, and having one doesn't really add value. Switch to the target directly for the few ports that actually use this.
2021-02-13sim: switch to AC_CONFIG_MACRO_DIRSMike Frysinger1-1/+1
Rather than hand maintain m4 includes in various autotool files, use AC_CONFIG_MACRO_DIRS to declare the relevant search paths. This simplifies the code, makes it more robust, and cleans out unused logic from configure.
2021-02-06sim: watchpoints: use common sim_pc_getMike Frysinger1-2/+2
Few arches implement STATE_WATCHPOINTS()->pc while all of them implement sim_pc_get. Lets switch the sim-watch core for monitoring pc events to the sim_pc_get API so this module works for all ports, and then we can delete this old back channel of snooping in the port's cpu state -- the code needs the pointer to the pc storage so that it can read out bytes and compare them to the watchrange. This also fixes the logic on multi-cpu sims by removing the limitation of only being able to watch CPU0's state.
2021-01-30sim: watchpoints: change sizeof_pc to sizeof(sim_cia)Mike Frysinger1-3/+1
Existing ports already have sizeof_pc set to the same size as sim_cia, so simply make that part of the core code. We already assume this in places by way of sim_pc_{get,set}, and this is how it's documented in the sim-base.h API. There is code to allow sims to pick different register word sizes from address sizes, but most ports use the defaults for both (32-bits), and the few that support multiple register sizes never change the address size (so address defaults to register). I can't think of any machine where the register hardware size would be larger than the address word size either. We have ABIs that behave that way (e.g. x32), but the hardware is still equivalent register sized.
2021-01-18sim: common: delete configure & MakefileMike Frysinger1-3/+3
This was mostly orphaned a while back, but left behind so people could still run `make headers`. Merge that one target to the top sim dir and delete all the build logic. This should avoid confusing people further.
2021-01-12sim: README-HACKING: clean up stale run referencesMike Frysinger1-2/+0
The run.c interface was deleted long ago and everyone moved to nrun.c (which is also the default), so no one needs to declare this anymore.
2021-01-09sim: clean up stale AC_PREREQ refsMike Frysinger1-1/+0
This was purged from the tree when we upgraded to autoconf-2.69, but a few references in the sim tree were missed.
2021-01-08sim: require a C11 compilerMike Frysinger1-27/+1
With GDB requiring a C++11 compiler now, this hopefully shouldn't be a big deal. It's been 10 years since C11 came out, so should be plenty of time to upgrade. This will allow us to start cleaning up random header logic and many of our non-standard custom types.
2015-12-26sim: punt WITH_DEVICES & tconfig.h supportMike Frysinger1-11/+0
No arch is using this anymore, and we want all new ports using the hardware framework instead. Punt WITH_DEVICES and the two callbacks device_io_{read,write}_buffer. We can also punt the tconfig.h file as no port is using it anymore. This fixes in-tree builds that get confused by picking up the wrong one (common/ vs <port>/) caused by commit ae7d0cac8ce971f7108d270c. Any port that needs to set up a global define can use their own sim-main.h file that they must provide regardless.
2015-06-12sim: update configure.in->configure.ac docsMike Frysinger1-2/+2
A few places still refer to the configure.in file; update them.
2015-03-16sim: rename tconfig.in to tconfig.hMike Frysinger1-4/+4
Rather than manually include tconfig.h when we think we'll need it (which is error prone as it can define symbols we expect from config.h), have it be included directly by config.h. Since we know we have to include that header everywhere already, this will make sure tconfig.h isn't missed. It should also be fine as tconfig.h is supposed to be simple and only set up a few core defines for the target. This allows us to stop symlinking it in place all the time and just use it straight out of the respective source directory.
2014-01-07remove PARAMS from simTom Tromey1-3/+1
This removes the last uses of PARAMS from sim. 2014-01-06 Tom Tromey <tromey@redhat.com> * README-HACKING: Don't use PARAMS. * arm/wrapper.c: Don't use PARAMS. * bfin/sim-main.h: Don't use PARAMS. * common/callback.c: Don't use PARAMS. * common/cgen-trace.c: Don't use PARAMS. * common/run-sim.h: Don't use PARAMS. * common/run.c: Don't use PARAMS. * common/sim-base.h: Don't use PARAMS. * common/sim-load.c: Don't use PARAMS. * common/sim-options.h: Don't use PARAMS. * common/sim-trace.c: Don't use PARAMS. * common/sim-trace.h: Don't use PARAMS. * common/sim-utils.h: Don't use PARAMS. * cr16/cr16_sim.h: Don't use PARAMS. * cr16/gencode.c: Don't use PARAMS. * cr16/interp.c: Don't use PARAMS. * cr16/simops.c: Don't use PARAMS. * d10v/d10v_sim.h: Don't use PARAMS. * d10v/gencode.c: Don't use PARAMS. * d10v/interp.c: Don't use PARAMS. * d10v/simops.c: Don't use PARAMS. * erc32/erc32.c: Don't use PARAMS. * erc32/exec.c: Don't use PARAMS. * erc32/float.c: Don't use PARAMS. * erc32/func.c: Don't use PARAMS. * erc32/sis.c: Don't use PARAMS. * erc32/sis.h: Don't use PARAMS. * mips/interp.c: Don't use PARAMS. * mips/sim-main.h: Don't use PARAMS. * sh/interp.c: Don't use PARAMS. * v850/sim-main.h: Don't use PARAMS. * v850/v850_sim.h: Don't use PARAMS.
2010-04-12sim: add more hacking notesMike Frysinger1-0/+245
I found the documentation lacking in many places, so I tried filling in a lot of holes that I personally fell into. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2002-06-06* Makefile.in (ChangeLog): New makefile variable.Andrew Cagney1-0/+5
* README-HACKING: Mention the ChangeLog makefile variable.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+254
1999-04-16Initial creation of sourceware repositoryStan Shebs1-234/+0
1998-11-24Add d10v and v850 to gennltvals.sh and regenerate.Andrew Cagney1-10/+19
Add a howto.
1998-04-26 * Makefile.in (autoconf-common autoheader-common): Don't pass -lTom Tromey1-3/+2
to autoconf and autoheader.
1998-04-24 * Makefile.in (autoconf-common autoheader-common): Pass `-lTom Tromey1-14/+52
../common' to autoconf and autoheader. Unconditionally run autoconf in every subdir. (autoconf-changelog autoheader-changelog): Unconditionally run commands in every subdir. (autoconf-install autoheader-install): Likewise.
1997-09-03Doc C language guidelines.Andrew Cagney1-0/+24
1997-09-02Add note on TAGS support.David Edelsohn1-2/+33
1997-04-03Add autoheader counterpart to autoconf-common et.al.Andrew Cagney1-1/+8
1997-04-02 * Makefile.in (autoconf-install): New target.David Edelsohn1-1/+1
1997-04-02New target - autoconf-changelogAndrew Cagney1-0/+126