Skip to content

Commit f070eb1

Browse files
committed
Formatters
1 parent 076f335 commit f070eb1

File tree

12 files changed

+43
-37
lines changed

12 files changed

+43
-37
lines changed

lldb/include/lldb/Interpreter/Interfaces/ScriptedBreakpointInterface.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDBREAKPOINTINTERFACE_H
1010
#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDBREAKPOINTINTERFACE_H
1111

12-
#include "lldb/lldb-private.h"
13-
#include "lldb/Symbol/SymbolContext.h"
1412
#include "ScriptedInterface.h"
13+
#include "lldb/Symbol/SymbolContext.h"
14+
#include "lldb/lldb-private.h"
1515

1616
namespace lldb_private {
1717
class ScriptedBreakpointInterface : public ScriptedInterface {
@@ -23,9 +23,7 @@ class ScriptedBreakpointInterface : public ScriptedInterface {
2323
/// "ResolverCallback" will get called when a new module is loaded. The
2424
/// new module information is passed in sym_ctx. The Resolver will add
2525
/// any breakpoint locations it found in that module.
26-
virtual bool ResolverCallback(SymbolContext sym_ctx) {
27-
return true;
28-
}
26+
virtual bool ResolverCallback(SymbolContext sym_ctx) { return true; }
2927
virtual lldb::SearchDepth GetDepth() { return lldb::eSearchDepthModule; }
3028
virtual std::optional<std::string> GetShortHelp() { return nullptr; }
3129
};

lldb/include/lldb/Interpreter/ScriptInterpreter.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ class ScriptInterpreter : public PluginInterface {
548548
return {};
549549
}
550550

551-
virtual lldb::ScriptedBreakpointInterfaceSP CreateScriptedBreakpointInterface() {
551+
virtual lldb::ScriptedBreakpointInterfaceSP
552+
CreateScriptedBreakpointInterface() {
552553
return {};
553554
}
554555

@@ -566,7 +567,8 @@ class ScriptInterpreter : public PluginInterface {
566567

567568
lldb::StreamSP GetOpaqueTypeFromSBStream(const lldb::SBStream &stream) const;
568569

569-
SymbolContext GetOpaqueTypeFromSBSymbolContext(const lldb::SBSymbolContext &sym_ctx) const;
570+
SymbolContext
571+
GetOpaqueTypeFromSBSymbolContext(const lldb::SBSymbolContext &sym_ctx) const;
570572

571573
lldb::BreakpointSP
572574
GetOpaqueTypeFromSBBreakpoint(const lldb::SBBreakpoint &breakpoint) const;

lldb/source/Breakpoint/BreakpointResolverScripted.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ void BreakpointResolverScripted::CreateImplementationIfNeeded(
5757
"Script interpreter couldn't create Scripted Breakpoint Interface");
5858
return;
5959
}
60-
61-
auto obj_or_err = m_interface_sp->CreatePluginObject(
62-
m_class_name, breakpoint_sp, m_args);
60+
61+
auto obj_or_err =
62+
m_interface_sp->CreatePluginObject(m_class_name, breakpoint_sp, m_args);
6363
if (!obj_or_err) {
6464
m_error = Status::FromError(obj_or_err.takeError());
6565
return;

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
#if LLDB_ENABLE_PYTHON
1717

1818
#include "OperatingSystemPythonInterface.h"
19+
#include "ScriptedBreakpointPythonInterface.h"
1920
#include "ScriptedPlatformPythonInterface.h"
2021
#include "ScriptedProcessPythonInterface.h"
2122
#include "ScriptedStopHookPythonInterface.h"
22-
#include "ScriptedBreakpointPythonInterface.h"
2323
#include "ScriptedThreadPlanPythonInterface.h"
2424

2525
namespace lldb_private {

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedBreakpointPythonInterface.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ ScriptedBreakpointPythonInterface::ScriptedBreakpointPythonInterface(
3131
: ScriptedBreakpointInterface(), ScriptedPythonInterface(interpreter) {}
3232

3333
llvm::Expected<StructuredData::GenericSP>
34-
ScriptedBreakpointPythonInterface::CreatePluginObject(llvm::StringRef class_name,
35-
lldb::BreakpointSP break_sp,
36-
const StructuredDataImpl &args_sp) {
34+
ScriptedBreakpointPythonInterface::CreatePluginObject(
35+
llvm::StringRef class_name, lldb::BreakpointSP break_sp,
36+
const StructuredDataImpl &args_sp) {
3737
return ScriptedPythonInterface::CreatePluginObject(class_name, nullptr,
3838
break_sp, args_sp);
3939
}
4040

41-
bool
42-
ScriptedBreakpointPythonInterface::ResolverCallback(SymbolContext sym_ctx) {
41+
bool ScriptedBreakpointPythonInterface::ResolverCallback(
42+
SymbolContext sym_ctx) {
4343
Status error;
44-
44+
4545
StructuredData::ObjectSP obj = Dispatch("__callback__", error, sym_ctx);
4646

4747
if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj,
4848
error)) {
4949
Log *log = GetLog(LLDBLog::Script);
50-
LLDB_LOG(log, "Error calling __callback__ method: {1}", error);
50+
LLDB_LOG(log, "Error calling __callback__ method: {1}", error);
5151
return true;
5252
}
5353
return obj->GetBooleanValue();
@@ -59,23 +59,23 @@ lldb::SearchDepth ScriptedBreakpointPythonInterface::GetDepth() {
5959

6060
if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj,
6161
error)) {
62-
return lldb::eSearchDepthModule;
62+
return lldb::eSearchDepthModule;
6363
}
6464
uint64_t value = obj->GetUnsignedIntegerValue();
6565
if (value <= lldb::kLastSearchDepthKind)
66-
return (lldb::SearchDepth) value;
66+
return (lldb::SearchDepth)value;
6767
// This is what we were doing on error before, though I'm not sure that's
6868
// better than returning eSearchDepthInvalid.
6969
return lldb::eSearchDepthModule;
7070
}
7171

72-
std::optional<std::string> ScriptedBreakpointPythonInterface::GetShortHelp() {
72+
std::optional<std::string> ScriptedBreakpointPythonInterface::GetShortHelp() {
7373
Status error;
7474
StructuredData::ObjectSP obj = Dispatch("get_short_help", error);
7575

7676
if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj,
7777
error)) {
78-
return {};
78+
return {};
7979
}
8080

8181
return obj->GetAsString()->GetValue().str();
@@ -88,7 +88,8 @@ void ScriptedBreakpointPythonInterface::Initialize() {
8888
"SBTarget.BreakpointCreateFromScript"};
8989
PluginManager::RegisterPlugin(
9090
GetPluginNameStatic(),
91-
llvm::StringRef("Create a breakpoint that chooses locations based on user-created callbacks"),
91+
llvm::StringRef("Create a breakpoint that chooses locations based on "
92+
"user-created callbacks"),
9293
CreateInstance, eScriptLanguagePython, {ci_usages, api_usages});
9394
}
9495

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedBreakpointPythonInterface.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//===-- ScriptedBreakpointPythonInterface.h -----------------------*- C++ -*-===//
1+
//===-- ScriptedBreakpointPythonInterface.h -----------------------*- C++
2+
//-*-===//
23
//
34
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,8 +19,8 @@
1819

1920
namespace lldb_private {
2021
class ScriptedBreakpointPythonInterface : public ScriptedBreakpointInterface,
21-
public ScriptedPythonInterface,
22-
public PluginInterface {
22+
public ScriptedPythonInterface,
23+
public PluginInterface {
2324
public:
2425
ScriptedBreakpointPythonInterface(ScriptInterpreterPythonImpl &interpreter);
2526

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ template <>
8484
SymbolContext
8585
ScriptedPythonInterface::ExtractValueFromPythonObject<SymbolContext>(
8686
python::PythonObject &p, Status &error) {
87-
if (lldb::SBSymbolContext *sb_symbol_context = reinterpret_cast<lldb::SBSymbolContext *>(
88-
python::LLDBSWIGPython_CastPyObjectToSBSymbolContext(p.get())))
87+
if (lldb::SBSymbolContext *sb_symbol_context =
88+
reinterpret_cast<lldb::SBSymbolContext *>(
89+
python::LLDBSWIGPython_CastPyObjectToSBSymbolContext(p.get())))
8990
return m_interpreter.GetOpaqueTypeFromSBSymbolContext(*sb_symbol_context);
9091
error = Status::FromErrorString(
9192
"Couldn't cast lldb::SBSymbolContext to lldb_private::SymbolContext.");

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ Event *ScriptedPythonInterface::ExtractValueFromPythonObject<Event *>(
564564
python::PythonObject &p, Status &error);
565565

566566
template <>
567-
SymbolContext ScriptedPythonInterface::ExtractValueFromPythonObject<SymbolContext>(
567+
SymbolContext
568+
ScriptedPythonInterface::ExtractValueFromPythonObject<SymbolContext>(
568569
python::PythonObject &p, Status &error);
569570

570571
template <>

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
9393
lldb::ScriptedProcessInterfaceUP CreateScriptedProcessInterface() override;
9494

9595
lldb::ScriptedStopHookInterfaceSP CreateScriptedStopHookInterface() override;
96-
97-
lldb::ScriptedBreakpointInterfaceSP CreateScriptedBreakpointInterface() override;
96+
97+
lldb::ScriptedBreakpointInterfaceSP
98+
CreateScriptedBreakpointInterface() override;
9899

99100
lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override;
100101

lldb/source/Target/Target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#include "lldb/Host/StreamFile.h"
3737
#include "lldb/Interpreter/CommandInterpreter.h"
3838
#include "lldb/Interpreter/CommandReturnObject.h"
39-
#include "lldb/Interpreter/Interfaces/ScriptedStopHookInterface.h"
4039
#include "lldb/Interpreter/Interfaces/ScriptedBreakpointInterface.h"
40+
#include "lldb/Interpreter/Interfaces/ScriptedStopHookInterface.h"
4141
#include "lldb/Interpreter/OptionGroupWatchpoint.h"
4242
#include "lldb/Interpreter/OptionValues.h"
4343
#include "lldb/Interpreter/Property.h"

0 commit comments

Comments
 (0)