(@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",
@{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
@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",
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
@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
@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
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++)
{
{
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
}
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;
}
}
if (close_list)
{
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
ui_out_tuple_end (uiout);
close_list = 0;
}
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;)
{
ui_file_rewind (stb->stream);
ui_out_tuple_end (uiout);
}
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
}
gdb_flush (gdb_stdout);
mi_gdb_test "print/x \$pc" "" ""
mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \
- "111\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
+ "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \
"data-disassemble from pc to pc+12 assembly only"
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \
- "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
+ "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file & line, assembly only"
}
mi_gdb_test "print/x \$pc" "" ""
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \
- "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
+ "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number assembly only"
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \
- "222\\^done,asm_insns=\{\}" \
+ "222\\^done,asm_insns=\\\[\\\]" \
"data-disassemble file, line, number (zero lines) assembly only"
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \
- "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \
+ "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \
"data-disassemble file, line, number (more than main lines) assembly only"
}
# -data-disassembly -s $pc -e "$pc+8" -- 1
mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \
- "002\\^done,asm_insns=\{src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\}\},.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
+ "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
"data-disassemble file, line assembly mixed"
#
# which we are now, even if we have specified that the range is only 2 insns.
#
mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \
- "003\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \
+ "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \
"data-disassemble range assembly mixed"
}
mi_gdb_test "print/x \$pc" "" ""
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \
- "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
+ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number assembly mixed"
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 1" \
- "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\{\}\}\}" \
+ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \
"data-disassemble file, line, number (zero lines) assembly mixed"
mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 1" \
- "222\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \
+ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \
"data-disassemble file, line, number (more than main lines) assembly mixed"
}