[PATCH] gdbarch cleanups part 1
Andrew Cagney
ac131313@cygnus.com
Wed Mar 29 21:32:00 GMT 2000
FYI,
I committed the attatched cleanups.
Andrew
Thu Mar 30 12:09:50 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdbarch.h, gdbarch.c: Re-indent. Remove FIXMEs.
* gdbarch.sh: Re-sync with gdbarch.[hc].
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.5
diff -p -r1.5 gdbarch.sh
*** gdbarch.sh 2000/03/21 20:40:43 1.5
--- gdbarch.sh 2000/03/30 05:31:15
***************
*** 1,7 ****
#!/usr/local/bin/bash
# Architecture commands for GDB, the GNU debugger.
! # Copyright 1998-1999 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
--- 1,7 ----
#!/usr/local/bin/bash
# Architecture commands for GDB, the GNU debugger.
! # Copyright 1998-2000 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
***************
*** 19,24 ****
--- 19,40 ----
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ compare_new ()
+ {
+ file=$1
+ if ! test -r ${file}
+ then
+ echo "${file} missing? cp new-${file} ${file}" 1>&2
+ elif diff -c ${file} new-${file}
+ then
+ echo "${file} unchanged" 1>&2
+ else
+ echo "${file} has changed? cp new-${file} ${file}" 1>&2
+ fi
+ }
+
+
+ # Format of the input table
read="class level macro returntype function formal actual attrib default init invalid_p fmt print print_p description"
# dump out/verify the doco
*************** fi
*** 259,264 ****
--- 275,282 ----
copyright ()
{
cat <<EOF
+ /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
+
/* Dynamic architecture support for GDB, the GNU debugger.
Copyright 1998-1999, Free Software Foundation, Inc.
*************** cat <<EOF
*** 279,286 ****
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
- /* *INDENT-OFF* */ /* \`\`typedef (f)();'' confuses indent */
-
/* This file was created with the aid of \`\`gdbarch.sh''.
The bourn shell script \`\`gdbarch.sh'' creates the files
--- 297,302 ----
*************** extern void gdbarch_dump (void);
*** 742,756 ****
EOF
exec 1>&2
#../move-if-change new-gdbarch.h gdbarch.h
! if ! test -r gdbarch.h
! then
! echo "gdbarch.h missing? cp new-gdbarch.h gdbarch.h" 1>&2
! elif diff -c gdbarch.h new-gdbarch.h
! then
! echo "gdbarch.h unchanged" 1>&2
! else
! echo "gdbarch.h has changed? cp new-gdbarch.h gdbarch.h" 1>&2
! fi
#
--- 758,764 ----
EOF
exec 1>&2
#../move-if-change new-gdbarch.h gdbarch.h
! compare_new gdbarch.h
#
*************** struct gdbarch_tdep *
*** 1076,1082 ****
gdbarch_tdep (struct gdbarch *gdbarch)
{
if (gdbarch_debug >= 2)
- /* FIXME: gdb_std??? */
fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
return gdbarch->tdep;
}
--- 1084,1089 ----
*************** do
*** 1098,1104 ****
echo " if (gdbarch->${function} == 0)"
echo " internal_error (\"gdbarch: gdbarch_${function} invalid\");"
echo " if (gdbarch_debug >= 2)"
- echo " /* FIXME: gdb_std??? */"
echo " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\n\");"
test "${actual}" = "-" && actual=""
if [ "${returntype}" = "void" ]
--- 1105,1110 ----
*************** do
*** 1131,1137 ****
echo " internal_error (\"gdbarch: gdbarch_${function} invalid\");"
fi
echo " if (gdbarch_debug >= 2)"
- echo " /* FIXME: gdb_std??? */"
echo " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\n\");"
echo " return gdbarch->${function};"
echo "}"
--- 1137,1142 ----
*************** do
*** 1149,1155 ****
echo "gdbarch_${function} (struct gdbarch *gdbarch)"
echo "{"
echo " if (gdbarch_debug >= 2)"
- echo " /* FIXME: gdb_std??? */"
echo " fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\n\");"
echo " return gdbarch->${function};"
echo "}"
--- 1154,1159 ----
*************** extern void _initialize_gdbarch (void);
*** 1965,1970 ****
--- 1969,1976 ----
void
_initialize_gdbarch ()
{
+ struct cmd_list_element *c;
+
add_prefix_cmd ("endian", class_support, set_endian,
"Set endianness of target.",
&endianlist, "set endian ", 0, &setlist);
*************** _initialize_gdbarch ()
*** 1991,2015 ****
tm_print_insn_info.memory_error_func = dis_asm_memory_error;
tm_print_insn_info.print_address_func = dis_asm_print_address;
! add_show_from_set (add_set_cmd ("archdebug",
class_maintenance,
var_zinteger,
(char *)&gdbarch_debug,
"Set architecture debugging.\n\\
! When non-zero, architecture debugging is enabled.", &setlist),
! &showlist);
}
EOF
# close things off
exec 1>&2
#../move-if-change new-gdbarch.c gdbarch.c
! if ! test -r gdbarch.c
! then
! echo "gdbarch.c missing? cp new-gdbarch.c gdbarch.c" 1>&2
! elif diff -c gdbarch.c new-gdbarch.c
! then
! echo "gdbarch.c unchanged" 1>&2
! else
! echo "gdbarch.c has changed? cp new-gdbarch.c gdbarch.c" 1>&2
! fi
--- 1997,2022 ----
tm_print_insn_info.memory_error_func = dis_asm_memory_error;
tm_print_insn_info.print_address_func = dis_asm_print_address;
! add_show_from_set (add_set_cmd ("arch",
class_maintenance,
var_zinteger,
(char *)&gdbarch_debug,
"Set architecture debugging.\n\\
! When non-zero, architecture debugging is enabled.", &setdebuglist),
! &showdebuglist);
! c = add_set_cmd ("archdebug",
! class_maintenance,
! var_zinteger,
! (char *)&gdbarch_debug,
! "Set architecture debugging.\n\\
! When non-zero, architecture debugging is enabled.", &setlist);
!
! deprecate_cmd (c, "set debug arch");
! deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
}
EOF
# close things off
exec 1>&2
#../move-if-change new-gdbarch.c gdbarch.c
! compare_new gdbarch.c
More information about the Gdb-patches
mailing list