+2007-01-29 Joel Brobecker <brobecker@adacore.com>
+
+ * target.c (maintenance_print_target_stack): New function.
+ (initialize_targets): Add new "maintenance print target-stack"
+ command.
+
2007-01-28 Mark Kettenis <kettenis@gnu.org>
* dwarf2read.c (new_symbol): Handle DW_AT_decl_file being zero.
target_rcmd (cmd, gdb_stdtarg);
}
+/* Print the name of each layers of our target stack. */
+
+static void
+maintenance_print_target_stack (char *cmd, int from_tty)
+{
+ struct target_ops *t;
+
+ printf_filtered (_("The current target stack is:\n"));
+
+ for (t = target_stack; t != NULL; t = t->beneath)
+ {
+ printf_filtered (" - %s (%s)\n", t->to_shortname, t->to_longname);
+ }
+}
+
void
initialize_targets (void)
{
add_com ("monitor", class_obscure, do_monitor_command,
_("Send a command to the remote monitor (remote targets only)."));
+ add_cmd ("target-stack", class_maintenance, maintenance_print_target_stack,
+ _("Print the name of each layer of the internal target stack."),
+ &maintenanceprintlist);
+
target_dcache = dcache_init ();
}