summaryrefslogtreecommitdiff
path: root/sim/common/gennltvals.py
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year range in header of all files managed by GDBJoel Brobecker2023-01-011-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.
* Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker2022-01-011-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.
* sim: drop unused gentmap & nltvals.def logicMike Frysinger2021-11-281-56/+28
| | | | | | 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.
* sim: nltvals: pull target syscalls out into a dedicated source fileMike Frysinger2021-11-281-6/+71
| | | | | | | | | | | | | | 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.
* sim: nltvals: drop i960Mike Frysinger2021-11-281-1/+2
| | | | | This port was dropped from gdb/bfd/sim years ago, so stop including its syscall constants too.
* sim: nltvals: pull target errno out into a dedicated source fileMike Frysinger2021-10-311-35/+74
| | | | | | | | | | | | | | | | | | | | | | | 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.
* sim: filter out SIGSTKSZ [PR sim/28302]Mike Frysinger2021-10-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | We map target signals to host signals so we can propagate signals between the host & simulated worlds. That means we need to know the symbolic names & values of all signals that might be sent. The tools that generate that list use signal.h and include all symbols that start with "SIG" so as to automatically include any new symbols that the C library might add. Unfortunately, this also picks up "SIGSTKSZ" which is not actually a signal itself, but a signal related setting -- it's the size of the stack when a signal is handled. By itself this doesn't super matter as we will never see a signal with that same value (since the range of valid signals tend to be way less than 1024, and the size of the default signal stack will never be that small). But with recent glibc changes that make this into a dynamic value instead of a compile-time constant, some users see build failures when building the sim. As suggested by Adam Sampson, update our scripts to ignore this symbol to simplify everything and avoid the build failure. Bug: https://sourceware.org/PR28302
* sim: nltvals: switch output mode to a directoryMike Frysinger2021-08-191-5/+8
| | | | | | In preparation for this script generating more files, change the output argument to specify a directory. This drops the stdout behavior, but since no one really runs this tool directly, it's not a big deal.
* sim: nltvals: unify common syscall tablesMike Frysinger2021-04-261-36/+13
| | | | | | 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.
* sim: moxie: switch syscalls to common nltvalsMike Frysinger2021-04-181-0/+1
| | | | | | Rather than hand duplicate the syscall constants, switch to the common nltvals framework. I made sure the constants have the same values before & after too :).
* sim: sh: switch syscalls to common nltvalsMike Frysinger2021-04-181-0/+2
| | | | | | | Rather than hand duplicate the syscall table, switch to the common nltvals framework. We have to tweak the constant names, but we get everything else for free. I made sure the constants have the same values before & after too :).
* sim: rx: switch syscalls to common nltvalsMike Frysinger2021-04-181-0/+1
| | | | | | | Rather than hand duplicate the syscall table, switch to the common nltvals framework. We have to tweak the constant names, but we get everything else for free. I made sure the constants have the same values before & after too :).
* sim: m32c: switch syscalls to common nltvalsMike Frysinger2021-04-181-0/+1
| | | | | | | Rather than hand duplicate the syscall table, switch to the common nltvals framework. We have to tweak the constant names, but we get everything else for free. I made sure the constants have the same values before & after too :).
* sim: iq2000: switch syscalls to common nltvalsMike Frysinger2021-04-181-0/+1
| | | | | | | Rather than hand duplicate the syscall table, switch to the common nltvals framework. We have to tweak the constant names, but we get everything else for free. I made sure the constants have the same values before & after too :).
* sim: riscv: new portMike Frysinger2021-02-041-0/+2
| | | | | | | | | This is a hand-written implementation that should have fairly complete coverage for the base integer instruction set ("i"), and for the atomic ("a") and integer multiplication+division ("m") extensions. It also covers 32-bit & 64-bit targets. The unittest coverage is a bit weak atm, but should get better.
* sim: common: change gennltvals helper to PythonMike Frysinger2021-01-301-0/+230
This tool is only run by developers and not in a release build, so rewrite it in Python to make it more maintainable.