# An optional indicator for any predicte to wrap around the
# print member code.
- # # -> Wrap print up in ``#ifdef MACRO''
# exp -> Wrap print up in ``if (${print_p}) ...
# ``'' -> No predicate
v:2:SP_REGNUM:int:sp_regnum::::0:-1
v:2:FP_REGNUM:int:fp_regnum::::0:-1
v:2:PC_REGNUM:int:pc_regnum::::0:-1
+v:2:FP0_REGNUM:int:fp0_regnum::::0:-1:0
+v:2:NPC_REGNUM:int:npc_regnum::::0:-1:0
+v:2:NNPC_REGNUM:int:nnpc_regnum::::0:-1:0
f:2:REGISTER_NAME: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
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:0
#
-v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::0:::::#
-v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type::::0:::::#
+v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::0:::::
+v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type::::0:::::
f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double:0
f:1:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval::generic_get_saved_register:0
#
# I wish that these would just go away....
f:2:D10V_MAKE_DADDR:CORE_ADDR:d10v_make_daddr:CORE_ADDR x:x:::0:0
f:2:D10V_MAKE_IADDR:CORE_ADDR:d10v_make_iaddr:CORE_ADDR x:x:::0:0
-f:2:D10V_DADDR_P:int:d10v_daddr_p:CORE_ADDR x:x:::0
-f:2:D10V_IADDR_P:int:d10v_iaddr_p:CORE_ADDR x:x:::0
-f:2:D10V_CONVERT_DADDR_TO_RAW:CORE_ADDR:d10v_convert_daddr_to_raw:CORE_ADDR x:x:::0
-f:2:D10V_CONVERT_IADDR_TO_RAW:CORE_ADDR:d10v_convert_iaddr_to_raw:CORE_ADDR x:x:::0
+f:2:D10V_DADDR_P:int:d10v_daddr_p:CORE_ADDR x:x:::0:0
+f:2:D10V_IADDR_P:int:d10v_iaddr_p:CORE_ADDR x:x:::0:0
+f:2:D10V_CONVERT_DADDR_TO_RAW:CORE_ADDR:d10v_convert_daddr_to_raw:CORE_ADDR x:x:::0:0
+f:2:D10V_CONVERT_IADDR_TO_RAW:CORE_ADDR:d10v_convert_iaddr_to_raw:CORE_ADDR x:x:::0:0
#
f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0
f:2:INIT_EXTRA_FRAME_INFO:void:init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
#
f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
+f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p:0
f:2:INNER_THAN:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs::0:0
f:2:BREAKPOINT_FROM_PC:unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:::legacy_breakpoint_from_pc:0
f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint:0
#
F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp::0:0
F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type::0:0
+F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
EOF
grep -v '^#'
}
if class_is_predicate_p && default_is_fallback_p
then
echo "Error: predicate function can not have a non- multi-arch default" 1>&2
+ kill $$
exit 1
fi
done
echo ""
echo "#if defined (${macro})"
echo "/* Legacy for systems yet to multi-arch ${macro} */"
+# echo "#if (GDB_MULTI_ARCH <= 2) && defined (${macro})"
echo "#define ${macro}_P() (1)"
echo "#endif"
echo ""
+ echo "/* Default predicate for non- multi-arch targets. */"
+ echo "#if (GDB_MULTI_ARCH == 0) && !defined (${macro}_P)"
+ echo "#define ${macro}_P() (0)"
+ echo "#endif"
+ echo ""
echo "extern int gdbarch_${function}_p (struct gdbarch *gdbarch);"
echo "#if (GDB_MULTI_ARCH > 1) || !defined (${macro}_P)"
echo "#define ${macro}_P() (gdbarch_${function}_p (current_gdbarch))"
fi
if class_is_variable_p
then
+ if default_is_fallback_p || class_is_predicate_p
+ then
+ echo ""
+ echo "/* Default (value) for non- multi-arch platforms. */"
+ echo "#if (GDB_MULTI_ARCH == 0) && !defined (${macro})"
+ echo "#define ${macro} (${default})"
+ echo "#endif"
+ fi
echo ""
echo "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch);"
echo "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, ${returntype} ${function});"
- if ! default_is_fallback_p && ! class_is_predicate_p
- then
- echo "#if GDB_MULTI_ARCH"
- fi
+ echo "#if GDB_MULTI_ARCH"
echo "#if (GDB_MULTI_ARCH > 1) || !defined (${macro})"
echo "#define ${macro} (gdbarch_${function} (current_gdbarch))"
echo "#endif"
- if ! default_is_fallback_p && ! class_is_predicate_p
- then
- echo "#endif"
- fi
+ echo "#endif"
fi
if class_is_function_p
then
+ if default_is_fallback_p || class_is_predicate_p
+ then
+ echo ""
+ echo "/* Default (function) for non- multi-arch platforms. */"
+ echo "#if (GDB_MULTI_ARCH == 0) && !defined (${macro})"
+ if [ "${default}" = "0" ]
+ then
+ echo "#define ${macro}(${actual}) (internal_error (\"${macro}\"), 0)"
+ else
+ echo "#define ${macro}(${actual}) (${default} (${actual}))"
+ fi
+ echo "#endif"
+ fi
echo ""
echo "typedef ${returntype} (gdbarch_${function}_ftype) (${formal});"
if [ "${formal}" = "void" ]
echo "extern ${returntype} gdbarch_${function} (struct gdbarch *gdbarch, ${formal});"
fi
echo "extern void set_gdbarch_${function} (struct gdbarch *gdbarch, gdbarch_${function}_ftype *${function});"
- if ! default_is_fallback_p && ! class_is_predicate_p
- then
- echo "#if GDB_MULTI_ARCH"
- fi
+ echo "#if GDB_MULTI_ARCH"
echo "#if (GDB_MULTI_ARCH > 1) || !defined (${macro})"
if [ "${actual}" = "" ]
then
echo "#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))"
fi
echo "#endif"
- if ! default_is_fallback_p && ! class_is_predicate_p
- then
- echo "#endif"
- fi
+ echo "#endif"
fi
done
EOF
function_list | while do_read # eval read $read
do
+ echo "#ifdef ${macro}"
if class_is_function_p
then
echo " fprintf_unfiltered (gdb_stdlog,"
echo " (long) current_gdbarch->${function}"
echo " /*${macro} ()*/);"
else
- if [ "${print_p}" = "#" ]
- then
- echo "#ifdef ${macro}"
- echo " fprintf_unfiltered (gdb_stdlog,"
- echo " \"gdbarch_update: ${macro} = ${fmt}\\n\","
- echo " ${print});"
- echo "#endif"
- elif [ "${print_p}" ]
+ if [ "${print_p}" ]
then
echo " if (${print_p})"
echo " fprintf_unfiltered (gdb_stdlog,"
echo " ${print});"
fi
fi
+ echo "#endif"
done
-echo "}"
+cat <<EOF
+ fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: GDB_MULTI_ARCH = %d\\n",
+ GDB_MULTI_ARCH);
+}
+EOF
# GET/SET
echo "gdbarch_${function} (struct gdbarch *gdbarch, ${formal})"
fi
echo "{"
- if default_is_fallback_p && [ "${default}" != "0" ]
- then
- echo " if (GDB_MULTI_ARCH == 0)"
- if [ "${returntype}" = "void" ]
- then
- echo " {"
- echo " ${default} (${actual});"
- echo " return;"
- echo " }"
- else
- echo " return ${default} (${actual});"
- fi
- fi
echo " if (gdbarch->${function} == 0)"
echo " internal_error (\"gdbarch: gdbarch_${function} invalid\");"
echo " if (gdbarch_debug >= 2)"
echo "${returntype}"
echo "gdbarch_${function} (struct gdbarch *gdbarch)"
echo "{"
- if default_is_fallback_p && [ "${default}" != "0" ]
- then
- echo " if (GDB_MULTI_ARCH == 0)"
- echo " return ${default};"
- fi
if [ "${invalid_p}" = "0" ]
then
echo " /* Skip verify of ${function}, invalid_p == 0 */"