}
+/* Free a gdbarch struct. This should never happen in normal
+ operation --- once you've created a gdbarch, you keep it around.
+ However, if an architecture's init function encounters an error
+ building the structure, it may need to clean up a partially
+ constructed gdbarch. */
+void
+gdbarch_free (struct gdbarch *arch)
+{
+ /* At the moment, this is trivial. */
+ free (arch);
+}
+
+
/* Ensure that all values in a GDBARCH are reasonable. */
static void
extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
+/* Helper function. Free a partially-constructed ``struct gdbarch''. */
+extern void gdbarch_free (struct gdbarch *);
+
+
/* Helper function. Force an update of the current architecture. Used
by legacy targets that have added their own target specific
architecture manipulation commands.
extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gdbarch_tdep *tdep);
+/* Helper function. Free a partially-constructed \`\`struct gdbarch''. */
+extern void gdbarch_free (struct gdbarch *);
+
+
/* Helper function. Force an update of the current architecture. Used
by legacy targets that have added their own target specific
architecture manipulation commands.
}
EOF
+# Free a gdbarch struct.
+echo ""
+echo ""
+cat <<EOF
+/* Free a gdbarch struct. This should never happen in normal
+ operation --- once you've created a gdbarch, you keep it around.
+ However, if an architecture's init function encounters an error
+ building the structure, it may need to clean up a partially
+ constructed gdbarch. */
+void
+gdbarch_free (struct gdbarch *arch)
+{
+ /* At the moment, this is trivial. */
+ free (arch);
+}
+EOF
+
# verify a new architecture
echo ""
echo ""