* dv-sockser.c, dv-sockser.h: New files.
* Make-common.in (dv-sockser.o): Add rule for. * aclocal.m4: Check for fcntl.h. * config.h: Add HAVE_FCNTL_H. * sim-break.c (remove_breakpoint): Fix thinko. * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA. Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
This commit is contained in:
parent
86a6094133
commit
84c6d152d1
6 changed files with 81 additions and 7 deletions
|
@ -46,6 +46,8 @@ cgen-utils.c
|
|||
config.in
|
||||
configure.in
|
||||
configure
|
||||
dv-sockser.c
|
||||
dv-sockser.h
|
||||
gdbinit.in
|
||||
genmloop.sh
|
||||
gennltvals.sh
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
Sat Mar 14 18:36:12 1998 Doug Evans <devans@seba.cygnus.com>
|
||||
|
||||
* dv-sockser.c, dv-sockser.h: New files.
|
||||
* Make-common.in (dv-sockser.o): Add rule for.
|
||||
* aclocal.m4: Check for fcntl.h.
|
||||
* config.h: Add HAVE_FCNTL_H.
|
||||
|
||||
* sim-break.c (remove_breakpoint): Fix thinko.
|
||||
|
||||
* sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
|
||||
Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
|
||||
|
||||
1998-03-13 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* sim-base.h (struct sim_state_base): Add prog_syms and
|
||||
|
|
|
@ -408,6 +408,11 @@ nrun.o: $(srccom)/nrun.c config.h tconfig.h \
|
|||
$(sim_main_headers)
|
||||
$(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
|
||||
|
||||
# Devices.
|
||||
|
||||
dv-sockser.o: $(srccom)/dv-sockser.h $(sim_main_headers)
|
||||
$(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS)
|
||||
|
||||
# CGEN support.
|
||||
|
||||
cgen-run.o: $(srccom)/cgen-run.c $(sim_main_headers) \
|
||||
|
@ -448,8 +453,12 @@ MAKEOVERRIDES=
|
|||
|
||||
tags etags: TAGS
|
||||
|
||||
# Macros like EXTERN_SIM_CORE confuse tags.
|
||||
# And the sim-n-foo.h files create functions that can't be found either.
|
||||
TAGS: force
|
||||
etags --regex '/^\/[*] TAGS: .*/' *.c *.h
|
||||
cd $(srcdir) && \
|
||||
etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \
|
||||
*.[ch] ../common/*.[ch]
|
||||
|
||||
clean: $(SIM_EXTRA_CLEAN)
|
||||
rm -f *.[oa] *~ core
|
||||
|
|
27
sim/common/aclocal.m4
vendored
27
sim/common/aclocal.m4
vendored
|
@ -46,7 +46,9 @@ AC_PROG_RANLIB
|
|||
# Check for common headers.
|
||||
# FIXME: Seems to me this can cause problems for i386-windows hosts.
|
||||
# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
|
||||
AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h)
|
||||
AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h)
|
||||
AC_CHECK_HEADERS(sys/time.h sys/resource.h)
|
||||
AC_CHECK_HEADERS(fcntl.h)
|
||||
AC_CHECK_FUNCS(getrusage time sigaction)
|
||||
|
||||
. ${srcdir}/../../bfd/configure.host
|
||||
|
@ -60,10 +62,11 @@ dnl all shall eventually behave the same way.
|
|||
|
||||
dnl We don't use automake, but we still want to support
|
||||
dnl --enable-maintainer-mode.
|
||||
USE_MAINTAINER_MODE=no
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode Enable developer functionality.],
|
||||
[case "${enableval}" in
|
||||
yes) MAINT="" ;;
|
||||
yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
|
||||
no) MAINT="#" ;;
|
||||
*) AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;;
|
||||
esac
|
||||
|
@ -472,19 +475,35 @@ fi])dnl
|
|||
AC_SUBST(sim_hostendian)
|
||||
|
||||
|
||||
dnl --enable-sim-float is for developers of the simulator
|
||||
dnl It specifies the presence of hardware floating point
|
||||
dnl And optionally the bitsize of the floating point register.
|
||||
dnl arg[1] specifies the presence (or absence) of floating point hardware
|
||||
dnl arg[2] specifies the number of bits in a floating point register
|
||||
AC_DEFUN(SIM_AC_OPTION_FLOAT,
|
||||
[
|
||||
default_sim_floating_point="ifelse([$1],,0,[$1])"
|
||||
default_sim_float="[$1]"
|
||||
default_sim_float_bitsize="[$2]"
|
||||
AC_ARG_ENABLE(sim-float,
|
||||
[ --enable-sim-float Specify that the target processor has floating point hardware.],
|
||||
[case "${enableval}" in
|
||||
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
|
||||
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
|
||||
32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";;
|
||||
64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";;
|
||||
*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
|
||||
echo "Setting float flags = $sim_float" 6>&1
|
||||
fi],[sim_float="-DWITH_FLOATING_POINT=${default_sim_floating_point}"])dnl
|
||||
fi],[
|
||||
sim_float=
|
||||
if test x"${default_sim_float}" != x""; then
|
||||
sim_float="-DWITH_FLOATING_POINT=${default_sim_float}"
|
||||
fi
|
||||
if test x"${default_sim_float_bitsize}" != x""; then
|
||||
sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}"
|
||||
fi
|
||||
])dnl
|
||||
])
|
||||
AC_SUBST(sim_float)
|
||||
|
||||
|
|
32
sim/common/dv-sockser.h
Normal file
32
sim/common/dv-sockser.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* Serial port emulation via sockets.
|
||||
Copyright (C) 1998, Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU simulators.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef DV_SOCKSER_H
|
||||
#define DV_SOCKSER_H
|
||||
|
||||
/* bits in result of dev_sockser_status */
|
||||
#define DV_SOCKSER_INPUT_EMPTY 1
|
||||
#define DV_SOCKSER_OUTPUT_EMPTY 2
|
||||
|
||||
/* FIXME: later add a device ptr arg */
|
||||
extern int dv_sockser_status (SIM_DESC);
|
||||
int dv_sockser_write (SIM_DESC, unsigned char);
|
||||
int dv_sockser_read (SIM_DESC);
|
||||
|
||||
#endif /* DV_SOCKSER_H */
|
|
@ -82,7 +82,7 @@ remove_breakpoint (sd, bp)
|
|||
|
||||
sim_core_write_buffer (sd, NULL, exec_map, bp->loc_contents,
|
||||
bp->addr, SIM_BREAKPOINT_SIZE);
|
||||
bp->flags &= SIM_BREAK_INSERTED;
|
||||
bp->flags &= ~SIM_BREAK_INSERTED;
|
||||
}
|
||||
|
||||
/* Come here when a breakpoint insn is hit. If it's really a breakpoint, we
|
||||
|
@ -161,7 +161,7 @@ sim_set_breakpoint (sd, addr)
|
|||
if (bp->addr == addr)
|
||||
return SIM_RC_DUPLICATE_BREAKPOINT; /* Already there */
|
||||
else
|
||||
break;
|
||||
break; /* FIXME: why not scan all bp's? */
|
||||
|
||||
bp = ZALLOC (struct sim_breakpoint);
|
||||
|
||||
|
|
Loading…
Reference in a new issue