aboutsummaryrefslogtreecommitdiff
path: root/sim/common/gentmap.c
AgeCommit message (Collapse)AuthorFilesLines
2021-11-28sim: drop unused gentmap & nltvals.def logicMike Frysinger1-79/+0
Now that all ports have switched to target-newlib-* files, there's no need for these files & generating things at build time. So punt the logic and make target-newlib-syscall a hard requirement.
2021-10-31sim: nltvals: pull target open flags out into a dedicated source fileMike Frysinger1-20/+0
Like we just did for pulling out the errno & signal maps, pull out the open flag map into a dedicated common file. All newlib ports are using the same map which makes it easy.
2021-10-31sim: nltvals: localize TARGET_<open> definesMike Frysinger1-5/+1
Code should not be using these directly, instead they should be resolving these dynamically via the open_map. Rework the common callback code that was using the defines to use symbolic names instead, and localize some of the defines in the ARM code (since it's a bit unclear how many different APIs it supports currently), then remove the defines out of the header so no new code can rely on them.
2021-10-31sim: nltvals: pull target signal out into a dedicated source fileMike Frysinger1-24/+0
Like we just did for pulling out the errno map, pull out the signal map into a dedicated common file. All newlib ports are using the same signal map which makes it easy.
2021-10-31sim: nltvals: pull target errno out into a dedicated source fileMike Frysinger1-20/+0
The current system maintains a list of target errno constants in the nltvals.def file, then runs a build-time tool to turn that into a C file. This list of errno values is the same for all arches, so we don't need the arch-specific flexibility. Further, these are only for newlib/libgloss environments, which makes it confusing to support other userland runtimes (like Linux). Let's simplify to make this easier to understand & build. We don't namespace the variables yet, but sets up the framework for it. Create a new target-newlib-errno.c template file. The template file is hand written, but the inline map is still automatically generated. This allows us to move it to the common set of objects so it's only built once in a multi-target build. Now we can remove the output from the gentmap build-time tool since it's checked into the tree. Then we stop including the errno lists in nltvals.def since nothing uses it.
2021-08-17sim: nltvals: localize TARGET_<ERRNO> definesMike Frysinger1-5/+1
Code should not be using these directly, instead they should be resolving these dynamically via cb_host_to_target_errno maps. Fix the Blackfin code and remove the defines out of the header so no new code can rely on them.
2021-06-22sim: callback: generate signal mapMike Frysinger1-0/+24
We've been generating the syscall/errno/open maps, but not the signal map, even though we've been including them in the source constants.
2021-05-16sim: switch config.h usage to defs.hMike Frysinger1-1/+1
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-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.
2016-01-10sim: drop targ-vals.def->nltvals.def indirectionMike Frysinger1-3/+3
We don't have alternative nltvals.def files, so always symlinking the targ-vals.def file to it doesn't gain us anything. It does make the build more complicated though and a pain to convert to something newer (like automake). Drop the symlinking entirely. In the future, we'll want to explode this file anyways into the respective arch dirs so things can be selected dynamically at runtime, so it's not like we'll be bringing this back.
2015-06-17sim: callback: add human readable strings for debugging to mapsMike Frysinger1-6/+7
When tracing, we often want to display the human readable name for the various syscall/errno values. Rather than make each target duplicate the lookup, extend the existing maps to include the string directly, and add helper functions to look up the constants. While most targets are autogenerated (from libgloss), the bfin/cris targets have custom maps for the Linux ABI which need to be updated by hand.
2015-03-16sim: convert some old prototypesMike Frysinger1-5/+3
2015-02-14sim/common/gentmap.c: Include "string.h".Chen Gang1-0/+1
The related warnings: gcc ../../../binutils-gdb/sim/mcore/../common/gentmap.c -o gentmap -g -O -I. -I../../../binutils-gdb/sim/mcore -I../common -I../../../binutils-gdb/sim/mcore/../common -I../../include -I../../../binutils-gdb/sim/mcore/../../include -I../../bfd -I../../../binutils-gdb/sim/mcore/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/mcore/../../opcodes ../../../binutils-gdb/sim/mcore/../common/gentmap.c: In function ‘main’: ../../../binutils-gdb/sim/mcore/../common/gentmap.c:119:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if (strcmp (argv[1], "-h") == 0) ^ 2015-02-13 Chen Gang <gang.chen.5i5j@gmail.com> * gentmap.c: Include "string.h".
2012-05-19 PR 14072Nick Clifton1-0/+1
* wrapper.c: Include config.h before system header files. * callback.c: Include config.h before system header files. * cgen-trace.c: Likewise. * cgen-utils.c: Likewise. * gentmap.c: Likewise. * sim-if.c: Include config.h before system header files. * compile.c: Include config.h before system header files. * sim-main.h: Likewise. * gdb-if.c: Include config.h before system header files. * load.c: Likewise. * syscalls.c: Likewise. * trace.c: Likewise. * interp.c: Include config.h before system header files.
2006-11-07 * gentmap.c: Fix compile time warning.Thiemo Seufer1-0/+1
2002-06-09Move include/callback.h and include/remote-sim.h to include/gdb/.Andrew Cagney1-1/+1
Update accordingly.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+125
1999-04-16Initial creation of sourceware repositoryStan Shebs1-102/+0
1996-11-20 * run.c: #include ../common/config.h, tconfig.h.David Edelsohn1-0/+102
(myname): New static global. (main): Recognize new options -a, -c. Also recognize -h if h8/300. Only process -c ifdef SIM_HAVE_SIMCACHE. Only process -p/-s ifdef SIM_HAVE_PROFILE. Parse program name from argv[0] and use in error messages. Pass sim_args to sim_open. Pass prog_args to sim_create_inferior. Add support for incomplete h8/300 termination indicators. (usage): Make more verbose. * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files. * Makefile.in,Make-common.in,callback.c: New files. * nltvals.def,gentmap.c,gentvals.sh: New files.