Commit Graph

37 Commits

Author SHA1 Message Date
Joel Brobecker b811d2c292 Update copyright year range in all GDB files.
gdb/ChangeLog:

        Update copyright year range in all GDB files.
2020-01-01 10:20:53 +04:00
Joel Brobecker 42a4f53d2b Update copyright year range in all GDB files.
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.
2019-01-01 10:01:51 +04:00
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Joel Brobecker 61baf725ec update copyright year range in GDB files
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.
2017-01-01 10:52:34 +04:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Mike Frysinger 61a0c964e6 sim: syscall: unify memory helpers
Almost every port implements these two callbacks in the same way, so
unify them in the common layer.
2015-06-17 13:19:51 -04:00
Mike Frysinger 6362a3f875 sim: callback: add human readable strings for debugging to maps
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-06-17 13:19:51 -04:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Joel Brobecker 2d7bb7580a callback.h:struct host_callback_struct compilation error on Windows hosts.
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-12-03 13:43:08 +04:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Joel Brobecker 8acc9f485b Update years in copyright notice for the GDB files.
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.
2013-01-01 06:41:43 +00:00
Joel Brobecker c5a5708100 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:28:28 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Hans-Peter Nilsson 7cf1d8af2f * traps.c (cris_break_13_handler): Pass lseek
offset parameter as sign-extended.
2010-10-06 23:44:33 +00:00
Joel Brobecker dc3cf14f35 Update copyright notices to add year 2010. 2010-01-01 10:03:36 +00:00
Joel Brobecker e4d013fc0f Update the copyright notice of some of the files I missed
in the previous copyright update.
2009-01-14 10:53:10 +00:00
Hans-Peter Nilsson fc887f09c5 * cris/traps.c (abort): Define to call sim_io_error.
(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-06 20:49:00 +00:00
Hans-Peter Nilsson ddf2c97233 * cris/sim-main.h (struct _sim_cpu): New member
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 21:00:48 +00:00
Hans-Peter Nilsson e56b67eda7 * cris/traps.c (TARGET_SYS_exit_group): Define.
(cris_break_13_handler): Handle it like the exit for the last
	thread.
2009-01-03 20:25:48 +00:00
Hans-Peter Nilsson ffc67e7a94 * cris/traps.c (TARGET_UTSNAME): Update to 2009-01-01.
(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 19:58:11 +00:00
Hans-Peter Nilsson a349c9b6a2 * cris/traps.c (TARGET_MAP_DENYWRITE): Define.
<case TARGET_SYS_mmap2>: Handle TARGET_MAP_DENYWRITE.
2009-01-03 19:21:42 +00:00
Hans-Peter Nilsson e7fcaaa45e * cris/traps.c (TARGET_SYS_access, TARGET_R_OK, TARGET_W_OK)
(TARGET_X_OK, TARGET_F_OK): Define.
	(cris_break_13_handler) <case TARGET_SYS_access>: New case.
2009-01-03 18:37:31 +00:00
Hans-Peter Nilsson c06ccdf1b6 * cris/traps.c (TARGET_SYS_writev): New macro.
(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-12-30 13:36:17 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Joel Brobecker 4744ac1bb0 Switch the license of all files explicitly copyright the FSF
to GPLv3.
2007-08-24 14:30:15 +00:00
Hans-Peter Nilsson 6a4669ea53 * cris/traps.c (dump_statistics): Change format for cycle numbers
to %llu and cast parameters to unsigned long long.
2007-02-20 00:14:11 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Hans-Peter Nilsson 466b1d3308 * cris/cris-sim.h (enum cris_unknown_syscall_action_type)
(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-10-02 03:21:28 +00:00
Hans-Peter Nilsson eccd787e25 * cris/traps.c (TARGET_PIPE_BUF): New macro.
(cris_pipe_empty): Correct initialization of "remaining".  Only
	adjust the "write" return value if more than TARGET_PIPE_BUF bytes
	are written.
2006-09-30 02:38:06 +00:00
Hans-Peter Nilsson 3ca4d560ef * cris/configure.ac: Check for limits.h and sys/param.h.
* cris/configure, cris/config.in: Rebuild.
	* cris/traps.c (SIM_PATHMAX): New macro.
	(cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
2006-09-29 02:45:48 +00:00
Hans-Peter Nilsson d022998de5 * cris/traps.c (syscall_map): Remove CB_SYS_time / TARGET_SYS_time
mapping.
	(cris_break_13_handler) <case TARGET_SYS_time>: New case.
2006-02-23 02:01:51 +00:00
Hans-Peter Nilsson 8b9b39f44a cris/traps.c (TARGET_O_RDONLY, TARGET_O_WRONLY): Define.
(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-20 14:52:36 +00:00
Hans-Peter Nilsson ed1f044ac6 * cris/sim-main.h (struct _sim_cpu): New members last_syscall,
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 16:14:53 +00:00
Hans-Peter Nilsson 5457266c93 * cris/traps.c (TARGET_SYS_stat): Define.
(syscall_stat32_map): Add entry for TARGET_SYS_stat.
	(cris_break_13_handler) <case TARGET_SYS_stat>: New case.
2005-11-17 15:51:24 +00:00
Hans-Peter Nilsson 69308976e8 * cris/traps.c (cris_break_13_handler) <case TARGET_SYS_mmap2>:
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-04-18 03:08:46 +00:00
Hans-Peter Nilsson 2ecb839027 * cris/traps.c (cris_break_13_handler) <case
TARGET_SYS_rt_sigaction>: Rename sa_handler, sa_flags,
	sa_restorer, sa_mask_low, sa_mask_high to target_sa_handler etc.
2005-03-24 01:14:09 +00:00
Hans-Peter Nilsson f6bcefefe8 * cris: New directory, simulator for Axis Communications CRIS
including CRIS v32, CGEN-based.
	* configure.ac: Add corresponding configury.
	* configure: Regenerate.
2005-01-28 04:29:00 +00:00