diff options
author | Tom Tromey <tromey@adacore.com> | 2023-05-26 13:35:52 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-06-22 09:46:23 -0600 |
commit | 59e75852dd9edff2199c5cd27a9be9f596a2fba6 (patch) | |
tree | 9e4b2f16887749aedfd285527ad535d5456fe6f6 /gdb/testsuite/gdb.dap | |
parent | 5ad513ae6288b186b982017bc20e7d492220a2ba (diff) | |
download | binutils-59e75852dd9edff2199c5cd27a9be9f596a2fba6.zip binutils-59e75852dd9edff2199c5cd27a9be9f596a2fba6.tar.gz binutils-59e75852dd9edff2199c5cd27a9be9f596a2fba6.tar.bz2 |
Handle supportsVariablePaging in DAP
A bug report about the supportsVariablePaging capability in DAP
resulted in a clarification: when this capability is not present, DAP
implementations should ignore the paging parameters to the "variables"
request. This patch implements this clarification.
Diffstat (limited to 'gdb/testsuite/gdb.dap')
-rw-r--r-- | gdb/testsuite/gdb.dap/scopes.exp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.dap/scopes.exp b/gdb/testsuite/gdb.dap/scopes.exp index cf9174f..6937bad 100644 --- a/gdb/testsuite/gdb.dap/scopes.exp +++ b/gdb/testsuite/gdb.dap/scopes.exp @@ -67,13 +67,23 @@ gdb_assert {[dict get $reg_scope presentationHint] == "registers"} \ gdb_assert {[dict get $reg_scope namedVariables] > 0} "at least one register" set num [dict get $scope variablesReference] -set refs [lindex [dap_check_request_and_response "fetch variables" \ - "variables" \ - [format {o variablesReference [i %d] count [i 3]} \ - $num]] \ - 0] - -foreach var [dict get $refs body variables] { +# Send two requests and combine them, to verify that using a range +# works. +set refs1 [lindex [dap_check_request_and_response "fetch variables 0,1" \ + "variables" \ + [format {o variablesReference [i %d] count [i 2]} \ + $num]] \ + 0] +set refs2 [lindex [dap_check_request_and_response "fetch variables 2" \ + "variables" \ + [format {o variablesReference [i %d] \ + start [i 2] count [i 1]} \ + $num]] \ + 0] + +set vars [concat [dict get $refs1 body variables] \ + [dict get $refs2 body variables]] +foreach var $vars { set name [dict get $var name] if {$name != "dei"} { |