From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id 49EDA3858407; Thu, 26 Jan 2023 20:23:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49EDA3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674764588; bh=ifLXpkl4VkyyAzqS/ZPzZOdRiprA2Dj7RP+mCXJUcJE=; h=From:To:Subject:Date:From; b=SVCUZfNigwI0+a73hr+OCkMFAQtUL/V+ZhKOEbuAkvD755EBZ15dsQ2VkiZDZTvcU 4DtP52CScQF2nbWKW+IyRtcMOqzP2iE7KsuagrhY/6UYlnNUSJIjgc+4RkK30gYCIE DlVQRGhCYVnT/dJz5zI3O3cFMSXAlqzX3zmsOJTw= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_check X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: faee137249c8494e36d0170c0a57319113f54185 X-Git-Newrev: 59db4c934f9931d0c77a36cac1f9d6402ab7496d Message-Id: <20230126202308.49EDA3858407@sourceware.org> Date: Thu, 26 Jan 2023 20:23:08 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D59db4c934f99= 31d0c77a36cac1f9d6402ab7496d commit 59db4c934f9931d0c77a36cac1f9d6402ab7496d Author: Simon Marchi Date: Fri Jan 6 12:09:38 2023 -0500 gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_check =20 I think that name describes a bit better what the proc does, it is similar to "wait_for" in tuiterm.exp. =20 Change-Id: Ie55aa011e6595dd1b5a874db13881ba572ace419 Diff: --- gdb/testsuite/gdb.dap/basic-dap.exp | 10 +++++----- gdb/testsuite/lib/dap-support.exp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.dap/basic-dap.exp b/gdb/testsuite/gdb.dap/ba= sic-dap.exp index 68d0440f692..795702a5a8f 100644 --- a/gdb/testsuite/gdb.dap/basic-dap.exp +++ b/gdb/testsuite/gdb.dap/basic-dap.exp @@ -88,9 +88,9 @@ set bplist [dict get $response body breakpoints] set insn_pc [dict get [lindex $bplist 0] instructionReference] =20 dap_check_request_and_response "start inferior" configurationDone -dap_read_event "inferior started" thread "body reason" started +dap_wait_for_event_and_check "inferior started" thread "body reason" start= ed =20 -dap_read_event "stopped at function breakpoint" stopped \ +dap_wait_for_event_and_check "stopped at function breakpoint" stopped \ "body reason" breakpoint \ "body hitBreakpointIds" $fn_bpno =20 @@ -100,7 +100,7 @@ dap_match_values "global value in function" [lindex $ob= j 0] \ "body result" 23 =20 dap_check_request_and_response step stepIn {o threadId [i 1]} -dap_read_event "stopped after step" stopped "body reason" step +dap_wait_for_event_and_check "stopped after step" stopped "body reason" st= ep =20 set obj [dap_check_request_and_response "evaluate global second time" \ evaluate {o expression [s global_variable]}] @@ -108,12 +108,12 @@ dap_match_values "global value after step" [lindex $o= bj 0] \ "body result" 24 =20 dap_check_request_and_response "continue to address" continue -dap_read_event "stopped at address breakpoint" stopped \ +dap_wait_for_event_and_check "stopped at address breakpoint" stopped \ "body reason" breakpoint \ "body hitBreakpointIds" $insn_bpno =20 dap_check_request_and_response "continue to line" continue -dap_read_event "stopped at line breakpoint" stopped \ +dap_wait_for_event_and_check "stopped at line breakpoint" stopped \ "body reason" breakpoint \ "body hitBreakpointIds" $line_bpno =20 diff --git a/gdb/testsuite/lib/dap-support.exp b/gdb/testsuite/lib/dap-supp= ort.exp index ee55a4acc9c..179f675b4d8 100644 --- a/gdb/testsuite/lib/dap-support.exp +++ b/gdb/testsuite/lib/dap-support.exp @@ -284,7 +284,7 @@ proc dap_match_values {name d args} { =20 # A helper for dap_read_event that reads events, looking for one # matching TYPE. -proc _dap_read_event {type} { +proc _dap_wait_for_event {type} { while 1 { # We don't do any extra error checking here for the time # being; we'll just get a timeout thrown instead. @@ -303,12 +303,12 @@ proc _dap_read_event {type} { # between a field name (in "dict get" form) and its expected value. # # Returns the dict for the chosen event, or empty string on error. -proc dap_read_event {name type args} { +proc dap_wait_for_event_and_check {name type args} { if {$name =3D=3D ""} { set name $type } =20 - set result [_dap_read_event $type] + set result [_dap_wait_for_event $type] eval dap_match_values [list $name $result] $args =20 return $result