2002-12-07 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbarch.sh
index cb879da38673c8c9ca8d59b89ae752f9cea32b48..d78b83578c0a2759c5f0bff370450cbe03972453 100755 (executable)
@@ -129,7 +129,7 @@ EOF
                    fi
                    ;;
                * )
-                   echo "Predicate function ${function} with invalid_p."
+                   echo "Predicate function ${function} with invalid_p." 1>&2
                    kill $$
                    exit 1
                    ;;
@@ -513,7 +513,7 @@ v:2:SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_
 v:1:CALL_DUMMY_STACK_ADJUST_P:int:call_dummy_stack_adjust_p::::0:-1:::0x%08lx
 v:2:CALL_DUMMY_STACK_ADJUST:int:call_dummy_stack_adjust::::0:::gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0:0x%08lx::CALL_DUMMY_STACK_ADJUST_P
 f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
-f:2:INIT_FRAME_PC_FIRST:void:init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_noop::0
+F::DEPRECATED_INIT_FRAME_PC_FIRST:void:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
 f:2:INIT_FRAME_PC:void:init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_default::0
 #
 v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
@@ -589,9 +589,9 @@ F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc
 F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
 v:2:PARM_BOUNDARY:int:parm_boundary
 #
-v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:gdbarch->float_format->name
-v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)::%s:gdbarch->float_format->name
-v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)::%s:gdbarch->float_format->name
+v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
+v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)::%s:(TARGET_DOUBLE_FORMAT)->name
+v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)::%s:(TARGET_LONG_DOUBLE_FORMAT)->name
 f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::core_addr_identity::0
 # On some machines there are bits in addresses which are not really
 # part of the address, but are used by the kernel, the hardware, etc.
@@ -1572,6 +1572,27 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
 EOF
 function_list | sort -t: -k 3 | while do_read
 do
+    # First the predicate
+    if class_is_predicate_p
+    then
+       if class_is_multiarch_p
+       then
+           printf "  if (GDB_MULTI_ARCH)\n"
+           printf "    fprintf_unfiltered (file,\n"
+           printf "                        \"gdbarch_dump: gdbarch_${function}_p() = %%d\\\\n\",\n"
+           printf "                        gdbarch_${function}_p (current_gdbarch));\n"
+       else
+           printf "#ifdef ${macro}_P\n"
+           printf "  fprintf_unfiltered (file,\n"
+           printf "                      \"gdbarch_dump: %%s # %%s\\\\n\",\n"
+           printf "                      \"${macro}_P()\",\n"
+           printf "                      XSTRING (${macro}_P ()));\n"
+           printf "  fprintf_unfiltered (file,\n"
+           printf "                      \"gdbarch_dump: ${macro}_P() = %%d\\\\n\",\n"
+           printf "                      ${macro}_P ());\n"
+           printf "#endif\n"
+       fi
+    fi
     # multiarch functions don't have macros.
     if class_is_multiarch_p
     then
This page took 0.026278 seconds and 4 git commands to generate.