1 //===-- CommandObjectBreakpointCommand.cpp ----------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "CommandObjectBreakpointCommand.h"
10 #include "CommandObjectBreakpoint.h"
11 #include "lldb/Breakpoint/Breakpoint.h"
12 #include "lldb/Breakpoint/BreakpointIDList.h"
13 #include "lldb/Breakpoint/BreakpointLocation.h"
14 #include "lldb/Breakpoint/StoppointCallbackContext.h"
15 #include "lldb/Core/IOHandler.h"
16 #include "lldb/Host/OptionParser.h"
17 #include "lldb/Interpreter/CommandInterpreter.h"
18 #include "lldb/Interpreter/CommandReturnObject.h"
19 #include "lldb/Interpreter/OptionArgParser.h"
20 #include "lldb/Target/Target.h"
21 #include "lldb/Target/Thread.h"
22 #include "lldb/Utility/State.h"
24 #include "llvm/ADT/STLExtras.h"
27 using namespace lldb_private;
29 // CommandObjectBreakpointCommandAdd
31 // FIXME: "script-type" needs to have its contents determined dynamically, so
32 // somebody can add a new scripting
33 // language to lldb and have it pickable here without having to change this
34 // enumeration by hand and rebuild lldb proper.
36 static constexpr OptionEnumValueElement g_script_option_enumeration[] = {
37 {eScriptLanguageNone, "command",
38 "Commands are in the lldb command interpreter language"},
39 {eScriptLanguagePython, "python", "Commands are in the Python language."},
40 {eSortOrderByName, "default-script",
41 "Commands are in the default scripting language."} };
43 static constexpr OptionEnumValues ScriptOptionEnum() {
44 return OptionEnumValues(g_script_option_enumeration);
47 static constexpr OptionDefinition g_breakpoint_add_options[] = {
49 { LLDB_OPT_SET_1, false, "one-liner", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOneLiner, "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." },
50 { LLDB_OPT_SET_ALL, false, "stop-on-error", 'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Specify whether breakpoint command execution should terminate on error." },
51 { LLDB_OPT_SET_ALL, false, "script-type", 's', OptionParser::eRequiredArgument, nullptr, ScriptOptionEnum(), 0, eArgTypeNone, "Specify the language for the commands - if none is specified, the lldb command interpreter will be used." },
52 { LLDB_OPT_SET_2, false, "python-function", 'F', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePythonFunction, "Give the name of a Python function to run as command for this breakpoint. Be sure to give a module name if appropriate." },
53 { LLDB_OPT_SET_ALL, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Sets Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
57 class CommandObjectBreakpointCommandAdd : public CommandObjectParsed,
58 public IOHandlerDelegateMultiline {
60 CommandObjectBreakpointCommandAdd(CommandInterpreter &interpreter)
61 : CommandObjectParsed(interpreter, "add",
62 "Add LLDB commands to a breakpoint, to be executed "
63 "whenever the breakpoint is hit."
64 " If no breakpoint is specified, adds the "
65 "commands to the last created breakpoint.",
67 IOHandlerDelegateMultiline("DONE",
68 IOHandlerDelegate::Completion::LLDBCommand),
72 General information about entering breakpoint commands
73 ------------------------------------------------------
76 "This command will prompt for commands to be executed when the specified \
77 breakpoint is hit. Each command is typed on its own line following the '> ' \
78 prompt until 'DONE' is entered."
82 "Syntactic errors may not be detected when initially entered, and many \
83 malformed commands can silently fail when executed. If your breakpoint commands \
84 do not appear to be executing, double-check the command syntax."
88 "Note: You may enter any debugger command exactly as you would at the debugger \
89 prompt. There is no limit to the number of commands supplied, but do NOT enter \
90 more than one command per line."
93 Special information about PYTHON breakpoint commands
94 ----------------------------------------------------
97 "You may enter either one or more lines of Python, including function \
98 definitions or calls to functions that will have been imported by the time \
99 the code executes. Single line breakpoint commands will be interpreted 'as is' \
100 when the breakpoint is hit. Multiple lines of Python will be wrapped in a \
101 generated function, and a call to the function will be attached to the breakpoint."
104 This auto-generated function is passed in three arguments:
106 frame: an lldb.SBFrame object for the frame which hit breakpoint.
108 bp_loc: an lldb.SBBreakpointLocation object that represents the breakpoint location that was hit.
110 dict: the python session dictionary hit.
113 "When specifying a python function with the --python-function option, you need \
114 to supply the function name prepended by the module name:"
117 --python-function myutils.breakpoint_callback
119 The function itself must have the following prototype:
121 def breakpoint_callback(frame, bp_loc, dict):
122 # Your code goes here
125 "The arguments are the same as the arguments passed to generated functions as \
126 described above. Note that the global variable 'lldb.frame' will NOT be updated when \
127 this function is called, so be sure to use the 'frame' argument. The 'frame' argument \
128 can get you to the thread via frame.GetThread(), the thread can get you to the \
129 process via thread.GetProcess(), and the process can get you back to the target \
130 via process.GetTarget()."
134 "Important Note: As Python code gets collected into functions, access to global \
135 variables requires explicit scoping using the 'global' keyword. Be sure to use correct \
136 Python syntax, including indentation, when entering Python breakpoint commands."
139 Example Python one-line breakpoint command:
141 (lldb) breakpoint command add -s python 1
142 Enter your Python command(s). Type 'DONE' to end.
143 > print "Hit this breakpoint!"
146 As a convenience, this also works for a short Python one-liner:
148 (lldb) breakpoint command add -s python 1 -o 'import time; print time.asctime()'
150 Launching '.../a.out' (x86_64)
151 (lldb) Fri Sep 10 12:17:45 2010
152 Process 21778 Stopped
153 * thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = breakpoint 1.1, queue = com.apple.main-thread
157 39 -> return val + 3;
160 42 int main (int argc, char const *argv[])
162 Example multiple line Python breakpoint command:
164 (lldb) breakpoint command add -s p 1
165 Enter your Python command(s). Type 'DONE' to end.
167 > bp_count = bp_count + 1
168 > print "Hit this breakpoint " + repr(bp_count) + " times!"
171 Example multiple line Python breakpoint command, using function definition:
173 (lldb) breakpoint command add -s python 1
174 Enter your Python command(s). Type 'DONE' to end.
175 > def breakpoint_output (bp_no):
176 > out_string = "Hit breakpoint number " + repr (bp_no)
179 > breakpoint_output (1)
183 "In this case, since there is a reference to a global variable, \
184 'bp_count', you will also need to make sure 'bp_count' exists and is \
193 "Your Python code, however organized, can optionally return a value. \
194 If the returned value is False, that tells LLDB not to stop at the breakpoint \
195 to which the code is associated. Returning anything other than False, or even \
196 returning None, or even omitting a return statement entirely, will cause \
201 "Final Note: A warning that no breakpoint command was generated when there \
202 are no syntax errors may indicate that a function was declared but never called.");
204 CommandArgumentEntry arg;
205 CommandArgumentData bp_id_arg;
207 // Define the first (and only) variant of this arg.
208 bp_id_arg.arg_type = eArgTypeBreakpointID;
209 bp_id_arg.arg_repetition = eArgRepeatOptional;
211 // There is only one variant this argument could be; put it into the
213 arg.push_back(bp_id_arg);
215 // Push the data for the first argument into the m_arguments vector.
216 m_arguments.push_back(arg);
219 ~CommandObjectBreakpointCommandAdd() override = default;
221 Options *GetOptions() override { return &m_options; }
223 void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
224 StreamFileSP output_sp(io_handler.GetOutputStreamFile());
225 if (output_sp && interactive) {
226 output_sp->PutCString(g_reader_instructions);
231 void IOHandlerInputComplete(IOHandler &io_handler,
232 std::string &line) override {
233 io_handler.SetIsDone(true);
235 std::vector<BreakpointOptions *> *bp_options_vec =
236 (std::vector<BreakpointOptions *> *)io_handler.GetUserData();
237 for (BreakpointOptions *bp_options : *bp_options_vec) {
241 auto cmd_data = llvm::make_unique<BreakpointOptions::CommandData>();
242 cmd_data->user_source.SplitIntoLines(line.c_str(), line.size());
243 bp_options->SetCommandDataCallback(cmd_data);
247 void CollectDataForBreakpointCommandCallback(
248 std::vector<BreakpointOptions *> &bp_options_vec,
249 CommandReturnObject &result) {
250 m_interpreter.GetLLDBCommandsFromIOHandler(
252 *this, // IOHandlerDelegate
253 true, // Run IOHandler in async mode
254 &bp_options_vec); // Baton for the "io_handler" that will be passed back
255 // into our IOHandlerDelegate functions
258 /// Set a one-liner as the callback for the breakpoint.
260 SetBreakpointCommandCallback(std::vector<BreakpointOptions *> &bp_options_vec,
261 const char *oneliner) {
262 for (auto bp_options : bp_options_vec) {
263 auto cmd_data = llvm::make_unique<BreakpointOptions::CommandData>();
265 cmd_data->user_source.AppendString(oneliner);
266 cmd_data->stop_on_error = m_options.m_stop_on_error;
268 bp_options->SetCommandDataCallback(cmd_data);
272 class CommandOptions : public Options {
275 : Options(), m_use_commands(false), m_use_script_language(false),
276 m_script_language(eScriptLanguageNone), m_use_one_liner(false),
277 m_one_liner(), m_function_name() {}
279 ~CommandOptions() override = default;
281 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
282 ExecutionContext *execution_context) override {
284 const int short_option = m_getopt_table[option_idx].val;
286 switch (short_option) {
288 m_use_one_liner = true;
289 m_one_liner = option_arg;
293 m_script_language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
294 option_arg, g_breakpoint_add_options[option_idx].enum_values,
295 eScriptLanguageNone, error);
297 if (m_script_language == eScriptLanguagePython ||
298 m_script_language == eScriptLanguageDefault) {
299 m_use_script_language = true;
301 m_use_script_language = false;
306 bool success = false;
308 OptionArgParser::ToBoolean(option_arg, false, &success);
310 error.SetErrorStringWithFormat(
311 "invalid value for stop-on-error: \"%s\"",
312 option_arg.str().c_str());
316 m_use_one_liner = false;
317 m_use_script_language = true;
318 m_function_name.assign(option_arg);
331 void OptionParsingStarting(ExecutionContext *execution_context) override {
332 m_use_commands = true;
333 m_use_script_language = false;
334 m_script_language = eScriptLanguageNone;
336 m_use_one_liner = false;
337 m_stop_on_error = true;
339 m_function_name.clear();
343 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
344 return llvm::makeArrayRef(g_breakpoint_add_options);
347 // Instance variables to hold the values for command options.
350 bool m_use_script_language;
351 lldb::ScriptLanguage m_script_language;
353 // Instance variables to hold the values for one_liner options.
354 bool m_use_one_liner;
355 std::string m_one_liner;
356 bool m_stop_on_error;
357 std::string m_function_name;
362 bool DoExecute(Args &command, CommandReturnObject &result) override {
363 Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
365 if (target == nullptr) {
366 result.AppendError("There is not a current executable; there are no "
367 "breakpoints to which to add commands");
368 result.SetStatus(eReturnStatusFailed);
372 const BreakpointList &breakpoints = target->GetBreakpointList();
373 size_t num_breakpoints = breakpoints.GetSize();
375 if (num_breakpoints == 0) {
376 result.AppendError("No breakpoints exist to have commands added");
377 result.SetStatus(eReturnStatusFailed);
381 if (!m_options.m_use_script_language &&
382 !m_options.m_function_name.empty()) {
383 result.AppendError("need to enable scripting to have a function run as a "
384 "breakpoint command");
385 result.SetStatus(eReturnStatusFailed);
389 BreakpointIDList valid_bp_ids;
390 CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
391 command, target, result, &valid_bp_ids,
392 BreakpointName::Permissions::PermissionKinds::listPerm);
394 m_bp_options_vec.clear();
396 if (result.Succeeded()) {
397 const size_t count = valid_bp_ids.GetSize();
399 for (size_t i = 0; i < count; ++i) {
400 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
401 if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
403 target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
404 BreakpointOptions *bp_options = nullptr;
405 if (cur_bp_id.GetLocationID() == LLDB_INVALID_BREAK_ID) {
406 // This breakpoint does not have an associated location.
407 bp_options = bp->GetOptions();
409 BreakpointLocationSP bp_loc_sp(
410 bp->FindLocationByID(cur_bp_id.GetLocationID()));
411 // This breakpoint does have an associated location. Get its
412 // breakpoint options.
414 bp_options = bp_loc_sp->GetLocationOptions();
417 m_bp_options_vec.push_back(bp_options);
421 // If we are using script language, get the script interpreter in order
422 // to set or collect command callback. Otherwise, call the methods
423 // associated with this object.
424 if (m_options.m_use_script_language) {
425 ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter();
426 // Special handling for one-liner specified inline.
427 if (m_options.m_use_one_liner) {
428 script_interp->SetBreakpointCommandCallback(
429 m_bp_options_vec, m_options.m_one_liner.c_str());
430 } else if (!m_options.m_function_name.empty()) {
431 script_interp->SetBreakpointCommandCallbackFunction(
432 m_bp_options_vec, m_options.m_function_name.c_str());
434 script_interp->CollectDataForBreakpointCommandCallback(
435 m_bp_options_vec, result);
438 // Special handling for one-liner specified inline.
439 if (m_options.m_use_one_liner)
440 SetBreakpointCommandCallback(m_bp_options_vec,
441 m_options.m_one_liner.c_str());
443 CollectDataForBreakpointCommandCallback(m_bp_options_vec, result);
447 return result.Succeeded();
451 CommandOptions m_options;
452 std::vector<BreakpointOptions *> m_bp_options_vec; // This stores the
453 // breakpoint options that
455 // collecting commands for. In the CollectData... calls we need to hand this
456 // off to the IOHandler, which may run asynchronously. So we have to have
457 // some way to keep it alive, and not leak it. Making it an ivar of the
458 // command object, which never goes away achieves this. Note that if we were
459 // able to run the same command concurrently in one interpreter we'd have to
460 // make this "per invocation". But there are many more reasons why it is not
461 // in general safe to do that in lldb at present, so it isn't worthwhile to
462 // come up with a more complex mechanism to address this particular weakness
464 static const char *g_reader_instructions;
467 const char *CommandObjectBreakpointCommandAdd::g_reader_instructions =
468 "Enter your debugger command(s). Type 'DONE' to end.\n";
470 // CommandObjectBreakpointCommandDelete
472 static constexpr OptionDefinition g_breakpoint_delete_options[] = {
474 { LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete commands from Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
478 class CommandObjectBreakpointCommandDelete : public CommandObjectParsed {
480 CommandObjectBreakpointCommandDelete(CommandInterpreter &interpreter)
481 : CommandObjectParsed(interpreter, "delete",
482 "Delete the set of commands from a breakpoint.",
485 CommandArgumentEntry arg;
486 CommandArgumentData bp_id_arg;
488 // Define the first (and only) variant of this arg.
489 bp_id_arg.arg_type = eArgTypeBreakpointID;
490 bp_id_arg.arg_repetition = eArgRepeatPlain;
492 // There is only one variant this argument could be; put it into the
494 arg.push_back(bp_id_arg);
496 // Push the data for the first argument into the m_arguments vector.
497 m_arguments.push_back(arg);
500 ~CommandObjectBreakpointCommandDelete() override = default;
502 Options *GetOptions() override { return &m_options; }
504 class CommandOptions : public Options {
506 CommandOptions() : Options(), m_use_dummy(false) {}
508 ~CommandOptions() override = default;
510 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
511 ExecutionContext *execution_context) override {
513 const int short_option = m_getopt_table[option_idx].val;
515 switch (short_option) {
521 error.SetErrorStringWithFormat("unrecognized option '%c'",
529 void OptionParsingStarting(ExecutionContext *execution_context) override {
533 llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
534 return llvm::makeArrayRef(g_breakpoint_delete_options);
537 // Instance variables to hold the values for command options.
542 bool DoExecute(Args &command, CommandReturnObject &result) override {
543 Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
545 if (target == nullptr) {
546 result.AppendError("There is not a current executable; there are no "
547 "breakpoints from which to delete commands");
548 result.SetStatus(eReturnStatusFailed);
552 const BreakpointList &breakpoints = target->GetBreakpointList();
553 size_t num_breakpoints = breakpoints.GetSize();
555 if (num_breakpoints == 0) {
556 result.AppendError("No breakpoints exist to have commands deleted");
557 result.SetStatus(eReturnStatusFailed);
561 if (command.empty()) {
563 "No breakpoint specified from which to delete the commands");
564 result.SetStatus(eReturnStatusFailed);
568 BreakpointIDList valid_bp_ids;
569 CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
570 command, target, result, &valid_bp_ids,
571 BreakpointName::Permissions::PermissionKinds::listPerm);
573 if (result.Succeeded()) {
574 const size_t count = valid_bp_ids.GetSize();
575 for (size_t i = 0; i < count; ++i) {
576 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
577 if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
579 target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
580 if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
581 BreakpointLocationSP bp_loc_sp(
582 bp->FindLocationByID(cur_bp_id.GetLocationID()));
584 bp_loc_sp->ClearCallback();
586 result.AppendErrorWithFormat("Invalid breakpoint ID: %u.%u.\n",
587 cur_bp_id.GetBreakpointID(),
588 cur_bp_id.GetLocationID());
589 result.SetStatus(eReturnStatusFailed);
598 return result.Succeeded();
602 CommandOptions m_options;
605 // CommandObjectBreakpointCommandList
607 class CommandObjectBreakpointCommandList : public CommandObjectParsed {
609 CommandObjectBreakpointCommandList(CommandInterpreter &interpreter)
610 : CommandObjectParsed(interpreter, "list", "List the script or set of "
611 "commands to be executed when "
612 "the breakpoint is hit.",
614 CommandArgumentEntry arg;
615 CommandArgumentData bp_id_arg;
617 // Define the first (and only) variant of this arg.
618 bp_id_arg.arg_type = eArgTypeBreakpointID;
619 bp_id_arg.arg_repetition = eArgRepeatPlain;
621 // There is only one variant this argument could be; put it into the
623 arg.push_back(bp_id_arg);
625 // Push the data for the first argument into the m_arguments vector.
626 m_arguments.push_back(arg);
629 ~CommandObjectBreakpointCommandList() override = default;
632 bool DoExecute(Args &command, CommandReturnObject &result) override {
633 Target *target = GetDebugger().GetSelectedTarget().get();
635 if (target == nullptr) {
636 result.AppendError("There is not a current executable; there are no "
637 "breakpoints for which to list commands");
638 result.SetStatus(eReturnStatusFailed);
642 const BreakpointList &breakpoints = target->GetBreakpointList();
643 size_t num_breakpoints = breakpoints.GetSize();
645 if (num_breakpoints == 0) {
646 result.AppendError("No breakpoints exist for which to list commands");
647 result.SetStatus(eReturnStatusFailed);
651 if (command.empty()) {
653 "No breakpoint specified for which to list the commands");
654 result.SetStatus(eReturnStatusFailed);
658 BreakpointIDList valid_bp_ids;
659 CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
660 command, target, result, &valid_bp_ids,
661 BreakpointName::Permissions::PermissionKinds::listPerm);
663 if (result.Succeeded()) {
664 const size_t count = valid_bp_ids.GetSize();
665 for (size_t i = 0; i < count; ++i) {
666 BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
667 if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
669 target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
672 BreakpointLocationSP bp_loc_sp;
673 if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
674 bp_loc_sp = bp->FindLocationByID(cur_bp_id.GetLocationID());
677 result.AppendErrorWithFormat("Invalid breakpoint ID: %u.%u.\n",
678 cur_bp_id.GetBreakpointID(),
679 cur_bp_id.GetLocationID());
680 result.SetStatus(eReturnStatusFailed);
686 BreakpointID::GetCanonicalReference(&id_str,
687 cur_bp_id.GetBreakpointID(),
688 cur_bp_id.GetLocationID());
689 const Baton *baton = nullptr;
692 ->GetOptionsSpecifyingKind(BreakpointOptions::eCallback)
695 baton = bp->GetOptions()->GetBaton();
698 result.GetOutputStream().Printf("Breakpoint %s:\n",
700 result.GetOutputStream().IndentMore();
701 baton->GetDescription(&result.GetOutputStream(),
702 eDescriptionLevelFull);
703 result.GetOutputStream().IndentLess();
705 result.AppendMessageWithFormat(
706 "Breakpoint %s does not have an associated command.\n",
710 result.SetStatus(eReturnStatusSuccessFinishResult);
712 result.AppendErrorWithFormat("Invalid breakpoint ID: %u.\n",
713 cur_bp_id.GetBreakpointID());
714 result.SetStatus(eReturnStatusFailed);
719 return result.Succeeded();
723 // CommandObjectBreakpointCommand
725 CommandObjectBreakpointCommand::CommandObjectBreakpointCommand(
726 CommandInterpreter &interpreter)
727 : CommandObjectMultiword(
728 interpreter, "command", "Commands for adding, removing and listing "
729 "LLDB commands executed when a breakpoint is "
731 "command <sub-command> [<sub-command-options>] <breakpoint-id>") {
732 CommandObjectSP add_command_object(
733 new CommandObjectBreakpointCommandAdd(interpreter));
734 CommandObjectSP delete_command_object(
735 new CommandObjectBreakpointCommandDelete(interpreter));
736 CommandObjectSP list_command_object(
737 new CommandObjectBreakpointCommandList(interpreter));
739 add_command_object->SetCommandName("breakpoint command add");
740 delete_command_object->SetCommandName("breakpoint command delete");
741 list_command_object->SetCommandName("breakpoint command list");
743 LoadSubCommand("add", add_command_object);
744 LoadSubCommand("delete", delete_command_object);
745 LoadSubCommand("list", list_command_object);
748 CommandObjectBreakpointCommand::~CommandObjectBreakpointCommand() = default;