Skip to content

Commit 0ed2dc1

Browse files
committed
Fix formatting
1 parent 0259bf8 commit 0ed2dc1

File tree

6 files changed

+38
-15
lines changed

6 files changed

+38
-15
lines changed

lldb/source/Plugins/SystemRuntime/MacOSX/AbortWithPayloadFrameRecognizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ AbortWithPayloadFrameRecognizer::RecognizeFrame(lldb::StackFrameSP frame_sp) {
5656
static constexpr llvm::StringLiteral info_key("abort_with_payload");
5757

5858
Log *log = GetLog(LLDBLog::SystemRuntime);
59-
59+
6060
if (!frame_sp) {
6161
LLDB_LOG(log, "abort_with_payload recognizer: invalid frame.");
6262
return {};
@@ -197,8 +197,8 @@ AbortWithPayloadFrameRecognizer::RecognizeFrame(lldb::StackFrameSP frame_sp) {
197197
abort_dict_sp->AddStringItem(reason_key, reason_string);
198198
abort_dict_sp->AddIntegerItem(flags_key, flags_val);
199199

200-
// This will overwrite the abort_with_payload information in the dictionary
201-
// already. But we can only crash on abort_with_payload once, so that
200+
// This will overwrite the abort_with_payload information in the dictionary
201+
// already. But we can only crash on abort_with_payload once, so that
202202
// shouldn't matter.
203203
process->GetExtendedCrashInfoDict()->AddItem(info_key, abort_dict_sp);
204204

lldb/source/Target/StackFrameRecognizer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ void StackFrameRecognizerManager::AddRecognizer(
6666
Mangled::NamePreference symbol_mangling, bool first_instruction_only) {
6767
m_recognizers.push_front({(uint32_t)m_recognizers.size(), recognizer, false,
6868
module, RegularExpressionSP(), symbols,
69-
RegularExpressionSP(), symbol_mangling, first_instruction_only});
69+
RegularExpressionSP(), symbol_mangling,
70+
first_instruction_only});
7071
BumpGeneration();
7172
}
7273

7374
void StackFrameRecognizerManager::AddRecognizer(
7475
StackFrameRecognizerSP recognizer, RegularExpressionSP module,
75-
RegularExpressionSP symbol,
76-
Mangled::NamePreference symbol_mangling, bool first_instruction_only) {
76+
RegularExpressionSP symbol, Mangled::NamePreference symbol_mangling,
77+
bool first_instruction_only) {
7778
m_recognizers.push_front({(uint32_t)m_recognizers.size(), recognizer, true,
7879
ConstString(), module, std::vector<ConstString>(),
7980
symbol, symbol_mangling, first_instruction_only});

lldb/source/Target/VerboseTrapFrameRecognizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ void RegisterVerboseTrapFrameRecognizer(Process &process) {
116116
std::make_shared<VerboseTrapFrameRecognizer>();
117117

118118
process.GetTarget().GetFrameRecognizerManager().AddRecognizer(
119-
srf_recognizer_sp, module_regex_sp, symbol_regex_sp, Mangled::ePreferDemangled, false);
119+
srf_recognizer_sp, module_regex_sp, symbol_regex_sp,
120+
Mangled::ePreferDemangled, false);
120121
}
121122

122123
} // namespace lldb_private

lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def test_frame_recognizer_1(self):
3535

3636
self.expect(
3737
"frame recognizer list",
38-
substrs=["0: recognizer.MyFrameRecognizer, module a.out, demangled symbol foo"],
38+
substrs=[
39+
"0: recognizer.MyFrameRecognizer, module a.out, demangled symbol foo"
40+
],
3941
)
4042

4143
self.runCmd(
@@ -305,7 +307,9 @@ def test_frame_recognizer_target_specific(self):
305307

306308
self.expect(
307309
"frame recognizer list",
308-
substrs=["recognizer.MyFrameRecognizer, module a.out, demangled symbol bar"],
310+
substrs=[
311+
"recognizer.MyFrameRecognizer, module a.out, demangled symbol bar"
312+
],
309313
)
310314

311315
# Now the new target should also recognize the frame.

lldb/test/API/lang/cpp/std-function-recognizer/TestStdFunctionRecognizer.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ def test_frame_recognizer(self):
1717
self.assertIn("foo", thread.GetFrameAtIndex(0).GetFunctionName())
1818
# Skip all hidden frames
1919
frame_id = 1
20-
while frame_id < thread.GetNumFrames() and thread.GetFrameAtIndex(frame_id).IsHidden():
20+
while (
21+
frame_id < thread.GetNumFrames()
22+
and thread.GetFrameAtIndex(frame_id).IsHidden()
23+
):
2124
frame_id = frame_id + 1
2225
# Expect `std::function<...>::operator()` to be the direct parent of `foo`
23-
self.assertIn("::operator()", thread.GetFrameAtIndex(frame_id).GetFunctionName())
26+
self.assertIn(
27+
"::operator()", thread.GetFrameAtIndex(frame_id).GetFunctionName()
28+
)
2429
# And right above that, there should be the `main` frame
2530
self.assertIn("main", thread.GetFrameAtIndex(frame_id + 1).GetFunctionName())
2631

lldb/test/API/lang/cpp/std-invoke-recognizer/TestStdInvokeRecognizer.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,28 @@ def test_frame_recognizer(self):
1616
)
1717

1818
while process.GetState() != lldb.eStateExited:
19-
self.assertTrue(any(f in thread.GetFrameAtIndex(0).GetFunctionName() for f in ["print_num", "add", "PrintAdder"]))
19+
self.assertTrue(
20+
any(
21+
f in thread.GetFrameAtIndex(0).GetFunctionName()
22+
for f in ["print_num", "add", "PrintAdder"]
23+
)
24+
)
2025
print(thread.GetFrameAtIndex(0).GetFunctionName())
2126
# Skip all hidden frames
2227
frame_id = 1
23-
while frame_id < thread.GetNumFrames() and thread.GetFrameAtIndex(frame_id).IsHidden():
28+
while (
29+
frame_id < thread.GetNumFrames()
30+
and thread.GetFrameAtIndex(frame_id).IsHidden()
31+
):
2432
print(thread.GetFrameAtIndex(frame_id).GetFunctionName())
2533
frame_id = frame_id + 1
2634
print(thread.GetFrameAtIndex(frame_id).GetFunctionName())
2735
# Expect `std::invoke` to be the direct parent
28-
self.assertIn("::invoke", thread.GetFrameAtIndex(frame_id).GetFunctionName())
36+
self.assertIn(
37+
"::invoke", thread.GetFrameAtIndex(frame_id).GetFunctionName()
38+
)
2939
# And right above that, there should be the `main` frame
30-
self.assertIn("main", thread.GetFrameAtIndex(frame_id + 1).GetFunctionName())
40+
self.assertIn(
41+
"main", thread.GetFrameAtIndex(frame_id + 1).GetFunctionName()
42+
)
3143
process.Continue()

0 commit comments

Comments
 (0)