It isn't useful for users to see "<unknown>" as a stack trace when lldb fails to symbolicate a stack frame. I've replaced "<unknown>" with the value of the program counter instead. Test Plan: To test this, I opened a target that lldb fails to symbolicate in VSCode, and observed in the CALL STACK section that instead of being shown as "<unknown>", those stack frames are represented by their program counters. I added a new test case, `TestVSCode_stackTraceMissingFunctionName` that exercises this feature. I also ran `lldb-dotest -p TestVSCode` and saw that the tests passed. Differential Revision: https://reviews.llvm.org/D156732
27 lines
743 B
Python
27 lines
743 B
Python
"""
|
|
Test lldb-vscode stack trace response
|
|
"""
|
|
|
|
|
|
import vscode
|
|
from lldbsuite.test.decorators import *
|
|
import os
|
|
|
|
import lldbvscode_testcase
|
|
from lldbsuite.test import lldbtest, lldbutil
|
|
|
|
|
|
class TestVSCode_stackTraceMissingFunctionName(lldbvscode_testcase.VSCodeTestCaseBase):
|
|
@skipIfWindows
|
|
@skipIfRemote
|
|
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.assertEquals(frame_without_function_name["name"], "0x0000000000000000")
|