2004-06-21 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (read): Delete "print_p" and "description", add "garbage_at_eol". Check for non-empty garbage at end-of-line. Delete references to print_p. (TARGET_ARCHITECTURE): Delete print predicate. * gdbarch.c: Re-generate.
This commit is contained in:
parent
aa02cc6302
commit
283354d860
3 changed files with 21 additions and 32 deletions
|
@ -1,5 +1,11 @@
|
||||||
2004-06-21 Andrew Cagney <cagney@gnu.org>
|
2004-06-21 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* gdbarch.sh (read): Delete "print_p" and "description", add
|
||||||
|
"garbage_at_eol". Check for non-empty garbage at end-of-line.
|
||||||
|
Delete references to print_p.
|
||||||
|
(TARGET_ARCHITECTURE): Delete print predicate.
|
||||||
|
* gdbarch.c: Re-generate.
|
||||||
|
|
||||||
* gdbarch.sh: Check that multi-arch methods do not provide a
|
* gdbarch.sh: Check that multi-arch methods do not provide a
|
||||||
macro.
|
macro.
|
||||||
(register_type, unwind_dummy_id, push_dummy_call, push_dummy_code)
|
(register_type, unwind_dummy_id, push_dummy_call, push_dummy_code)
|
||||||
|
|
|
@ -770,10 +770,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
||||||
fprintf_unfiltered (file,
|
fprintf_unfiltered (file,
|
||||||
"gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
|
"gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
|
||||||
XSTRING (TARGET_ARCHITECTURE));
|
XSTRING (TARGET_ARCHITECTURE));
|
||||||
if (TARGET_ARCHITECTURE != NULL)
|
fprintf_unfiltered (file,
|
||||||
fprintf_unfiltered (file,
|
"gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
|
||||||
"gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
|
TARGET_ARCHITECTURE->printable_name);
|
||||||
TARGET_ARCHITECTURE->printable_name);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGET_BFD_VMA_BIT
|
#ifdef TARGET_BFD_VMA_BIT
|
||||||
fprintf_unfiltered (file,
|
fprintf_unfiltered (file,
|
||||||
|
|
|
@ -44,7 +44,7 @@ compare_new ()
|
||||||
|
|
||||||
|
|
||||||
# Format of the input table
|
# Format of the input table
|
||||||
read="class macro returntype function formal actual attrib staticdefault predefault postdefault invalid_p fmt print print_p description"
|
read="class macro returntype function formal actual attrib staticdefault predefault postdefault invalid_p fmt print garbage_at_eol"
|
||||||
|
|
||||||
do_read ()
|
do_read ()
|
||||||
{
|
{
|
||||||
|
@ -75,6 +75,13 @@ ${line}
|
||||||
EOF
|
EOF
|
||||||
IFS="${OFS}"
|
IFS="${OFS}"
|
||||||
|
|
||||||
|
if test -n "${garbage_at_eol}"
|
||||||
|
then
|
||||||
|
echo "Garbage at end-of-line in ${line}" 1>&2
|
||||||
|
kill $$
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# .... and then going back through each field and strip out those
|
# .... and then going back through each field and strip out those
|
||||||
# that ended up with just that space character.
|
# that ended up with just that space character.
|
||||||
for r in ${read}
|
for r in ${read}
|
||||||
|
@ -360,20 +367,9 @@ do
|
||||||
|
|
||||||
# If PRINT is empty, ``(long)'' is used.
|
# If PRINT is empty, ``(long)'' is used.
|
||||||
|
|
||||||
print_p ) : ;;
|
garbage_at_eol ) : ;;
|
||||||
|
|
||||||
# An optional indicator for any predicte to wrap around the
|
# Catches stray fields.
|
||||||
# print member code.
|
|
||||||
|
|
||||||
# () -> Call a custom function to do the dump.
|
|
||||||
# exp -> Wrap print up in ``if (${print_p}) ...
|
|
||||||
# ``'' -> No predicate
|
|
||||||
|
|
||||||
# If PRINT_P is empty, ``1'' is always used.
|
|
||||||
|
|
||||||
description ) : ;;
|
|
||||||
|
|
||||||
# Currently unused.
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Bad field ${field}"
|
echo "Bad field ${field}"
|
||||||
|
@ -386,7 +382,7 @@ function_list ()
|
||||||
{
|
{
|
||||||
# See below (DOCO) for description of each field
|
# See below (DOCO) for description of each field
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
i:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name:TARGET_ARCHITECTURE != NULL
|
i:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name
|
||||||
#
|
#
|
||||||
i:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
|
i:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
|
||||||
#
|
#
|
||||||
|
@ -1592,19 +1588,7 @@ do
|
||||||
printf " \"gdbarch_dump: ${macro} # %%s\\\\n\",\n"
|
printf " \"gdbarch_dump: ${macro} # %%s\\\\n\",\n"
|
||||||
printf " XSTRING (${macro}));\n"
|
printf " XSTRING (${macro}));\n"
|
||||||
fi
|
fi
|
||||||
if [ "x${print_p}" = "x()" ]
|
if class_is_function_p
|
||||||
then
|
|
||||||
printf " gdbarch_dump_${function} (current_gdbarch);\n"
|
|
||||||
elif [ "x${print_p}" = "x0" ]
|
|
||||||
then
|
|
||||||
printf " /* skip print of ${macro}, print_p == 0. */\n"
|
|
||||||
elif [ -n "${print_p}" ]
|
|
||||||
then
|
|
||||||
printf " if (${print_p})\n"
|
|
||||||
printf " fprintf_unfiltered (file,\n"
|
|
||||||
printf " \"gdbarch_dump: ${macro} = %s\\\\n\",\n" "${fmt}"
|
|
||||||
printf " ${print});\n"
|
|
||||||
elif class_is_function_p
|
|
||||||
then
|
then
|
||||||
printf " fprintf_unfiltered (file,\n"
|
printf " fprintf_unfiltered (file,\n"
|
||||||
printf " \"gdbarch_dump: ${macro} = <0x%%08lx>\\\\n\",\n"
|
printf " \"gdbarch_dump: ${macro} = <0x%%08lx>\\\\n\",\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue