aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog11
-rw-r--r--gdb/mi/gdbmi.texinfo23
-rw-r--r--gdb/mi/mi-cmd-disas.c16
3 files changed, 30 insertions, 20 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 203ced4..87c8725 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,14 @@
+2001-06-23 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbmi.texinfo (data-disassemble): Update documentation of
+ output. Produces a list of instructions and a list of source
+ lines.
+
+2001-06-22 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-disas.c (mi_cmd_disassemble): For "-data-disassemble",
+ output a list instead of a tupple.
+
2001-06-21 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (struct ui_out_data): Replace field first_header with
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index e07b089..74b774b 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -1093,7 +1093,7 @@ Disassemble from the current value of @code{$pc} to @code{$pc + 20}:
(@value{GDBP})
-data-disassemble -s $pc -e "$pc + 20" -- 0
^done,
-asm_insns=@{
+asm_insns=[
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
@@ -1103,7 +1103,7 @@ inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@},
@{address="0x000107cc",func-name="main",offset="16",
inst="sethi %hi(0x11800), %o2"@},
@{address="0x000107d0",func-name="main",offset="20",
-inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}@}
+inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
(@value{GDBP})
@end smallexample
@@ -1112,7 +1112,7 @@ Disassemble the whole @code{main} function. Line 32 is part of
@smallexample
-data-disassemble -f basics.c -l 32 -- 0
-^done,asm_insns=@{
+^done,asm_insns=[
@{address="0x000107bc",func-name="main",offset="0",
inst="save %sp, -112, %sp"@},
@{address="0x000107c0",func-name="main",offset="4",
@@ -1121,7 +1121,7 @@ inst="mov 2, %o0"@},
inst="sethi %hi(0x11800), %o2"@},
[@dots{}]
@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
-@{address="0x00010820",func-name="main",offset="100",inst="restore "@}@}
+@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
(@value{GDBP})
@end smallexample
@@ -1130,13 +1130,13 @@ Disassemble 3 instructions from the start of @code{main}:
@smallexample
(@value{GDBP})
-data-disassemble -f basics.c -l 32 -n 3 -- 0
-^done,asm_insns=@{
+^done,asm_insns=[
@{address="0x000107bc",func-name="main",offset="0",
inst="save %sp, -112, %sp"@},
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}@}
+inst="sethi %hi(0x11800), %o2"@}]
(@value{GDBP})
@end smallexample
@@ -1145,20 +1145,19 @@ Disassemble 3 instructions from the start of @code{main} in mixed mode:
@smallexample
(@value{GDBP})
-data-disassemble -f basics.c -l 32 -n 3 -- 1
-^done,asm_insns=@{
+^done,asm_insns=[
src_and_asm_line=@{line="31",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=@{
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
@{address="0x000107bc",func-name="main",offset="0",
-inst="save %sp, -112, %sp"@}@}@},
-
+inst="save %sp, -112, %sp"@}]@},
src_and_asm_line=@{line="32",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=@{
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}@}@}@}
+inst="sethi %hi(0x11800), %o2"@}]@}]
(@value{GDBP})
@end smallexample
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 021ee5e..0b51324 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -364,7 +364,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
for that line. */
next_line = 0; /* Force out first line */
- ui_out_tuple_begin (uiout, "asm_insns");
+ ui_out_list_begin (uiout, "asm_insns");
num_displayed = 0;
for (i = 0; i < newlines; i++)
{
@@ -387,8 +387,8 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
{
ui_out_tuple_begin (uiout, "src_and_asm_line");
print_source_lines (symtab, next_line, mle[i].line + 1, 0);
- ui_out_tuple_begin (uiout, "line_asm_insn");
- ui_out_tuple_end (uiout);
+ ui_out_list_begin (uiout, "line_asm_insn");
+ ui_out_list_end (uiout);
ui_out_tuple_end (uiout);
}
/* Print the last line and leave list open for
@@ -404,7 +404,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
}
next_line = mle[i].line + 1;
- ui_out_tuple_begin (uiout, "line_asm_insn");
+ ui_out_list_begin (uiout, "line_asm_insn");
if (i + 1 < newlines && mle[i + 1].line <= mle[i].line)
close_list = 0;
}
@@ -441,7 +441,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
}
if (close_list)
{
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
ui_out_tuple_end (uiout);
close_list = 0;
}
@@ -449,12 +449,12 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
if (num_displayed >= how_many)
break;
}
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
}
else
{
assembly_only:
- ui_out_tuple_begin (uiout, "asm_insns");
+ ui_out_list_begin (uiout, "asm_insns");
num_displayed = 0;
for (pc = low; pc < high;)
{
@@ -487,7 +487,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
ui_file_rewind (stb->stream);
ui_out_tuple_end (uiout);
}
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
}
gdb_flush (gdb_stdout);