aboutsummaryrefslogtreecommitdiff
path: root/sim/common/callback.c
AgeCommit message (Collapse)AuthorFilesLines
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-09sim: drop common/cconfig.h in favor of a single config.hMike Frysinger1-2/+1
The common subdir sets up a cconfig.h file to hold checks for the common code. In practice, most files still end up using config.h instead which just leads to confusion. Merge all the configure checks that went into cconfig.h into SIM_AC_COMMON so we can drop the cconfig.h file altogether. Now there is only a single config.h file like normal.
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-06-18sim: callback: fix sentinel testing when walking mapsMike Frysinger1-2/+2
The new helpers for walking the maps tested the wrong value for exiting the for loop. This caused crashes when looking up entries that were not in the map.
2015-06-17sim: callback: add human readable strings for debugging to mapsMike Frysinger1-12/+82
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-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-03-04sim: convert old style prototypesMike Frysinger1-155/+42
Most of these prototypes have been killed off, but we have a few left in the sim tree. Clean them up so we can enable the -W flag for it.
2014-01-07remove PARAMS from simTom Tromey1-28/+28
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.
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-2/+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-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.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+2
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-05-11sim: fix func call style (space before paren)Mike Frysinger1-1/+1
Committed this as obvious: -foo(...); +foo (...); Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-15sim: common: trim trailing whitespaceMike Frysinger1-19/+19
2011-02-25 * callback.c (fdbad): Return EBADF rather than EINVAL for badKevin Buettner1-1/+1
file descriptors.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-2/+2
2010-10-06 * callback.c (os_lseek): Call wrap on lseek result.Hans-Peter Nilsson1-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/+1
in the previous copyright update.
2009-01-06 * callback.c (os_error): Mark as being a noreturn function.Hans-Peter Nilsson1-1/+5
* sim-io.h (sim_io_error): Similar for sim_io_error.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-10-112007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>Daniel Jacobowitz1-0/+11
* callback.c (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add functions. * syscall.c (cb_syscall): Test for stdin/out/err, not just fd 0/1/2. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * callback.h (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add prototypes. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * sim/cris/c/freopen2.c: Added testcase.
2007-10-112007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>Daniel Jacobowitz1-0/+7
* callback.c (cb_is_stdin): Add. * syscall.c (cb_syscall): Test for stdin, not just fd 0. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * callback.h (cb_is_stdin): Add prototype.
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-3/+2
to GPLv3.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2005-07-08 * callback.c: Remove ANSI_PROTOTYPES conditional code.Ben Elliston1-44/+0
* sim-load.c: Likewise. * syscall.c: Likewise.
2005-04-292005-04-29 Paul Brook <paul@codesourcery.com>Paul Brook1-0/+18
* common/callback.c (PIPE_BUF): Provide default refinition. (os_lstat): Use stat if lstat is not available on the host. (os_ftruncate): Return EINVAL if not available on the host. (os_truncate): Ditto. * common/configure.ac: Check for lstat, truncate and ftruncate. * common/configure: Regenerate. * common/config.in: Regenerate.
2005-02-21* callback.c (os_fstat): Don't declare 't' unless it's used.Jim Blandy1-0/+2
2005-01-28 * syscall.c (cb_syscall) <case CB_SYS_pipe>: New case.Hans-Peter Nilsson1-1/+242
* callback.c [HAVE_LIMITS_H]: Include limits.h. Include libiberty.h. (os_close, os_read, os_write, os_fstat, os_ftruncate): Support fd being either end of a pipe. (os_pipe, os_pipe_empty, os_pipe_nonempty): New functions. (os_shutdown): Clear pipe state. (default_callback): Initialize new members.
2005-01-28 * callback.c (default_callback): Initialize target_endian.Hans-Peter Nilsson1-8/+11
(cb_store_target_endian): Renamed from store, new first parameter host_callback *cb, drop last parameter big_p. Take endianness from cb. (cb_host_to_target_stat): Change to use cb_store_target_endian. Remove variable big_p. * nrun.c (main): Initialize default_callback.target_endian.
2004-12-13 * syscall.c (cb_syscall) <case CB_SYS_lstat>: New case.Hans-Peter Nilsson1-0/+11
* callback.c (os_lstat): New function.
2004-12-03Bah, forgot to commit the trivial fix I pointed out myself after applying ↵Hans-Peter Nilsson1-1/+1
patch for previous change
2004-12-03 * configure.in (SIM_CHECK_MEMBERS): Call for struct stat membersHans-Peter Nilsson1-4/+48
st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, st_size, st_blksize, st_blocks, st_atime, st_mtime and st_ctime. * aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS_1) (SIM_CHECK_MEMBERS): New macros. * callback.c (cb_host_to_target_stat): Use temporary macro ST_x for struct stat member test and write. Add ST_x calls for each struct stat member tested in configure.in. Wrap each ST_x call in #ifdef of configure macro for that member. * configure, config.in: Regenerate.
2004-06-27 * callback.c (os_shutdown): Fix bug in last change: actuallyJoern Rennecke1-0/+1
mark file descriptors as available on startup.
2004-06-252004-06-25 J"orn Rennecke <joern.rennecke@superh.com>Joern Rennecke1-14/+39
include/gdb: * callback.h (host_callback_struct): Replace members fdopen and alwaysopen with fd_buddy. sim/common: * callback.c: Changed all users.
2004-05-10 * callback.c: Update copyright dates.Daniel Jacobowitz1-2/+3
* run.c: Likewise. * sim-basics.h: Likewise. * sim-load.c: Likewise. * syscall.c: Likewise. From Maciej W. Rozycki <macro@ds2.pg.gda.pl> * callback.c: Include cconfig.h instead of config.h. * run.c: Likewise. * sim-basics.h: Likewise. * sim-load.c: Likewise. * syscall.c: Likewise.
2003-10-212003-10-21 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+1
* callback.c (os_truncate): Call "truncate", and not "stat".
2003-10-15include/gdb:Joern Rennecke1-0/+27
* callback.h (struct host_callback_struct): New members ftruncate and truncate. gdb: sim/common: * callback.c (os_ftruncate, os_truncate): New functions. (default_callback): Initialize ftruncate and truncate members. sim/sh: * syscall.h (SYS_truncate, SYS_ftruncate): Define. * interp.c (trap): Add support for SYS_ftruncate and SYS_truncate.
2002-06-09Move include/callback.h and include/remote-sim.h to include/gdb/.Andrew Cagney1-1/+1
Update accordingly.
2002-05-01[ common/ChangeLog ]Chris Demetriou1-1/+1
2002-05-01 Chris Demetriou <cgd@broadcom.com> * callback.c: Use 'deprecated' rather than 'depreciated.' [ igen/ChangeLog ] 2002-05-01 Chris Demetriou <cgd@broadcom.com> * igen.c: Use 'deprecated' rather than 'depreciated.' [ mips/ChangeLog ] 2002-05-01 Chris Demetriou <cgd@broadcom.com> * interp.c: Use 'deprecated' rather than 'depreciated.' * sim-main.h: Likewise.
2002-02-102002-02-10 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-1/+1
* callback.c: Fix some spelling errors. * hw-device.h: Likewise. * hw-tree.c: Likewise. * sim-abort.c: Likewise. * sim-alu.h: Likewise. * sim-core.h: Likewise. * sim-events.c: Likewise. * sim-events.h: Likewise. * sim-fpu.h: Likewise. * sim-profile.h: Likewise. * sim-utils.c: Likewise.
2000-02-08Fix compile time warning messages.Nick Clifton1-8/+8
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+810
1999-04-16Initial creation of sourceware repositoryStan Shebs1-808/+0
1997-11-20 * callback.c (cb_host_to_target_stat): Fix return values.Doug Evans1-3/+6
1997-11-17Tweak comment.Doug Evans1-2/+3
1997-11-17 * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.Doug Evans1-24/+239
(LIB_OBJS): Add syscall.o. (gentmap): Pass $(NL_TARGET) to $(CC). (syscall.o): Add rule for. (sim_main_headers): Add $(SIM_EXTRA_DEPS). (sim-bits.o): Depend on $(sim-n-bits_h). (sim-load.o): Depend on callback.h. * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to cgen-mem.h, sem-ops.h renamed to cgen-ops.h. * cgen-mem.h, cgen-ops.h: New files. * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no". * Makefile.in (nltvals.def): Depend on gennltvals.sh. Rewrite build rule. * callback.c: #include string.h or strings.h. #include sys/types.h and sys/stat.h. (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare. (enosys): New function. (os_get_errno,os_open): Update. (os_stat,os_fstat): New functions. (os_init): Initialize syscall_map, errno_map, open_map. (default_callback): Add entries for os_stat, os_fstat, syscall_map, errno_map, open_map, signal_map, stat_map. (cb_read_target_syscall_maps): New function. (cb_target_to_host_syscall): New function. (cb_host_to_target_errno): Renamed from host_to_target_errno. (cb_target_to_host_open): Renamed from target_to_host_open. (store): New function. (cb_host_to_target_stat): New function. * gentmap.c (sys_tdefs): New global. (gen_targ_vals_h): Output target syscall numbers. (gen_targ_map_c): Update. Output target syscall translation map. * gentvals.sh: New first argument `target'. Preface table with #ifdef NL_TARGET_$target if non-null target passed. * gennltvals.sh: New file. * nltvals.def: Regenerated.
1997-08-30Passify GCC. Convert 0x0LL to something more portable in the FP code.Andrew Cagney1-0/+8