aboutsummaryrefslogtreecommitdiff
path: root/include/sim/callback.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
2021-12-04sim: reorder header includesMike Frysinger1-2/+3
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-11-16sim: callback: expose argv & environMike Frysinger1-0/+6
Pass the existing strings data to the callbacks so that common libgloss syscalls can be implemented (which we'll do shortly).
2021-06-29sim: callback: add printf attributesMike Frysinger1-4/+8
This helps these funcs get printf format checking coverage. The sim-io.c hack as a result is a bit unfortunate, but the compiler throws warnings when printing with empty strings. In this one case, we actually want that due to the side-effect of the callback halting execution for us.
2021-06-24sim: callback: extend syscall interface to handle 7 argsMike Frysinger1-1/+1
The Linux syscall interface, depending on architecture, handles up to 7 arguments. Extend the callback API to handle those.
2021-06-23sim: callback: add a kill interfaceMike Frysinger1-0/+1
This will make it easier to emulate the syscall. If the kill target is the sim itself, don't do anything. This forces the higher layers to make a decision as to how to handle this event: like halting the overall engine process.
2021-06-22sim: callback: add a getpid interfaceMike Frysinger1-0/+1
Rather than hit the OS interface directly, use the existing callback layer so the instantiator can decide behavior.
2021-05-14sim: callback: convert FS interfaces to 64-bitMike Frysinger1-3/+3
Rather than rely on off_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target.
2021-05-14sim: callback: convert time interface to 64-bitMike Frysinger1-1/+2
PR sim/27705 Rather than rely on time_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target.
2021-05-14sim: callback: inline PTR defineMike Frysinger1-3/+3
We require C11 now, so no need for these pre-ANSI C hacks. PTR is simply void*, so use that directly.
2021-05-14sim: callback: use ATTRIBUTE_NORETURNMike Frysinger1-5/+1
This define is handled by ansidecl.h, so no need to duplicate effort.
2021-05-14sim: callback: always include necessary headersMike Frysinger1-4/+0
We use types from these headers, so always include them.
2021-05-14sim: create header namespaceMike Frysinger1-0/+347
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.