[5/9] gdb/testsuite/dap: remove catch from dap_read_event

Message ID 20230106185729.42372-6-simon.marchi@efficios.com
State Committed
Commit 4dde3b33e461e40e069c2026861b3e5ba2476604
Headers
Series Fix gdb.dap/basic-dap.exp for PIE |

Commit Message

Simon Marchi Jan. 6, 2023, 6:57 p.m. UTC
  This catch didn't cause me any trouble, but for the same reason as the
preceding patch, I think it's a bit better to just let any exception
propagate, to make for easier debugging.

Change-Id: I1779e62c788b77fef2d50434edf4c3d2ec5e1c4c
---
 gdb/testsuite/lib/dap-support.exp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
  

Patch

diff --git a/gdb/testsuite/lib/dap-support.exp b/gdb/testsuite/lib/dap-support.exp
index bc99f0182a7..8c85f90c352 100644
--- a/gdb/testsuite/lib/dap-support.exp
+++ b/gdb/testsuite/lib/dap-support.exp
@@ -310,11 +310,7 @@  proc dap_read_event {name type args} {
 	set name $type
     }
 
-    if {[catch {_dap_read_event $type} result]} {
-	fail $name
-	return ""
-    }
-
+    set result [_dap_read_event $type]
     eval dap_match_values [list $name $result] $args
 
     return $result