Refactoring `stackTrace` to perform frame look ups in a more on-demand fashion to improve overall performance. Additionally adding additional information to the `exceptionInfo` request to report exception stacks there instead of merging the exception stack into the stack trace. The `exceptionInfo` request is only called if a stop event occurs with `reason='exception'`, which should mitigate the performance of `SBThread::GetCurrentException` calls. Adding unit tests for exception handling and stack trace supporting.
21 lines
637 B
Python
21 lines
637 B
Python
"""
|
|
Test lldb-dap stack trace response
|
|
"""
|
|
|
|
from lldbsuite.test.decorators import *
|
|
import lldbdap_testcase
|
|
|
|
|
|
class TestDAP_stackTraceMissingFunctionName(lldbdap_testcase.DAPTestCaseBase):
|
|
@skipIfWindows
|
|
def test_missingFunctionName(self):
|
|
"""
|
|
Test that the stack frame without a function name is given its pc in the response.
|
|
"""
|
|
program = self.getBuildArtifact("a.out")
|
|
self.build_and_launch(program)
|
|
|
|
self.continue_to_next_stop()
|
|
frame_without_function_name = self.get_stackFrames()[0]
|
|
self.assertEqual(frame_without_function_name["name"], "0x0000000000000000")
|