Skip to content

Commit 446eccb

Browse files
authored
Revert "[Dexter] Temporarily print DAP logs on specific exception (#157130)"
This reverts commit 5341e26.
1 parent 17abebe commit 446eccb

File tree

82 files changed

+83
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+83
-94
lines changed

cross-project-tests/debuginfo-tests/dexter/dex/debugger/DAP.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import abc
1111
from collections import defaultdict
1212
import copy
13-
import io
1413
import json
1514
import os
1615
import shlex
@@ -51,7 +50,6 @@ def __init__(self, context):
5150
self.prefix_recv: str = "<-"
5251
self.out_handle = None
5352
self.open = False
54-
self.text = io.StringIO() # In-process copy of the message log.
5553
self.lock = threading.Lock()
5654

5755
def _custom_enter(self):
@@ -93,8 +91,6 @@ def write_message(self, message: dict, incoming: bool):
9391
message_str = json.dumps(
9492
self._colorize_dap_message(message), indent=self.indent
9593
).replace("\\u001b", "\033")
96-
97-
self.text.write(f"{prefix} {message_str}\n")
9894
if self.out_handle is not None and self.open:
9995
with self.lock:
10096
self.out_handle.write(f"{prefix} {message_str}\n")

cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -430,16 +430,9 @@ def _post_step_hook(self):
430430
trace_response = self._await_response(trace_req_id)
431431
if not trace_response["success"]:
432432
raise DebuggerException("failed to get stack frames")
433-
try:
434-
stackframes = trace_response["body"]["stackFrames"]
435-
path = stackframes[0]["source"]["path"]
436-
addr = stackframes[0]["instructionPointerReference"]
437-
except KeyError as e:
438-
# Temporarily print the DAP log if this fails to aid debugging
439-
# a buildbot failure that doesn't reproduce easily.
440-
print(self.message_logger.text.getvalue(), file=sys.stderr)
441-
raise e
442-
433+
stackframes = trace_response["body"]["stackFrames"]
434+
path = stackframes[0]["source"]["path"]
435+
addr = stackframes[0]["instructionPointerReference"]
443436
if any(
444437
self._debugger_state.bp_addr_map.get(self.dex_id_to_dap_id[dex_bp_id])
445438
== addr

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/control/dex-continue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// UNSUPPORTED: system-windows
1010
//
1111
// RUN: %dexter_regression_test_cxx_build %s -o %t
12-
// RUN: %dexter_regression_test_run -v --binary %t -- %s 2>&1 | FileCheck --dump-input-context=999999999 %s
12+
// RUN: %dexter_regression_test_run -v --binary %t -- %s 2>&1 | FileCheck %s
1313

1414
int g = 0;
1515
int c(int) {

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/control/dex_step_function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// UNSUPPORTED: system-windows
66
//
77
// RUN: %dexter_regression_test_cxx_build %s -o %t
8-
// RUN: %dexter_regression_test_run -v --binary %t -- %s 2>&1 | FileCheck --dump-input-context=999999999 %s
8+
// RUN: %dexter_regression_test_run -v --binary %t -- %s 2>&1 | FileCheck %s
99

1010
int g = 0;
1111
int c(int) {

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//
88
// RUN: %dexter_regression_test_cxx_build %s -o %t
9-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
9+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
1010
// CHECK: dex_declare_file.cpp
1111

1212
int main() {

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// UNSUPPORTED: system-darwin
66
//
77
// RUN: %dexter_regression_test_cxx_build %s -o %t
8-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
8+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
99
// CHECK: expect_program_state.cpp:
1010

1111
int GCD(int lhs, int rhs)

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// UNSUPPORTED: system-darwin
66
//
77
// RUN: %dexter_regression_test_cxx_build %s -o %t
8-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
8+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
99
// CHECK: expect_step_kinds.cpp:
1010

1111
int abs(int i){

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// UNSUPPORTED: system-darwin
66
//
77
// RUN: %dexter_regression_test_cxx_build %s -o %t
8-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
8+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
99
// CHECK: expect_step_order.cpp:
1010

1111
int main()

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// expected behaviour.
1111
//
1212
// RUN: %dexter_regression_test_cxx_build %s -o %t
13-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
13+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
1414
// CHECK: expect_watch_type.cpp:
1515

1616
template<class T>

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//
88
// RUN: %dexter_regression_test_cxx_build %s -o %t
9-
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck --dump-input-context=999999999 %s
9+
// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
1010
// CHECK: expect_watch_value.cpp:
1111

1212
int main()

0 commit comments

Comments
 (0)