This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] mi disassemble


I added the capability of having the functions in mi-cmd-disas.c work
from the CLI. this is an old patch i had sitting around. it will help in
unifying all the 20,000 disassembly functions we have in gdb.

Elena

2002-09-26  Elena Zannoni  <ezannoni@redhat.com>

        * mi-cmd-disas.c (dump_insns): Add text only output for CLI.
        (do_mixed_source_and_assembly): Ditto.

Index: mi-cmd-disas.c
===================================================================
RCS file: /cvs/uberbaum/gdb/mi/mi-cmd-disas.c,v
retrieving revision 1.18
diff -u -p -r1.18 mi-cmd-disas.c
--- mi-cmd-disas.c	30 Jul 2002 13:45:15 -0000	1.18
+++ mi-cmd-disas.c	26 Sep 2002 18:33:13 -0000
@@ -115,8 +115,11 @@ dump_insns (disassemble_info * di, CORE_
 	{
 	  /* We don't care now about line, filename and
 	     unmapped. But we might in the future. */
+	  ui_out_text (uiout, " <");
 	  ui_out_field_string (uiout, "func-name", name);
+	  ui_out_text (uiout, "+");
 	  ui_out_field_int (uiout, "offset", offset);
+	  ui_out_text (uiout, ">:\t");
 	}
       if (filename != NULL)
 	xfree (filename);
@@ -128,6 +131,7 @@ dump_insns (disassemble_info * di, CORE_
       ui_out_field_stream (uiout, "inst", stb);
       ui_file_rewind (stb->stream);
       ui_out_tuple_end (uiout);
+      ui_out_text (uiout, "\n");
     }
   return num_displayed;
 }
@@ -257,6 +261,7 @@ do_mixed_source_and_assembly (struct dis
 	{
 	  ui_out_list_end (uiout);
 	  ui_out_tuple_end (uiout);
+	  ui_out_text (uiout, "\n");
 	  close_list = 0;
 	}
       if (how_many >= 0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]