aboutsummaryrefslogtreecommitdiff
path: root/sim/cris/traps.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-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-17sim: syscall: unify memory helpersMike Frysinger1-30/+3
Almost every port implements these two callbacks in the same way, so unify them in the common layer.
2015-06-17sim: callback: add human readable strings for debugging to mapsMike Frysinger1-161/+161
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-12-03callback.h:struct host_callback_struct compilation error on Windows hosts.Joel Brobecker1-1/+1
On Windows, a recent gnulib update imported the lstat module, and this caused a remote-sim.c build failure in struct host_callback_struct: In file included from /[...]/gdb/remote-sim.c:34:0: /[...]/gdb/../include/gdb/callback.h:93:9: error: duplicate member '_stati64' int (*lstat) (host_callback *, const char *, struct stat *); ^ What happens it that gnulib's stat.h makes the following defines: /* Large File Support on native Windows. */ #if 1 # define stat _stati64 #endif and then: #if 1 # if ! 0 /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif So, the following fields in struct host_callback_struct... int (*stat) (host_callback *, const char *, struct stat *); int (*fstat) (host_callback *, int, struct stat *); int (*lstat) (host_callback *, const char *, struct stat *); ... get translated to... int (*_stati64) (host_callback *, const char *, struct _stati64 *); int (*_fstati64) (host_callback *, int, struct _stati64 *); int (*_stati64) (host_callback *, const char *, struct _stati64 *); ... which causes two fields to have the same name. This patch fixes the issue by renaming the stat-related fields by adding a "to_" prefix, similar to what is done in GDB's target_ops vector. include/gdb/ChangeLog: * callback.h (struct host_callback_struct) <to_stat>: Renamed from "stat". <to_fstat>: Renamed from "fstat". <to_lstat>: Renamed from "lstat". sim/common/ChangeLog: * sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat" and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks following renaming in callback.h. * syscall.c (cb_syscall): Likewise. Adjust calls to "lstat" callback by call to "to_lstat" callback sim/cris/ChangeLog: * traps.c (cris_break_13_handler): Adjust call to "fstat" callback by call to "to_fstat" following renaming in callback.h. sim/h8300/ChangeLog: * compile.c (sim_resume): Adjust calls to "stat" and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks following renaming in callback.h.
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-1/+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-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-10-06 * traps.c (cris_break_13_handler): Pass lseekHans-Peter Nilsson1-0/+8
offset parameter as sign-extended.
2010-01-01Update copyright notices to add year 2010.Joel Brobecker1-1/+2
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 * cris/traps.c (abort): Define to call sim_io_error.Hans-Peter Nilsson1-24/+51
(create_map): Make -1 imply a non-fixed address, not 0. All callers changed. Only prefer the next higher unmapped address if the last mapped address is no less than 0x40000000. Check that the address to be mapped is not already mapped. Update head comment. (unmap_pages): Don't call abort when recursive call fails, just note and return an error if a page in the range couldn't be unmapped. (cris_bmod_handler, h_supr_set_handler, h_supr_get_handler) (schedule, make_first_thread, cris_pipe_empty): New local variable sd. (cris_break_13_handler) <case TARGET_SYS_mmap2>: Handle non-MAP_FIXED argument overlapping existing map. For MAP_FIXED, don't abort on page not being mapped. Handle non-anon filemap with length padded to pagesize.
2009-01-03 * cris/sim-main.h (struct _sim_cpu): New memberHans-Peter Nilsson1-0/+12
set_target_thread_data. * cris/crisv32f.c (CRIS_TLS_REGISTER): Define. * cris/crisv10f.c: Ditto. * cris/cris-tmpl.c (MY (set_target_thread_data)): New function. (MY (f_specific_init)): Set new _sim_cpu member to new function. * cris/traps.c (TARGET_SYS_set_thread_area): Define. (cris_break_13_handler) <case TARGET_SYS_set_thread_area>: New case.
2009-01-03 * cris/traps.c (TARGET_SYS_exit_group): Define.Hans-Peter Nilsson1-1/+3
(cris_break_13_handler): Handle it like the exit for the last thread.
2009-01-03 * cris/traps.c (TARGET_UTSNAME): Update to 2009-01-01.Hans-Peter Nilsson1-6/+14
(TARGET_EPOCH): Update to match TARGET_UTSNAME. Correct comment. (cris_break_13_handler) <case TARGET_SYS_uname>: Update to 2.6.27. Set machine field to the BFD printable name of the machine.
2009-01-03 * cris/traps.c (TARGET_MAP_DENYWRITE): Define.Hans-Peter Nilsson1-0/+6
<case TARGET_SYS_mmap2>: Handle TARGET_MAP_DENYWRITE.
2009-01-03 * cris/traps.c (TARGET_SYS_access, TARGET_R_OK, TARGET_W_OK)Hans-Peter Nilsson1-0/+57
(TARGET_X_OK, TARGET_F_OK): Define. (cris_break_13_handler) <case TARGET_SYS_access>: New case.
2008-12-30 * cris/traps.c (TARGET_SYS_writev): New macro.Hans-Peter Nilsson1-19/+176
(is_mapped_only, cris_dump_map): New functions. (cris_break_13_handler) <case TARGET_SYS_mmap2>: Handle more flags and prot combinations and a non-zero page-offset. If TARGET_MAP_FIXED, unmap pages before mapping them. <case TARGET_SYS_mprotect>: When checking, allow any length argument. Don't actually do anything. <case TARGET_SYS_writev>: New case.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-5/+4
to GPLv3.
2007-02-20 * cris/traps.c (dump_statistics): Change format for cycle numbersHans-Peter Nilsson1-19/+19
to %llu and cast parameters to unsigned long long.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2006-10-02 * cris/cris-sim.h (enum cris_unknown_syscall_action_type)Hans-Peter Nilsson1-109/+152
(cris_unknown_syscall_action): Declare. * cris/sim-if.c (cris_unknown_syscall_action): Define. (cris_options): Add cris-unknown-syscall option. (cris_option_handler): Correct comment about and error message for invalid --cris-cycles argument. Handle --cris-unknown-syscall. * cris/traps.c: Include stdarg.h (cris_unknown_syscall): New function. (cris_break_13_handler): Instead of sim_io_eprintf and sim_engine_halt, call cris_unknown_syscall to handle more or less unknown syscalls. Adjust code as necessary to handle return value.
2006-09-30 * cris/traps.c (TARGET_PIPE_BUF): New macro.Hans-Peter Nilsson1-13/+24
(cris_pipe_empty): Correct initialization of "remaining". Only adjust the "write" return value if more than TARGET_PIPE_BUF bytes are written.
2006-09-29 * cris/configure.ac: Check for limits.h and sys/param.h.Hans-Peter Nilsson1-9/+24
* cris/configure, cris/config.in: Rebuild. * cris/traps.c (SIM_PATHMAX): New macro. (cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
2006-02-23 * cris/traps.c (syscall_map): Remove CB_SYS_time / TARGET_SYS_timeHans-Peter Nilsson1-1/+11
mapping. (cris_break_13_handler) <case TARGET_SYS_time>: New case.
2005-11-20 cris/traps.c (TARGET_O_RDONLY, TARGET_O_WRONLY): Define.Hans-Peter Nilsson1-6/+25
(open_map): Use TARGET_O_ACCMODE, TARGET_O_RDONLY and TARGET_O_WRONLY. (cris_break_13_handler) <case TARGET_SYS_fcntl>: Add support for F_GETFL on fd 0, 1 and 2.
2005-11-17 * cris/sim-main.h (struct _sim_cpu): New members last_syscall,Hans-Peter Nilsson1-5/+41
last_open_fd, last_open_flags. * cris/traps.c: Don't include targ-vals.h. (TARGET_O_ACCMODE): Define. (cris_break_13_handler): Set new _sim_cpu members. <case TARGET_SYS_fcntl>: Support special case of F_GETFL. Rearrange code as switch. Emit "unimplemented" abort for unimplemented fcntl calls.
2005-11-17 * cris/traps.c (TARGET_SYS_stat): Define.Hans-Peter Nilsson1-0/+3
(syscall_stat32_map): Add entry for TARGET_SYS_stat. (cris_break_13_handler) <case TARGET_SYS_stat>: New case.
2005-04-18 * cris/traps.c (cris_break_13_handler) <case TARGET_SYS_mmap2>:Hans-Peter Nilsson1-3/+3
For ((len & 8191) != 0 && fd == (USI) -1), don't say this isn't implemented. In call to create_map, pad length argument to 8k.
2005-03-24 * cris/traps.c (cris_break_13_handler) <caseHans-Peter Nilsson1-12/+13
TARGET_SYS_rt_sigaction>: Rename sa_handler, sa_flags, sa_restorer, sa_mask_low, sa_mask_high to target_sa_handler etc.
2005-01-28 * cris: New directory, simulator for Axis Communications CRISHans-Peter Nilsson1-0/+2982
including CRIS v32, CGEN-based. * configure.ac: Add corresponding configury. * configure: Regenerate.