summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-06-21 16:20:04 +0000
committerAndrew Cagney <cagney@redhat.com>2002-06-21 16:20:04 +0000
commitced5a8da6951e3e5d6509f376043ad54cba798a0 (patch)
tree60910d5b68f3d4e0e28a07f105c8384ead5894a0
parentce3753f940e8da101702dd528908224b4ebaacbc (diff)
downloadbinutils-gdb-ced5a8da6951e3e5d6509f376043ad54cba798a0.tar.gz
Merge with trunk.
-rw-r--r--ChangeLog23
-rw-r--r--Makefile.in9
-rwxr-xr-xconfig.sub4
-rw-r--r--configure.in131
-rw-r--r--gdb/ChangeLog1889
-rw-r--r--gdb/MAINTAINERS2
-rw-r--r--gdb/ada-lang.c10
-rw-r--r--gdb/alpha-tdep.c45
-rw-r--r--gdb/arch-utils.c18
-rw-r--r--gdb/arch-utils.h2
-rw-r--r--gdb/avr-tdep.c2
-rw-r--r--gdb/breakpoint.c30
-rw-r--r--gdb/cli/cli-decode.c94
-rw-r--r--gdb/cli/cli-decode.h23
-rw-r--r--gdb/cli/cli-setshow.c21
-rw-r--r--gdb/command.h51
-rw-r--r--gdb/config/i386/tm-cygwin.h1
-rw-r--r--gdb/config/i386/tm-fbsd.h1
-rw-r--r--gdb/config/i386/tm-go32.h1
-rw-r--r--gdb/config/i386/tm-i386.h238
-rw-r--r--gdb/config/i386/tm-i386gnu.h1
-rw-r--r--gdb/config/i386/tm-i386lynx.h7
-rw-r--r--gdb/config/i386/tm-i386sol2.h1
-rw-r--r--gdb/config/i386/tm-linux.h1
-rw-r--r--gdb/config/i386/tm-nbsd.h1
-rw-r--r--gdb/config/i386/tm-obsd.h1
-rw-r--r--gdb/config/m68k/tm-m68k.h2
-rw-r--r--gdb/config/mips/tm-mips.h2
-rw-r--r--gdb/config/romp/rtbsd.mh8
-rw-r--r--gdb/config/romp/xm-rtbsd.h37
-rw-r--r--gdb/cris-tdep.c4
-rw-r--r--gdb/d10v-tdep.c4
-rw-r--r--gdb/defs.h10
-rw-r--r--gdb/frame.h7
-rwxr-xr-xgdb/gdb_indent.sh5
-rw-r--r--gdb/gdbarch.c2
-rw-r--r--gdb/gdbarch.h4
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/i386-linux-nat.c10
-rw-r--r--gdb/i386-linux-tdep.c2
-rw-r--r--gdb/i386-sol2-tdep.c15
-rw-r--r--gdb/i386-tdep.c153
-rw-r--r--gdb/i386-tdep.h2
-rw-r--r--gdb/i386bsd-nat.c5
-rw-r--r--gdb/i386gnu-nat.c16
-rw-r--r--gdb/i386ly-tdep.c61
-rw-r--r--gdb/i386v-nat.c11
-rw-r--r--gdb/i386v4-nat.c160
-rw-r--r--gdb/ia64-tdep.c2
-rw-r--r--gdb/infrun.c4
-rw-r--r--gdb/m68hc11-tdep.c2
-rw-r--r--gdb/m68k-tdep.c57
-rw-r--r--gdb/maint.c21
-rw-r--r--gdb/mi/ChangeLog15
-rw-r--r--gdb/mi/gdbmi.texinfo12
-rw-r--r--gdb/mips-tdep.c140
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c4
-rw-r--r--gdb/regcache.c544
-rw-r--r--gdb/regcache.h37
-rw-r--r--gdb/remote-rdi.c36
-rw-r--r--gdb/remote.c115
-rw-r--r--gdb/rs6000-tdep.c6
-rw-r--r--gdb/s390-tdep.c2
-rw-r--r--gdb/sh-tdep.c105
-rw-r--r--gdb/sparc-tdep.c8
-rw-r--r--gdb/target.c15
-rw-r--r--gdb/v850-tdep.c2
-rw-r--r--gdb/valops.c6
-rw-r--r--gdb/values.c13
-rw-r--r--gdb/varobj.c22
-rw-r--r--gdb/vax-tdep.c2
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/xstormy16-tdep.c2
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/lbasename.c16
76 files changed, 2880 insertions, 1448 deletions
diff --git a/ChangeLog b/ChangeLog
index 27ac092f6d2..62a463787f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2002-06-19 Nathanael Nerode <neroden@twcny.rr.com>
+
+ * configure.in: replace ${topsrcdir} with ${srcdir}
+
+ * configure.in: Move definition of libstdcxx_flags
+ right above usage, rather than waaay earlier.
+
+ * configure.in: Pull definition of is_cross_compiler earlier.
+
+ * configure.in: Rearrange a little.
+
+ * configure.in: Remove references to librx.
+ * Makefile.in: Remove references to librx.
+
+2002-06-19 Nathanael Nerode <neroden@twcny.rr.com>
+
+ * configure.in: Eliminate ${gasdir} variable.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ * configure.in: Add support for frv.
+ * config.sub: Add support for frv.
+
2002-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
diff --git a/Makefile.in b/Makefile.in
index 4a761096539..6aa538355aa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -186,7 +186,7 @@ OTHERS =
# This is set by the configure script to the list of directories which
# should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libobjc
+TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes bsp libstub cygmon libf2c libobjc
# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.
@@ -783,7 +783,6 @@ INSTALL_X11_MODULES = \
# using $(TARGET_FLAGS_TO_PASS).
ALL_TARGET_MODULES = \
all-target-libstdc++-v3 \
- all-target-librx \
all-target-newlib \
all-target-libf2c \
all-target-libobjc \
@@ -806,7 +805,6 @@ ALL_TARGET_MODULES = \
# are compiled using the target tools.
CONFIGURE_TARGET_MODULES = \
configure-target-libstdc++-v3 \
- configure-target-librx \
configure-target-newlib \
configure-target-libf2c \
configure-target-libobjc \
@@ -932,7 +930,6 @@ CLEAN_MODULES = \
# All of the target modules that can be cleaned
CLEAN_TARGET_MODULES = \
clean-target-libstdc++-v3 \
- clean-target-librx \
clean-target-newlib \
clean-target-libf2c \
clean-target-libobjc \
@@ -1747,7 +1744,7 @@ all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc
all-gprof: all-libiberty all-bfd all-opcodes all-intl
all-grep: all-libiberty
all-grez: all-libiberty all-bfd all-opcodes
-all-gui: all-gdb all-libproc all-target-librx
+all-gui: all-gdb all-libproc
all-guile:
all-gzip: all-libiberty
all-hello: all-libiberty
@@ -1768,8 +1765,6 @@ configure-target-libffi: $(ALL_GCC_C)
all-target-libffi: configure-target-libffi
configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
-configure-target-librx: $(ALL_GCC_C)
-all-target-librx: configure-target-librx
configure-target-libstdc++-v3: $(ALL_GCC_C)
all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
configure-target-libstub: $(ALL_GCC_C)
diff --git a/config.sub b/config.sub
index 4693ac17f95..69f444e7902 100755
--- a/config.sub
+++ b/config.sub
@@ -231,7 +231,7 @@ case $basic_machine in
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| m32r | m68000 | m68k | m88k | mcore \
@@ -288,7 +288,7 @@ case $basic_machine in
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
diff --git a/configure.in b/configure.in
index 5962337875f..80b72e8c5e1 100644
--- a/configure.in
+++ b/configure.in
@@ -45,8 +45,6 @@
host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib"
libstdcxx_version="target-libstdc++-v3"
-# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -66,7 +64,6 @@ libgcj="target-libffi \
target_libs="target-libiberty \
target-libgloss \
target-newlib \
- target-librx \
${libstdcxx_version} \
target-libf2c \
${libgcj}
@@ -118,6 +115,18 @@ appdirs=""
# per-host:
+# There is no longer anything interesting in the per-host section.
+
+# per-target:
+
+# Define is_cross_compiler to save on calls to 'test'.
+is_cross_compiler=
+if test x"${host}" = x"${target}" ; then
+ is_cross_compiler=no
+else
+ is_cross_compiler=yes
+fi
+
# Work in distributions that contain no compiler tools, like Autoconf.
tentative_cc=""
if test -d ${srcdir}/config ; then
@@ -351,8 +360,6 @@ if test -n "${host_makefile_frag}" ; then
host_makefile_frag=mh-frag
fi
-# per-target:
-
case "${target}" in
v810*)
target_makefile_frag="${target_makefile_frag} config/mt-v810"
@@ -402,7 +409,6 @@ case "${enable_target_optspace}:${target}" in
esac
skipdirs=
-gasdir=gas
use_gnu_ld=
use_gnu_as=
@@ -425,19 +431,10 @@ esac
# toolchains, we add some directories that should only be useful in a
# cross-compiler.
-is_cross_compiler=
-
-if test x"${host}" = x"${target}" ; then
- # when doing a native toolchain, don't build the targets
- # that are in the 'cross only' list
- skipdirs="${skipdirs} ${cross_only}"
- is_cross_compiler=no
-else
- # similarly, don't build the targets in the 'native only'
- # list when building a cross compiler
- skipdirs="${skipdirs} ${native_only}"
- is_cross_compiler=yes
-fi
+case $is_cross_compiler in
+ no) skipdirs="${skipdirs} ${cross_only}" ;;
+ yes) skipdirs="${skipdirs} ${native_only}" ;;
+esac
# We always want to use the same name for this directory, so that dejagnu
# can reliably find it.
@@ -497,33 +494,6 @@ if test x"${with_libs}" != x ; then
done
fi
-# If both --with-headers and --with-libs are specified, default to
-# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
- if test x"${with_newlib}" = x ; then
- with_newlib=no
- fi
-fi
-
-# Recognize --with-newlib/--without-newlib.
-if test x${with_newlib} = xno ; then
- skipdirs="${skipdirs} target-newlib"
-elif test x${with_newlib} = xyes ; then
- skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
-fi
-
-# Default to using --with-stabs for certain targets.
-if test x${with_stabs} = x ; then
- case "${target}" in
- mips*-*-irix6*)
- ;;
- mips*-*-* | alpha*-*-osf*)
- with_stabs=yes;
- withoptions="${withoptions} --with-stabs"
- ;;
- esac
-fi
-
# Handle ${copy_dirs}
set fnord ${copy_dirs}
shift
@@ -555,6 +525,32 @@ while test $# != 0 ; do
shift; shift
done
+# If both --with-headers and --with-libs are specified, default to
+# --without-newlib.
+if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+ if test x"${with_newlib}" = x ; then
+ with_newlib=no
+ fi
+fi
+
+# Recognize --with-newlib/--without-newlib.
+case ${with_newlib} in
+ no) skipdirs="${skipdirs} target-newlib" ;;
+ yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
+esac
+
+# Default to using --with-stabs for certain targets.
+if test x${with_stabs} = x ; then
+ case "${target}" in
+ mips*-*-irix6*)
+ ;;
+ mips*-*-* | alpha*-*-osf*)
+ with_stabs=yes;
+ withoptions="${withoptions} --with-stabs"
+ ;;
+ esac
+fi
+
# Configure extra directories which are host specific
case "${host}" in
@@ -639,7 +635,7 @@ case "${target}" in
esac
;;
*-*-netware)
- noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-newlib target-libiberty target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -665,8 +661,6 @@ case "${target}" in
alpha*-*-linux*)
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
;;
alpha*-*-freebsd*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -677,8 +671,6 @@ case "${target}" in
;;
sh-*-linux*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -735,7 +727,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
;;
c4x-*-*)
- noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
;;
c54x*-*-* | tic54x-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
@@ -744,7 +736,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs ${libgcj}"
;;
d10v-*-*)
- noconfigdirs="$noconfigdirs target-librx ${libstdcxx_version} target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
;;
d30v-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -755,11 +747,17 @@ case "${target}" in
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
+ frv-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ if test x${is_cross_compiler} != xno ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
h8500-*-*)
- noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj} target-libf2c"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
;;
hppa*64*-*-linux* | parisc*64*-*-linux*)
# In this case, it's because the hppa64-linux target is for
@@ -799,8 +797,6 @@ case "${target}" in
s390*-*-linux*)
# The libffi port is not yet in the GCC tree
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
;;
i[3456]86-*-linux*)
# This section makes it possible to build newlib natively on linux.
@@ -813,13 +809,9 @@ case "${target}" in
# Note however, that newlib will only be configured in this situation
# if the --with-newlib option has been given, because otherwise
# 'target-newlib' will appear in skipdirs.
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
;;
*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- # linux has rx in libc
- skipdirs="$skipdirs target-librx"
;;
i[3456]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
@@ -846,7 +838,7 @@ case "${target}" in
esac
;;
i[3456]86-*-pe)
- noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
;;
i[3456]86-*-sco3.2v5*)
# The linker does not yet know about weak symbols in COFF,
@@ -1277,7 +1269,7 @@ fi
# --without-gnu-ld options for the configure script.
if test x${use_gnu_as} = x ; then
- if test x${with_gnu_as} != xno && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && test -d ${srcdir}/${gasdir} ; then
+ if test x${with_gnu_as} != xno && echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 && test -d ${srcdir}/gas ; then
with_gnu_as=yes
withoptions="$withoptions --with-gnu-as"
fi
@@ -1454,7 +1446,7 @@ if test x${gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
gxx_include_dir='${libsubdir}/include/g++'
else
- . ${topsrcdir}/config.if
+ . ${srcdir}/config.if
gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
fi
else
@@ -1475,7 +1467,7 @@ case " $skipdirs " in
esac
# If we're not building GCC, don't discard standard headers.
- if test -d ${topsrcdir}/gcc; then
+ if test -d ${srcdir}/gcc; then
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
if test "${build}" != "${host}"; then
@@ -1521,7 +1513,7 @@ esac
# the previously-installed cross compiler, so don't bother to add
# flags for directories within the install tree of the compiler
# being built; programs in there won't even run.
-if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
+if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
# Search for pre-installed headers if nothing else fits.
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
fi
@@ -1535,7 +1527,7 @@ fi
if test "x${CC_FOR_TARGET+set}" = xset; then
:
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
elif test "$host" = "$target"; then
CC_FOR_TARGET='$(CC)'
@@ -1551,7 +1543,7 @@ esac
if test "x${GCJ_FOR_TARGET+set}" = xset; then
:
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
elif test "$host" = "$target"; then
GCJ_FOR_TARGET='gcj'
@@ -1563,9 +1555,12 @@ case $GCJ_FOR_TARGET in
*) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
+# Don't use libstdc++-v3's flags to configure/build itself.
+libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+
if test "x${CXX_FOR_TARGET+set}" = xset; then
:
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
# We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
# of g++ for linking C++ or Java, because g++ has -shared-libgcc by
# default whereas gcc does not.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0dbe0a5f740..d8233fe928c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1770,6 +1770,1895 @@ Fri May 17 14:26:19 2002 J"orn Rennecke <joern.rennecke@superh.com>
* gdbserver/server.c (gdbserver_usage): New function.
(main): Call it.
+2002-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h: Update copyright.
+ (struct regcache, struct gdbarch): Add opaque declarations.
+ (current_regcache): Declare global variable.
+ (regcache_read, regcache_write): Add gdbarch parameter.
+ (regcache_save, regcache_save_no_passthrough)
+ (regcache_restore, regcache_restore_no_passthrough)
+ (regcache_dup, regcache_dup_no_passthrough)
+ (regcache_cpy, regcache_cpy_no_passthrough)
+ (deprecated_grub_regcache_for_registers)
+ (deprecated_grub_regcache_for_register_valid)
+ (regcache_valid_p): Add function declarations.
+
+ * regcache.c: Update copyright.
+ (regcache_descr_handle): New global variable.
+ (struct regcache_descr): Define.
+ (init_legacy_regcache_descr, init_regcache_descr): New functions.
+ (regcache_descr, xfree_regcache_descr): New functions.
+ (struct regcache): Define.
+ (regcache_xmalloc, regcache_xfree): New functions.
+ (regcache_cpy, regcache_cpy_no_passthrough): New functions.
+ (regcache_dup, regcache_dup_no_passthrough): New functions.
+ (regcache_valid_p, regcache_read_as_address): New functions.
+ (deprecated_grub_regcache_for_registers): New function.
+ (deprecated_grub_regcache_for_register_valid): New function.
+ (current_regcache): New global variable.
+ (register_buffer): Add regcache parameter. Update calls.
+ (regcache_read, regcache_write): Add regcache parameter. Rewrite.
+ (read_register_gen, write_register_gen): Update register_buffer
+ call. Test for legacy_p instead of gdbarch_register_read_p or
+ gdbarch_register_write_p.
+ (regcache_collect): Update register_buffer call.
+ (build_regcache): Rewrite. Use deprecated grub functions.
+ (regcache_save, regcache_save_no_passthrough): New functions.
+ (regcache_restore, regcache_restore_no_passthrough): New
+ functions.
+ (_initialize_regcache): Create the regcache_data_handle. Swap
+ current_regcache global variable.
+
+ * sh-tdep.c (sh_pseudo_register_read): Add current_regcache
+ parameter to regcache_read and regcache_write calls.
+ (sh4_register_read): Ditto.
+ (sh64_pseudo_register_read): Ditto.
+ (sh64_register_read): Ditto.
+ (sh_pseudo_register_write): Ditto.
+ (sh4_register_write): Ditto.
+ (sh64_pseudo_register_write): Ditto.
+ (sh64_register_write): Ditto.
+
+ * defs.h (XCALLOC): Define.
+
+2002-06-19 Grace Sainsbury <graces@redhat.com>
+
+ * config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0).
+ * m68k-tdep.c (m68k_gdbarch_init): Added.
+ (m68k_dump_tdep): Added.
+
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * ada-lang.c (fill_in_ada_prototype): Update comment.
+
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (enum mips_abi): Explicitly start at 0. Add
+ MIPS_ABI_LAST.
+ (mips_abi_string, mips_abi_strings): New.
+ (struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
+ (mips_gdbarch_init): Set tdep->found_abi. Don't set
+ tdep->mips_abi_string. Honor mips_abi_string. Default to
+ O32 if no ABI is found.
+ (mips_dump_tdep): Use mips_abi_strings.
+ (mips_abi_update): New function.
+ (_initialize_mips_tdep): Initialize mips_abi_string. Add
+ ``set mips abi'' and ``show mips abi''. Check the size of
+ mips_abi_strings.
+
+2002-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * i386-linux-tdep.c (i386_linux_register_name): Make return type
+ constant.
+
+2002-06-18 Joel Brobecker <brobecker@gnat.com>
+
+ * alpha-tdep.c (heuristic_proc_desc): Compute the size of the
+ current frame using only the first stack size adjustment. All
+ subsequent size adjustments are not considered to be part of
+ the "static" part of the current frame.
+ Compute the address of the saved registers relative to the
+ Frame Pointer ($fp) instead of the Stack Pointer if $fp is
+ in use in this frame.
+
+2002-06-18 Don Howard <dhoward@redhat.com>
+
+ * valops.c (value_ind): Use value_at_lazy() when dereferencing
+ type int expressions. Thanks to Jim Blandy <jimb@redhat.com> for
+ suggesting this solution.
+
+2002-06-18 Andrew Cagney <ac131313@redhat.com>
+
+ * config/romp/xm-rtbsd.h: Delete file.
+ * config/romp/rtbsd.mh: Delete file.
+
+2002-06-18 Keith Seitz <keiths@redhat.com>
+
+ * breakpoint.c (condition_command): Post breakpoint_modify
+ when a condition is added to an existing breakpoint.
+ (commands_command): Likewise for commands.
+ (set_ignore_count): Likewise for ignore counts.
+ If no tty, do not simply return, still need to send event
+ notification.
+ (ignore_command): Only print a newline if the command came
+ from a tty.
+ Don't call breakpoints_changed, since this is now properly
+ handled by set_ignore_count.
+
+2002-06-18 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Note that cris-elf target can be compiled with
+ -Werror.
+ * cris-tdep.c (cris_register_name): Make return type constant.
+ (cris_breakpoint_from_pc): Ditto.
+
+2002-06-18 Michal Ludvig <mludvig@suse.cz>
+
+ * frame.h (struct frame_info): Change type of context to
+ 'struct context'.
+
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (REGISTER_NAME): Change return type a constant string
+ pointer.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/mips/tm-mips.h (mips_register_name): Update.
+ * i386-tdep.h (i386_register_name): Update.
+ * mips-tdep.c (mips_register_name): Update
+ * alpha-tdep.c (alpha_register_name): Update.
+ * arch-utils.c (legacy_register_name): Update.
+ * arch-utils.h (legacy_register_name): Update.
+ * avr-tdep.c (avr_register_name): Update.
+ * ia64-tdep.c (ia64_register_name): Update.
+ * i386-tdep.c (i386_register_name): Update.
+ * sparc-tdep.c (sparc32_register_name): Update.
+ (sparc64_register_name): Update.
+ (sparclite_register_name): Update.
+ (sparclet_register_name): Update.
+ * sh-tdep.c (sh_generic_register_name): Update.
+ (sh_sh_register_name): Update.
+ (sh_sh3_register_name): Update.
+ (sh_sh3e_register_name): Update.
+ (sh_sh_dsp_register_name): Update.
+ (sh_sh3_dsp_register_name): Update.
+ (sh_sh4_register_name): Update.
+ (sh_sh64_register_name): Update.
+ * s390-tdep.c (s390_register_name): Update.
+ * rs6000-tdep.c (rs6000_register_name): Update.
+ * ns32k-tdep.c (ns32k_register_name_32082): Update.
+ (ns32k_register_name_32382): Update.
+ * d10v-tdep.c (d10v_ts2_register_name): Update.
+ (d10v_ts3_register_name): Update.
+ * xstormy16-tdep.c (xstormy16_register_name): Update.
+ * vax-tdep.c (vax_register_name): Update.
+ * v850-tdep.c (v850_register_name): Update.
+ * m68hc11-tdep.c (m68hc11_register_name): Update.
+ * mn10300-tdep.c (mn10300_generic_register_name): Update.
+ (am33_register_name): Update.
+
+2002-06-17 Grace Sainsbury <graces@redhat.com>
+
+ * m68k-tdep.c: Reindented.
+
+2002-06-17 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_indent.sh: Add prgregset_t, fpregset_t, and gregset_t to the
+ list of predefined types.
+
+2002-06-16 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE,
+ REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW): Remove defines.
+ (i386_register_virtual_type, i386_register_convertible,
+ i386_register_convert_to_virtual, i386_register_convert_to_raw):
+ Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+ * config/i386/tm-i386lynx.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386lynx_saved_pc_after_call): Remove prototype.
+ * i386ly-tdep.c: Include "i386-tdep.h".
+ (i386lynx_saved_pc_after_call): Make static. Use
+ read_memory_nobpt instead of read_memory. Use
+ read_memory_unsigned_integer instead of read_memory_integer.
+ (i386lynx_init_abi): New function.
+ (i386lynx_coff_osabi_sniffer): New function.
+ (_initialize_i386bsd_tdep): New function.
+
+ * config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
+ CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
+ (i386_fix_call_dummy): Remove prototype.
+ * i386-tdep.c (i386_call_dummy_words): New variable.
+ (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration.
+ * mips-tdep.c (_initialize_mips_tdep): Update ``set mips
+ mask-address'' command.
+ (show_mask_address): Add cmd parameter.
+ * remote.c (add_packet_config_cmd): Update. Change type of
+ set_func and show_func to cmd_sfunc_ftype.
+ (_initialize_remote): Update `set remote Z-packet'
+ (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter.
+ (show_remote_protocol_e_packet_cmd): Ditto.
+ (show_remote_protocol_E_packet_cmd): Ditto.
+ (show_remote_protocol_P_packet_cmd): Ditto.
+ (show_remote_protocol_Z_software_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_write_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_read_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_access_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_packet_cmd): Ditto.
+ (show_remote_protocol_binary_download_cmd): Ditto.
+ (show_remote_cmd): Pass NULL to all of above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
+ DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
+ POP_FRAME): Remove defines.
+ (i386_push_arguments, i386_store_struct_return,
+ i386_extract_return_value, i386_store_return_value,
+ i386_extract_struct_value_address, i386_push_dummy_frame,
+ i386_pop_frame): Renove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ (add_setshow_cmd): New function.
+ * command.h (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ * remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat''
+ and ``set rdiromatzero''.
+ * maint.c (_initialize_maint_cmds): Update commented out code.
+ * cli/cli-decode.h (add_set_boolean_cmd): Delete declaration.
+ * target.c (initialize_targets): Update `set
+ trust-readonly-sections'.
+ * remote.c (_initialize_remote): Update `set remotebreak'.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (FUNCTION_START_OFFSET, INNER_THAN,
+ BREAKPOINT, DECR_PC_AFTER_BREAK): Removed.
+ * i386-tdep.c (i386_skip_prologue): Adjust function signature to
+ fit into multi-arch framework.
+ (i386_breakpoint_from_pc): New function.
+ (i386_gdbarch_init): Adjust for removal of the macros mentioned
+ above.
+
+ * config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION,
+ FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS,
+ FRAME_ARGS_SKIP, FRAME_INIT_SAVED_REGS): Remove defines.
+ (i386_frameless_function_invocation, i386_frame_num_args,
+ i386_frame_init_saved_regs): Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (set_cmd_cfunc): Update.
+ (set_cmd_sfunc): Update.
+ * command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare.
+ (set_cmd_sfunc, set_cmd_cfunc): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-sol2-tdep.c (i386_sol2_osabi_sniffer): New function.
+ (_initialize_i386_sol2_tdep): Register i386_sol2_osabi_sniffer.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (auto_boolean): Declare enum.
+ * command.h (cmd_auto_boolean): Delete enum.
+ * mips-tdep.c (mask_address_var): Update.
+ (mips_mask_address_p): Update.
+ (show_mask_address): Update.
+ * remote.c (struct packet_config): Update.
+ (update_packet_config): Update.
+ (show_packet_config_cmd): Update.
+ (packet_ok): Update.
+ (add_packet_config_cmd): Update.
+ (_initialize_remote):
+ * command.h: Update.
+ * cli/cli-setshow.c (parse_auto_binary_operation): Update.
+ (do_setshow_command): Update.
+ * cli/cli-decode.c (add_set_auto_boolean_cmd): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-cygwin.h, config/i386/tm-fbsd.h,
+ config/i386/tm-go32.h, config/i386/tm-i386gnu.h,
+ config/i386/tm-i386sol2.h, config/i386/tm-i386v4.h,
+ config/i386/tm-linux.h, config/i386/tm-nbsd.h,
+ config/i386/tm-obsd.h (HAVE_I387_REGS): Remove define.
+ * config/i386/tm-i386.h: Unconditionally define FLOAT_INFO.
+
+ * i386-tdep.c (i386_coff_osabi_sniffer): Add "coff-go32" to the
+ list of DJGPP COFF targets.
+
+ * config/i386/tm-i386.h (REGISTER_SIZE): Remove define.
+ (NUM_GREGS, NUM_FREGS, NUM_SSE_REGS): Remove defines.
+ (FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove defines.
+ (FP0_REGNUM): Remove define.
+ (MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+ MAX_REGISTER_VIRTUAL_SIZE): Remove define.
+ (i386_register_virtual_size): Remove protoype.
+ * i386-tdep.c (i386_register_virtual_size): Removed.
+ (i386_extract_return_value, i386_store_return_value): Use
+ FP0_REGNUM instead of NUM_FREGS to determine whether the
+ floating-point registers are available.
+ (i386_gdbarch_init): Tweak FIXME about FPU registers.
+ Adjust for removal of macros mentioned above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v4-nat.c: Include "i386-tdep.h". Reformat and tweak various
+ comments.
+ (fill_gregset, supply_gregset, supply_fpregset, fill_fpregset):
+ Remove prototypes.
+ (supply_gregset, fill_gregset): Remove use of register keyword and
+ remove declaration for regmap. Use I386_NUM_GREGS instead of
+ NUM_REGS and NUM_FREGS.
+ (FPREGSET_FSAVE_OFFSET): Remove.
+ (supply_fpregset, fill_fpregset): Use FPO_REGNUM instead of
+ NUM_FREGS to determine whether the floating-point registers are
+ available.
+
+ * i386gnu-nat.c (supply_gregset, gnu_fetch_registers,
+ gnu_store_registers): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386-linux-nat.c (OLD_CANNOT_FETCH_REGISTER,
+ OLD_CANNOT_STORE_REGISTER, supply_gregset, fill_gregset): Replace
+ usage of NUM_GREGS with I386_NUM_GREGS.
+
+ * i386-linux-nat.c (fill_gregset): Remove redundant parentheses.
+
+ * i386bsd-nat.c: Include "i386-tdep.h".
+ (supply_gregset, fill_gregset): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386v-nat.c: Remove copnditional inclusion of <asm/debugreg.h>,
+ and associated comment. They no longer make any sense, since we
+ don't use this file anymore on Linux.
+
+ * config/i386/tm-i386.h (MAX_NUM_REGS): Removed.
+ * i386-tdep.c (i386_register_offset, i386_register_size): Use
+ I386_SSE_NUM_REGS instead of MAX_NUM_REGS for the number of
+ elements in these arrays.
+ (_initialize_i386_tdep): Use I386_SSE_NUM_REGS instead of
+ MAX_NUM_REGS.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_LYNXOS.
+ * osabi.c (gdb_osabi_names): Add entry for "LynxOS".
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
+ EXTRACT_RETURN_VALUE.
+ (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
+ EXTRACT_STRUCT_VALUE_ADDRESS.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * values.c (value_being_returned): Handle
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+ (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
+
+ * arm-linux-tdep.c (arm_linux_init_abi): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+ * config/arc/tm-arc.h: Update.
+ * config/d30v/tm-d30v.h: Update.
+ * config/fr30/tm-fr30.h: Update.
+ * config/h8300/tm-h8300.h: Update.
+ * config/h8500/tm-h8500.h: Update.
+ * config/i386/tm-i386.h: Update.
+ * config/i386/tm-ptx.h: Update.
+ * config/i386/tm-symmetry.h: Update.
+ * config/i960/tm-i960.h: Update.
+ * config/m32r/tm-m32r.h: Update.
+ * config/m68k/tm-delta68.h: Update.
+ * config/m68k/tm-linux.h: Update.
+ * config/m68k/tm-m68k.h: Update.
+ * config/m88k/tm-m88k.h: Update.
+ * config/mcore/tm-mcore.h: Update.
+ * config/mips/tm-mips.h: Update.
+ * config/mn10200/tm-mn10200.h: Update.
+ * config/pa/tm-hppa.h: Update.
+ * config/pa/tm-hppa64.h: Update.
+ * config/sparc/tm-sp64.h: Update.
+ * config/sparc/tm-sparc.h: Update.
+ * config/sparc/tm-sparclet.h: Update.
+ * config/z8k/tm-z8k.h: Update.
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (i386_linux_tdep_h): Define.
+ (i386_tdep_h, i387_tdep_h): Define.
+ (i386-linux-nat.o): Add $(i386_linux_tdep_h),
+ $(i386_tdep_h) and $(i387_tdep_h).
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+
+2002-06-14 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (START_INFERIOR_TRAPS_EXPECTED): Removed.
+ Already covered by the default.
+
+ * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT,
+ TARGET_LONG_DOUBLE_BIT): Remove. * i386-tdep.c
+ (i386_gdbarch_init): Initialize long_double_format and long_double
+ bit.
+
+ * config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
+ i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o.
+ Move these to ...
+ * config/i386/i386sol2.mh: ... here.
+ * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define.
+ (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef.
+ (SIGCONTEXT_PC_OFFSET): Remove define.
+ (IN_SIGTRAMP): Remove define.
+ * i386-sol2-tdep.c: New file.
+
+ * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h.
+ * config/i386/tm-i386nw.h: Removed.
+
+ * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM,
+ USE_STRUCT_CONVENTION): Remove defines.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC,
+ GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention):
+ Remove prototype.
+ (USE_STRUCT_CONVENTION): Remove prototype.
+ * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove
+ declaration.
+ (_initialize_i386bsd_nat): Revise logic to determine some
+ constants at compile time when compiling a native GDB. Warn if
+ things don't match up with what we expect.
+ * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end):
+ Remove variables.
+ (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite
+ to use date stored in `struct gdbarch_tdep'.
+ (i386bsd_sigcontext_offset): Remove varaible.
+ (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data
+ stored in `struct gdbarch_tdep'.
+ (i386bsd_frame_saved_pc): Make static.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions.
+ (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset,
+ i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+ i386fbsd4_sc_pc_offset): New variables.
+ (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi,
+ i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New
+ functions.
+ (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New
+ functions.
+ * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment.
+ Modify the value of i386fbsd_sigtramp_start and
+ i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and
+ i386fbsd_sigtramp_end.
+ * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove
+ function.
+
+ * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move
+ define to i386-linux-tdep.h.
+ (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME,
+ REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove
+ defines.
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size): Remove prototypes.
+ (i386_linux_svr4_fetch_link_map_offsets): Remove prototype.
+ (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define.
+ (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL,
+ TARGET_WRITE_PC): Remove defines.
+ (i386_linux_in_sigtramp, i386_linux_frame_chain,
+ i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call,
+ i386_linux_write_pc): Remove prototypes.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-linux-tdep.h: New file.
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+ * i386-linux-tdep.c: Include "i386-tdep.h" and
+ "i386-linux-tdep.h".
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size, i386_linux_in_sigtramp,
+ i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets):
+ Make static.
+ (i386_linux_init_abi): New function.
+ (_initialize_i386_linux_tdep): New function.
+
+ * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386_saved_pc_after_call): Remove prototype.
+ (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register".
+ (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
+ DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines.
+ (i386_register_name, i386_stab_reg_to_regnum,
+ i386_dwarf_reg_to_regnum): Remove prototypes.
+ (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS,
+ SIZEOF_SSE_REGS): Remove defines.
+ (REGISTER_BYTES): Remove define.
+ (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines.
+ (i386_register_byte, i386_register_raw_size): Remove prototypes.
+ (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines.
+ (i386_frame_chain, i386_frame_saved_pc): Remove prototypes.
+ * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define.
+ (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP,
+ JB_EDX, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines.
+ (sigtramp_saved_pc): Remove define.
+ (i386v4_sigtramp_saved_pc): Remove prototype.
+ * config/i386/tm-go32.h (FRAME_CHAIN,
+ FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines.
+ (i386go32_frame_saved_pc): Remove prototype.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-tdep.h: Include "osabi.h".
+ (enum i386_abi): Removed.
+ (enum struct_return): New enum.
+ (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset,
+ struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and
+ sc_pc_offset members.
+ (i386_gdbarch_register_os_abi): Remove prototype.
+ (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS,
+ I386_SSE_NUM_REGS): New defines.
+ (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS,
+ I386_SSE_SIZEOF_REGS): New defines.
+ (i386_register_name, i386_register_byte, i386_register_raw_size):
+ New prototypes.
+ (i386_elf_init_abi, i386_svr4_init_abi): New prototypes.
+ (i386bsd_sigtramp_saved_pc): New prototype.
+ * i386-tdep.c: Don't include "elf-bfd.h".
+ (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum,
+ i386_frame_chain, i386_saved_pc_after_call): Make static.
+ (i386_frame_saved_pc): Rewrite to call architecture dependent
+ function to deal with signal handlers. Make static.
+ (i386go32_frame_saved_pc): Removed.
+ [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target):
+ Removed.
+ (i386_get_longjmp_target): New function.
+ (default_struct_convention, pcc_struct_convention,
+ reg_struct_convention, valid_conventions, struct_convention): New
+ variables.
+ (i386_use_struct_convention): New function.
+ (i386v4_sigtramp_saved_pc): Renamed to
+ i386_svr4_sigtramp_saved_pc. Made static. Moved.
+ (i386_pc_in_sigtramp): New function.
+ (i386_abi_names): Removed.
+ (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD,
+ ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD):
+ Removed.
+ (process_note_sections, i386_elf_abi_from_note, i386_elf_abi,
+ i386_gdbarch_register_os_abi): Removed.
+ (struct i386_abi_handler): Removed.
+ (i386_abi_handler_list): Removed.
+ (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New
+ functions.
+ (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi,
+ i386_nw_init_abi): New functions.
+ (i386_gdbarch_init): Rewritten to use generic OS ABI framework.
+ Use set_gdbarch_xxx() calls instead of relying on macros for a
+ number of calls.
+ (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions.
+ (_initialize_i386_tdep): Add new 'struct-convcention' command.
+ Register the various architecture variants defined in this file.
+
+2002-06-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
+ (struct main_type): Remove arg_types member. Update comments for
+ struct field.
+ (TYPE_ARG_TYPES): Remove.
+ (TYPE_FN_FIELD_ARGS): Update.
+ (smash_to_method_type): Update prototype.
+
+ * c-typeprint.c (cp_type_print_method_args): Take method type
+ instead of argument list. Use new argument layout. Simplify.
+ (c_type_print_args): Use new argument layout. Simplify.
+ (c_type_print_base): Update call to cp_type_print_method_args.
+ * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
+ argument; use die->type instead. Update call to
+ smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+ * gdbtypes.c (allocate_stub_method): Update comment.
+ (smash_to_method_type): Take new NARGS and VARARGS arguments.
+ Use new argument layout.
+ (check_stub_method): Use new argument layout. Don't count
+ void as an argument.
+ (print_arg_types): Update comments. Use new argument layout.
+ (recursive_dump_type): Don't print arg_types member.
+ * hpread.c (hpread_read_struct_type): Use new argument layout.
+ (fixup_class_method_type): Likewise.
+ (hpread_type_lookup): Likewise.
+ * stabsread.c (read_type): Update calls to read_args and
+ smash_to_method_type.
+ (read_args): Use new argument layout. Simplify.
+ * valops.c (typecmp): Use new argument layout. Update parameters
+ and comments. Simplify.
+ (hand_function_call): Use new argument layout.
+ (search_struct_method): Update call to typecmp.
+ (find_overload_match): Use new argument layout.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Mention multithreaded debug support for gdbserver.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * MAINTAINERS: Mention NEWS.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/regcache.c: Add comment.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (PROC_SYMBOL): Add warning comment.
+ (struct mips_objfile_private, compare_pdr_entries): New.
+ (non_heuristic_proc_desc): Read the ".pdr" section if it
+ is present.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_push_arguments): Rewrite using a two-pass loop.
+ (arm_debug): New static variable.
+ (_initialize_arm_tdep): Add ``set debug arm'' command.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (sim_arm_h): Define.
+ (arm-tdep.o): Add $(sim_arm_h) and $(gdb_assert_h).
+ * arm-tdep.c: Include "gdb/sim-arm.h" and "gdb_assert.h".
+ (arm_register_sim_regno): New function, map an internal REGNUM
+ onto a simulator register number.
+ (arm_gdbarch_init): Set register_sim_regno.
+
+2002-06-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * MAINTAINERS: Add self.
+
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * source.c (source_info): Mention whether the symtab has
+ information about preprocessor macros.
+
+ Call the command `info macro', not `show macro'.
+ * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
+ Fix error message.
+ (_initialize_macrocmd): Register `info_macro_command' in
+ `infolist', not `showlist'.
+
+2002-06-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
+ (MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_SAVED_REGSIZE, MIPS_REGS_HAVE_HOME_P)
+ (MIPS_DEFAULT_STACK_ARGSIZE, GDB_TARGET_IS_MIPS64)
+ (MIPS_DEFAULT_MASK_ADDRESS_P): Remove obsolete definitions. Define
+ unconditionally.
+ (set_mipsfpu_single_command, set_mipsfpu_double_command)
+ (set_mipsfpu_none_command): Remove if (GDB_MULTI_ARCH).
+ (_initialize_mips_tdep): Remove dead code.
+ * config/mips/tm-irix5.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-irix6.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-mips.h (MIPS_EABI, MIPS_LAST_ARG_REGNUM,
+ MIPS_LAST_FP_ARG_REGNUM): Remove.
+
+2002-06-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/thread-db.c: New file.
+ * gdbserver/proc-service.c: New file.
+ * gdbserver/acinclude.m4: New file.
+ * gdbserver/Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
+ proc-service.o, and thread-db.o.
+ (linux-low.o): Add USE_THREAD_DB.
+ * gdbserver/acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
+ HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
+ * gdbserver/aclocal.m4: Regenerated.
+ * gdbserver/config.in: Regenerated.
+ * gdbserver/configure: Regenerated.
+ * gdbserver/configure.in: Check for proc_service.h, sys/procfs.h,
+ thread_db.h, and linux/elf.h headrs.
+ Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
+ PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
+ Check for -lthread_db and thread support.
+ * gdbserver/configure.srv: Enable thread_db support for ARM, i386, MIPS,
+ PowerPC, and SuperH.
+ * gdbserver/i387-fp.c: Constify arguments.
+ * gdbserver/i387-fp.h: Likewise.
+ * gdbserver/inferiors.c: (struct thread_info): Renamed from
+ `struct inferior_info'. Remove PID member. Use generic inferior
+ list header. All uses updated.
+ (inferiors, signal_pid): Removed.
+ (all_threads): New variable.
+ (get_thread): Define.
+ (add_inferior_to_list): New function.
+ (for_each_inferior): New function.
+ (change_inferior_id): New function.
+ (add_inferior): Removed.
+ (remove_inferior): New function.
+ (add_thread): New function.
+ (free_one_thread): New function.
+ (remove_thread): New function.
+ (clear_inferiors): Use for_each_inferior and free_one_thread.
+ (find_inferior): New function.
+ (find_inferior_id): New function.
+ (inferior_target_data): Update argument type.
+ (set_inferior_target_data): Likewise.
+ (inferior_regcache_data): Likewise.
+ (set_inferior_regcache_data): Likewise.
+ * gdbserver/linux-low.c (linux_bp_reinsert): Remove.
+ (all_processes, stopping_threads, using_thrads)
+ (struct pending_signals, debug_threads, pid_of): New.
+ (inferior_pid): Replace with macro.
+ (struct inferior_linux_data): Remove.
+ (get_stop_pc, add_process): New functions.
+ (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
+ Use add_process and add_thread.
+ (linux_attach_lwp): New function, based on old linux_attach. Use
+ add_process and add_thread. Set stop_expected for new threads.
+ (linux_attach): New function.
+ (linux_kill_one_process): New function.
+ (linux_kill): Kill all LWPs.
+ (linux_thread_alive): Use find_inferior_id.
+ (check_removed_breakpoints, status_pending_p): New functions.
+ (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
+ Update. Use WNOHANG. Wait for cloned processes also. Update process
+ struct for the found process.
+ (linux_wait_for_event): New function.
+ (linux_wait): Use it. Support LWPs.
+ (send_sigstop, wait_for_sigstop, stop_all_processes)
+ (linux_resume_one_process, linux_continue_one_process): New functions.
+ (linux_resume): Support LWPs.
+ (REGISTER_RAW_SIZE): Remove.
+ (fetch_register): Use register_size instead. Call supply_register.
+ (usr_store_inferior_registers): Likewise. Call collect_register.
+ Fix recursive case.
+ (regsets_fetch_inferior_registers): Improve error message.
+ (regsets_store_inferior_registers): Add debugging.
+ (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
+ (unstopped_p, linux_signal_pid): New functions.
+ (linux_target_ops): Add linux_signal_pid.
+ (linux_init_signals): New function.
+ (initialize_low): Call it. Initialize using_threads.
+ * gdbserver/regcache.c (inferior_regcache_data): Add valid
+ flag.
+ (get_regcache): Fetch registers lazily. Add fetch argument
+ and update all callers.
+ (regcache_invalidate_one, regcache_invalidate): New
+ functions.
+ (new_register_cache): Renamed from create_register_cache.
+ Return the new regcache.
+ (free_register_cache): Change argument to a void *.
+ (registers_to_string, registers_from_string): Call get_regcache
+ with fetch flag set.
+ (register_data): Make static. Pass fetch flag to get_regcache.
+ (supply_register): Call get_regcache with fetch flag clear.
+ (collect_register): Call get_regcache with fetch flag set.
+ (collect_register_as_string): New function.
+ * gdbserver/regcache.h: Update.
+ * gdbserver/remote-utils.c (putpkt): Flush after debug output and use
+ stderr.
+ Handle input interrupts while waiting for an ACK.
+ (input_interrupt): Use signal_pid method.
+ (getpkt): Flush after debug output and use stderr.
+ (outreg): Use collect_register_as_string.
+ (new_thread_notify, dead_thread_notify): New functions.
+ (prepare_resume_reply): Check using_threads. Set thread_from_wait
+ and general_thread.
+ (look_up_one_symbol): Flush after debug output.
+ * gdbserver/server.c (step_thread, server_waiting): New variables.
+ (start_inferior): Don't use signal_pid. Update call to mywait.
+ (attach_inferior): Update call to mywait.
+ (handle_query): Handle qfThreadInfo and qsThreadInfo.
+ (main): Don't fetch/store registers explicitly. Use
+ set_desired_inferior. Support proposed ``Hs'' packet. Update
+ calls to mywait.
+ * gdbserver/server.h: Update.
+ (struct inferior_list, struct_inferior_list_entry): New.
+ * gdbserver/target.c (set_desired_inferior): New.
+ (write_inferior_memory): Constify.
+ (mywait): New function.
+ * gdbserver/target.h: Update.
+ (struct target_ops): New signal_pid method.
+ (mywait): Removed macro, added prototype.
+
+ * gdbserver/linux-low.h (regset_func): Removed.
+ (regset_fill_func, regset_store_func): New.
+ (enum regset_type): New.
+ (struct regset_info): Add type field. Use new operation types.
+ (struct linux_target_ops): stop_pc renamed to get_pc.
+ Add decr_pc_after_break and breakpoint_at.
+ (get_process, get_thread_proess, get_process_thread)
+ (strut process_info, all_processes, linux_attach_lwp)
+ (thread_db_init): New.
+
+ * gdbserver/linux-arm-low.c (arm_get_pc, arm_set_pc,
+ arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
+ (i386_store_fpxregset): Constify.
+ (target_regsets): Add new kind identifier.
+ (i386_get_pc): Renamed from i386_stop_pc. Simplify.
+ (i386_set_pc): Add debugging.
+ (i386_breakpoint_at): New function.
+ (the_low_target): Add new members.
+ * gdbserver/linux-mips-low.c (mips_get_pc, mips_set_pc)
+ (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
+ (mips_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
+ (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-sh-low.c (sh_get_pc, sh_set_pc)
+ (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-x86-64-low.c (target_regsets): Add new kind
+ identifier.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (unwind_tmp_obstack_init): New.
+ (unwind_tmp_obstack_free, parse_frame_info)
+ (update_context, cfi_read_fp, cfi_write_fp)
+ (cfi_frame_chain, cfi_init_extra_frame_info)
+ (cfi_virtual_frame_pointer): Use the above function.
+ * dwarf2cfi.c: Reindented (using 'indent dwarf2cfi.c').
+
+2002-06-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c (v850_type_is_scalar): New function.
+ (v850_use_struct_convention): Match current gcc implementation
+ as close as possible.
+ (v850_push_arguments): Fix stack_offset handling. Don't write
+ struct_addr into register. This is done by v850_store_struct_return.
+ (v850_extract_return_value): Care for structs.
+ (v850_store_return_value): Ditto.
+ (v850_store_struct_return): Actually write address.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions
+ without debug information too.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters.
+ Make multi-arch pure.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-tdep.c (arm_print_float_info): Update.
+ * arch-utils.h (default_print_float_info): Update.
+ * arch-utils.c (default_print_float_info): Update.
+ * infcmd.c (float_info): Update call.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (init.c): Move the call to _initialize_gdbtypes to
+ the front of the initialize list.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (struct inferior_status): Replace fields
+ selected_frame_address and selected_level with field
+ selected_frame_id.
+ (save_inferior_status): Update. Use get_frame_id.
+ (struct restore_selected_frame_args): Delete.
+ (restore_selected_frame): Update. Use frame_find_by_id.
+ (restore_inferior_status): Update.
+
+ * breakpoint.h (struct breakpoint): Change type of
+ watchpoint_frame to frame_id.
+ * breakpoint.c (insert_breakpoints): Use frame_find_by_id. Remove
+ call to get_current_frame.
+ (do_enable_breakpoint): Use frame_find_by_id. Remove call to
+ get_current_frame.
+ (watchpoint_check): Use frame_find_by_id.
+
+ * frame.h (record_selected_frame): Delete declaration.
+ * stack.c (record_selected_frame): Delete function.
+
+ * frame.h (struct frame_id): Define.
+ (get_frame_id): Declare.
+ (frame_find_by_id): Declare.
+ * frame.c (frame_find_by_id): New function.
+ (get_frame_id): New function.
+
+2002-06-10 Andrey Volkov <avolkov@transas.com>
+
+ * ser-e7kpc.c: Fix duplicated define and call of
+ _initialize_ser_e7000pc
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c (target_signal_from_host): Fix #ifdef
+ SIGRTMIN case.
+ (do_target_signal_to_host): Likewise.
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (mips_find_abi_section): New function.
+ (mips_gdbarch_init): Call it.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-svr4.c (init_fetch_link_map_offsets): Simply return
+ legacy_fetch_link_map_offsets. Adjust comment to reflect reality
+ after Andrew's 2002-06-08 gdbarch change.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (suppy_gregset): Don't supply
+ I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
+ register cache.
+ (fill_gregset): Don't fetch it under the same circumstances.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (callback_h): Define.
+ (remote_sim_h): Update path to remote-sim.h.
+ (remote-rdp.o): Add $(callback_h).
+ (remote-sim.o): Use $(callback_h).
+ * remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * remote-rdp.c: Include "gdb/callback.h".
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+ * osabi.c (gdb_osabi_names): Add "DJGPP" and "NetWare".
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * sparcl-tdep.c: Use __CYGWIN__ instead of __CYGWIN32__.
+ * rdi-share/serpardr.c: Ditto.
+ * rdi-share/unixcomm.c: Ditto.
+ * rdi-share/serdrv.c: Ditto.
+ * rdi-share/hostchan.h: Ditto.
+ * rdi-share/hostchan.c: Ditto.
+ * rdi-share/host.h: Ditto.
+ * rdi-share/devsw.c: Ditto.
+
+ * objfiles.h: Change type of obj_private to void pointer.
+ * pa64solib.c: Update copyright. Don't include "assert.h", use
+ strcmp instead of STREQ, use LONGEST, do not use PTR
+ * somsolib.c: Ditto.
+
+ * config/djgpp/fnchange.lst: Fix problems with bfd/elf32-i386.c,
+ bfd/elf32-i386qnx.c, bfd/elf32-sh.c, bfd/elf32-sh64-nbsd.c,
+ bfd/elf64-sh64-nbsd.c bfd/elf64-sh64.c.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (GET_SAVED_REGISTER): Delete macro definition.
+ (default_get_saved_register): Delete function.
+ * gdbarch.sh (GET_SAVED_REGISTER): Set default to
+ generic_unwind_get_saved_register.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_CHAIN_VALID): Set default to
+ generic_func_frame_chain_valid.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * blockframe.c (generic_func_frame_chain_valid): Only check
+ PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
+ passing FP to PC_IN_CALL_DUMMY.
+ Fix PR gdb/360.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (struct gdbarch_data): Add field init_p.
+ (register_gdbarch_data): Initialize init_p.
+ (gdbarch_data): Initialize data pointer using the init function.
+ (init_gdbarch_data): Delete function.
+ (gdbarch_update_p): Update.
+ (initialize_non_multiarch): Update.
+ (struct gdbarch): Add field initialized_p.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-07 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (x86_64_fxsave_offset): New.
+ (supply_fpregset, fill_fpregset): Don't call i387_*_fxsave,
+ better do the things actually here.
+ * x86-64-tdep.c (x86_64_register_name2nr): New.
+ (x86_64_register_name): Renamed to x86_64_register_nr2name.
+ (x86_64_gdbarch_init): Respect the above change.
+ * x86-64-tdep.h (x86_64_register_name2nr)
+ (x86_64_register_nr2name): Add prototypes.
+ * config/i386/x86-64linux.mt (TDEPFILES): Remove i387-tdep.o.
+
+2002-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c (d10v_push_arguments): Handle struct_return.
+ Delete extra braces and re-indent.
+ (d10v_store_return_value): Char return values
+ must be shifted over by one byte in R0.
+ (d10v_extract_return_value): Delete extra braces, re-indent.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * d10v-tdep.c (d10v_read_sp, d10v_read_fp): Add prototype.
+ (d10v_register_virtual_type): Make $fp and $sp be pointer to data.
+ (d10v_integer_to_address): Rewrite.
+ (d10v_frame_init_saved_regs): When reading fp and sp registers use
+ the d10v specific functions which take care of converting to the
+ correct space.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * config/djgpp/fnchange.lst: Add testsuite files altivec-abi.c,
+ altivec-abi.exp, altivec-regs.c, altivec-regs.exp.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ * config/alpha/nm-linux.h: Add "config/" prefix to tm, nm and xm
+ includes.
+ * config/tm-linux.h: Ditto.
+ * config/alpha/tm-alphalinux.h: Ditto.
+ * config/arm/nm-linux.h, config/arm/tm-linux.h: Ditto.
+ * config/arm/xm-nbsd.h, config/i386/nm-gnu.h: Ditto.
+ * config/i386/nm-i386lynx.h, config/i386/nm-i386sol2.h: Ditto.
+ * config/i386/nm-i386v4.h, config/i386/nm-i386v42mp.h: Ditto.
+ * config/i386/nm-linux.h, config/i386/nm-m3.h: Ditto.
+ * config/i386/nm-ptx4.h, config/i386/nm-x86-64.h: Ditto.
+ * config/i386/tm-i386gnu.h, config/i386/tm-i386lynx.h: Ditto.
+ * config/i386/tm-i386m3.h, config/i386/tm-i386sco5.h: Ditto.
+ * config/i386/tm-i386v4.h, config/i386/tm-linux.h: Ditto.
+ * config/i386/tm-ptx4.h, config/i386/tm-vxworks.h: Ditto.
+ * config/i386/xm-i386v4.h, config/i386/xm-nbsd.h: Ditto.
+ * config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
+ * config/i960/tm-vx960.h, config/ia64/nm-aix.h: Ditto.
+ * config/ia64/nm-linux.h, config/ia64/tm-aix.h: Ditto.
+ * config/ia64/tm-linux.h, config/ia64/xm-aix.h: Ditto.
+ * config/m68k/nm-linux.h, config/m68k/nm-m68klynx.h: Ditto.
+ * config/m68k/nm-sysv4.h, config/m68k/tm-linux.h: Ditto.
+ * config/m68k/tm-m68klynx.h, config/m68k/tm-m68kv4.h: Ditto.
+ * config/m68k/tm-sun2os4.h, config/m68k/tm-sun3os4.h: Ditto.
+ * config/m68k/tm-vx68.h, config/m68k/xm-m68kv4.h: Ditto.
+ * config/m68k/xm-nbsd.h, config/m88k/nm-delta88v4.h: Ditto.
+ * config/m88k/tm-delta88v4.h, config/m88k/xm-delta88v4.h: Ditto.
+ * config/mips/nm-irix5.h, config/mips/nm-linux.h: Ditto.
+ * config/mips/tm-linux.h, config/mips/tm-mips64.h: Ditto.
+ * config/mips/tm-mipsm3.h, config/mips/tm-mipsv4.h: Ditto.
+ * config/mips/tm-vxmips.h, config/mips/xm-irix5.h: Ditto.
+ * config/mips/xm-mipsv4.h, config/ns32k/xm-nbsd.h: Ditto.
+ * config/pa/nm-hppao.h, config/powerpc/nm-linux.h: Ditto.
+ * config/powerpc/tm-linux.h, config/powerpc/tm-vxworks.h: Ditto.
+ * config/powerpc/xm-aix.h, config/rs6000/nm-rs6000ly.h: Ditto.
+ * config/rs6000/tm-rs6000ly.h, config/rs6000/xm-aix4.h: Ditto.
+ * config/sh/tm-linux.h, config/sparc/nm-linux.h: Ditto.
+ * config/sparc/nm-sparclynx.h, config/sparc/nm-sun4sol2.h: Ditto.
+ * config/sparc/tm-linux.h, config/sparc/tm-sp64linux.h: Ditto.
+ * config/sparc/tm-sp64sim.h, config/sparc/tm-sparclynx.h: Ditto.
+ * config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h: Ditto.
+ * config/sparc/tm-vxsparc.h, config/sparc/xm-sun4sol2.h: Ditto.
+
+2002-05-04 Aidan Skinner <aidan@velvet.net>
+
+ * ada-exp.tab.c: New file
+ * ada-exp.y: New file
+ * ada-lang.c: New file
+ * ada-lang.h: New file
+ * ada-lex.c: New file
+ * ada-lex.l: New file
+ * ada-tasks.c: New file
+ * ada-typeprint.c: New file
+ * ada-valprint.c: New file
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set
+ use_struct_convention to ppc_sysv_abi_broken_use_struct_convention.
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/rs6000/aix4.mt (TDEPFILES): Use ppc-sysv-tdep.o
+ insetead of ppc-linux-tdep.o.
+ * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
+ * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ 2002-05-07 Christian Groessler <chris@groessler.org>
+ * z8k-tdep.c (z8k_print_register_hook): Fix display of 32 and 64
+ bit register contents for little endian hosts.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mention that any `HP/UX reader' can be changed by
+ any maintainer.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.h: Regenerate.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add everyone to write-after-approval list.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_info): Use frame_register_unwind instead of
+ saved_regs. Mention when the SP is on the stack or in a register.
+
+ * frame.h (frame_register_unwind_ftype): Define. Document.
+ (struct frame_info): Add field register_unwind and
+ register_unwind_cache.
+ (frame_register_unwind): Declare.
+ (generic_unwind_get_saved_register): Declare.
+
+ * frame.c (frame_register_unwind): New function.
+ (generic_unwind_get_saved_register): New function.
+
+ * blockframe.c (generic_call_dummy_register_unwind): New function.
+ (frame_saved_regs_register_unwind): New function.
+ (set_unwind_by_pc): New function.
+ (create_new_frame): New function.
+ (get_prev_frame): New function.
+
+2002-05-30 Andrew Cagney <ac131313@redhat.com>
+
+ * a29k-share/: Delete directory.
+ * remote-vx29k.c: Delete file.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add ns32knbsd-nat.c, ns32knbsd-tdep.c,
+ ppcnbsd-nat.c, ppcnbsd-tdep.c, sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add sparc64nbsd-nat.c,
+ sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+ (sparc64nbsd-nat.o)
+ (sparcnbsd-nat.o)
+ (sparcnbsd-tdep.o): New dependency lists.
+ * NEWS: Note new UltraSPARC NetBSD native configuration.
+ * configure.host (sparc64-*-netbsd*): New host.
+ * configure.tgt (sparc-*-netbsdelf*)
+ (sparc-*-netbsd*): Set gdb_target to nbsd.
+ (sparc64-*-netbsd*): New target.
+ * sparc64nbsd-nat.c: New file.
+ * sparcnbsd-nat.c: New file.
+ * sparcnbsd-tdep.c: New file.
+ * sparcnbsd-tdep.h: New file.
+ * config/sparc/nbsd.mt: New file.
+ * config/sparc/nbsd64.mh: New file.
+ * config/sparc/nbsd64.mt: New file.
+ * config/sparc/nbsdaout.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdaout.mt: Remove.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdelf.mt: Remove.
+ * config/sparc/nm-nbsd.h: Update copyright years. Remove all
+ sparc-nat.c compatiblity defines.
+ * config/sparc/tm-nbsd.h: Update copyright years. Include solib.h.
+ (GDB_MULTI_ARCH): Set to GDB_MULTI_ARCH_PARTIAL.
+ * config/sparc/tm-nbsd64.h: New file.
+ * config/sparc/tm-nbsdaout.h: Remove.
+ * config/sparc/xm-nbsd.h: Remove.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (sparc-tdep.o): Add osabi.h to dependency list.
+ * sparc-tdep.c: Include osabi.h.
+ (gdbarch_tdep): Add osabi member.
+ (_initialize_sparc_tdep): Use gdbarch_register.
+ (sparc_gdbarch_init): Use generic OS ABI framework.
+ (sparc_dump_tdep): New function.
+
+2002-05-30 Kevin Buettner <kevinb@redhat.com>
+
+ * corefile.c (do_captured_read_memory_integer): Return non-zero
+ result.
+ (safe_read_memory_integer): Copy result of memory read when
+ status is non-zero. Also, add comments.
+
+2002-05-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ppc_tdep_h): Define.
+ (ppc-linux-nat.o)
+ (ppc-linux-tdep.o)
+ (rs6000-tdep.o): Use $(ppc_tdep_h).
+ (ppc-sysv-tdep.o)
+ (ppcnbsd-nat.o)
+ (ppcnbsd-tdep.o): New dependency lists.
+ * ppc-tdep.h: Use generic OS ABI framework.
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep)
+ (ppc_linux_init_abi): New functions.
+ (ppc_sysv_abi_broken_use_struct_convention)
+ (ppc_sysv_abi_use_struct_convention)
+ (ppc_sysv_abi_push_arguments): Move to...
+ * ppc-sysv-tdep.c: ...here.
+ * ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
+ * rs6000-tdep.c (process_note_abi_tag_sections)
+ (get_elfosabi): Remove.
+ (rs6000_gdbarch_init): Use generic OS ABI framework.
+ (rs6000_dump_tdep): New function.
+ (_initialize_rs6000_tdep): Use gdbarch_register.
+ * config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
+ * config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
+ of ppc-linux-tdep.o.
+ * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
+
+2002-05-29 Jim Blandy <jimb@redhat.com>
+
+ * macroscope.c (default_macro_scope): Put `void' in empty argument
+ list.
+
+2002-05-29 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (arch-utils.o): Add $(sim_regno_h).
+ * arch-utils.c: Include "sim-regno.h".
+ * gdbarch.sh: Don't include "sim-regno.h".
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * sim-regno.h (legacy_register_sim_regno): Move declaration from
+ here.
+ * arch-utils.h (legacy_register_sim_regno): To here.
+ * remote-sim.c (legacy_register_sim_regno): Move function from
+ here.
+ * arch-utils.c (legacy_register_sim_regno): To here.
+
+2002-05-28 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-regno.h: New file.
+ * Makefile.in (sim_regno_h): Define.
+ (d10v-tdep.o, remote-sim.o): Add dependency on $(sim_regno_h).
+ * remote-sim.c: Include "sim-regno.h" and "gdb_assert.h".
+ (legacy_register_sim_regno): New function.
+ (one2one_register_sim_regno): New function.
+ (gdbsim_fetch_register): Rewrite.
+ (gdbsim_store_register): Only store a register when
+ REGISTER_SIM_REGNO is valid.
+ * d10v-tdep.c: Include "sim-regno.h".
+ (d10v_ts2_register_sim_regno): Add legacy_regiter_sim_regno check.
+ (d10v_ts3_register_sim_regno): Ditto.
+ * gdbarch.sh: Include "sim-regno.h".
+ (REGISTER_SIM_REGNO): Set default to legacy_register_sim_regno.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.h (default_register_sim_regno): Delete declaration.
+ * arch-utils.c (default_register_sim_regno): Delete function.
+
+2002-05-28 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ppcnbsd-nat.c: Rewrite.
+ * ppcnbsd-tdep.c: New file.
+ * ppcnbsd-tdep.h: New file.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Remove corelow.o,
+ solib.o, and solib-svr4.o.
+ * config/powerpc/nbsd.mt (TDEPFILES): Add ppcnbsd-tdep.o,
+ nbsd-tdep.o, and corelow.o.
+
+2002-05-28 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS (--enable-gdb-build-warnings): Rewrite script to use
+ `tr' and `sed'. Mention that `broken' targets are not expected to
+ build.
+
+2002-05-27 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Remove obsolete note.
+ Let PC point right after the prologue before looking up symbols.
+
+2002-05-27 Martin M. Hunt <hunt@redhat.com>
+
+ * i386-tdep.c (i386_register_virtual_type): Return
+ builtin_type_vec128i for SSE registers.
+
+ * gdbtypes.h (builtin_type_vec128i): Declare.
+
+ * gdbtypes.c (build_builtin_type_vec128i): New function.
+ (builtin_type_v2_double, builtin_type_v4_int64): New types.
+ (builtin_type_vec128i): New type for SSE2 128-bit registers.
+ (build_gdbtypes): Initialize new builtin vector types.
+ (_initialize_gdbtypes): Register new vector types with gdbarch.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * MAINTAINERS: ns32k is not longer an obsolete candidate,
+ since it has been multi-arch'd.
+ * NEWS: Note that ns32k-*-* is now partial multi-arch.
+ Move Alpha and VAX multi-arch news entries to same section
+ as other multi-arch news.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c: include gdbtypes.h, inferior.h, regcache.h,
+ target.s, arch-utils.h, ns32k-tdep.h. Make many functions
+ static. Rename some register numbers to put them in ns32k-tdep
+ private namespace.
+ (ns32k_get_saved_register, ns32k_gdbarch_init_32082,
+ ns32k_gdbarch_init_32382, ns32k_gdbarch_init, ns32k_dump_tdep): New
+ functions.
+ (_initialize_ns32k_tdep): Use gdbarch_register.
+ * ns32k-tdep.h: New file.
+ * ns32knbsd-tdep.c: New file.
+ * config/ns32k/nbsdaout.mt (TDEPFILES): Add ns32knbsd-tdep.o.
+ * config/ns32k/tm-nbsd.h: Include "ns32k/tm-ns32k.h".
+ (IN_SOLIB_CALL_TRAMPOLINE, REGISTER_NAME, NUM_REGS,
+ REGISTER_BYTES, REGISTER_BYTE): Remove.
+ * config/ns32k/tm-ns32k.h: New file.
+ * config/ns32k/tm-umax.h: Remove.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_saved_pc_after_call,
+ ns32k_store_struct_return, ns32k_extract_return_value,
+ ns32k_store_return_value, ns32k_extract_struct_value_address): New
+ functions.
+ * config/ns32k/tm-umax.h (SAVED_PC_AFTER_CALL): Define as
+ ns32k_saved_pc_after_call.
+ (STORE_STRUCT_RETURN): Define as ns32k_store_struct_return.
+ (EXTRACT_RETURN_VALUE): Define as ns32k_extract_return_value.
+ (STORE_RETURN_VALUE): Define as ns32k_store_return_value.
+ (EXTRACT_STRUCT_VALUE_ADDRESS): Define as
+ ns32k_extract_struct_value_address.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_call_dummy_words, sizeof_ns32k_call_dummy_words,
+ ns32k_fix_call_dummy): New.
+ * config/ns32k/tm-umax.h (CALL_DUMMY_WORDS): Define as
+ ns32k_call_dummy_words.
+ (SIZEOF_CALL_DUMMY_WORDS): Define as sizeof_ns32k_call_dummy_words.
+ (CALL_DUMMY, CALL_DUMMY_LENGTH, CALL_DUMMY_ADDR,
+ CALL_DUMMY_NARGS): Remove.
+ (FIX_CALL_DUMMY): Define as ns32k_fix_call_dummy.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_breakpoint_from_pc, ns32k_frame_chain,
+ ns32k_frame_saved_pc, ns32k_frame_args_address,
+ ns32k_frame_locals_address, ns32k_frame_init_saved_regs,
+ ns32k_push_dummy_frame, ns32k_pop_frame): New functions.
+ * config/ns32k/tm-nbsd.h (FRAME_SAVED_PC): Remove.
+ * config/ns32k/tm-umax.h (INNER_THAN): Define as core_addr_lessthan.
+ (BREAKPOINT_FROM_PC): Define as ns32k_breakpoint_from_pc.
+ (BREAKPOINT): Remove..
+ (FRAME_CHAIN): Define as ns32k_frame_chain.
+ (FRAME_SAVED_PC): Define as ns32k_frame_saved_pc.
+ (FRAME_ARGS_ADDRESS): Define as ns32k_frame_args_address.
+ (FRAME_LOCALS_ADDRESS): Define as ns32k_frame_locals_address.
+ (FRAME_FIND_SAVED_REGS): Remove.
+ (FRAME_INIT_SAVED_REGS): Define as ns32k_frame_init_saved_regs.
+ (PUSH_DUMMY_FRAME): Define as ns32k_push_dummy_frame.
+ (POP_FRAME): Define as ns32k_pop_frame.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c (ns32k_register_byte_32082,
+ ns32k_register_byte_32382, ns32k_register_raw_size,
+ ns32k_register_virtual_size, ns32k_register_virtual_type): New
+ functions.
+ * config/ns32k/tm-nbsd.h (REGISTER_BYTE): Define as
+ ns32k_register_byte_32382.
+ * config/ns32k/tm-umax.h: Update copyright years.
+ (REGISTER_BYTE): Define as ns32k_register_byte_32082.
+ (REGISTER_RAW_SIZE): Define as ns32k_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Define as ns32k_register_virtual_size.
+ (REGISTER_VIRTUAL_TYPE): Define as ns32k_register_virtual_type.
+ (ns32k_get_enter_addr): Fix prototype.
+
+2002-05-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ns32k-tdep.c: Update copyright years.
+ (ns32k_register_name_32082): New function.
+ (ns32k_register_name_32382): Ditto.
+ * config/ns32k/tm-nbsd.h (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define as ns32k_register_name_32382.
+ * config/ns32k/tm-umax.h (REGISTER_NAMES): Remove.
+ (REGISTER_NAME): Define as ns32k_register_name_32082.
+
+2002-05-24 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (free_line_header): Use xfree, not free.
+
+2002-05-24 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add alphabsd-nat.c,
+ alphabsd-tdep.c, mipsnbsd-nat.c, and mipsnbsd-tdep.c
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ * PROBLEMS: Mention s390 and FreeBSD 4.4 build problems.
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ From Ross Alexander at NEC Europe:
+ * config/pa/hpux11w.mh (NATDEPFILES): Add solib.o.
+
+2002-05-23 Michael Snyder <msnyder@redhat.com>
+
+ * cli/cli-dump.c (restore_command): Use parse_and_eval_long
+ for input, rather than parse_and_eval_address.
+
+2002-05-23 Andrew Cagney <ac131313@redhat.com>
+
+ * d10v-tdep.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
+ * Makefile.in (sim_d10v_h): Update definition.
+
+2002-05-24 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_gdbarch_init): Revert old code included in
+ change `2002-05-22 Michael Snyder' below.
+ (d10v_push_arguments): Ditto.
+ (d10v_extract_return_value): Ditto.
+
+2002-05-23 Jim Blandy <jimb@redhat.com>
+
+ * macrotab.c (check_for_redefinition): Don't complain if the new
+ definition is the same as the previous one. Take more arguments
+ to allow the comparison.
+ (macro_define_object, macro_define_function): Pass more arguments
+ to check_for_redefinition.
+
+2002-05-22 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c: Change a few macros to enums for ease of debugging.
+ (d10v_frame_chain_valid): Add PC_IN_CALL_DUMMY clause.
+ (d10v_frame_saved_pc): Add PC_IN_CALL_DUMMY clause.
+ (d10v_frame_chain): Bail immediately if PC_IN_CALL_DUMMY.
+ Don't bail if return_pc is PC_IN_CALL_DUMMY.
+ Add a temp variable to save a call (and a memory read).
+ (d10v_init_extra_frame_info): Get fi->pc from callee's return_pc
+ if possible (so that PC_IN_CALL_DUMMY will work).
+
+2002-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * MAINTAINERS: Remove status `OBSOLETE' from v850.
+
+2002-05-22 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (frame_state_for): Added safety check for a valid
+ fde->cie_ptr.
+ (dwarf2_build_frame_info): Corrected handling of eh_frame.
+ (dwarf2_build_frame_info): Add offset to fde->initial_location
+ so that frames of shared libraries are mapped correctly.
+ (execute_stack_op): Change type of 'result' from ULONGEST to
+ CORE_ADDR.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/tm-nbsd.h: Include solib.h.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Don't make
+ assumptions about the host's byte order.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (alphanbsd-tdep.o, shnbsd-tdep.o): Add solib-svr4.h
+ to dependency list.
+ * alphanbsd-tdep.c: Include solib-svr4.h.
+ * shnbsd-tdep.c: Ditto.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (armnbsd-tdep.o): Add solib-svr4.h and
+ nbsd-tdep.h to dependency list.
+ * configure.host (arm*-*-netbsdelf*, arm*-*-netbsd*,
+ i[3456]86-*-netbsdaout*, i[3456]86-*-netbsd*, m68*-*-netbsd*,
+ ns32k-*-netbsd*, sparc-*-netbsdaout*, sparc-*-netbsd*): Use
+ nbsdaout.mh and nbsdelf.mh consistently.
+ * configure.tgt (i[3456]86-*-netbsd*, m68*-*-netbsd*,
+ ns32k-*-netbsd*, sparc-*-netbsdelf*, sparc-*-netbsd*) Use
+ nbsdaout.mt and nbsdelf.mh consistently.
+ * armnbsd-tdep.c: Include nbsd-tdep.h and solib-svr4.h.
+ (arm_netbsd_elf_init_abi): Use set_solib_svr4_fetch_link_map_offsets
+ to set nbsd_ilp32_solib_svr4_fetch_link_map_offsets.
+ * config/nm-nbsd.h: Garbage-collect SVR4_SHARED_LIBS. Move
+ a.out shared library stuff from here...
+ * config/nm-nbsdaout.h: ...to here.
+ * config/tm-nbsd.h: Remove.
+ * config/alpha/nm-nbsd.h (SVR4_SHARED_LIBS): Remove.
+ * config/arm/nbsd.mh: Remove.
+ * config/arm/nbsd.mt (TDEPFILES): Remove solib-sunos.o, add
+ nbsd-tdep.o.
+ * config/arm/nbsdaout.mh: New file.
+ * config/arm/nbsdelf.mh: New file.
+ * config/arm/nm-nbsdaout.h: New file.
+ * config/i386/nbsd.mh: Remove.
+ * config/i386/nbsd.mt: Remove.
+ * config/i386/nbsdaout.mh: New file.
+ * config/i386/nbsdaout.mt: New file.
+ * config/i386/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
+ * config/i386/nbsdelf.mt (TM_FILE): Use tm-nbsd.h.
+ * config/i386/nm-nbsd.h (REGISTER_U_ADDR,
+ i386_register_u_addr): Remove.
+ * config/i386/nm-nbsdaout.h: New file.
+ * config/i386/nm-nbsdelf.h: Remove.
+ * config/i386/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (USE_STRUCT_CONVENTION): Remove.
+ * config/i386/tm-nbsdaout.h: New file.
+ * config/i386/tm-nbsdelf.h: Remove.
+ * config/m68k/nbsd.mh: Remove.
+ * config/m68k/nbsd.mt: Remove.
+ * config/m68k/nbsdaout.mh: New file.
+ * config/m68k/nbsdaout.mt: New file.
+ * config/m68k/nm-nbsd.h: Use config/nm-nbsd.h.
+ * config/m68k/nm-nbsdaout.h: New file.
+ * config/m68k/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (IN_SOLIB_CALL_TRAMPOLINE): Define.
+ * config/ns32k/nbsd.mh: Remove.
+ * config/ns32k/nbsd.mt: Remove.
+ * config/ns32k/nbsdaout.mh: New file.
+ * config/ns32k/nbsdaout.mt: New file.
+ * config/ns32k/nm-nbsd.h: Include config/nm-nbsd.h.
+ * config/ns32k/nm-nbsdaout.h: New file.
+ * config/ns32k/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ (IN_SOLIB_CALL_TRAMPOLINE): Define.
+ * config/powerpc/nm-nbsd.h: Include config/nm-nbsd.h.
+ (SVR4_SHARED_LIBS): Remove.
+ * config/powerpc/tm-nbsd.h: Dont' include config/tm-nbsd.h.
+ * config/sparc/nbsd.mh: Remove.
+ * config/sparc/nbsd.mt: Remove.
+ * config/sparc/nbsdaout.mh: New file.
+ * config/sparc/nbsdaout.mt: New file.
+ * config/sparc/nbsdelf.mh (NAT_FILE): Use nm-nbsd.h.
+ * config/sparc/nbsdelf.mt: New file.
+ * config/sparc/nm-nbsdaout.h: New file.
+ * config/sparc/nm-nbsdelf.h: Remove.
+ * config/sparc/tm-nbsd.h: Don't include config/tm-nbsd.h.
+ * config/sparc/tm-nbsdaout.h: New file.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add mipsnbsd-nat.c and
+ mipsnbsd-tdep.c
+ (mipsnbsd-nat.o, mipsnbsd-tdep.o): New dependency lists.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add shnbsd-tdep.c and
+ shnbsd-nat.c.
+ (shnbsd-tdep.o, shnbsd-nat.o): New dependency lists.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * NEWS: Note new MIPS NetBSD native configuration.
+ * configure.host (mips*-*-netbsd*): New host.
+ * configure.tgt (mips*-*-netbsd*): New target.
+ * mipsnbsd-nat.c: New file.
+ * mipsnbsd-tdep.c: New file.
+ * mipsnbsd-tdep.h: New file.
+ * config/mips/nbsd.mh: New file.
+ * config/mips/nbsd.mt: New file.
+ * config/mips/nm-nbsd.h: New file.
+ * config/mips/tm-nbsd.h: New file.
+
+2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (SFILES): Add osabi.c.
+ (COMMON_OBS): Add osabi.o.
+ (osabi.o): New dependency list.
+ * osabi.c: New file.
+ * osabi.h: New file.
+ * doc/gdbint.texinfo: Document new generic OS ABI framework.
+
+ * Makefile.in (alpha_tdep_h): Define and use instead of
+ alpha-tdep.h.
+ * alpha-tdep.c (alpha_abi_names, process_note_abi_tag_sections,
+ get_elfosabi, alpha_abi_handler_list, alpha_gdbarch_register_os_abi):
+ Remove.
+ (alpha_gdbarch_init, alpha_dump_tdep): Use generic OS ABI framework.
+ * alpha-tdep.h: Include osabi.h.
+ (alpha_abi): Remove.
+ (gdbarch_tdep): Use generic OS ABI framework.
+ * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Use
+ gdbarch_register_osabi.
+ * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Likewise.
+ * alphafbsd-tdep.c (_initialize_alphafbsd_tdep): Likewise.
+ * alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Likewise.
+
+ * Makefile.in (sh_tdep_h): Add osabi.h.
+ * sh-tdep.h (sh_osabi): Remove.
+ (gdbarch_tdep): Use generic OS ABI framework.
+ * sh-tdep.c (sh_osabi_names, process_note_abi_tag_sections,
+ sh_osabi_handler_list, sh_gdbarch_register_os_abi): Remove.
+ (sh_gdbarch_init, sh_dump_tdep): Use generic OS ABI framework.
+ * shnbsd-tdep.c (_initialize_shnbsd_tdep): Use gdbarch_register_osabi.
+
+ * Makefile.in (arm_tdep_h): Define and use instead of arm-tdep.h.
+ * arm-linux-tdep.c (_initialize_arm_linux_tdep): Use
+ gdbarch_register_osabi.
+ * arm-tdep.c (arm_abi_names, process_note_abi_tag_sections,
+ arm_abi_handler_list, arm_gdbarch_register_os_abi): Remove.
+ (get_elfosabi): Rename to...
+ (arm_elf_osabi_sniffer): ...this. Adjust to use generic OS
+ ABI framework support routines.
+ (arm_gdbarch_init): Use generic OS ABI framework.
+ (arm_dump_tdep): Likewise.
+ (_initialize_arm_tdep): Likewise.
+ * arm-tdep.h: Include osabi.h.
+ (arm_abi): Remove.
+ (gdbarch_tdep): Remove arm_abi and abi_name members. Add
+ osabi member.
+ (arm_gdbarch_register_os_abi): Remove prototype.
+ * armnbsd-tdep.c (arm_netbsd_aout_osabi_sniffer): New function.
+ (_initialize_arm_netbsd_tdep): Use gdbarch_register_osabi.
+
+ * Makefile.in (mips-tdep.o): Add osabi.h to dependency list.
+ * mips-tdep.c: Include osabi.h.
+ (gdbarch_tdep, mips_gdbarch_init, mips_dump_tdep): Use generic
+ OS ABI framework.
+
+2002-05-20 Kazu Hirata <kazu@cs.umass.edu>
+
+ * h8300-tdep.c: Fix formatting.
+
+2002-05-20 Elena Zannoni <ezannoni@redhat.com>
+
+ * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
+ printing vector registers.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ From Fernando Nasser:
+ * remote.c (remote_async_open_1): Re-throw the exception when the
+ connection fails.
+ (remote_cisco_open): Ditto.
+ (remote_open_1): Ditto.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ * remote.c (remote_start_remote_dummy): Add uiout parameter.
+ (remote_start_remote): Add uiout parameter. Pass through to
+ remote_start_remote_dummy.
+ (remote_open_1): Use catch_exception instead of catch_errors.
+ (remote_async_open_1): Ditto.
+ (remote_cisco_open): Ditto.
+
+2002-05-19 Andrew Cagney <ac131313@redhat.com>
+
+ * remote.c (remote_start_remote): Replace PTR with void pointer.
+ (sigint_remote_twice_token, sigint_remote_token): Ditto. Make
+ static.
+
+2002-05-18 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_indent.sh: Allow the script to be run in the sim directory.
+
+2002-05-18 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/nm-cygwin.h (NO_PTRACE_H): Remove define.
+ * config/i386/nm-go32.h (NO_PTRACE_H): Remove define.
+
+ * corelow.c (core_open): Only call set_gdbarch_from_file if
+ exec_bfd is NULL.
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Add support of EXR register
+ * config/h8300/tm-h8300.h: Ditto.
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Add additional CCR flags (I,UI,H,U)
+
+2002-05-17 Andrey Volkov <avolkov@transas.com>
+
+ * h8300-tdep.c: Change literal regnums to REGNO.
+
+2002-05-17 Jim Blandy <jimb@redhat.com>
+
+ * NEWS: Note addition of macro support.
+
+ Expand preprocessor macros in C expressions.
+ * c-lang.h: #include "macroexp.h", for macro_lookup_ftype.
+ (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion): New function declarations.
+ (expression_macro_lookup_func, expression_macro_lookup_baton): New
+ variable declarations.
+ * parser-defs.h (expression_context_pc): New declaration.
+ * parse.c (expression_context_pc): New variable.
+ (parse_exp_1): Set expression_context_pc, as well as
+ expression_context_block.
+ * c-exp.y (yylex): If we're not already reading the result of a
+ macro expansion, try to macro-expand the next token. When we're
+ done scanning a macro expansion, switch back to the mainline text.
+ Commas and `if's in a macro's expansion don't terminate the input.
+ * c-lang.c: #include "macroscope.h" and "gdb_assert.h".
+ (macro_original_text, macro_expanded_text,
+ expression_macro_lookup_func, expression_macro_lookup_baton): New
+ variables.
+ (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion, scan_macro_cleanup, null_macro_lookup,
+ c_preprocess_and_parse): New functions.
+ (c_language_defn, cplus_language_defn, asm_language_defn): Call
+ c_preprocess_and_parse, instead of c_parse.
+ * Makefile.in (c_lang_h): Note that this #includes macroexp.h.
+ (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
+
+Fri May 17 14:26:19 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh-tdep.c (gdb_print_insn_sh64): Delete.
+ (gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
+ (sh_gdbarch_init): Always use gdb_print_insn_sh.
+
+2002-05-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * NEWS: Add section for multi-arched targets. Add v850 to that section.
+
+2002-05-17 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (sh_tdep_h): Define and use.
+ * config/sh/tm-sh.h (sh_osabi, sh_abi, gdbarch_tdep,
+ register enum): Move to...
+ * * sh-tdep.h: ...here.
+ * sh-tdep.c: Include sh-tdep.h.
+ * sh3-rom.c: Likewise.
+ * shnbsd-tdep.c: Likewise.
+
+2002-05-16 Michael Snyder <msnyder@redhat.com>
+
+ * arm-tdep.c: Spelling fix in comment.
+
+2002-05-16 Jim Blandy <jimb@redhat.com>
+
+ Add commands for manually expanding macros and showing their
+ definitions.
+ * macrocmd.c, macroscope.c, macroscope.h: New files.
+ * Makefile.in (SFILES): Add macrocmd.c, macroscope.c.
+ (macroscope_h): New variable.
+ (HFILES_NO_SRCDIR): Add macroscope.h.
+ (COMMON_OBS): Add macrocmd.o, macroscope.o.
+ (macroscope.o, macrocmd.o): New rules.
+
+ Teach the Dwarf 2 reader to read macro information.
+ * dwarf2read.c: #include "macrotab.h".
+ (dwarf_macinfo_buffer): New variable.
+ (struct dwarf2_pinfo): New members: dwarf_macinfo_buffer, and
+ dwarf_macinfo_size.
+ (DWARF_MACINFO_BUFFER, DWARF_MACINFO_SIZE): New macros.
+ (dwarf2_missing_macinfo_section, dwarf2_macros_too_long,
+ dwarf2_macros_not_terminated, dwarf2_macro_outside_file,
+ dwarf2_macro_unmatched_end_file, dwarf2_macro_malformed_definition,
+ dwarf2_macro_spaces_in_definition): New complaints.
+ (dwarf2_has_info): Initialize dwarf_macinfo_offset.
+ (dwarf2_build_psymtabs): Read the .dwarf_macinfo section.
+ (dwarf2_build_psymtabs_hard): Record the buffer and its size in
+ the partial symbol table.
+ (psymtab_to_symtab_1): Set the macinfo buffer and size globals
+ from what's recorded in the partial symbol table.
+ (read_file_scope): If the compilation unit has a
+ `DW_AT_macro_info' attribute, read its macro information.
+ * Makefile.in (dwarf2read.o): Depend on macrotab.h.
+
+2002-05-16 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR gdb/546
+ * ser-tcp.c: Don't include <netinet/udp.h>.
+
+2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
+
+ * MAINTAINERS: Update my email address.
+
+2002-05-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/arm/nm-nbsd.h: Use "config/nm-nbsd.h" to include generic
+ include file of the same name.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.tgt: Mark v850 as multi-arched.
+ * config/v850/tm-v850.h: Remove file.
+ * config/v850/v850.mt: Eliminate TM_FILE.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Full multi-arch.
+ * config/v850/tm-v850.h: Eliminate or move to v850-tdep.c everything.
+ Define GDB_MULTI_ARCH to 2.
+
+2002-05-16 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (current_type): New static variable.
+ Carries the type of the expression at the position that is parsed.
+ (push_current_type, pop_current_type): Two new functions. Used
+ to store/restore current_type in expression on specific tokens.
+ (search_field): New static variable. Set to one after parsing a point
+ as at that point only a FIELDNAME token should be searched.
+ (FIELDNAME): New token. After a point only a token belonging to
+ current_type type definition is allowed.
+ (all over token rules): reset and change current_type according
+ to rules.
+ (exp '[' rule): insert implicit array index field if
+ exp is a pascal string type.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Fix comment for v850_scan_prologue. Remove extra
+ frame info. Use frame_info's saved_regs instead of matching member
+ in extra_frame_info throughout.
+ (v850_frame_init_saved_regs): New function.
+ (v850_init_extra_frame_info): Move most functionality into
+ v850_frame_init_saved_regs().
+ * config/v850/tm-v850.h (EXTRA_FRAME_INFO): Remove definition.
+ (v850_frame_find_saved_regs): Remove declaration.
+ (FRAME_FIND_SAVED_REGS): Remove definition.
+ (v850_frame_init_saved_regs): Add declaration.
+ (FRAME_INIT_SAVED_REGS): Add definition.
+
+2002-05-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c: Begin multi-arch'ing v850.
+ (v850_target_architecture_hook): Remove function.
+ (v850_gdbarch_init): New function. Add code previously in
+ v850_target_architecture_hook().
+ (_initialize_v850_tdep): Don't set target_architecture_hook.
+ Call register_gdbarch_init() instead.
+
+2002-05-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct cplus_struct_type): Remove args field.
+ * hpread.c (hpread_read_struct_type): Remove assignments to args.
+ (fixup_class_method_type): Likewise.
+
+2002-05-15 Daniel Jacobowitz <drow@mvista.com>
+
+ From Martin Pool <mbp@samba.org>:
+ * gdbserver/server.c (gdbserver_usage): New function.
+ (main): Call it.
+
2002-05-15 Jim Blandy <jimb@redhat.com>
Add macro structures to GDB's symbol tables. Nobody puts anything
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index f86c42c484f..aa7257c4bbb 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -72,7 +72,7 @@ maintainer works with the native maintainer when resolving API issues.
avr --target=avr ,-Werror
Theodore A. Roth troth@verinet.com
- cris --target=cris-elf -w
+ cris --target=cris-elf ,-Werror
Orjan Friberg orjanf@axis.com
d10v --target=d10v-elf ,-Werror
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 2c4f1d94d41..db1d7d4f185 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4280,15 +4280,7 @@ ada_add_block_symbols (block, name, namespace, objfile, wild)
/* Function Types */
/* Assuming that SYM is the symbol for a function, fill in its type
- with prototype information, if it is not already there.
-
- Why is there provision in struct type for BOTH an array of argument
- types (TYPE_ARG_TYPES) and for an array of typed fields, whose
- comment suggests it may also represent argument types? I presume
- this is some attempt to save space. The problem is that argument
- names in Ada are significant. Therefore, for Ada we use the
- (apparently older) TYPE_FIELD_* stuff to store argument types. */
-
+ with prototype information, if it is not already there. */
static void
fill_in_ada_prototype (func)
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 8a87a8a5e50..564896fdc94 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -277,7 +277,7 @@ push_sigtramp_desc (CORE_ADDR low_addr)
}
-static char *
+static const char *
alpha_register_name (int regno)
{
static char *register_names[] =
@@ -649,11 +649,13 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
struct frame_info *next_frame)
{
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
+ CORE_ADDR vfp = sp;
CORE_ADDR cur_pc;
int frame_size;
int has_frame_reg = 0;
unsigned long reg_mask = 0;
int pcreg = -1;
+ int regno;
if (start_pc == 0)
return NULL;
@@ -678,7 +680,12 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
{
if (word & 0x8000)
- frame_size += (-word) & 0xffff;
+ {
+ /* Consider only the first stack allocation instruction
+ to contain the static size of the frame. */
+ if (frame_size == 0)
+ frame_size += (-word) & 0xffff;
+ }
else
/* Exit loop if a positive stack adjustment is found, which
usually means that the stack cleanup code in the function
@@ -690,7 +697,16 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
{
int reg = (word & 0x03e00000) >> 21;
reg_mask |= 1 << reg;
- temp_saved_regs[reg] = sp + (short) word;
+
+ /* Do not compute the address where the register was saved yet,
+ because we don't know yet if the offset will need to be
+ relative to $sp or $fp (we can not compute the address relative
+ to $sp if $sp is updated during the execution of the current
+ subroutine, for instance when doing some alloca). So just store
+ the offset for the moment, and compute the address later
+ when we know whether this frame has a frame pointer or not.
+ */
+ temp_saved_regs[reg] = (short) word;
/* Starting with OSF/1-3.2C, the system libraries are shipped
without local symbols, but they still contain procedure
@@ -719,8 +735,15 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
}
else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
pcreg = (word >> 16) & 0x1f;
- else if (word == 0x47de040f) /* bis sp,sp fp */
- has_frame_reg = 1;
+ else if (word == 0x47de040f || word == 0x47fe040f) /* bis sp,sp fp */
+ {
+ /* ??? I am not sure what instruction is 0x47fe040f, and I
+ am suspecting that there was a typo and should have been
+ 0x47fe040f. I'm keeping it in the test above until further
+ investigation */
+ has_frame_reg = 1;
+ vfp = read_next_frame_reg (next_frame, ALPHA_GCC_FP_REGNUM);
+ }
}
if (pcreg == -1)
{
@@ -759,6 +782,18 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
PROC_FRAME_REG (&temp_proc_desc) = ALPHA_GCC_FP_REGNUM;
else
PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
+
+ /* At this point, we know which of the Stack Pointer or the Frame Pointer
+ to use as the reference address to compute the saved registers address.
+ But in both cases, the processing above has set vfp to this reference
+ address, so just need to increment the offset of each saved register
+ by this address. */
+ for (regno = 0; regno < NUM_REGS; regno++)
+ {
+ if (reg_mask & 1 << regno)
+ temp_saved_regs[regno] += vfp;
+ }
+
PROC_FRAME_OFFSET (&temp_proc_desc) = frame_size;
PROC_REG_MASK (&temp_proc_desc) = reg_mask;
PROC_PC_REG (&temp_proc_desc) = (pcreg == -1) ? ALPHA_RA_REGNUM : pcreg;
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index c0569f2a110..d60eeb36ed7 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -118,6 +118,22 @@ legacy_register_sim_regno (int regnum)
}
int
+legacy_register_sim_regno (int regnum)
+{
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+ /* NOTE: cagney/2002-05-13: The old code did it this way and it is
+ suspected that some GDB/SIM combinations may rely on this
+ behavour. The default should be one2one_register_sim_regno
+ (below). */
+ if (REGISTER_NAME (regnum) != NULL
+ && REGISTER_NAME (regnum)[0] != '\0')
+ return regnum;
+ else
+ return LEGACY_SIM_REGNO_IGNORE;
+}
+
+int
generic_frameless_function_invocation_not (struct frame_info *fi)
{
return 0;
@@ -147,7 +163,7 @@ generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
return 0;
}
-char *
+const char *
legacy_register_name (int i)
{
#ifdef REGISTER_NAMES
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 9dfa70cefdc..7ceb8b70b84 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -52,7 +52,7 @@ extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_in
extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
/* Map onto old REGISTER_NAMES. */
-extern char *legacy_register_name (int i);
+extern const char *legacy_register_name (int i);
/* Accessor for old global function pointer for disassembly. */
extern int legacy_print_insn (bfd_vma vma, disassemble_info *info);
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 43ac3098c72..79f8d6b3a06 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -158,7 +158,7 @@ struct gdbarch_tdep
/* Lookup the name of a register given it's number. */
-static char *
+static const char *
avr_register_name (int regnum)
{
static char *register_names[] = {
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 1861370eaa7..187061e45e7 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -553,6 +553,7 @@ condition_command (char *arg, int from_tty)
error ("Junk at end of expression");
}
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
@@ -592,6 +593,7 @@ commands_command (char *arg, int from_tty)
free_command_lines (&b->commands);
b->commands = l;
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
error ("No breakpoint number %d.", bnum);
@@ -7071,18 +7073,20 @@ set_ignore_count (int bptnum, int count, int from_tty)
if (b->number == bptnum)
{
b->ignore_count = count;
- if (!from_tty)
- return;
- else if (count == 0)
- printf_filtered ("Will stop next time breakpoint %d is reached.",
- bptnum);
- else if (count == 1)
- printf_filtered ("Will ignore next crossing of breakpoint %d.",
- bptnum);
- else
- printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
- count, bptnum);
+ if (from_tty)
+ {
+ if (count == 0)
+ printf_filtered ("Will stop next time breakpoint %d is reached.",
+ bptnum);
+ else if (count == 1)
+ printf_filtered ("Will ignore next crossing of breakpoint %d.",
+ bptnum);
+ else
+ printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
+ count, bptnum);
+ }
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
@@ -7119,8 +7123,8 @@ ignore_command (char *args, int from_tty)
set_ignore_count (num,
longest_to_int (value_as_long (parse_and_eval (p))),
from_tty);
- printf_filtered ("\n");
- breakpoints_changed ();
+ if (from_tty)
+ printf_filtered ("\n");
}
/* Call FUNCTION on each of the breakpoints
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 3f510ac87d1..a6fadd91360 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -53,8 +53,7 @@ do_cfunc (struct cmd_list_element *c, char *args, int from_tty)
}
void
-set_cmd_cfunc (struct cmd_list_element *cmd,
- void (*cfunc) (char *args, int from_tty))
+set_cmd_cfunc (struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
{
if (cfunc == NULL)
cmd->func = NULL;
@@ -70,9 +69,7 @@ do_sfunc (struct cmd_list_element *c, char *args, int from_tty)
}
void
-set_cmd_sfunc (struct cmd_list_element *cmd,
- void (*sfunc) (char *args, int from_tty,
- struct cmd_list_element * c))
+set_cmd_sfunc (struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
{
if (sfunc == NULL)
cmd->func = NULL;
@@ -328,6 +325,35 @@ add_set_or_show_cmd (char *name,
return c;
}
+/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
+ CLASS is as in add_cmd. VAR_TYPE is the kind of thing we are
+ setting. VAR is address of the variable being controlled by this
+ command. SET_FUNC and SHOW_FUNC are the callback functions (if
+ non-NULL). SET_DOC and SHOW_DOC are the documentation strings. */
+
+static struct cmd_list_element *
+add_setshow_cmd (char *name,
+ enum command_class class,
+ var_types var_type, void *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ struct cmd_list_element *set;
+ struct cmd_list_element *show;
+ set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
+ set_doc, set_list);
+ if (set_func != NULL)
+ set_cmd_sfunc (set, set_func);
+ show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+ show_doc, show_list);
+ if (show_func != NULL)
+ set_cmd_sfunc (show, show_func);
+ /* The caller often wants to modify set to include info like an
+ enumeration. */
+ return set;
+}
struct cmd_list_element *
add_set_cmd (char *name,
@@ -363,42 +389,48 @@ add_set_enum_cmd (char *name,
return c;
}
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- VAR is address of the variable which will contain the value.
- DOC is the documentation string. */
-struct cmd_list_element *
-add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list)
+/* Add an auto-boolean command named NAME to both the set and show
+ command list lists. CLASS is as in add_cmd. VAR is address of the
+ variable which will contain the value. DOC is the documentation
+ string. FUNC is the corresponding callback. */
+void
+add_setshow_auto_boolean_cmd (char *name,
+ enum command_class class,
+ enum auto_boolean *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
{
static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
struct cmd_list_element *c;
- c = add_set_cmd (name, class, var_auto_boolean, var, doc, list);
+ c = add_setshow_cmd (name, class, var_auto_boolean, var,
+ set_doc, show_doc, set_func, show_func,
+ set_list, show_list);
c->enums = auto_boolean_enums;
- return c;
}
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- VAR is address of the variable which will contain the value.
- DOC is the documentation string. */
-struct cmd_list_element *
-add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list)
+/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). CLASS is as in
+ add_cmd. VAR is address of the variable which will contain the
+ value. SET_DOC and SHOW_DOR are the documentation strings. */
+void
+add_setshow_boolean_cmd (char *name,
+ enum command_class class,
+ int *var, char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
{
static const char *boolean_enums[] = { "on", "off", NULL };
struct cmd_list_element *c;
- c = add_set_cmd (name, class, var_boolean, var, doc, list);
+ c = add_setshow_cmd (name, class, var_boolean, var,
+ set_doc, show_doc,
+ set_func, show_func,
+ set_list, show_list);
c->enums = boolean_enums;
- return c;
}
/* Where SETCMD has already been added, add the corresponding show
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index 72436f04657..e8563ff5c59 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -69,12 +69,11 @@ struct cmd_list_element
to one of the below. */
union
{
- /* If type is not_set_cmd, call it like this: */
- void (*cfunc) (char *args, int from_tty);
-
- /* If type is set_cmd or show_cmd, first set the variables, and
- then call this. */
- void (*sfunc) (char *args, int from_tty, struct cmd_list_element * c);
+ /* If type is not_set_cmd, call it like this: */
+ cmd_cfunc_ftype *cfunc;
+ /* If type is set_cmd or show_cmd, first set the variables,
+ and then call this: */
+ cmd_sfunc_ftype *sfunc;
}
function;
@@ -294,18 +293,6 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list);
-
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list);
-
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
struct cmd_list_element
**);
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index f967b0c3eba..94ba94e16dd 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -34,9 +34,8 @@
static int parse_binary_operation (char *);
-static enum cmd_auto_boolean parse_auto_binary_operation (const char *arg);
-static enum cmd_auto_boolean
+static enum auto_boolean
parse_auto_binary_operation (const char *arg)
{
if (arg != NULL && *arg != '\0')
@@ -48,18 +47,18 @@ parse_auto_binary_operation (const char *arg)
|| strncmp (arg, "1", length) == 0
|| strncmp (arg, "yes", length) == 0
|| strncmp (arg, "enable", length) == 0)
- return CMD_AUTO_BOOLEAN_TRUE;
+ return AUTO_BOOLEAN_TRUE;
else if (strncmp (arg, "off", length) == 0
|| strncmp (arg, "0", length) == 0
|| strncmp (arg, "no", length) == 0
|| strncmp (arg, "disable", length) == 0)
- return CMD_AUTO_BOOLEAN_FALSE;
+ return AUTO_BOOLEAN_FALSE;
else if (strncmp (arg, "auto", length) == 0
|| (strncmp (arg, "-1", length) == 0 && length > 1))
- return CMD_AUTO_BOOLEAN_AUTO;
+ return AUTO_BOOLEAN_AUTO;
}
error ("\"on\", \"off\" or \"auto\" expected.");
- return CMD_AUTO_BOOLEAN_AUTO; /* pacify GCC */
+ return AUTO_BOOLEAN_AUTO; /* pacify GCC */
}
static int
@@ -167,7 +166,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
*(int *) c->var = parse_binary_operation (arg);
break;
case var_auto_boolean:
- *(enum cmd_auto_boolean *) c->var = parse_auto_binary_operation (arg);
+ *(enum auto_boolean *) c->var = parse_auto_binary_operation (arg);
break;
case var_uinteger:
if (arg == NULL)
@@ -296,15 +295,15 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
break;
case var_auto_boolean:
- switch (*(enum cmd_auto_boolean*) c->var)
+ switch (*(enum auto_boolean*) c->var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
fputs_filtered ("on", stb->stream);
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
fputs_filtered ("off", stb->stream);
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
fputs_filtered ("auto", stb->stream);
break;
default:
diff --git a/gdb/command.h b/gdb/command.h
index db7a7402584..00110ce555d 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -51,14 +51,6 @@ typedef enum cmd_types
}
cmd_types;
-/* Reasonable values for an AUTO_BOOLEAN variable. */
-enum cmd_auto_boolean
-{
- CMD_AUTO_BOOLEAN_TRUE,
- CMD_AUTO_BOOLEAN_FALSE,
- CMD_AUTO_BOOLEAN_AUTO
-};
-
/* Types of "set" or "show" command. */
typedef enum var_types
{
@@ -67,9 +59,9 @@ typedef enum var_types
var_boolean,
/* "on" / "true" / "enable" or "off" / "false" / "disable" or
- "auto. *VAR is an ``enum cmd_auto_boolean''. NOTE: In general
- a custom show command will need to be implemented - one that
- for "auto" prints both the "auto" and the current auto-selected
+ "auto. *VAR is an ``enum auto_boolean''. NOTE: In general a
+ custom show command will need to be implemented - one that for
+ "auto" prints both the "auto" and the current auto-selected
value. */
var_auto_boolean,
@@ -132,12 +124,14 @@ extern struct cmd_list_element *add_abbrev_prefix_cmd (char *,
/* Set the commands corresponding callback. */
+typedef void cmd_cfunc_ftype (char *args, int from_tty);
extern void set_cmd_cfunc (struct cmd_list_element *cmd,
- void (*cfunc) (char *args, int from_tty));
+ cmd_cfunc_ftype *cfunc);
+typedef void cmd_sfunc_ftype (char *args, int from_tty,
+ struct cmd_list_element *c);
extern void set_cmd_sfunc (struct cmd_list_element *cmd,
- void (*sfunc) (char *args, int from_tty,
- struct cmd_list_element * c));
+ cmd_sfunc_ftype *sfunc);
extern void set_cmd_completer (struct cmd_list_element *cmd,
char **(*completer) (char *text, char *word));
@@ -229,17 +223,24 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list);
-
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list);
+extern void add_setshow_auto_boolean_cmd (char *name,
+ enum command_class class,
+ enum auto_boolean *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
+extern void add_setshow_boolean_cmd (char *name,
+ enum command_class class,
+ int *var,
+ char *set_doc,
+ char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
struct cmd_list_element
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 1d49133a05b..2710ef70ca3 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -25,7 +25,6 @@
#else
#undef HAVE_SSE_REGS
#endif /* CONTEXT_EXTENDED_REGISTERS */
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h
index f51859d0b46..87d0e08b26c 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/config/i386/tm-fbsd.h
@@ -21,7 +21,6 @@
#ifndef TM_FBSD_H
#define TM_FBSD_H
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
/* These defines allow the recognition of sigtramps as a function name
diff --git a/gdb/config/i386/tm-go32.h b/gdb/config/i386/tm-go32.h
index 79370e778a2..85e0888ef80 100644
--- a/gdb/config/i386/tm-go32.h
+++ b/gdb/config/i386/tm-go32.h
@@ -22,7 +22,6 @@
#define TM_GO32_H
#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index 0ea151b4a14..8ec3d4de852 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -32,249 +32,11 @@ struct frame_saved_regs;
struct value;
struct type;
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions to reach some
- "real" code. */
-
-#define SKIP_PROLOGUE(frompc) (i386_skip_prologue (frompc))
-
-extern int i386_skip_prologue (int);
-
-/* Stack grows downward. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction. */
-
-#define BREAKPOINT {0xcc}
-
-/* Amount PC must be decremented by after a breakpoint. This is often the
- number of bytes in BREAKPOINT but not always. */
-
-#define DECR_PC_AFTER_BREAK 1
-
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-
-#define REGISTER_SIZE 4
-
-/* This register file is parameterized by two macros:
- HAVE_I387_REGS --- register file should include i387 registers
- HAVE_SSE_REGS --- register file should include SSE registers
- If HAVE_SSE_REGS is #defined, then HAVE_I387_REGS must also be #defined.
-
- However, GDB code should not test those macros with #ifdef, since
- that makes code which is annoying to multi-arch. Instead, GDB code
- should check the values of NUM_GREGS, NUM_FREGS, and NUM_SSE_REGS,
- which will eventually get mapped onto architecture vector entries.
-
- It's okay to use the macros in tm-*.h files, though, since those
- files will get completely replaced when we multi-arch anyway. */
-
-/* Number of general registers, present on every 32-bit x86 variant. */
-#define NUM_GREGS (16)
-
-/* Number of floating-point unit registers. */
-#ifdef HAVE_I387_REGS
-#define NUM_FREGS (16)
-#else
-#define NUM_FREGS (0)
-#endif
-
-/* Number of SSE registers. */
-#ifdef HAVE_SSE_REGS
-#define NUM_SSE_REGS (9)
-#else
-#define NUM_SSE_REGS (0)
-#endif
-
-/* Largest number of registers we could have in any configuration. */
-#define MAX_NUM_REGS (16 + 16 + 9 + 1)
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP_REGNUM 5 /* (ebp) Contains address of executing stack
- frame */
-#define SP_REGNUM 4 /* (usp) Contains address of top of stack */
-#define PC_REGNUM 8 /* (eip) Contains program counter */
-#define PS_REGNUM 9 /* (ps) Contains processor status */
-
-/* First FPU data register. */
-#ifdef HAVE_I387_REGS
-#define FP0_REGNUM 16
-#else
-#define FP0_REGNUM 0
-#endif
-
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 16
-
-/* Return the size in bytes of the virtual type of register REG. */
-#define REGISTER_VIRTUAL_SIZE(reg) i386_register_virtual_size ((reg))
-extern int i386_register_virtual_size (int reg);
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define MAX_REGISTER_VIRTUAL_SIZE 16
-
-/* Return the GDB type object for the "standard" data type of data in
- register REGNUM. */
-
-#define REGISTER_VIRTUAL_TYPE(regnum) i386_register_virtual_type (regnum)
-extern struct type *i386_register_virtual_type (int regnum);
-
-/* Return true iff register REGNUM's virtual format is different from
- its raw format. */
-
-#define REGISTER_CONVERTIBLE(regnum) i386_register_convertible (regnum)
-extern int i386_register_convertible (int regnum);
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) \
- i386_register_convert_to_virtual ((regnum), (type), (from), (to))
-extern void i386_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to);
-
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. */
-
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) \
- i386_register_convert_to_raw ((type), (regnum), (from), (to))
-extern void i386_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to);
-
/* Print out the i387 floating point state. */
-#ifdef HAVE_I387_REGS
extern void i387_float_info (void);
#define FLOAT_INFO { i387_float_info (); }
-#endif
-
-
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
- i386_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR i386_push_arguments (int nargs, struct value **args,
- CORE_ADDR sp, int struct_return,
- CORE_ADDR struct_addr);
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(addr, sp) \
- i386_store_struct_return ((addr), (sp))
-extern void i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \
- i386_extract_return_value ((type), (regbuf), (valbuf))
-extern void i386_extract_return_value (struct type *type, char *regbuf,
- char *valbuf);
-
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
-
-#define STORE_RETURN_VALUE(type, valbuf) \
- i386_store_return_value ((type), (valbuf))
-extern void i386_store_return_value (struct type *type, char *valbuf);
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR. */
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \
- i386_extract_struct_value_address ((regbuf))
-extern CORE_ADDR i386_extract_struct_value_address (char *regbuf);
-
-/* Determine whether the function invocation represented by FRAME does
- not have a from on the stack associated with it. If it does not,
- return non-zero, otherwise return zero. */
-
-#define FRAMELESS_FUNCTION_INVOCATION(frame) \
- i386_frameless_function_invocation (frame)
-extern int i386_frameless_function_invocation (struct frame_info *frame);
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Return number of args passed to a frame. Can return -1, meaning no way
- to tell, which is typical now that the C compiler delays popping them. */
-
-#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
-
-extern int i386_frame_num_args (struct frame_info *);
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 8
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-extern void i386_frame_init_saved_regs (struct frame_info *);
-#define FRAME_INIT_SAVED_REGS(FI) i386_frame_init_saved_regs (FI)
-
-
-
-/* Things needed for making the inferior call functions. */
-
-/* "An argument's size is increased, if necessary, to make it a
- multiple of [32 bit] words. This may require tail padding,
- depending on the size of the argument" - from the x86 ABI. */
-#define PARM_BOUNDARY 32
-
-/* Push an empty stack frame, to record the current PC, etc. */
-
-#define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
-
-extern void i386_push_dummy_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-
-#define POP_FRAME { i386_pop_frame (); }
-
-extern void i386_pop_frame (void);
-/* this is
- * call 11223344 (32 bit relative)
- * int3
- */
-
-#define CALL_DUMMY { 0x223344e8, 0xcc11 }
-
-#define CALL_DUMMY_LENGTH 8
-
-#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
-
-#define CALL_DUMMY_BREAKPOINT_OFFSET 5
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at DUMMYNAME. */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
- i386_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
-extern void i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
- int nargs, struct value **args,
- struct type *type, int gcc_p);
-
/* FIXME: kettenis/2000-06-12: These do not belong here. */
extern void print_387_control_word (unsigned int);
extern void print_387_status_word (unsigned int);
diff --git a/gdb/config/i386/tm-i386gnu.h b/gdb/config/i386/tm-i386gnu.h
index f1835423a72..638cb03f2a0 100644
--- a/gdb/config/i386/tm-i386gnu.h
+++ b/gdb/config/i386/tm-i386gnu.h
@@ -39,7 +39,6 @@
FIXME: This is probably native-dependent too. */
#define ATTACH_DETACH 1
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
/* We use stabs-in-ELF with the DWARF register numbering scheme. */
diff --git a/gdb/config/i386/tm-i386lynx.h b/gdb/config/i386/tm-i386lynx.h
index 2da0b7c8dee..03fe4ff8bf7 100644
--- a/gdb/config/i386/tm-i386lynx.h
+++ b/gdb/config/i386/tm-i386lynx.h
@@ -1,5 +1,5 @@
/* Macro definitions for Intel 386 running under LynxOS.
- Copyright 1993, 1995 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,9 +26,4 @@
/* Most definitions from sysv could be used. */
#include "i386/tm-i386.h"
-#undef SAVED_PC_AFTER_CALL
-
-#define SAVED_PC_AFTER_CALL i386lynx_saved_pc_after_call
-CORE_ADDR i386lynx_saved_pc_after_call ();
-
#endif /* TM_I386LYNX_H */
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index 7473f3bbc91..a63e8a011ff 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -21,7 +21,6 @@
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
-#define HAVE_I387_REGS
#include "i386/tm-i386v4.h"
/* If the current gcc for for this target does not produce correct
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 7bfdf03895c..e64ae8a257f 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -24,7 +24,6 @@
#define TM_LINUX_H
#define I386_GNULINUX_TARGET
-#define HAVE_I387_REGS
#ifdef HAVE_PTRACE_GETFPXREGS
#define FILL_FPXREGSET
#define HAVE_SSE_REGS
diff --git a/gdb/config/i386/tm-nbsd.h b/gdb/config/i386/tm-nbsd.h
index 55ef6fa56fc..ac61d93a8cf 100644
--- a/gdb/config/i386/tm-nbsd.h
+++ b/gdb/config/i386/tm-nbsd.h
@@ -21,7 +21,6 @@
#ifndef TM_NBSD_H
#define TM_NBSD_H
-#define HAVE_I387_REGS
#define HAVE_SSE_REGS
#include "i386/tm-i386.h"
diff --git a/gdb/config/i386/tm-obsd.h b/gdb/config/i386/tm-obsd.h
index d26b03bf41d..f3b111adcaa 100644
--- a/gdb/config/i386/tm-obsd.h
+++ b/gdb/config/i386/tm-obsd.h
@@ -21,7 +21,6 @@
#ifndef TM_OBSD_H
#define TM_OBSD_H
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
/* OpenBSD uses the old gcc convention for struct returns. */
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index 40bd25aa626..8f0f6a843a9 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -21,6 +21,8 @@
#include "regcache.h"
+#define GDB_MULTI_ARCH 0
+
/* Generic 68000 stuff, to be included by other tm-*.h files. */
#define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index f573e96fd58..d53156cf817 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -93,7 +93,7 @@ extern int in_sigtramp (CORE_ADDR, char *);
/* Given the register index, return the name of the corresponding
register. */
-extern char *mips_register_name (int regnr);
+extern const char *mips_register_name (int regnr);
#define REGISTER_NAME(i) mips_register_name (i)
/* Initializer for an array of names of registers.
diff --git a/gdb/config/romp/rtbsd.mh b/gdb/config/romp/rtbsd.mh
deleted file mode 100644
index 1efa116fa18..00000000000
--- a/gdb/config/romp/rtbsd.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# IBM RT/PC running BSD unix.
-# This file contributed at NYU, where we are using the RT to remote
-# debug an a29k running unix. No attempt, as of 7/16/91, has been made
-# to support debugging of RT executables.
-NATDEPFILES corelow.o core-aout.o infptrace.o inftarg.o fork-child.o
-MH_CFLAGS=-DHOSTING_ONLY # No debugging of RT executables
-XM_FILE= xm-rtbsd.h
-CC=gcc -traditional # hc/pcc just can't cut it.
diff --git a/gdb/config/romp/xm-rtbsd.h b/gdb/config/romp/xm-rtbsd.h
deleted file mode 100644
index e7918163ee2..00000000000
--- a/gdb/config/romp/xm-rtbsd.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Definitions to host GDB on an IBM RT/PC running BSD Unix.
- Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
- Contributed by David Wood @ New York University (wood@lab.ultra.nyu.edu).
-
- This file is part of GDB.
-
- 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 of the License, 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. */
-
-/* This OS has the wait structure */
-#define HAVE_WAIT_STRUCT
-
-#ifdef HOSTING_ONLY
-/*
- * This next two defines are to get GDB up and running as a host to
- * do remote debugging. I know there is a gdb for the RT, but there wasn't
- * an xconfig/rt* file.
- */
-#define KERNEL_U_ADDR_BSD /* This may be correct, but hasn't been tested */
-#define REGISTER_U_ADDR(a,b,c) \
- (printf("GDB can not debug IBM RT/PC BSD executables (yet)\n"),\
- quit(),0)
-#else
-#include "GDB for the RT is not included in the distribution"
-#endif
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index b28d3bb83f7..b223f8734ee 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -762,7 +762,7 @@ cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
adjusts pcptr (if necessary) to point to the actual memory location where
the breakpoint should be inserted. */
-unsigned char *
+const unsigned char *
cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x38, 0xe9};
@@ -995,7 +995,7 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
/* Return the name of register regno as a string. Return NULL for an invalid or
unimplemented register. */
-char *
+const char *
cris_register_name (int regno)
{
static char *cris_genreg_names[] =
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 4fe1c6228be..856e18ed2de 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -187,7 +187,7 @@ enum ts2_regnums
TS2_A0_REGNUM = 35
};
-static char *
+static const char *
d10v_ts2_register_name (int reg_nr)
{
static char *register_names[] =
@@ -213,7 +213,7 @@ enum ts3_regnums
TS3_A0_REGNUM = 32
};
-static char *
+static const char *
d10v_ts3_register_name (int reg_nr)
{
static char *register_names[] =
diff --git a/gdb/defs.h b/gdb/defs.h
index b1a050da896..10327389e2b 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -222,6 +222,14 @@ enum precision_type
unspecified_precision
};
+/* A generic, not quite boolean, enumeration. */
+enum auto_boolean
+{
+ AUTO_BOOLEAN_TRUE,
+ AUTO_BOOLEAN_FALSE,
+ AUTO_BOOLEAN_AUTO
+};
+
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
Each link in the chain records a function to call and an
@@ -840,7 +848,7 @@ extern void xfree (void *);
``struct foo *foo = xmalloc (sizeof bar)'' and ``struct foo *foo =
(struct foo *) xmalloc (sizeof bar)''. */
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
-#define XCALLOC(NR, TYPE) ((TYPE*) xcalloc ((NR), sizeof (TYPE)));
+#define XCALLOC(NMEMB, TYPE) ((TYPE*) xcalloc ((NMEMB), sizeof (TYPE)))
/* Like asprintf/vasprintf but get an internal_error if the call
fails. */
diff --git a/gdb/frame.h b/gdb/frame.h
index 03a71c7a097..a0a965edf24 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -133,7 +133,12 @@ struct frame_info
/* If dwarf2 unwind frame informations is used, this structure holds all
related unwind data. */
- struct unwind_contect *context;
+ struct context *context;
+
+ /* See description above. Return the register value for the
+ previous frame. */
+ frame_register_unwind_ftype *register_unwind;
+ void *register_unwind_cache;
/* See description above. Return the register value for the
previous frame. */
diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh
index 1e727fe2309..0d0829a4a13 100755
--- a/gdb/gdb_indent.sh
+++ b/gdb/gdb_indent.sh
@@ -54,7 +54,10 @@ esac
# Run indent per GDB specs
-types="-T FILE `cat *.h | sed -n \
+types="\
+-T FILE \
+-T prgregset_t -T fpregset_t -T gregset_t \
+`cat *.h | sed -n \
-e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
-e 's/^.*[^a-z0-9_]\([a-z0-9_]*_func\).*$/-T \1/p' \
-e 's/^typedef.*[^a-zA-Z0-9_]\([a-zA-Z0-9_]*[a-zA-Z0-9_]\);$/-T \1/p' \
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 55041aca53a..079c768584b 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -2838,7 +2838,7 @@ set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
}
-char *
+const char *
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 7d73294bfc9..c1443c88c8d 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -659,8 +659,8 @@ extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_d
#define REGISTER_NAME(regnr) (legacy_register_name (regnr))
#endif
-typedef char * (gdbarch_register_name_ftype) (int regnr);
-extern char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
+typedef const char * (gdbarch_register_name_ftype) (int regnr);
+extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
#error "Non multi-arch definition of REGISTER_NAME"
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 6d6c2d02f18..2bdc3871d0a 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -458,7 +458,7 @@ f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no
# to map one to one onto the sdb register numbers.
f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
-f:2:REGISTER_NAME:char *:register_name:int regnr:regnr:::legacy_register_name::0
+f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
v:2:REGISTER_SIZE:int:register_size::::0:-1
v:2:REGISTER_BYTES:int:register_bytes::::0:-1
f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 26f5aaf85ab..fe610211f8e 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -171,7 +171,7 @@ kernel_u_size (void)
#endif
/* Registers we shouldn't try to fetch. */
-#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
/* Fetch one register. */
@@ -237,7 +237,7 @@ old_fetch_inferior_registers (int regno)
}
/* Registers we shouldn't try to store. */
-#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
/* Store one register. */
@@ -311,7 +311,7 @@ supply_gregset (elf_gregset_t *gregsetp)
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, (char *) (regp + regmap[i]));
if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
@@ -328,8 +328,8 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < NUM_GREGS; i++)
- if ((regno == -1 || regno == i))
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
regcache_collect (i, regp + regmap[i]);
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 12a2ab9004d..8fa9261e3c3 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -38,7 +38,7 @@
/* Return the name of register REG. */
-static char *
+static const char *
i386_linux_register_name (int reg)
{
/* Deal with the extra "orig_eax" pseudo register. */
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index 714f5db9b36..206e85cfe72 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -48,12 +48,27 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
+static enum gdb_osabi
+i386_sol2_osabi_sniffer (bfd *abfd)
+{
+ /* If we have a section named .SUNW_version, then it is almost
+ certainly Solaris 2. */
+ if (bfd_get_section_by_name (abfd, ".SUNW_version"))
+ return GDB_OSABI_SOLARIS;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_i386_sol2_tdep (void);
void
_initialize_i386_sol2_tdep (void)
{
+ /* Register and ELF OS ABI sniffer for Solaris 2 binaries. */
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour,
+ i386_sol2_osabi_sniffer);
+
gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_SOLARIS,
i386_sol2_init_abi);
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index f0723fa660b..1a838f2a491 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -58,11 +58,11 @@ static char *i386_register_names[] =
/* i386_register_offset[i] is the offset into the register file of the
start of register number i. We initialize this from
i386_register_size. */
-static int i386_register_offset[MAX_NUM_REGS];
+static int i386_register_offset[I386_SSE_NUM_REGS];
/* i386_register_size[i] is the number of bytes of storage in GDB's
register array occupied by register i. */
-static int i386_register_size[MAX_NUM_REGS] = {
+static int i386_register_size[I386_SSE_NUM_REGS] = {
4, 4, 4, 4,
4, 4, 4, 4,
4, 4, 4, 4,
@@ -78,7 +78,7 @@ static int i386_register_size[MAX_NUM_REGS] = {
/* Return the name of register REG. */
-char *
+const char *
i386_register_name (int reg)
{
if (reg < 0)
@@ -106,14 +106,6 @@ i386_register_raw_size (int reg)
return i386_register_size[reg];
}
-/* Return the size in bytes of the virtual type of register REG. */
-
-int
-i386_register_virtual_size (int reg)
-{
- return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg));
-}
-
/* Convert stabs register number REG to the appropriate register
number used by GDB. */
@@ -674,8 +666,8 @@ i386_frame_init_saved_regs (struct frame_info *fip)
/* Return PC of first real instruction. */
-int
-i386_skip_prologue (int pc)
+CORE_ADDR
+i386_skip_prologue (CORE_ADDR pc)
{
unsigned char op;
int i;
@@ -757,6 +749,24 @@ i386_skip_prologue (int pc)
return (codestream_tell ());
}
+/* Use the program counter to determine the contents and size of a
+ breakpoint instruction. Return a pointer to a string of bytes that
+ encode a breakpoint instruction, store the length of the string in
+ *LEN and optionally adjust *PC to point to the correct memory
+ location for inserting the breakpoint.
+
+ On the i386 we have a single breakpoint that fits in a single byte
+ and can be inserted anywhere. */
+
+static const unsigned char *
+i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+{
+ static unsigned char break_insn[] = { 0xcc }; /* int 3 */
+
+ *len = sizeof (break_insn);
+ return break_insn;
+}
+
void
i386_push_dummy_frame (void)
{
@@ -777,6 +787,19 @@ i386_push_dummy_frame (void)
write_register (FP_REGNUM, fp);
}
+/* The i386 call dummy sequence:
+
+ call 11223344 (32-bit relative)
+ int 3
+
+ It is 8 bytes long. */
+
+static LONGEST i386_call_dummy_words[] =
+{
+ 0x223344e8,
+ 0xcc11
+};
+
/* Insert the (relative) function address into the call sequence
stored at DYMMY. */
@@ -905,7 +928,7 @@ i386_extract_return_value (struct type *type, char *regbuf, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
{
warning ("Cannot find floating-point return value.");
memset (valbuf, 0, len);
@@ -959,7 +982,7 @@ i386_store_return_value (struct type *type, char *valbuf)
unsigned int fstat;
char buf[FPU_REG_RAW_SIZE];
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
{
warning ("Cannot set floating-point return value.");
return;
@@ -1340,8 +1363,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->osabi = osabi;
/* The i386 default settings don't include the SSE registers.
- FIXME: kettenis/20020509: They do include the FPU registers for
- now, which is not quite right. */
+ FIXME: kettenis/20020614: They do include the FPU registers for
+ now, which probably is not quite right. */
tdep->num_xmm_regs = 0;
tdep->jb_pc_offset = -1;
@@ -1362,55 +1385,106 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
alignment. */
set_gdbarch_long_double_bit (gdbarch, 96);
+ /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
+ tm-symmetry.h currently override this. Sigh. */
+ set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
+
+ set_gdbarch_sp_regnum (gdbarch, 4);
+ set_gdbarch_fp_regnum (gdbarch, 5);
+ set_gdbarch_pc_regnum (gdbarch, 8);
+ set_gdbarch_ps_regnum (gdbarch, 9);
+ set_gdbarch_fp0_regnum (gdbarch, 16);
+
+ /* Use the "default" register numbering scheme for stabs and COFF. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+ set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+
+ /* Use the DWARF register numbering scheme for DWARF and DWARF 2. */
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+
+ /* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
+ be in use on any of the supported i386 targets. */
+
+ set_gdbarch_register_name (gdbarch, i386_register_name);
+ set_gdbarch_register_size (gdbarch, 4);
+ set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
+ set_gdbarch_register_byte (gdbarch, i386_register_byte);
+ set_gdbarch_register_raw_size (gdbarch, i386_register_raw_size);
+ set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
+
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
/* Call dummy code. */
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+ set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 5);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+ set_gdbarch_call_dummy_length (gdbarch, 8);
set_gdbarch_call_dummy_p (gdbarch, 1);
+ set_gdbarch_call_dummy_words (gdbarch, i386_call_dummy_words);
+ set_gdbarch_sizeof_call_dummy_words (gdbarch,
+ sizeof (i386_call_dummy_words));
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+ set_gdbarch_fix_call_dummy (gdbarch, i386_fix_call_dummy);
+
+ set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
+ set_gdbarch_register_convert_to_virtual (gdbarch,
+ i386_register_convert_to_virtual);
+ set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
+ /* "An argument's size is increased, if necessary, to make it a
+ multiple of [32-bit] words. This may require tail padding,
+ depending on the size of the argument" -- from the x86 ABI. */
+ set_gdbarch_parm_boundary (gdbarch, 32);
+
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ i386_extract_return_value);
+ set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
+ set_gdbarch_push_dummy_frame (gdbarch, i386_push_dummy_frame);
+ set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
+ set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+ set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+ i386_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
+ set_gdbarch_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
+ set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
+
+ /* Stack grows downward. */
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+ set_gdbarch_breakpoint_from_pc (gdbarch, i386_breakpoint_from_pc);
+ set_gdbarch_decr_pc_after_break (gdbarch, 1);
+ set_gdbarch_function_start_offset (gdbarch, 0);
+
/* The following redefines make backtracing through sigtramp work.
They manufacture a fake sigtramp frame and obtain the saved pc in
sigtramp from the sigcontext structure which is pushed by the
kernel on the user stack, along with a pointer to it. */
+ set_gdbarch_frame_args_skip (gdbarch, 8);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ i386_frameless_function_invocation);
set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
+ set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
+ set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
- /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
- tm-symmetry.h currently override this. Sigh. */
- set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
-
- /* Use the "default" register numbering scheme for stabs and COFF. */
- set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
- set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
-
- /* Use the DWARF register numbering scheme for DWARF and DWARF 2. */
- set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
-
- /* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
- be in use on any of the supported i386 targets. */
-
- set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_register_name (gdbarch, i386_register_name);
- set_gdbarch_register_byte (gdbarch, i386_register_byte);
- set_gdbarch_register_raw_size (gdbarch, i386_register_raw_size);
-
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch, osabi);
@@ -1420,7 +1494,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static enum gdb_osabi
i386_coff_osabi_sniffer (bfd *abfd)
{
- if (strcmp (bfd_get_target (abfd), "coff-go32-exe") == 0)
+ if (strcmp (bfd_get_target (abfd), "coff-go32-exe") == 0
+ || strcmp (bfd_get_target (abfd), "coff-go32") == 0)
return GDB_OSABI_GO32;
return GDB_OSABI_UNKNOWN;
@@ -1447,7 +1522,7 @@ _initialize_i386_tdep (void)
int i, offset;
offset = 0;
- for (i = 0; i < MAX_NUM_REGS; i++)
+ for (i = 0; i < I386_SSE_NUM_REGS; i++)
{
i386_register_offset[i] = offset;
offset += i386_register_size[i];
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 64af99d1e66..61a817822c4 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -157,7 +157,7 @@ struct gdbarch_tdep
+ I386_SIZEOF_XREGS)
/* Return the name of register REG. */
-extern char *i386_register_name (int reg);
+extern char const *i386_register_name (int reg);
/* Return the offset into the register array of the start of register
number REG. */
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index a941d5b468c..3ab22a9bab8 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -43,6 +43,7 @@ typedef struct fpreg fpregset_t;
#endif
#include "gregset.h"
+#include "i386-tdep.h"
/* In older BSD versions we cannot get at some of the segment
@@ -125,7 +126,7 @@ supply_gregset (gregset_t *gregsetp)
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
{
if (CANNOT_FETCH_REGISTER (i))
supply_register (i, NULL);
@@ -143,7 +144,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
if ((regno == -1 || regno == i) && ! CANNOT_STORE_REGISTER (i))
regcache_collect (i, REG_ADDR (gregsetp, i));
}
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 329ef2fd17a..3fa99a34d88 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -99,7 +99,7 @@ void
supply_gregset (gdb_gregset_t *gregs)
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, REG_ADDR (gregs, i));
}
@@ -124,7 +124,7 @@ gnu_fetch_registers (int regno)
error ("Can't fetch registers from thread %d: No such thread",
PIDGET (inferior_ptid));
- if (regno < NUM_GREGS || regno == -1)
+ if (regno < I386_NUM_GREGS || regno == -1)
{
thread_state_t state;
@@ -143,7 +143,7 @@ gnu_fetch_registers (int regno)
proc_debug (thread, "fetching all register");
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, REG_ADDR (state, i));
thread->fetched_regs = ~0;
}
@@ -156,7 +156,7 @@ gnu_fetch_registers (int regno)
}
}
- if (regno >= NUM_GREGS || regno == -1)
+ if (regno >= I386_NUM_GREGS || regno == -1)
{
proc_debug (thread, "fetching floating-point registers");
@@ -211,7 +211,7 @@ gnu_store_registers (int regno)
error ("Couldn't store registers into thread %d: No such thread",
PIDGET (inferior_ptid));
- if (regno < NUM_GREGS || regno == -1)
+ if (regno < I386_NUM_GREGS || regno == -1)
{
thread_state_t state;
thread_state_data_t old_state;
@@ -238,7 +238,7 @@ gnu_store_registers (int regno)
{
int check_regno;
- for (check_regno = 0; check_regno < NUM_GREGS; check_regno++)
+ for (check_regno = 0; check_regno < I386_NUM_GREGS; check_regno++)
if ((thread->fetched_regs & (1 << check_regno))
&& memcpy (REG_ADDR (&old_state, check_regno),
REG_ADDR (state, check_regno),
@@ -265,7 +265,7 @@ gnu_store_registers (int regno)
proc_debug (thread, "storing all registers");
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
if (register_valid[i])
fill (state, i);
}
@@ -284,7 +284,7 @@ gnu_store_registers (int regno)
#undef fill
- if (regno >= NUM_GREGS || regno == -1)
+ if (regno >= I386_NUM_GREGS || regno == -1)
{
proc_debug (thread, "storing floating-point registers");
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index 92b544deabd..69c37501d59 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for Intel 386 running LynxOS.
- Copyright 1993, 1996, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1993, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,27 +19,62 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "inferior.h"
-#include "target.h"
#include "gdbcore.h"
+#include "inferior.h"
#include "regcache.h"
+#include "target.h"
+
+#include "i386-tdep.h"
-/* Return the PC of the caller from the call frame. Assumes the subr prologue
- has already been executed, and the frame pointer setup. If this is the
- outermost frame, we check to see if we are in a system call by examining the
- previous instruction. If so, then the return PC is actually at SP+4 because
- system calls use a different calling sequence. */
+/* Return the PC of the caller from the call frame. Assumes the subr
+ prologue has already been executed, and the frame pointer setup.
+ If this is the outermost frame, we check to see if we are in a
+ system call by examining the previous instruction. If so, then the
+ return PC is actually at SP+4 because system calls use a different
+ calling sequence. */
-CORE_ADDR
+static CORE_ADDR
i386lynx_saved_pc_after_call (struct frame_info *frame)
{
char opcode[7];
static const unsigned char call_inst[] =
- {0x9a, 0, 0, 0, 0, 8, 0}; /* lcall 0x8,0x0 */
+ { 0x9a, 0, 0, 0, 0, 8, 0 }; /* lcall 0x8,0x0 */
- read_memory (frame->pc - 7, opcode, 7);
+ read_memory_nobpt (frame->pc - 7, opcode, 7);
if (memcmp (opcode, call_inst, 7) == 0)
- return read_memory_integer (read_register (SP_REGNUM) + 4, 4);
+ return read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
+
+ return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
+}
+
+
+/* LynxOS. */
+static void
+i386lynx_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ set_gdbarch_saved_pc_after_call (gdbarch, i386lynx_saved_pc_after_call);
+}
+
+
+static enum gdb_osabi
+i386lynx_coff_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "coff-i386-lynx") == 0)
+ return GDB_OSABI_LYNXOS;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386lynx_tdep (void);
+
+void
+_initialize_i386bsd_tdep (void)
+{
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+ i386lynx_coff_osabi_sniffer);
- return read_memory_integer (read_register (SP_REGNUM), 4);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_LYNXOS,
+ i386lynx_init_abi);
}
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 672ddfbf808..c603b281966 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -46,20 +46,9 @@
#include <sys/ioctl.h>
#include <fcntl.h>
-
-/* FIXME: 1998-10-21/jsm: The following used to be just "#include
- <sys/debugreg.h>", but the the Linux kernel (version 2.1.x) and
- glibc 2.0.x are not in sync; including <sys/debugreg.h> will result
- in an error. With luck, these losers will get their act together
- and we can trash this hack in the near future. */
-
#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
-#ifdef HAVE_ASM_DEBUGREG_H
-#include <asm/debugreg.h>
-#else
#include <sys/debugreg.h>
#endif
-#endif
#include <sys/file.h>
#include "gdb_stat.h"
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index c67f1fb2f44..7de8c148034 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -1,5 +1,6 @@
-/* Native-dependent code for SVR4 Unix running on i386's, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001
+/* Native-dependent code for SVR4 Unix running on i386's.
+ Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,8 +28,9 @@
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
-#include "i387-tdep.h"
+#include "i386-tdep.h"
+#include "i387-tdep.h"
#ifdef HAVE_SYS_PROCFS_H
@@ -37,15 +39,16 @@
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
-/* The /proc interface divides the target machine's register set up into
- two different sets, the general register set (gregset) and the floating
- point register set (fpregset). For each set, there is an ioctl to get
- the current register set and another ioctl to set the current values.
+/* The `/proc' interface divides the target machine's register set up
+ into two different sets, the general purpose register set (gregset)
+ and the floating-point register set (fpregset). For each set,
+ there is an ioctl to get the current register set and another ioctl
+ to set the current values.
- The actual structure passed through the ioctl interface is, of course,
- naturally machine dependent, and is different for each set of registers.
- For the i386 for example, the general register set is typically defined
- by:
+ The actual structure passed through the ioctl interface is, of
+ course, naturally machine dependent, and is different for each set
+ of registers. For the i386 for example, the general-purpose
+ register set is typically defined by:
typedef int gregset_t[19]; (in <sys/regset.h>)
@@ -55,36 +58,38 @@
#define UESP 17
#define SS 18
- and the floating point set by:
-
- typedef struct fpregset
- {
- union
- {
- struct fpchip_state // fp extension state //
- {
- int state[27]; // 287/387 saved state //
- int status; // status word saved at exception //
- } fpchip_state;
- struct fp_emul_space // for emulators //
- {
- char fp_emul[246];
- char fp_epad[2];
- } fp_emul_space;
- int f_fpregs[62]; // union of the above //
- } fp_reg_set;
- long f_wregs[33]; // saved weitek state //
+ and the floating-point set by:
+
+ typedef struct fpregset {
+ union {
+ struct fpchip_state // fp extension state //
+ {
+ int state[27]; // 287/387 saved state //
+ int status; // status word saved at //
+ // exception //
+ } fpchip_state;
+ struct fp_emul_space // for emulators //
+ {
+ char fp_emul[246];
+ char fp_epad[2];
+ } fp_emul_space;
+ int f_fpregs[62]; // union of the above //
+ } fp_reg_set;
+ long f_wregs[33]; // saved weitek state //
} fpregset_t;
- These routines provide the packing and unpacking of gregset_t and
- fpregset_t formatted data.
+ Incidentally fpchip_state contains the FPU state in the same format
+ as used by the "fsave" instruction, and that's the only thing we
+ support here. I don't know how the emulator stores it state. The
+ Weitek stuff definitely isn't supported.
- */
+ The routines defined here, provide the packing and unpacking of
+ gregset_t and fpregset_t formatted data. */
#ifdef HAVE_GREGSET_T
-/* This is a duplicate of the table in i386-xdep.c. */
-
+/* Mapping between the general-purpose registers in `/proc'
+ format and GDB's register array layout. */
static int regmap[] =
{
EAX, ECX, EDX, EBX,
@@ -93,92 +98,63 @@ static int regmap[] =
DS, ES, FS, GS,
};
-/* Prototypes for local functions */
-
-void fill_gregset (gregset_t *, int);
-
-void supply_gregset (gregset_t *);
-
-void supply_fpregset (fpregset_t *);
-
-void fill_fpregset (fpregset_t *, int);
-
-
-/* FIXME: These routine absolutely depends upon (NUM_REGS - NUM_FREGS)
- being less than or equal to the number of registers that can be stored
- in a gregset_t. Note that with the current scheme there will typically
- be more registers actually stored in a gregset_t that what we know
- about. This is bogus and should be fixed. */
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
+/* Fill GDB's register array with the general-purpose register values
+ in *GREGSETP. */
void
supply_gregset (gregset_t *gregsetp)
{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
- extern int regmap[];
-
- for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
- {
- supply_register (regi, (char *) (regp + regmap[regi]));
- }
+ greg_t *regp = (greg_t *) gregsetp;
+ int i;
+
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ supply_register (i, (char *) (regp + regmap[i]));
}
+/* Fill register REGNO (if it is a general-purpose register) in
+ *GREGSETPS with the value in GDB's register array. If REGNO is -1,
+ do this for all registers. */
+
void
fill_gregset (gregset_t *gregsetp, int regno)
{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
- extern int regmap[];
-
- for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- *(regp + regmap[regi]) = *(int *) &registers[REGISTER_BYTE (regi)];
- }
- }
+ greg_t *regp = (greg_t *) gregsetp;
+ int i;
+
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
+ regcache_collect (i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */
-#if defined (HAVE_FPREGSET_T)
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
+#ifdef HAVE_FPREGSET_T
-/* FIXME: Assumes that fpregsetp contains an i387 FSAVE area. */
-#if !defined(FPREGSET_FSAVE_OFFSET)
-#define FPREGSET_FSAVE_OFFSET 0
-#endif
+/* Fill GDB's register array with the floating-point register values in
+ *FPREGSETP. */
void
supply_fpregset (fpregset_t *fpregsetp)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
return;
- i387_supply_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET);
+ i387_supply_fsave ((char *) fpregsetp);
}
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), update the register specified by REGNO from gdb's idea
- of the current floating point register set. If REGNO is -1, update
- them all. */
+/* Fill register REGNO (if it is a floating-point register) in
+ *FPREGSETP with the value in GDB's register array. If REGNO is -1,
+ do this for all registers. */
void
fill_fpregset (fpregset_t *fpregsetp, int regno)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
return;
- i387_fill_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET, regno);
+ i387_fill_fsave ((char *) fpregsetp, regno);
}
-#endif /* defined (HAVE_FPREGSET_T) */
+#endif /* HAVE_FPREGSET_T */
#endif /* HAVE_SYS_PROCFS_H */
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 44210d7d065..89009de0ce9 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -243,7 +243,7 @@ struct gdbarch_tdep
#define FIND_GLOBAL_POINTER \
(gdbarch_tdep (current_gdbarch)->find_global_pointer)
-static char *
+static const char *
ia64_register_name (int reg)
{
return ia64_register_names[reg];
diff --git a/gdb/infrun.c b/gdb/infrun.c
index cb8f1086341..ec6c7d98da5 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3906,7 +3906,6 @@ struct inferior_status
CORE_ADDR step_resume_break_address;
int stop_after_trap;
int stop_soon_quietly;
- CORE_ADDR selected_frame_address;
struct regcache *stop_registers;
/* These are here because if call_function_by_hand has written some
@@ -3917,6 +3916,9 @@ struct inferior_status
/* A frame unique identifier. */
struct frame_id selected_frame_id;
+ /* A frame unique identifier. */
+ struct frame_id selected_frame_id;
+
int breakpoint_proceeded;
int restore_stack_info;
int proceed_to_finish;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 38ec7e348e4..eb8fb748057 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -255,7 +255,7 @@ m68hc11_store_pseudo_register (int regno)
}
}
-static char *
+static const char *
m68hc11_register_name (int reg_nr)
{
if (reg_nr < 0)
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 1c4bc4d4d1f..05a3e50fdec 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -81,11 +81,11 @@ delta68_frame_args_address (struct frame_info *frame_info)
return frame_info->frame + 12;
else if (frameless_look_for_prologue (frame_info))
{
- /* Check for an interrupted system call */
- if (frame_info->next && frame_info->next->signal_handler_caller)
- return frame_info->next->frame + 16;
- else
- return frame_info->frame + 4;
+ /* Check for an interrupted system call */
+ if (frame_info->next && frame_info->next->signal_handler_caller)
+ return frame_info->next->frame + 16;
+ else
+ return frame_info->frame + 4;
}
else
return frame_info->frame;
@@ -226,7 +226,8 @@ m68k_pop_frame (void)
}
if (fsr.regs[PS_REGNUM])
{
- write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4));
+ write_register (PS_REGNUM,
+ read_memory_integer (fsr.regs[PS_REGNUM], 4));
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -278,7 +279,7 @@ m68k_skip_prologue (CORE_ADDR ip)
If so, ensure we don't go past it. If not, assume "infinity". */
sal = find_pc_line (ip, 0);
- limit = (sal.end) ? sal.end : (CORE_ADDR) ~ 0;
+ limit = (sal.end) ? sal.end : (CORE_ADDR) ~0;
while (ip < limit)
{
@@ -298,7 +299,7 @@ m68k_skip_prologue (CORE_ADDR ip)
else if (op == P_FMOVM)
ip += 10; /* Skip fmovm */
else
- break; /* Found unknown code, bail out. */
+ break; /* Found unknown code, bail out. */
}
return (ip);
}
@@ -314,7 +315,7 @@ m68k_find_saved_regs (struct frame_info *frame_info,
/* First possible address for a pc in a call dummy for this frame. */
CORE_ADDR possible_call_dummy_start =
- (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
+ (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
int nextinsn;
memset (saved_regs, 0, sizeof (*saved_regs));
@@ -367,7 +368,7 @@ m68k_find_saved_regs (struct frame_info *frame_info,
next_addr += read_memory_integer (pc += 2, 4), pc += 4;
}
- for ( ; ; )
+ for (;;)
{
nextinsn = 0xffff & read_memory_integer (pc, 2);
regmask = read_memory_integer (pc + 2, 2);
@@ -636,9 +637,8 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
sp = read_register (SP_REGNUM);
- if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
- buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
+ if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
+ buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
@@ -677,9 +677,40 @@ m68k_saved_pc_after_call (struct frame_info *frame)
return read_memory_integer (read_register (SP_REGNUM), 4);
}
+/* Function: m68k_gdbarch_init
+ Initializer function for the m68k gdbarch vector.
+ Called by gdbarch. Sets up the gdbarch vector(s) for this target. */
+
+static struct gdbarch *
+m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch_tdep *tdep = NULL;
+ struct gdbarch *gdbarch;
+
+ /* find a candidate among the list of pre-declared architectures. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return (arches->gdbarch);
+
+#if 0
+ tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+#endif
+
+ gdbarch = gdbarch_alloc (&info, 0);
+
+ return gdbarch;
+}
+
+
+static void
+m68k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+
+}
void
_initialize_m68k_tdep (void)
{
+ gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
tm_print_insn = print_insn_m68k;
}
diff --git a/gdb/maint.c b/gdb/maint.c
index ddaa390b683..f09703f7729 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -783,16 +783,15 @@ passes without a response from the target, an error occurs.", &setlist),
#ifdef NOTYET
- /* FIXME: cagney/2001-09-24: A patch introducing a
- add_set_boolean_cmd() is pending, the below should probably use
- it. A patch implementing profiling is pending, this just sets up
- the framework. */
- tmpcmd = add_set_cmd ("profile", class_maintenance,
- var_boolean, &maintenance_profile_p,
- "Set internal profiling.\n\
-When enabled GDB is profiled.",
- &maintenance_set_cmdlist);
- set_cmd_sfunc (tmpcmd, maintenance_set_profile_cmd);
- add_show_from_set (tmpcmd, &maintenance_show_cmdlist);
+ /* FIXME: cagney/2002-06-15: A patch implementing profiling is
+ pending, this just sets up the framework. */
+ tmpcmd = add_setshow_boolean_cmd ("profile", class_maintenance,
+ var_boolean, &maintenance_profile_p, "\
+Set internal profiling.\n\
+When enabled GDB is profiled.", "\
+Show internal profiling.\n",
+ maintenance_set_profile_cmd, NULL,
+ &maintenance_set_cmdlist,
+ &maintenance_show_cmdlist);
#endif
}
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 096154f9ebb..1c67aca6262 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -26,6 +26,21 @@
Use enum to handle actions to be performed instead of overloading
catch_errors return result and the mi return result.
+2002-06-17 Keith Seitz <keiths@redhat.com>
+
+ * gdbmi.texinfo: Update command examples with real MI behavior.
+
+2002-05-20 Keith Seitz <keiths@redhat.com>
+
+ * mi-main.c (captured_mi_execute_command): Add uiout parameter.
+ "data" is now a structure which is used to pass data to/from this
+ function to mi_execute_command.
+ Modify function to comply with requirements from catch_exceptions.
+ Store real return result and command's return result in data.
+ (mi_execute_command): Use catch_exceptions.
+ Use enum to handle actions to be performed instead of overloading
+ catch_errors return result and the mi return result.
+
2002-04-14 Andrew Cagney <ac131313@redhat.com>
* mi-main.c (mi_cmd_exec_return):
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index f924214caa5..a71b7026964 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -8,7 +8,7 @@
@c @ifinfo
@c This file documents GDB/MI, a Machine Interface to GDB.
-@c Copyright 2000, 2001 Free Software Foundation, Inc.
+@c Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
@c Contributed by Cygnus Solutions.
@c Permission is granted to copy, distribute and/or modify this document
@@ -36,7 +36,7 @@
@c @page
@c @vskip 0pt plus 1filll
-@c Copyright @copyright{} 2000, 2001 Free Software Foundation, Inc.
+@c Copyright @copyright{} 2000, 2001, 2002 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -355,7 +355,7 @@ following line is passed to @sc{gdb/mi} as input, while @samp{<-} means
the output received from @sc{gdb/mi}.
@subsubheading Target Stop
-
+@c Ummm... There is no "-stop" command. This assumes async, no?
Here's an example of stopping the inferior process:
@example
@@ -378,7 +378,9 @@ Here's an example of a simple CLI command being passed through
@example
-> print 1+2
-<- ~3\n
+<- &"print 1+2\n"
+<- ~"$1 = 3\n"
+<- ^done
<- (@value{GDBP})
@end example
@@ -396,7 +398,7 @@ Here's what happens if you pass a non-existent command:
@example
-> -rubbish
-<- error,"Rubbish not found"
+<- ^error,msg="Undefined MI command: rubbish"
<- (@value{GDBP})
@end example
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index d7f6d855ea0..fb46b0262ac 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -61,14 +61,27 @@ enum
enum mips_abi
{
- MIPS_ABI_UNKNOWN,
+ MIPS_ABI_UNKNOWN = 0,
MIPS_ABI_N32,
MIPS_ABI_O32,
MIPS_ABI_O64,
MIPS_ABI_EABI32,
- MIPS_ABI_EABI64
+ MIPS_ABI_EABI64,
+ MIPS_ABI_LAST
};
+static const char *mips_abi_string;
+
+static const char *mips_abi_strings[] = {
+ "auto",
+ "n32",
+ "o32",
+ "o64",
+ "eabi32",
+ "eabi64",
+ NULL
+};
+
struct frame_extra_info
{
mips_extra_func_info_t proc_desc;
@@ -117,7 +130,7 @@ struct gdbarch_tdep
/* mips options */
enum mips_abi mips_abi;
- const char *mips_abi_string;
+ enum mips_abi found_abi;
enum mips_fpu_type mips_fpu_type;
int mips_last_arg_regnum;
int mips_last_fp_arg_regnum;
@@ -270,7 +283,7 @@ static struct cmd_list_element *showmipscmdlist = NULL;
char *mips_generic_reg_names[] = MIPS_REGISTER_NAMES;
char **mips_processor_reg_names = mips_generic_reg_names;
-char *
+const char *
mips_register_name (int i)
{
return mips_processor_reg_names[i];
@@ -469,19 +482,19 @@ mips_register_convert_to_raw (struct type *virtual_type, int n,
}
/* Should the upper word of 64-bit addresses be zeroed? */
-enum cmd_auto_boolean mask_address_var = CMD_AUTO_BOOLEAN_AUTO;
+enum auto_boolean mask_address_var = AUTO_BOOLEAN_AUTO;
static int
mips_mask_address_p (void)
{
switch (mask_address_var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
return 1;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
return 0;
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
return MIPS_DEFAULT_MASK_ADDRESS_P;
default:
internal_error (__FILE__, __LINE__,
@@ -491,17 +504,17 @@ mips_mask_address_p (void)
}
static void
-show_mask_address (char *cmd, int from_tty)
+show_mask_address (char *cmd, int from_tty, struct cmd_list_element *c)
{
switch (mask_address_var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
printf_filtered ("The 32 bit mips address mask is enabled\n");
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
printf_filtered ("The 32 bit mips address mask is disabled\n");
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
printf_filtered ("The 32 bit address mask is set automatically. Currently %s\n",
mips_mask_address_p () ? "enabled" : "disabled");
break;
@@ -4247,6 +4260,19 @@ mips_find_abi_section (bfd *abfd, asection *sect, void *obj)
warning ("unsupported ABI %s.", name + 8);
}
+static enum mips_abi
+global_mips_abi (void)
+{
+ int i;
+
+ for (i = 0; mips_abi_strings[i] != NULL; i++)
+ if (mips_abi_strings[i] == mips_abi_string)
+ return (enum mips_abi) i;
+
+ internal_error (__FILE__, __LINE__,
+ "unknown ABI string");
+}
+
static struct gdbarch *
mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches)
@@ -4256,7 +4282,7 @@ mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
int elf_flags;
- enum mips_abi mips_abi;
+ enum mips_abi mips_abi, found_abi, wanted_abi;
enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Reset the disassembly info, in case it was set to something
@@ -4305,6 +4331,11 @@ mips_gdbarch_init (struct gdbarch_info info,
if (mips_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
bfd_map_over_sections (info.abfd, mips_find_abi_section, &mips_abi);
+ /* If we have no bfd, then mips_abi will still be MIPS_ABI_UNKNOWN.
+ Use the ABI from the last architecture if there is one. */
+ if (info.abfd == NULL && arches != NULL)
+ mips_abi = gdbarch_tdep (arches->gdbarch)->found_abi;
+
/* Try the architecture for any hint of the corect ABI */
if (mips_abi == MIPS_ABI_UNKNOWN
&& info.bfd_arch_info != NULL
@@ -4325,11 +4356,22 @@ mips_gdbarch_init (struct gdbarch_info info,
break;
}
}
+
#ifdef MIPS_DEFAULT_ABI
if (mips_abi == MIPS_ABI_UNKNOWN)
mips_abi = MIPS_DEFAULT_ABI;
#endif
+ if (mips_abi == MIPS_ABI_UNKNOWN)
+ mips_abi = MIPS_ABI_O32;
+
+ /* Now that we have found what the ABI for this binary would be,
+ check whether the user is overriding it. */
+ found_abi = mips_abi;
+ wanted_abi = global_mips_abi ();
+ if (wanted_abi != MIPS_ABI_UNKNOWN)
+ mips_abi = wanted_abi;
+
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
@@ -4338,6 +4380,9 @@ mips_gdbarch_init (struct gdbarch_info info,
fprintf_unfiltered (gdb_stdlog,
"mips_gdbarch_init: mips_abi = %d\n",
mips_abi);
+ fprintf_unfiltered (gdb_stdlog,
+ "mips_gdbarch_init: found_mips_abi = %d\n",
+ found_abi);
}
/* try to find a pre-existing architecture */
@@ -4368,12 +4413,12 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
+ tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
switch (mips_abi)
{
case MIPS_ABI_O32:
- tdep->mips_abi_string = "o32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
@@ -4387,7 +4432,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_O64:
- tdep->mips_abi_string = "o64";
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
@@ -4401,7 +4445,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_EABI32:
- tdep->mips_abi_string = "eabi32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
@@ -4415,7 +4458,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_EABI64:
- tdep->mips_abi_string = "eabi64";
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
@@ -4429,7 +4471,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_N32:
- tdep->mips_abi_string = "n32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
@@ -4454,19 +4495,8 @@ mips_gdbarch_init (struct gdbarch_info info,
tm_print_insn_info.mach = bfd_mach_mips8000;
break;
default:
- tdep->mips_abi_string = "default";
- tdep->mips_default_saved_regsize = MIPS_REGSIZE;
- tdep->mips_default_stack_argsize = MIPS_REGSIZE;
- tdep->mips_fp_register_double = (REGISTER_VIRTUAL_SIZE (FP0_REGNUM) == 8);
- tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->mips_regs_have_home_p = 1;
- tdep->gdb_target_is_mips64 = 0;
- tdep->default_mask_address_p = 0;
- set_gdbarch_long_bit (gdbarch, 32);
- set_gdbarch_ptr_bit (gdbarch, 32);
- set_gdbarch_long_long_bit (gdbarch, 64);
- break;
+ internal_error (__FILE__, __LINE__,
+ "unknown ABI in switch");
}
/* FIXME: jlarmour/2000-04-07: There *is* a flag EF_MIPS_32BIT_MODE
@@ -4579,6 +4609,18 @@ mips_gdbarch_init (struct gdbarch_info info,
}
static void
+mips_abi_update (char *ignore_args, int from_tty,
+ struct cmd_list_element *c)
+{
+ struct gdbarch_info info;
+
+ /* Force the architecture to update, and (if it's a MIPS architecture)
+ mips_gdbarch_init will take care of the rest. */
+ gdbarch_info_init (&info);
+ gdbarch_update_p (info);
+}
+
+static void
mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -4619,7 +4661,7 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: tdep->mips_abi = %d (%s)\n",
tdep->mips_abi,
- tdep->mips_abi_string);
+ mips_abi_strings[tdep->mips_abi]);
fprintf_unfiltered (file,
"mips_dump_tdep: mips_mask_address_p() %d (default %d)\n",
mips_mask_address_p (),
@@ -4995,6 +5037,11 @@ _initialize_mips_tdep (void)
static struct cmd_list_element *mipsfpulist = NULL;
struct cmd_list_element *c;
+ mips_abi_string = mips_abi_strings [MIPS_ABI_UNKNOWN];
+ if (MIPS_ABI_LAST + 1
+ != sizeof (mips_abi_strings) / sizeof (mips_abi_strings[0]))
+ internal_error (__FILE__, __LINE__, "mips_abi_strings out of sync");
+
gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
if (!tm_print_insn) /* Someone may have already set it */
tm_print_insn = gdb_print_insn_mips;
@@ -5037,6 +5084,21 @@ This option can be set to one of:\n\
&setmipscmdlist),
&showmipscmdlist);
+ /* Allow the user to override the ABI. */
+ c = add_set_enum_cmd
+ ("abi", class_obscure, mips_abi_strings, &mips_abi_string,
+ "Set the ABI used by this program.\n"
+ "This option can be set to one of:\n"
+ " auto - the default ABI associated with the current binary\n"
+ " o32\n"
+ " o64\n"
+ " n32\n"
+ " eabi32\n"
+ " eabi64",
+ &setmipscmdlist);
+ add_show_from_set (c, &showmipscmdlist);
+ set_cmd_sfunc (c, mips_abi_update);
+
/* Let the user turn off floating point and set the fence post for
heuristic_proc_start. */
@@ -5083,13 +5145,13 @@ search. The only need to set it is when debugging a stripped executable.",
/* Allow the user to control whether the upper bits of 64-bit
addresses should be zeroed. */
- c = add_set_auto_boolean_cmd ("mask-address", no_class, &mask_address_var,
- "Set zeroing of upper 32 bits of 64-bit addresses.\n\
-Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to allow GDB to determine\n\
-the correct value.\n",
- &setmipscmdlist);
- add_cmd ("mask-address", no_class, show_mask_address,
- "Show current mask-address value", &showmipscmdlist);
+ add_setshow_auto_boolean_cmd ("mask-address", no_class, &mask_address_var, "\
+Set zeroing of upper 32 bits of 64-bit addresses.\n\
+Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to \n\
+allow GDB to determine the correct value.\n", "\
+Show zeroing of upper 32 bits of 64-bit addresses.",
+ NULL, show_mask_address,
+ &setmipscmdlist, &showmipscmdlist);
/* Allow the user to control the size of 32 bit registers within the
raw remote packet. */
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 5d3da69c0b9..35301017701 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -89,7 +89,7 @@ register_name (int reg, char **regs, long sizeof_regs)
return regs[reg];
}
-static char *
+static const char *
mn10300_generic_register_name (int reg)
{
static char *regs[] =
@@ -102,7 +102,7 @@ mn10300_generic_register_name (int reg)
}
-static char *
+static const char *
am33_register_name (int reg)
{
static char *regs[] =
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 4e9f9608f91..ae81ebe4eb5 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -36,7 +36,7 @@ static CORE_ADDR ns32k_get_enter_addr (CORE_ADDR);
static int ns32k_localcount (CORE_ADDR enter_pc);
static void flip_bytes (void *, int);
-static char *
+static const char *
ns32k_register_name_32082 (int regno)
{
static char *register_names[] =
@@ -55,7 +55,7 @@ ns32k_register_name_32082 (int regno)
return (register_names[regno]);
}
-static char *
+static const char *
ns32k_register_name_32382 (int regno)
{
static char *register_names[] =
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 5da651272d1..11ed8c4f70d 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1,7 +1,6 @@
/* Cache and manage the values of registers for GDB, the GNU debugger.
-
- Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,361 +33,6 @@
* Here is the actual register cache.
*/
-/* Per-architecture object describing the layout of a register cache.
- Computed once when the architecture is created */
-
-struct gdbarch_data *regcache_data_handle;
-
-struct regcache_descr
-{
- /* The architecture this descriptor belongs to. */
- struct gdbarch *gdbarch;
-
- /* Is this a ``legacy'' register cache? Such caches reserve space
- for raw and pseudo registers and allow access to both. */
- int legacy_p;
-
- /* The raw register cache. This should contain just [0
- .. NUM_RAW_REGISTERS). However, for older targets, it contains
- space for the full [0 .. NUM_RAW_REGISTERS +
- NUM_PSEUDO_REGISTERS). */
- int nr_raw_registers;
- long sizeof_raw_registers;
- long sizeof_raw_register_valid_p;
-
- /* Offset, in bytes, of reach register in the raw register cache.
- Pseudo registers have an offset even though they don't
- (shouldn't) have a correspoinding space in the register cache.
- It is to keep existing code, that relies on
- write/write_register_bytes working. */
- long *register_offset;
-
- /* The cooked / frame / virtual register space. The registers in
- the range [0..NR_RAW_REGISTERS) should be mapped directly onto
- the corresponding raw register. The next [NR_RAW_REGISTERS
- .. NR_REGISTERS) should have been mapped, via
- gdbarch_register_read/write onto either raw registers or memory. */
- int nr_registers;
- long *sizeof_register;
- long max_register_size;
-
-};
-
-static void *
-init_legacy_regcache_descr (struct gdbarch *gdbarch)
-{
- int i;
- struct regcache_descr *descr;
- /* FIXME: cagney/2002-05-11: gdbarch_data() should take that
- ``gdbarch'' as a parameter. */
- gdb_assert (gdbarch != NULL);
-
- descr = XMALLOC (struct regcache_descr);
- descr->gdbarch = gdbarch;
- descr->legacy_p = 1;
-
- /* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
- in the register buffer. Unfortunatly some architectures do. */
- descr->nr_registers = NUM_REGS + NUM_PSEUDO_REGS;
- descr->nr_raw_registers = descr->nr_registers;
- descr->sizeof_raw_register_valid_p = descr->nr_registers;
-
- /* FIXME: cagney/2002-05-11: Instead of using REGISTER_BYTE() this
- code should compute the offets et.al. at runtime. This currently
- isn't possible because some targets overlap register locations -
- see the mess in read_register_bytes() and write_register_bytes()
- registers. */
- descr->sizeof_register = XCALLOC (descr->nr_registers, long);
- descr->register_offset = XCALLOC (descr->nr_registers, long);
- descr->max_register_size = 0;
- for (i = 0; i < descr->nr_registers; i++)
- {
- descr->register_offset[i] = REGISTER_BYTE (i);
- descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
- if (descr->max_register_size < REGISTER_RAW_SIZE (i))
- descr->max_register_size = REGISTER_RAW_SIZE (i);
- }
-
- /* Come up with the real size of the registers buffer. */
- descr->sizeof_raw_registers = REGISTER_BYTES; /* OK use. */
- for (i = 0; i < descr->nr_registers; i++)
- {
- long regend;
- /* Keep extending the buffer so that there is always enough
- space for all registers. The comparison is necessary since
- legacy code is free to put registers in random places in the
- buffer separated by holes. Once REGISTER_BYTE() is killed
- this can be greatly simplified. */
- /* FIXME: cagney/2001-12-04: This code shouldn't need to use
- REGISTER_BYTE(). Unfortunatly, legacy code likes to lay the
- buffer out so that certain registers just happen to overlap.
- Ulgh! New targets use gdbarch's register read/write and
- entirely avoid this uglyness. */
- regend = descr->register_offset[i] + descr->sizeof_register[i];
- if (descr->sizeof_raw_registers < regend)
- descr->sizeof_raw_registers = regend;
- }
- set_gdbarch_data (gdbarch, regcache_data_handle, descr);
- return descr;
-}
-
-static void *
-init_regcache_descr (struct gdbarch *gdbarch)
-{
- int i;
- struct regcache_descr *descr;
- gdb_assert (gdbarch != NULL);
-
- /* If an old style architecture, construct the register cache
- description using all the register macros. */
- if (!gdbarch_register_read_p (gdbarch)
- && !gdbarch_register_write_p (gdbarch))
- return init_legacy_regcache_descr (gdbarch);
-
- descr = XMALLOC (struct regcache_descr);
- descr->gdbarch = gdbarch;
- descr->legacy_p = 0;
-
- /* Total size of the register space. The raw registers should
- directly map onto the raw register cache while the pseudo's are
- either mapped onto raw-registers or memory. */
- descr->nr_registers = NUM_REGS + NUM_PSEUDO_REGS;
-
- /* Construct a strictly RAW register cache. Don't allow pseudo's
- into the register cache. */
- descr->nr_raw_registers = NUM_REGS;
- descr->sizeof_raw_register_valid_p = NUM_REGS;
-
- /* Lay out the register cache. The pseud-registers are included in
- the layout even though their value isn't stored in the register
- cache. Some code, via read_register_bytes() access a register
- using an offset/length rather than a register number.
-
- NOTE: cagney/2002-05-22: Only REGISTER_VIRTUAL_TYPE() needs to be
- used when constructing the register cache. It is assumed that
- register raw size, virtual size and type length of the type are
- all the same. */
-
- {
- long offset = 0;
- descr->sizeof_register = XCALLOC (descr->nr_registers, long);
- descr->register_offset = XCALLOC (descr->nr_registers, long);
- descr->max_register_size = 0;
- for (i = 0; i < descr->nr_registers; i++)
- {
- descr->sizeof_register[i] = TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (i));
- descr->register_offset[i] = offset;
- offset += descr->sizeof_register[i];
- if (descr->max_register_size < descr->sizeof_register[i])
- descr->max_register_size = descr->sizeof_register[i];
- }
- /* Set the real size of the register cache buffer. */
- /* FIXME: cagney/2002-05-22: Should only need to allocate space
- for the raw registers. Unfortunatly some code still accesses
- the register array directly using the global registers[].
- Until that code has been purged, play safe and over allocating
- the register buffer. Ulgh! */
- descr->sizeof_raw_registers = offset;
- /* = descr->register_offset[descr->nr_raw_registers]; */
- }
-
- set_gdbarch_data (gdbarch, regcache_data_handle, descr);
-
- /* Sanity check. Confirm that the assumptions about gdbarch are
- true. The REGCACHE_DATA_HANDLE is set before doing the checks so
- that targets using the generic methods supplied by regcache don't
- go into infinite recursion trying to, again, create the regcache. */
- for (i = 0; i < descr->nr_registers; i++)
- {
- gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i));
- gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
- gdb_assert (descr->register_offset[i] == REGISTER_BYTE (i));
- }
- /* gdb_assert (descr->sizeof_raw_registers == REGISTER_BYTES (i)); */
- return descr;
-}
-
-static struct regcache_descr *
-regcache_descr (struct gdbarch *gdbarch)
-{
- return gdbarch_data (gdbarch, regcache_data_handle);
-}
-
-static void
-xfree_regcache_descr (struct gdbarch *gdbarch, void *ptr)
-{
- struct regcache_descr *descr = ptr;
- if (descr == NULL)
- return;
- xfree (descr->register_offset);
- xfree (descr->sizeof_register);
- descr->register_offset = NULL;
- descr->sizeof_register = NULL;
- xfree (descr);
-}
-
-/* The register cache for storing raw register values. */
-
-struct regcache
-{
- struct regcache_descr *descr;
- char *raw_registers;
- char *raw_register_valid_p;
- /* If a value isn't in the cache should the corresponding target be
- queried for a value. */
- int passthrough_p;
-};
-
-struct regcache *
-regcache_xmalloc (struct gdbarch *gdbarch)
-{
- struct regcache_descr *descr;
- struct regcache *regcache;
- gdb_assert (gdbarch != NULL);
- descr = regcache_descr (gdbarch);
- regcache = XMALLOC (struct regcache);
- regcache->descr = descr;
- regcache->raw_registers
- = XCALLOC (descr->sizeof_raw_registers, char);
- regcache->raw_register_valid_p
- = XCALLOC (descr->sizeof_raw_register_valid_p, char);
- regcache->passthrough_p = 0;
- return regcache;
-}
-
-void
-regcache_xfree (struct regcache *regcache)
-{
- if (regcache == NULL)
- return;
- xfree (regcache->raw_registers);
- xfree (regcache->raw_register_valid_p);
- xfree (regcache);
-}
-
-void
-do_regcache_xfree (void *buf)
-{
- regcache_xfree (buf);
-}
-
-struct regcache *
-regcache_xmalloc_with_cleanup (struct gdbarch *gdbarch)
-{
- struct regcache *regcache = regcache_xmalloc (gdbarch);
- make_cleanup (do_regcache_xfree, regcache);
- return regcache;
-}
-
-void
-regcache_cpy (struct regcache *dst, struct regcache *src)
-{
- int i;
- char *buf;
- gdb_assert (src != NULL && dst != NULL);
- gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
- gdb_assert (src != dst);
- /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
- It keeps the existing code working where things rely on going
- through to the register cache. */
- if (src == current_regcache && src->descr->legacy_p)
- {
- /* ULGH!!!! Old way. Use REGISTER bytes and let code below
- untangle fetch. */
- read_register_bytes (0, dst->raw_registers, REGISTER_BYTES);
- return;
- }
- /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
- It keeps the existing code working where things rely on going
- through to the register cache. */
- if (dst == current_regcache && dst->descr->legacy_p)
- {
- /* ULGH!!!! Old way. Use REGISTER bytes and let code below
- untangle fetch. */
- write_register_bytes (0, src->raw_registers, REGISTER_BYTES);
- return;
- }
- buf = alloca (src->descr->max_register_size);
- for (i = 0; i < src->descr->nr_raw_registers; i++)
- {
- /* Should we worry about the valid bit here? */
- regcache_read (src, i, buf);
- regcache_write (dst, i, buf);
- }
-}
-
-void
-regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src)
-{
- int i;
- gdb_assert (src != NULL && dst != NULL);
- gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
- /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough
- move of data into the current_regcache(). Doing this would be
- silly - it would mean that valid_p would be completly invalid. */
- gdb_assert (dst != current_regcache);
- memcpy (dst->raw_registers, src->raw_registers,
- dst->descr->sizeof_raw_registers);
- memcpy (dst->raw_register_valid_p, src->raw_register_valid_p,
- dst->descr->sizeof_raw_register_valid_p);
-}
-
-struct regcache *
-regcache_dup (struct regcache *src)
-{
- struct regcache *newbuf;
- gdb_assert (current_regcache != NULL);
- newbuf = regcache_xmalloc (src->descr->gdbarch);
- regcache_cpy (newbuf, src);
- return newbuf;
-}
-
-struct regcache *
-regcache_dup_no_passthrough (struct regcache *src)
-{
- struct regcache *newbuf;
- gdb_assert (current_regcache != NULL);
- newbuf = regcache_xmalloc (src->descr->gdbarch);
- regcache_cpy_no_passthrough (newbuf, src);
- return newbuf;
-}
-
-int
-regcache_valid_p (struct regcache *regcache, int regnum)
-{
- gdb_assert (regcache != NULL);
- gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
- return regcache->raw_register_valid_p[regnum];
-}
-
-CORE_ADDR
-regcache_read_as_address (struct regcache *regcache, int regnum)
-{
- char *buf;
- gdb_assert (regcache != NULL);
- gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
- buf = alloca (regcache->descr->sizeof_register[regnum]);
- regcache_read (regcache, regnum, buf);
- return extract_address (buf, regcache->descr->sizeof_register[regnum]);
-}
-
-char *
-deprecated_grub_regcache_for_registers (struct regcache *regcache)
-{
- return regcache->raw_registers;
-}
-
-char *
-deprecated_grub_regcache_for_register_valid (struct regcache *regcache)
-{
- return regcache->raw_register_valid_p;
-}
-
-/* Global structure containing the current regcache. */
-/* FIXME: cagney/2002-05-11: The two global arrays registers[] and
- register_valid[] currently point into this structure. */
-struct regcache *current_regcache;
-
/* NOTE: this is a write-through cache. There is no "dirty" bit for
recording if the register values have been changed (eg. by the
user). Therefore all registers must be written back to the
@@ -453,9 +97,10 @@ register_changed (int regnum)
else return a pointer to the start of the cache buffer. */
static char *
-register_buffer (struct regcache *regcache, int regnum)
+register_buffer (int regnum)
{
- return regcache->raw_registers + regcache->descr->register_offset[regnum];
+ gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
+ return &registers[REGISTER_BYTE (regnum)];
}
/* Return whether register REGNUM is a real register. */
@@ -666,52 +311,22 @@ legacy_read_register_gen (int regnum, char *myaddr)
if (!register_cached (regnum))
fetch_register (regnum);
- memcpy (myaddr, register_buffer (current_regcache, regnum),
+ memcpy (myaddr, register_buffer (regnum),
REGISTER_RAW_SIZE (regnum));
}
void
-regcache_read (struct regcache *regcache, int regnum, char *buf)
+regcache_read (int rawnum, char *buf)
{
- gdb_assert (regcache != NULL && buf != NULL);
- gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
- if (regcache->descr->legacy_p
- && regcache->passthrough_p)
- {
- gdb_assert (regcache == current_regcache);
- /* For moment, just use underlying legacy code. Ulgh!!! This
- silently and very indirectly updates the regcache's regcache
- via the global register_valid[]. */
- legacy_read_register_gen (regnum, buf);
- return;
- }
- /* Make certain that the register cache is up-to-date with respect
- to the current thread. This switching shouldn't be necessary
- only there is still only one target side register cache. Sigh!
- On the bright side, at least there is a regcache object. */
- if (regcache->passthrough_p)
- {
- gdb_assert (regcache == current_regcache);
- if (! ptid_equal (registers_ptid, inferior_ptid))
- {
- registers_changed ();
- registers_ptid = inferior_ptid;
- }
- if (!register_cached (regnum))
- fetch_register (regnum);
- }
- /* Copy the value directly into the register cache. */
- memcpy (buf, (regcache->raw_registers
- + regcache->descr->register_offset[regnum]),
- regcache->descr->sizeof_register[regnum]);
+ gdb_assert (rawnum >= 0 && rawnum < (NUM_REGS + NUM_PSEUDO_REGS));
+ /* For moment, just use underlying legacy code. Ulgh!!! */
+ legacy_read_register_gen (rawnum, buf);
}
void
read_register_gen (int regnum, char *buf)
{
- gdb_assert (current_regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
- if (current_regcache->descr->legacy_p)
+ if (! gdbarch_register_read_p (current_gdbarch))
{
legacy_read_register_gen (regnum, buf);
return;
@@ -747,80 +362,30 @@ legacy_write_register_gen (int regnum, char *myaddr)
/* If we have a valid copy of the register, and new value == old
value, then don't bother doing the actual store. */
if (register_cached (regnum)
- && (memcmp (register_buffer (current_regcache, regnum), myaddr, size)
- == 0))
+ && memcmp (register_buffer (regnum), myaddr, size) == 0)
return;
else
target_prepare_to_store ();
}
- memcpy (register_buffer (current_regcache, regnum), myaddr, size);
+ memcpy (register_buffer (regnum), myaddr, size);
set_register_cached (regnum, 1);
store_register (regnum);
}
void
-regcache_write (struct regcache *regcache, int regnum, char *buf)
+regcache_write (int rawnum, char *buf)
{
- gdb_assert (regcache != NULL && buf != NULL);
- gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
-
- if (regcache->passthrough_p
- && regcache->descr->legacy_p)
- {
- /* For moment, just use underlying legacy code. Ulgh!!! This
- silently and very indirectly updates the regcache's buffers
- via the globals register_valid[] and registers[]. */
- gdb_assert (regcache == current_regcache);
- legacy_write_register_gen (regnum, buf);
- return;
- }
-
- /* On the sparc, writing %g0 is a no-op, so we don't even want to
- change the registers array if something writes to this register. */
- if (CANNOT_STORE_REGISTER (regnum))
- return;
-
- /* Handle the simple case first -> not write through so just store
- value in cache. */
- if (!regcache->passthrough_p)
- {
- memcpy ((regcache->raw_registers
- + regcache->descr->register_offset[regnum]), buf,
- regcache->descr->sizeof_register[regnum]);
- regcache->raw_register_valid_p[regnum] = 1;
- return;
- }
-
- /* Make certain that the correct cache is selected. */
- gdb_assert (regcache == current_regcache);
- if (! ptid_equal (registers_ptid, inferior_ptid))
- {
- registers_changed ();
- registers_ptid = inferior_ptid;
- }
-
- /* If we have a valid copy of the register, and new value == old
- value, then don't bother doing the actual store. */
- if (regcache_valid_p (regcache, regnum)
- && (memcmp (register_buffer (regcache, regnum), buf,
- regcache->descr->sizeof_register[regnum]) == 0))
- return;
-
- target_prepare_to_store ();
- memcpy (register_buffer (regcache, regnum), buf,
- regcache->descr->sizeof_register[regnum]);
- regcache->raw_register_valid_p[regnum] = 1;
- store_register (regnum);
+ gdb_assert (rawnum >= 0 && rawnum < (NUM_REGS + NUM_PSEUDO_REGS));
+ /* For moment, just use underlying legacy code. Ulgh!!! */
+ legacy_write_register_gen (rawnum, buf);
}
void
write_register_gen (int regnum, char *buf)
{
- gdb_assert (current_regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
- if (current_regcache->descr->legacy_p)
+ if (! gdbarch_register_write_p (current_gdbarch))
{
legacy_write_register_gen (regnum, buf);
return;
@@ -999,10 +564,10 @@ supply_register (int regnum, char *val)
set_register_cached (regnum, 1);
if (val)
- memcpy (register_buffer (current_regcache, regnum), val,
+ memcpy (register_buffer (regnum), val,
REGISTER_RAW_SIZE (regnum));
else
- memset (register_buffer (current_regcache, regnum), '\000',
+ memset (register_buffer (regnum), '\000',
REGISTER_RAW_SIZE (regnum));
/* On some architectures, e.g. HPPA, there are a few stray bits in
@@ -1022,8 +587,7 @@ supply_register (int regnum, char *val)
void
regcache_collect (int regnum, void *buf)
{
- memcpy (buf, register_buffer (current_regcache, regnum),
- REGISTER_RAW_SIZE (regnum));
+ memcpy (buf, register_buffer (regnum), REGISTER_RAW_SIZE (regnum));
}
@@ -1191,53 +755,37 @@ reg_flush_command (char *command, int from_tty)
static void
build_regcache (void)
{
- current_regcache = regcache_xmalloc (current_gdbarch);
- current_regcache->passthrough_p = 1;
- registers = deprecated_grub_regcache_for_registers (current_regcache);
- register_valid = deprecated_grub_regcache_for_register_valid (current_regcache);
-}
-
-void
-regcache_save (struct regcache *regcache)
-{
- int i;
- gdb_assert (current_regcache != NULL && regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == regcache->descr->gdbarch);
- regcache_cpy (regcache, current_regcache);
-}
-
-void
-regcache_save_no_passthrough (struct regcache *regcache)
-{
- gdb_assert (current_regcache != NULL && regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == regcache->descr->gdbarch);
- regcache_cpy_no_passthrough (regcache, current_regcache);
-}
-
-void
-regcache_restore (struct regcache *regcache)
-{
int i;
- gdb_assert (current_regcache != NULL && regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == regcache->descr->gdbarch);
- regcache_cpy (current_regcache, regcache);
-}
-
-void
-regcache_restore_no_passthrough (struct regcache *regcache)
-{
- char *regcache_registers;
- gdb_assert (current_regcache != NULL && regcache != NULL);
- gdb_assert (current_regcache->descr->gdbarch == regcache->descr->gdbarch);
- regcache_cpy_no_passthrough (current_regcache, regcache);
+ int sizeof_register_valid;
+ /* Come up with the real size of the registers buffer. */
+ int sizeof_registers = REGISTER_BYTES; /* OK use. */
+ for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+ {
+ long regend;
+ /* Keep extending the buffer so that there is always enough
+ space for all registers. The comparison is necessary since
+ legacy code is free to put registers in random places in the
+ buffer separated by holes. Once REGISTER_BYTE() is killed
+ this can be greatly simplified. */
+ /* FIXME: cagney/2001-12-04: This code shouldn't need to use
+ REGISTER_BYTE(). Unfortunatly, legacy code likes to lay the
+ buffer out so that certain registers just happen to overlap.
+ Ulgh! New targets use gdbarch's register read/write and
+ entirely avoid this uglyness. */
+ regend = REGISTER_BYTE (i) + REGISTER_RAW_SIZE (i);
+ if (sizeof_registers < regend)
+ sizeof_registers = regend;
+ }
+ registers = xmalloc (sizeof_registers);
+ sizeof_register_valid = ((NUM_REGS + NUM_PSEUDO_REGS)
+ * sizeof (*register_valid));
+ register_valid = xmalloc (sizeof_register_valid);
+ memset (register_valid, 0, sizeof_register_valid);
}
void
_initialize_regcache (void)
{
- regcache_data_handle = register_gdbarch_data (init_regcache_descr,
- xfree_regcache_descr);
- REGISTER_GDBARCH_SWAP (current_regcache);
register_gdbarch_swap (&registers, sizeof (registers), NULL);
register_gdbarch_swap (&register_valid, sizeof (register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 17e01386fe8..4e854d31667 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -1,7 +1,6 @@
/* Cache and manage the values of registers for GDB, the GNU debugger.
-
- Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,20 +22,11 @@
#ifndef REGCACHE_H
#define REGCACHE_H
-struct regcache;
-
-extern struct regcache *current_regcache;
-
-void regcache_xfree (struct regcache *regcache);
-struct regcache *regcache_xmalloc (struct gdbarch *gdbarch);
-
/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
regcache. */
-void regcache_read (struct regcache *regcache, int rawnum, char *buf);
-void regcache_write (struct regcache *regcache, int rawnum, char *buf);
-int regcache_valid_p (struct regcache *regcache, int regnum);
-CORE_ADDR regcache_read_as_address (struct regcache *regcache, int rawnum);
+void regcache_read (int rawnum, char *buf);
+void regcache_write (int rawnum, char *buf);
/* Transfer a raw register [0..NUM_REGS) between the regcache and the
target. These functions are called by the target in response to a
@@ -57,25 +47,6 @@ extern char *registers;
extern signed char *register_valid;
-/* Save/restore the register cache using the regbuf. The operation is
- write through - it is strictly for code that needs to restore the
- target's registers to a previous state.
-
- ``no passthrough'' versions do not go through to the target. They
- only save values already in the cache. */
-
-extern void regcache_save (struct regcache *regcache);
-extern void regcache_restore (struct regcache *regcache);
-extern struct regcache *regcache_dup (struct regcache *regcache);
-extern void regcache_save_no_passthrough (struct regcache *regcache);
-extern void regcache_restore_no_passthrough (struct regcache *regcache);
-extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
-extern void regcache_cpy (struct regcache *dest, struct regcache *src);
-extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
-
-extern char *deprecated_grub_regcache_for_registers (struct regcache *);
-extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
-
extern int register_cached (int regnum);
extern void set_register_cached (int regnum, int state);
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 5243f9bd28f..228e3d98c37 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -1041,24 +1041,24 @@ _initialize_remote_rdi (void)
"Withough an argument, it will display current state.\n",
&maintenancelist);
- add_show_from_set
- (add_set_boolean_cmd
- ("rdiromatzero", no_class, &rom_at_zero,
- "Set target has ROM at addr 0.\n"
- "A true value disables vector catching, false enables vector catching.\n"
- "This is evaluated at the time the 'target rdi' command is executed\n",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_boolean_cmd
- ("rdiheartbeat", no_class, &rdi_heartbeat,
- "Set enable for ADP heartbeat packets.\n"
- "I don't know why you would want this. If you enable them,\n"
- "it will confuse ARM and EPI JTAG interface boxes as well\n"
- "as the Angel Monitor.\n",
- &setlist),
- &showlist);
+ add_setshow_boolean_cmd
+ ("rdiromatzero", no_class, &rom_at_zero,
+ "Set target has ROM at addr 0.\n"
+ "A true value disables vector catching, false enables vector catching.\n"
+ "This is evaluated at the time the 'target rdi' command is executed\n",
+ "Show if target has ROM at addr 0.\n",
+ NULL, NULL,
+ &setlist, &showlist);
+
+ add_setshow_boolean_cmd
+ ("rdiheartbeat", no_class, &rdi_heartbeat,
+ "Set enable for ADP heartbeat packets.\n"
+ "I don't know why you would want this. If you enable them,\n"
+ "it will confuse ARM and EPI JTAG interface boxes as well\n"
+ "as the Angel Monitor.\n",
+ "Show enable for ADP heartbeat packets.\n",
+ NULL, NULL,
+ &setlist, &showlist);
}
/* A little dummy to make linking with the library succeed. */
diff --git a/gdb/remote.c b/gdb/remote.c
index a1b90b7a5a4..8231a574ff9 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -583,7 +583,7 @@ struct packet_config
{
char *name;
char *title;
- enum cmd_auto_boolean detect;
+ enum auto_boolean detect;
enum packet_support support;
};
@@ -602,13 +602,13 @@ update_packet_config (struct packet_config *config)
{
switch (config->detect)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
config->support = PACKET_ENABLE;
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
config->support = PACKET_DISABLE;
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
config->support = PACKET_SUPPORT_UNKNOWN;
break;
}
@@ -632,12 +632,12 @@ show_packet_config_cmd (struct packet_config *config)
}
switch (config->detect)
{
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
printf_filtered ("Support for remote protocol `%s' (%s) packet is auto-detected, currently %s.\n",
config->name, config->title, support);
break;
- case CMD_AUTO_BOOLEAN_TRUE:
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_FALSE:
printf_filtered ("Support for remote protocol `%s' (%s) packet is currently %s.\n",
config->name, config->title, support);
break;
@@ -648,11 +648,8 @@ static void
add_packet_config_cmd (struct packet_config *config,
char *name,
char *title,
- void (*set_func) (char *args, int from_tty,
- struct cmd_list_element *
- c),
- void (*show_func) (char *name,
- int from_tty),
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_remote_list,
struct cmd_list_element **show_remote_list,
int legacy)
@@ -664,7 +661,7 @@ add_packet_config_cmd (struct packet_config *config,
char *cmd_name;
config->name = name;
config->title = title;
- config->detect = CMD_AUTO_BOOLEAN_AUTO;
+ config->detect = AUTO_BOOLEAN_AUTO;
config->support = PACKET_SUPPORT_UNKNOWN;
xasprintf (&set_doc, "Set use of remote protocol `%s' (%s) packet",
name, title);
@@ -672,12 +669,10 @@ add_packet_config_cmd (struct packet_config *config,
name, title);
/* set/show TITLE-packet {auto,on,off} */
xasprintf (&cmd_name, "%s-packet", title);
- set_cmd = add_set_auto_boolean_cmd (cmd_name, class_obscure,
- &config->detect, set_doc,
- set_remote_list);
- set_cmd_sfunc (set_cmd, set_func);
- show_cmd = add_cmd (cmd_name, class_obscure, show_func, show_doc,
- show_remote_list);
+ add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
+ &config->detect, set_doc, show_doc,
+ set_func, show_func,
+ set_remote_list, show_remote_list);
/* set/show remote NAME-packet {auto,on,off} -- legacy */
if (legacy)
{
@@ -730,7 +725,7 @@ packet_ok (const char *buf, struct packet_config *config)
switch (config->support)
{
case PACKET_ENABLE:
- if (config->detect == CMD_AUTO_BOOLEAN_AUTO)
+ if (config->detect == AUTO_BOOLEAN_AUTO)
/* If the stub previously indicated that the packet was
supported then there is a protocol error.. */
error ("Protocol error: %s (%s) conflicting enabled responses.",
@@ -765,7 +760,8 @@ set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty)
+show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_qSymbol);
}
@@ -781,7 +777,8 @@ set_remote_protocol_e_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_e_packet_cmd (char *args, int from_tty)
+show_remote_protocol_e_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_e);
}
@@ -798,7 +795,8 @@ set_remote_protocol_E_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_E_packet_cmd (char *args, int from_tty)
+show_remote_protocol_E_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_E);
}
@@ -816,7 +814,8 @@ set_remote_protocol_P_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_P_packet_cmd (char *args, int from_tty)
+show_remote_protocol_P_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_P);
}
@@ -846,7 +845,8 @@ set_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
}
@@ -859,7 +859,8 @@ set_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
}
@@ -872,7 +873,8 @@ set_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
}
@@ -885,7 +887,8 @@ set_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
}
@@ -898,7 +901,8 @@ set_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
}
@@ -906,7 +910,7 @@ show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty)
/* For compatibility with older distributions. Provide a ``set remote
Z-packet ...'' command that updates all the Z packet types. */
-static enum cmd_auto_boolean remote_Z_packet_detect;
+static enum auto_boolean remote_Z_packet_detect;
static void
set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
@@ -921,7 +925,8 @@ set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
int i;
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
@@ -962,8 +967,8 @@ set_remote_protocol_binary_download_cmd (char *args,
}
static void
-show_remote_protocol_binary_download_cmd (char *args,
- int from_tty)
+show_remote_protocol_binary_download_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_binary_download);
}
@@ -5968,13 +5973,14 @@ set_remote_cmd (char *args, int from_tty)
static void
show_remote_cmd (char *args, int from_tty)
{
-
- show_remote_protocol_Z_packet_cmd (args, from_tty);
- show_remote_protocol_e_packet_cmd (args, from_tty);
- show_remote_protocol_E_packet_cmd (args, from_tty);
- show_remote_protocol_P_packet_cmd (args, from_tty);
- show_remote_protocol_qSymbol_packet_cmd (args, from_tty);
- show_remote_protocol_binary_download_cmd (args, from_tty);
+ /* FIXME: cagney/2002-06-15: This function should iterate over
+ remote_show_cmdlist for a list of sub commands to show. */
+ show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_e_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_E_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
}
static void
@@ -6069,11 +6075,11 @@ response packet. GDB supplies the initial `$' character, and the\n\
terminating `#' character and checksum.",
&maintenancelist);
- add_show_from_set
- (add_set_boolean_cmd ("remotebreak", no_class, &remote_break,
- "Set whether to send break if interrupted.\n",
- &setlist),
- &showlist);
+ add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break,
+ "Set whether to send break if interrupted.\n",
+ "Show whether to send break if interrupted.\n",
+ NULL, NULL,
+ &setlist, &showlist);
/* Install commands for configuring memory read/write packets. */
@@ -6150,7 +6156,7 @@ in a memory packet.\n",
0);
/* Disable by default. The ``e'' packet has nasty interactions with
the threading code - it relies on global state. */
- remote_protocol_e.detect = CMD_AUTO_BOOLEAN_FALSE;
+ remote_protocol_e.detect = AUTO_BOOLEAN_FALSE;
update_packet_config (&remote_protocol_e);
add_packet_config_cmd (&remote_protocol_E,
@@ -6161,7 +6167,7 @@ in a memory packet.\n",
0);
/* Disable by default. The ``e'' packet has nasty interactions with
the threading code - it relies on global state. */
- remote_protocol_E.detect = CMD_AUTO_BOOLEAN_FALSE;
+ remote_protocol_E.detect = AUTO_BOOLEAN_FALSE;
update_packet_config (&remote_protocol_E);
add_packet_config_cmd (&remote_protocol_P,
@@ -6207,12 +6213,11 @@ in a memory packet.\n",
0);
/* Keep the old ``set remote Z-packet ...'' working. */
- tmpcmd = add_set_auto_boolean_cmd ("Z-packet", class_obscure,
- &remote_Z_packet_detect,
- "\
-Set use of remote protocol `Z' packets", &remote_set_cmdlist);
- set_cmd_sfunc (tmpcmd, set_remote_protocol_Z_packet_cmd);
- add_cmd ("Z-packet", class_obscure, show_remote_protocol_Z_packet_cmd,
- "Show use of remote protocol `Z' packets ",
- &remote_show_cmdlist);
+ add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
+ &remote_Z_packet_detect, "\
+Set use of remote protocol `Z' packets",
+ "Show use of remote protocol `Z' packets ",
+ set_remote_protocol_Z_packet_cmd,
+ show_remote_protocol_Z_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
}
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index db38203b5e0..5a09361a53e 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1579,7 +1579,7 @@ regsize (const struct reg *reg, int wordsize)
/* Return the name of register number N, or null if no such register exists
in the current architecture. */
-static char *
+static const char *
rs6000_register_name (int n)
{
struct gdbarch_tdep *tdep = TDEP;
@@ -2624,7 +2624,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
- set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value);
/* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
is correct for the SysV ABI when the wordsize is 8, but I'm also
@@ -2640,7 +2640,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 8add4952f19..cb3b81de05a 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -150,7 +150,7 @@ s390_memset_extra_info (struct frame_extra_info *fextra_info)
-char *
+const char *
s390_register_name (int reg_nr)
{
static char *register_names[] = {
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 375b55a6b66..2ef89faadf1 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -68,7 +68,7 @@ struct frame_extra_info
int f_offset;
};
-static char *
+static const char *
sh_generic_register_name (int reg_nr)
{
static char *register_names[] =
@@ -90,7 +90,7 @@ sh_generic_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh_register_name (int reg_nr)
{
static char *register_names[] =
@@ -112,7 +112,7 @@ sh_sh_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3_register_name (int reg_nr)
{
static char *register_names[] =
@@ -134,7 +134,7 @@ sh_sh3_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3e_register_name (int reg_nr)
{
static char *register_names[] =
@@ -156,7 +156,7 @@ sh_sh3e_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh_dsp_register_name (int reg_nr)
{
static char *register_names[] =
@@ -178,7 +178,7 @@ sh_sh_dsp_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3_dsp_register_name (int reg_nr)
{
static char *register_names[] =
@@ -201,7 +201,7 @@ sh_sh3_dsp_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh4_register_name (int reg_nr)
{
static char *register_names[] =
@@ -236,7 +236,7 @@ sh_sh4_register_name (int reg_nr)
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh64_register_name (int reg_nr)
{
static char *register_names[] =
@@ -3385,9 +3385,9 @@ sh_pseudo_register_read (int reg_nr, char *buffer)
/* Build the value in the provided buffer. */
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_read (base_regnum + portion,
- temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh4_register_convert_to_virtual (reg_nr,
REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3400,7 +3400,7 @@ sh_pseudo_register_read (int reg_nr, char *buffer)
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_read (base_regnum + portion,
+ regcache_read (current_regcache, base_regnum + portion,
buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
}
@@ -3410,7 +3410,7 @@ sh4_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_read (reg_nr, buffer);
+ regcache_read (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh_pseudo_register_read (reg_nr, buffer);
@@ -3434,9 +3434,9 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* DR regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (base_regnum + portion,
- temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3453,8 +3453,8 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* FPP regs are pairs of single precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
else if (reg_nr >= tdep->FV0_REGNUM
@@ -3466,8 +3466,8 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* FV regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
@@ -3477,7 +3477,7 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
base_regnum = sh64_compact_reg_base_num (reg_nr);
/* Build the value in the provided buffer. */
- regcache_read (base_regnum, temp_buffer);
+ regcache_read (current_regcache, base_regnum, temp_buffer);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = 4;
memcpy (buffer, temp_buffer + offset, 4); /* get LOWER 32 bits only????*/
@@ -3491,7 +3491,7 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* Build the value in the provided buffer. */
/* Floating point registers map 1-1 to the media fp regs,
they have the same size and endienness. */
- regcache_read (base_regnum, buffer);
+ regcache_read (current_regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
@@ -3502,9 +3502,9 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* DR_C regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (base_regnum + portion,
- temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3520,8 +3520,8 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* FV_C regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_read (current_regcache, base_regnum + portion,
+ buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
else if (reg_nr == tdep->FPSCR_C_REGNUM)
@@ -3552,11 +3552,11 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
*/
/* *INDENT-ON* */
/* Get FPSCR into a local buffer */
- regcache_read (fpscr_base_regnum, temp_buffer);
+ regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
/* Get value as an int. */
fpscr_value = extract_unsigned_integer (temp_buffer, 4);
/* Get SR into a local buffer */
- regcache_read (sr_base_regnum, temp_buffer);
+ regcache_read (current_regcache, sr_base_regnum, temp_buffer);
/* Get value as an int. */
sr_value = extract_unsigned_integer (temp_buffer, 4);
/* Build the new value. */
@@ -3574,7 +3574,7 @@ sh64_pseudo_register_read (int reg_nr, char *buffer)
/* FPUL_C register is floating point register 32,
same size, same endianness. */
- regcache_read (base_regnum, buffer);
+ regcache_read (current_regcache, base_regnum, buffer);
}
}
@@ -3584,7 +3584,7 @@ sh64_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_read (reg_nr, buffer);
+ regcache_read (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh64_pseudo_register_read (reg_nr, buffer);
@@ -3608,8 +3608,9 @@ sh_pseudo_register_write (int reg_nr, char *buffer)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (base_regnum + portion,
- temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
&& reg_nr <= tdep->FV_LAST_REGNUM)
@@ -3618,7 +3619,7 @@ sh_pseudo_register_write (int reg_nr, char *buffer)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (base_regnum + portion,
+ regcache_write (current_regcache, base_regnum + portion,
buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
}
@@ -3628,7 +3629,7 @@ sh4_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_write (reg_nr, buffer);
+ regcache_write (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh_pseudo_register_write (reg_nr, buffer);
@@ -3653,8 +3654,9 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (base_regnum + portion,
- temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FPP0_REGNUM
@@ -3664,7 +3666,7 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (base_regnum + portion,
+ regcache_write (current_regcache, base_regnum + portion,
buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
@@ -3675,7 +3677,7 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (base_regnum + portion,
+ regcache_write (current_regcache, base_regnum + portion,
buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
@@ -3693,10 +3695,10 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
/* Let's read the value of the base register into a temporary
buffer, so that overwriting the last four bytes with the new
value of the pseudo will leave the upper 4 bytes unchanged. */
- regcache_read (base_regnum, temp_buffer);
+ regcache_read (current_regcache, base_regnum, temp_buffer);
/* Write as an 8 byte quantity */
memcpy (temp_buffer + offset, buffer, 4);
- regcache_write (base_regnum, temp_buffer);
+ regcache_write (current_regcache, base_regnum, temp_buffer);
}
/* sh floating point compact pseudo registers. 1-to-1 with a shmedia
@@ -3705,7 +3707,7 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
&& reg_nr <= tdep->FP_LAST_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (base_regnum, buffer);
+ regcache_write (current_regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
@@ -3718,8 +3720,9 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
buffer, temp_buffer);
- regcache_write (base_regnum + portion,
- temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
@@ -3730,7 +3733,7 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
for (portion = 0; portion < 4; portion++)
{
- regcache_write (base_regnum + portion,
+ regcache_write (current_regcache, base_regnum + portion,
buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
}
@@ -3773,25 +3776,25 @@ sh64_pseudo_register_write (int reg_nr, char *buffer)
fpscr_value = fpscr_c_value & fpscr_mask;
sr_value = (fpscr_value & sr_mask) >> 6;
- regcache_read (fpscr_base_regnum, temp_buffer);
+ regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
old_fpscr_value = extract_unsigned_integer (temp_buffer, 4);
old_fpscr_value &= 0xfffc0002;
fpscr_value |= old_fpscr_value;
store_unsigned_integer (temp_buffer, 4, fpscr_value);
- regcache_write (fpscr_base_regnum, temp_buffer);
+ regcache_write (current_regcache, fpscr_base_regnum, temp_buffer);
- regcache_read (sr_base_regnum, temp_buffer);
+ regcache_read (current_regcache, sr_base_regnum, temp_buffer);
old_sr_value = extract_unsigned_integer (temp_buffer, 4);
old_sr_value &= 0xffff8fff;
sr_value |= old_sr_value;
store_unsigned_integer (temp_buffer, 4, sr_value);
- regcache_write (sr_base_regnum, temp_buffer);
+ regcache_write (current_regcache, sr_base_regnum, temp_buffer);
}
else if (reg_nr == tdep->FPUL_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (base_regnum, buffer);
+ regcache_write (current_regcache, base_regnum, buffer);
}
}
@@ -3800,7 +3803,7 @@ sh64_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_write (reg_nr, buffer);
+ regcache_write (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh64_pseudo_register_write (reg_nr, buffer);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 6ad95c48dc8..2ca35b1910c 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -2551,7 +2551,7 @@ sparc_print_extra_frame_info (struct frame_info *fi)
/* MULTI_ARCH support */
-static char *
+static const char *
sparc32_register_name (int regno)
{
static char *register_names[] =
@@ -2575,7 +2575,7 @@ sparc32_register_name (int regno)
return register_names[regno];
}
-static char *
+static const char *
sparc64_register_name (int regno)
{
static char *register_names[] =
@@ -2607,7 +2607,7 @@ sparc64_register_name (int regno)
return register_names[regno];
}
-static char *
+static const char *
sparclite_register_name (int regno)
{
static char *register_names[] =
@@ -2632,7 +2632,7 @@ sparclite_register_name (int regno)
return register_names[regno];
}
-static char *
+static const char *
sparclet_register_name (int regno)
{
static char *register_names[] =
diff --git a/gdb/target.c b/gdb/target.c
index 2cd492809f4..69f034513e4 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2299,16 +2299,15 @@ initialize_targets (void)
When non-zero, target debugging is enabled.", &setdebuglist),
&showdebuglist);
- add_show_from_set
- (add_set_boolean_cmd
- ("trust-readonly-sections", class_support,
- &trust_readonly,
- "Set mode for reading from readonly sections.\n\
+ add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
+ &trust_readonly, "\
+Set mode for reading from readonly sections.\n\
When this mode is on, memory reads from readonly sections (such as .text)\n\
will be read from the object file instead of from the target. This will\n\
-result in significant performance improvement for remote targets.",
- &setlist),
- &showlist);
+result in significant performance improvement for remote targets.", "\
+Set mode for reading from readonly sections.\n",
+ NULL, NULL,
+ &setlist, &showlist);
add_com ("monitor", class_obscure, do_monitor_command,
"Send a command to the remote monitor (remote targets only).");
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index dc3bc6ba9e0..c4f6bd908b5 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -205,7 +205,7 @@ static CORE_ADDR v850_scan_prologue (CORE_ADDR pc, struct prologue_info *fs);
/* Function: v850_register_name
Returns the name of the v850/v850e register N. */
-static char *
+static const char *
v850_register_name (int regnum)
{
if (regnum < 0 || regnum >= E_NUM_REGS)
diff --git a/gdb/valops.c b/gdb/valops.c
index 691c1c4461f..22c744d7608 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -961,9 +961,9 @@ value_ind (struct value *arg1)
to do. "long long" variables are rare enough that
BUILTIN_TYPE_LONGEST would seem to be a mistake. */
if (TYPE_CODE (base_type) == TYPE_CODE_INT)
- return value_at (builtin_type_int,
- (CORE_ADDR) value_as_long (arg1),
- VALUE_BFD_SECTION (arg1));
+ return value_at_lazy (builtin_type_int,
+ (CORE_ADDR) value_as_long (arg1),
+ VALUE_BFD_SECTION (arg1));
else if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
{
struct type *enc_type;
diff --git a/gdb/values.c b/gdb/values.c
index 69e1dfa5ac2..a72b7fa3ccd 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1231,6 +1231,7 @@ value_being_returned (struct type *valtype, struct regcache *retbuf,
struct value *val;
CORE_ADDR addr;
+#if 0
/* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
if (struct_return)
@@ -1240,6 +1241,17 @@ value_being_returned (struct type *valtype, struct regcache *retbuf,
error ("Function return value unknown.");
return value_at (valtype, addr, NULL);
}
+#endif
+
+ /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
+ if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+ if (struct_return)
+ {
+ addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (retbuf);
+ if (!addr)
+ error ("Function return value unknown.");
+ return value_at (valtype, addr, NULL);
+ }
/* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
@@ -1254,6 +1266,7 @@ value_being_returned (struct type *valtype, struct regcache *retbuf,
val = allocate_value (valtype);
CHECK_TYPEDEF (valtype);
+#define EXTRACT_RETURN_VALUE DEPRECATED_EXTRACT_RETURN_VALUE
EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
return val;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 9ae145e2170..09b5a7cb888 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1210,7 +1210,7 @@ create_child (struct varobj *parent, int index, char *name)
child->name = name;
child->index = index;
child->value = value_of_child (parent, index);
- if ((!CPLUS_FAKE_CHILD(child) && child->value == NULL) || parent->error)
+ if ((!CPLUS_FAKE_CHILD (child) && child->value == NULL) || parent->error)
child->error = 1;
child->parent = parent;
child->root = parent->root;
@@ -1645,8 +1645,8 @@ value_of_child (struct varobj *parent, int index)
if (value != NULL && VALUE_LAZY (value))
{
/* If we fail to fetch the value of the child, return
- NULL so that callers notice that we're leaving an
- error message. */
+ NULL so that callers notice that we're leaving an
+ error message. */
if (!gdb_value_fetch_lazy (value))
value = NULL;
}
@@ -1929,7 +1929,8 @@ c_value_of_child (struct varobj *parent, int index)
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+ "vstructure");
break;
case TYPE_CODE_PTR:
@@ -1937,7 +1938,8 @@ c_value_of_child (struct varobj *parent, int index)
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+ "vstructure");
break;
default:
@@ -2062,9 +2064,10 @@ c_value_of_variable (struct varobj *var)
{
if (VALUE_LAZY (var->value))
gdb_value_fetch_lazy (var->value);
- val_print (VALUE_TYPE (var->value), VALUE_CONTENTS_RAW (var->value), 0,
- VALUE_ADDRESS (var->value),
- stb, format_code[(int) var->format], 1, 0, 0);
+ val_print (VALUE_TYPE (var->value),
+ VALUE_CONTENTS_RAW (var->value), 0,
+ VALUE_ADDRESS (var->value), stb,
+ format_code[(int) var->format], 1, 0, 0);
thevalue = ui_file_xstrdup (stb, &dummy);
do_cleanups (old_chain);
}
@@ -2200,7 +2203,8 @@ cplus_name_of_child (struct varobj *parent, int index)
/* FIXME: This assumes that type orders
inherited, public, private, protected */
i = index + TYPE_N_BASECLASSES (type);
- if (STREQ (parent->name, "private") || STREQ (parent->name, "protected"))
+ if (STREQ (parent->name, "private")
+ || STREQ (parent->name, "protected"))
i += children[v_public];
if (STREQ (parent->name, "protected"))
i += children[v_private];
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 2e82d927e10..a723a6d0306 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -83,7 +83,7 @@ static gdbarch_fix_call_dummy_ftype vax_fix_call_dummy;
static unsigned char *print_insn_arg ();
-static char *
+static const char *
vax_register_name (int regno)
{
static char *register_names[] =
diff --git a/gdb/version.in b/gdb/version.in
index ff62cb84c8f..d89eb22266c 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-06-15-cvs
+2002-06-20-cvs
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 9be59718918..8e283b861ea 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -97,7 +97,7 @@ enum
/* Function: xstormy16_register_name
Returns the name of the standard Xstormy16 register N. */
-static char *
+static const char *
xstormy16_register_name (int regnum)
{
static char *register_names[] = {
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 916995e5b12..06cb89f4b0e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-17 Douglas Rupp <rupp@gnat.com>
+
+ * lbasename.c: Add 2002 to copyright.
+ (IS_DIR_SEPARATOR): Remove VMS junk.
+
2002-06-05 Geoffrey Keating <geoffk@redhat.com>
* hashtab.c (htab_create): New stub function for backward
diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c
index cea0253887b..43cb73f0a1d 100644
--- a/libiberty/lbasename.c
+++ b/libiberty/lbasename.c
@@ -1,6 +1,6 @@
/* Libiberty basename. Like basename, but is not overridden by the
system C library.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -53,19 +53,11 @@ and a path ending in @code{/} returns the empty string after it.
# endif
#endif
-/* Define IS_DIR_SEPARATOR. VMS uses '::', ':', '[...]' and '<...>' to
- separate the different components of a file specification. It's a
- bit of a stretch to call ':', ']' and '>' directory separators, so
- just define the test to find the file name component. */
-#ifdef VMS
-# define IS_DIR_SEPARATOR(ch) ((ch) == ':' || (ch) == ']' || (ch) == '>')
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
#else
-# ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-# else
-# define IS_DIR_SEPARATOR(ch) \
+# define IS_DIR_SEPARATOR(ch) \
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-# endif
#endif
const char *