From 80f43b40c54e53920c10478a87690ffeb45384a0 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 25 Jun 2001 20:08:53 +0000 Subject: [PATCH] For data-list-register-values output a list of register values. --- gdb/mi/ChangeLog | 6 ++++++ gdb/mi/gdbmi.texinfo | 8 ++++---- gdb/mi/mi-main.c | 4 ++-- gdb/testsuite/gdb.mi/ChangeLog | 5 +++++ gdb/testsuite/gdb.mi/mi-regs.exp | 16 ++++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 06ed0a4fc49..ba34ec46a7b 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,9 @@ +2001-06-25 Andrew Cagney + + * mi-main.c (mi_cmd_data_list_register_values): Output a list of + register values. + * gdbmi.texinfo (data-list-register-values): Update documentation. + 2001-06-25 Andrew Cagney * mi-main.c (mi_cmd_data_list_register_names): Output a list of diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo index b5e9890ddd4..138640c33c4 100644 --- a/gdb/mi/gdbmi.texinfo +++ b/gdb/mi/gdbmi.texinfo @@ -1326,11 +1326,11 @@ don't appear in the actual output): @smallexample (@value{GDBP}) -data-list-register-values r 64 65 -^done,register-values=@{@{number="64",value="0xfe00a300"@}, -@{number="65",value="0x00029002"@}@} +^done,register-values=[@{number="64",value="0xfe00a300"@}, +@{number="65",value="0x00029002"@}] (@value{GDBP}) -data-list-register-values x -^done,register-values=@{@{number="0",value="0xfe0043c8"@}, +^done,register-values=[@{number="0",value="0xfe0043c8"@}, @{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@}, @{number="3",value="0x0"@},@{number="4",value="0xa"@}, @{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@}, @@ -1365,7 +1365,7 @@ don't appear in the actual output): @{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@}, @{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@}, @{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@}, -@{number="69",value="0x20002b03"@}@} +@{number="69",value="0x20002b03"@}] (@value{GDBP}) @end smallexample diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 1342c21df89..1b7a19bcf07 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -432,7 +432,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc) return MI_CMD_ERROR; } - ui_out_tuple_begin (uiout, "register-values"); + ui_out_list_begin (uiout, "register-values"); if (argc == 1) /* No args, beside the format: do all the regs */ { @@ -475,7 +475,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc) return MI_CMD_ERROR; } } - ui_out_tuple_end (uiout); + ui_out_list_end (uiout); return MI_CMD_DONE; } diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index 7514836de46..976a0ea74e2 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog +++ b/gdb/testsuite/gdb.mi/ChangeLog @@ -1,3 +1,8 @@ +2001-06-25 Andrew Cagney + + * mi-regs.exp: Update patters matching register-values. Outputs a + list. + 2001-06-25 Andrew Cagney * mi-regs.exp: Update patters matching register-names. Now diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp index 5fd6b08b44d..e03dcd11a4c 100644 --- a/gdb/testsuite/gdb.mi/mi-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-regs.exp @@ -120,33 +120,33 @@ proc sparc_register_tests { } { "list register names" mi_gdb_test "222-data-list-register-values x" \ - "222\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \ + "222\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \ "register values x" mi_gdb_test "333-data-list-register-values f" \ - "333\\^done,register-values=\{\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\}" \ + "333\\^done,register-values=\\\[\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\\\]" \ "register values f" mi_gdb_test "444-data-list-register-values d" \ - "444\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \ + "444\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \ "register values d" mi_gdb_test "555-data-list-register-values o" \ - "555\\^done,register-values=\{\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\}" \ + "555\\^done,register-values=\\\[\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\\\]" \ "register values o" mi_gdb_test "666-data-list-register-values t" \ - "666\\^done,register-values=\{\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\}" \ + "666\\^done,register-values=\\\[\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\\\]" \ "register values t" # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int mi_gdb_test "777-data-list-register-values N" \ - "777\\^done,register-values=\{\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\}" \ + "777\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \ "register values N" mi_gdb_test "888-data-list-register-values r" \ - "888\\^done,register-values=\{\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\}" \ + "888\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \ "register values r" mi_gdb_test "999-data-list-register-names 68 69 70 71" \ @@ -154,7 +154,7 @@ proc sparc_register_tests { } { "list names of some regs" mi_gdb_test "001-data-list-register-values x 68 69 70 71" \ - "001\\^done,register-values=\{\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\}" \ + "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \ "list values of some regs" # Don't know how useful this test is -- 2.30.2