xref: /freebsd-src/contrib/llvm-project/lldb/source/Commands/CommandOptionsProcessLaunch.h (revision 04eeddc0aa8e0a417a16eaf9d7d095207f4a8623)
1fe6060f1SDimitry Andric //===-- CommandOptionsProcessLaunch.h ---------------------------*- C++ -*-===//
2e8d8bef9SDimitry Andric //
3e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e8d8bef9SDimitry Andric //
7e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===//
8e8d8bef9SDimitry Andric 
9e8d8bef9SDimitry Andric #ifndef LLDB_SOURCE_COMMANDS_COMMANDOPTIONSPROCESSLAUNCH_H
10e8d8bef9SDimitry Andric #define LLDB_SOURCE_COMMANDS_COMMANDOPTIONSPROCESSLAUNCH_H
11e8d8bef9SDimitry Andric 
12e8d8bef9SDimitry Andric #include "lldb/Host/ProcessLaunchInfo.h"
13e8d8bef9SDimitry Andric #include "lldb/Interpreter/Options.h"
14e8d8bef9SDimitry Andric 
15e8d8bef9SDimitry Andric namespace lldb_private {
16e8d8bef9SDimitry Andric 
17e8d8bef9SDimitry Andric // CommandOptionsProcessLaunch
18e8d8bef9SDimitry Andric 
19fe6060f1SDimitry Andric class CommandOptionsProcessLaunch : public lldb_private::OptionGroup {
20e8d8bef9SDimitry Andric public:
CommandOptionsProcessLaunch()21*04eeddc0SDimitry Andric   CommandOptionsProcessLaunch() {
22e8d8bef9SDimitry Andric     // Keep default values of all options in one place: OptionParsingStarting
23e8d8bef9SDimitry Andric     // ()
24e8d8bef9SDimitry Andric     OptionParsingStarting(nullptr);
25e8d8bef9SDimitry Andric   }
26e8d8bef9SDimitry Andric 
27e8d8bef9SDimitry Andric   ~CommandOptionsProcessLaunch() override = default;
28e8d8bef9SDimitry Andric 
29e8d8bef9SDimitry Andric   lldb_private::Status
30e8d8bef9SDimitry Andric   SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
31e8d8bef9SDimitry Andric                  lldb_private::ExecutionContext *execution_context) override;
32e8d8bef9SDimitry Andric 
OptionParsingStarting(lldb_private::ExecutionContext * execution_context)33e8d8bef9SDimitry Andric   void OptionParsingStarting(
34e8d8bef9SDimitry Andric       lldb_private::ExecutionContext *execution_context) override {
35e8d8bef9SDimitry Andric     launch_info.Clear();
36e8d8bef9SDimitry Andric     disable_aslr = lldb_private::eLazyBoolCalculate;
37e8d8bef9SDimitry Andric   }
38e8d8bef9SDimitry Andric 
39e8d8bef9SDimitry Andric   llvm::ArrayRef<lldb_private::OptionDefinition> GetDefinitions() override;
40e8d8bef9SDimitry Andric 
41e8d8bef9SDimitry Andric   // Instance variables to hold the values for command options.
42e8d8bef9SDimitry Andric 
43e8d8bef9SDimitry Andric   lldb_private::ProcessLaunchInfo launch_info;
44e8d8bef9SDimitry Andric   lldb_private::LazyBool disable_aslr;
45e8d8bef9SDimitry Andric }; // CommandOptionsProcessLaunch
46e8d8bef9SDimitry Andric 
47fe6060f1SDimitry Andric } // namespace lldb_private
48e8d8bef9SDimitry Andric 
49e8d8bef9SDimitry Andric #endif // LLDB_SOURCE_COMMANDS_COMMANDOPTIONSPROCESSLAUNCH_H
50