$(elf_common_h)
available.o: available.c $(defs_h) $(symfile_h) $(target_h) $(available_h) \
$(arch_utils_h) $(exceptions_h) $(gdbtypes_h) $(sha1_h) \
+ $(reggroups_h) \
$(gdb_string) $(gdb_assert) $(gdb_obstack_h) $(gdb_stdint_h)
avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \
set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM);
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
set_gdbarch_register_type (gdbarch, arm_register_type);
+ set_gdbarch_register_reggroup_p (gdbarch, available_register_reggroup_p);
if (info.feature_set)
{
#include "arch-utils.h"
#include "exceptions.h"
#include "gdbtypes.h"
+#include "reggroups.h"
#include "symfile.h"
#include "target.h"
#include "sha1.h"
return reg->protocol_number;
}
+
+/* Check whether REGNUM is a member of REGGROUP. */
+
+/* TODO: This function only supports "info registers", "info float",
+ and "info vector". Registers with group="general" go in general;
+ group="float" and group="vector" are similar. Other specified
+ values of group go into all-registers only. Registers with no
+ group specified go to the default function and are handled by
+ type. When we have a hierarchy of features, it may make more
+ sense to use that to show registers. */
+
+int
+available_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *reggroup)
+{
+ struct gdb_available_register *reg;
+
+ reg = find_register (gdbarch_feature_set (gdbarch), regnum);
+ if (reg != NULL && reg->group != NULL)
+ {
+ int general_p, float_p, vector_p;
+
+ if (strcmp (reg->group, "general") == 0)
+ general_p = 1;
+ else if (strcmp (reg->group, "float") == 0)
+ float_p = 1;
+ else if (strcmp (reg->group, "vector") == 0)
+ vector_p = 1;
+
+ if (reggroup == float_reggroup)
+ return float_p;
+
+ if (reggroup == vector_reggroup)
+ return vector_p;
+
+ if (reggroup == general_reggroup)
+ return general_p;
+ }
+
+ return default_register_reggroup_p (gdbarch, regnum, reggroup);
+}
#define AVAILABLE_H 1
struct obstack;
+struct reggroup;
/* A GDB target interface can use these types to communicate to the
architecture support (gdbarch) what new or optional features
int available_register_target_regnum (struct gdbarch *, int);
+/* Check the register group of a target-described register. */
+
+int available_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *reggroup);
+
/* Find a compiled-in XML file, e.g. the standard DTD. */
const char *fetch_xml_builtin (const char *);
exit 1
fi
+if test -e "$output"; then
+ echo "Output file \"$output\" already exists; refusing to overwrite."
+ exit 1
+fi
+
for input in dummy "$@"; do
if test $input != dummy; then
arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`