+/* If ON, GDB will display disassembly of the next source line when
+ execution of the program being debugged stops.
+ If AUTO (which is the default), or there's no line info to determine
+ the source line of the next instruction, display disassembly of next
+ instruction instead. */
+
+static enum auto_boolean disassemble_next_line;
+
+static void
+show_disassemble_next_line (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+ fprintf_filtered (file, _("\
+Debugger's willingness to use disassemble-next-line is %s.\n"),
+ value);
+}
+
+/* Show assembly codes; stub for catch_errors. */
+
+struct gdb_disassembly_stub_args
+{
+ int how_many;
+ CORE_ADDR low;
+ CORE_ADDR high;
+};
+
+static void
+gdb_disassembly_stub (void *args)
+{
+ struct gdb_disassembly_stub_args *p = args;
+ gdb_disassembly (uiout, 0, 0, p->how_many, p->low, p->high);
+}
+
+/* Use TRY_CATCH to catch the exception from the gdb_disassembly
+ because it will be broken by filter sometime. */
+
+static void
+do_gdb_disassembly (int how_many, CORE_ADDR low, CORE_ADDR high)
+{
+ volatile struct gdb_exception exception;
+ struct gdb_disassembly_stub_args args;
+
+ args.how_many = how_many;
+ args.low = low;
+ args.high = high;
+ TRY_CATCH (exception, RETURN_MASK_ALL)
+ {
+ gdb_disassembly_stub (&args);
+ }
+}
+