Commit Graph

17 Commits

Author SHA1 Message Date
Hans-Peter Nilsson 97f669eda9 * syscall.c (cb_syscall) <case CB_SYS_pipe>: New case.
* 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 03:40:54 +00:00
Hans-Peter Nilsson 5d945fec64 * syscall.c (cb_syscall) <case CB_SYS_truncate>
<case CB_SYS_ftruncate>: New cases.
2004-12-15 01:26:40 +00:00
Hans-Peter Nilsson 82571856a8 * syscall.c (cb_syscall) <case CB_SYS_rename>: New case. 2004-12-13 00:46:05 +00:00
Hans-Peter Nilsson 0d3cd463e3 * syscall.c (cb_syscall) <case CB_SYS_lstat>: New case.
* callback.c (os_lstat): New function.
2004-12-13 00:38:38 +00:00
Hans-Peter Nilsson 027e2a04f1 * run.1: Document --sysroot=filepath.
* sim-options.c (STANDARD_OPTIONS): New member OPTION_SYSROOT.
	(standard_options): Support --sysroot=<path>.
	(standard_option_handler): Handle OPTION_SYSROOT.
	* syscall.c (simulator_sysroot): Define, initialized empty.
	(get_path): Prepend simulator_sysroot to absolute file path.
	[HAVE_STRING_H]: Include string.h.
	[!HAVE_STRING_H && HAVE_STRINGS_H]: Include strings.h.
	* nrun.c [HAVE_UNISTD_H]: Include unistd.h.
	(main): If simulator_sysroot is not empty, chdir there.
	* sim-config.h (simulator_sysroot): Declare.
2004-12-08 00:40:30 +00:00
Daniel Jacobowitz 41ee5402be * callback.c: Update copyright dates.
* 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.
2004-05-10 16:18:03 +00:00
Andrew Cagney 3c25f8c7b0 Move include/callback.h and include/remote-sim.h to include/gdb/.
Update accordingly.
2002-06-09 15:45:54 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Michael Meissner 3aeca4624a Handle short reads and EOF 1998-02-23 18:21:13 +00:00
Michael Meissner ac07041378 Flush writes to stdout, stderr 1997-11-26 21:52:16 +00:00
Doug Evans 6b8d6a1c49 Delete magic number FIXME. 1997-11-26 19:53:26 +00:00
Doug Evans 4123aca810 Undo last change. callback.h changed instead.
Plus:
	* syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
1997-11-26 19:52:34 +00:00
Doug Evans fc63d75ab3 * syscall.c (cb_syscall, cases stat, fstat): Handle -Wall -Werror. 1997-11-26 19:19:58 +00:00
Doug Evans 4ee2892be8 Add comment. 1997-11-25 18:43:29 +00:00
Doug Evans f33673061f * callback.c (os_stat): Make 3rd arg a host struct stat ptr.
(os_fstat): Likewise.  Validate fd argument.
	(cb_host_to_target_stat): Delete big_p arg.  If HS arg is NULL,
	just compute target stat struct length.
	* syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
	(ENOSYS,ENAMETOOLONG): Provide definitions if missing.
	(get_string): Return host errno values so they can be properly
	translated later.
	(cb_syscall): Likewise.
	(cb_syscall, cases open,unlink): Use get_path instead of get_string.
	(cb_syscall, case read): Use read_stdin for file descriptor 0.
	(cb_syscall, case write): Use write_stderr for file descriptor 2.
	(cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
	(get_path): New function.
1997-11-25 09:33:34 +00:00
Doug Evans f7abc1ca0c * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(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-11-17 23:09:08 +00:00