Skip to content

Commit

Permalink
[lldb] Support non-default libc++ ABI namespace
Browse files Browse the repository at this point in the history
This is a fix forward for the issue introduced in #104523.
  • Loading branch information
petrhosek committed Aug 26, 2024
1 parent 92e00af commit 68a1593
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer {
public:
LibCXXFrameRecognizer()
: m_hidden_function_regex(
R"(^std::__1::(__function.*::operator\(\)|__invoke))"
R"(^std::__.*::(__function.*::operator\(\)|__invoke))"
R"((\[.*\])?)" // ABI tag.
R"(( const)?$)"), // const.
m_hidden_frame(new LibCXXHiddenFrame()) {}
Expand All @@ -81,7 +81,7 @@ CPPLanguageRuntime::CPPLanguageRuntime(Process *process)
if (process)
process->GetTarget().GetFrameRecognizerManager().AddRecognizer(
StackFrameRecognizerSP(new LibCXXFrameRecognizer()), {},
std::make_shared<RegularExpression>("^std::__1::"),
std::make_shared<RegularExpression>("^std::__.*::"),
/*first_instruction_only*/ false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ def test_backtrace(self):
substrs=["frame", "foo", "frame", "main"],
)
self.expect(
"thread backtrace", matching=False, patterns=["frame.*std::__1::__function"]
"thread backtrace", matching=False, patterns=["frame.*std::__.*::__function"]
)
# Unfiltered.
self.expect(
"thread backtrace -u",
ordered=True,
patterns=["frame.*foo", "frame.*std::__1::__function", "frame.*main"],
patterns=["frame.*foo", "frame.*std::__.*::__function", "frame.*main"],
)
self.expect(
"thread backtrace --unfiltered",
ordered=True,
patterns=["frame.*foo", "frame.*std::__1::__function", "frame.*main"],
patterns=["frame.*foo", "frame.*std::__.*::__function", "frame.*main"],
)

@add_test_categories(["libc++"])
Expand Down

0 comments on commit 68a1593

Please sign in to comment.