1 //===-- PlatformLinux.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_PlatformLinux_h_
11 #define liblldb_PlatformLinux_h_
12 
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Target/Platform.h"
18 
19 namespace lldb_private {
20 
21     class PlatformLinux : public Platform
22     {
23     public:
24 
25         static void
26         Initialize ();
27 
28         static void
29         Terminate ();
30 
31         PlatformLinux ();
32 
33         virtual
34         ~PlatformLinux();
35 
36         //------------------------------------------------------------
37         // lldb_private::PluginInterface functions
38         //------------------------------------------------------------
39         static Platform *
40         CreateInstance ();
41 
42         static const char *
43         GetPluginNameStatic();
44 
45         static const char *
46         GetPluginDescriptionStatic();
47 
48         virtual const char *
49         GetPluginName()
50         {
51             return GetPluginNameStatic();
52         }
53 
54         virtual const char *
55         GetShortPluginName()
56         {
57             return "PlatformLinux";
58         }
59 
60         virtual uint32_t
61         GetPluginVersion()
62         {
63             return 1;
64         }
65 
66         //------------------------------------------------------------
67         // lldb_private::Platform functions
68         //------------------------------------------------------------
69         virtual Error
70         ResolveExecutable (const FileSpec &exe_file,
71                            const ArchSpec &arch,
72                            lldb::ModuleSP &module_sp);
73 
74         virtual const char *
75         GetDescription ()
76         {
77             return GetPluginDescriptionStatic();
78         }
79 
80         virtual void
81         GetStatus (Stream &strm);
82 
83         virtual Error
84         GetFile (const FileSpec &platform_file,
85                  const UUID* uuid, FileSpec &local_file);
86 
87         virtual bool
88         GetProcessInfo (lldb::pid_t pid, ProcessInfo &proc_info);
89 
90         virtual bool
91         GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch);
92 
93         virtual size_t
94         GetSoftwareBreakpointTrapOpcode (Target &target,
95                                          BreakpointSite *bp_site);
96 
97     protected:
98 
99 
100     private:
101         DISALLOW_COPY_AND_ASSIGN (PlatformLinux);
102     };
103 } // namespace lldb_private
104 
105 #endif  // liblldb_PlatformLinux_h_
106