blob: d6ae3462c73b11a6d6863c5286d59779aaedfcf4 [file] [log] [blame]
Johnny Chen9ed5b492012-01-05 21:48:15 +00001//===-- ProcessFreeBSD.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_ProcessFreeBSD_H_
11#define liblldb_ProcessFreeBSD_H_
12
13// C Includes
14
15// C++ Includes
16#include <queue>
17
18// Other libraries and framework includes
19#include "lldb/Target/Process.h"
20#include "lldb/Target/ThreadList.h"
21#include "ProcessMessage.h"
22#include "ProcessPOSIX.h"
23
24class ProcessMonitor;
25
26class ProcessFreeBSD :
27 public ProcessPOSIX
28{
29
30public:
31 //------------------------------------------------------------------
32 // Static functions.
33 //------------------------------------------------------------------
Greg Clayton29d19302012-02-27 18:40:48 +000034 static lldb::ProcessSP
Johnny Chen9ed5b492012-01-05 21:48:15 +000035 CreateInstance(lldb_private::Target& target,
Greg Clayton29d19302012-02-27 18:40:48 +000036 lldb_private::Listener &listener,
37 const lldb_private::FileSpec *crash_file_path);
Johnny Chen9ed5b492012-01-05 21:48:15 +000038
39 static void
40 Initialize();
41
42 static void
43 Terminate();
44
Greg Clayton57abc5d2013-05-10 21:47:16 +000045 static lldb_private::ConstString
Johnny Chen9ed5b492012-01-05 21:48:15 +000046 GetPluginNameStatic();
47
48 static const char *
49 GetPluginDescriptionStatic();
50
51 //------------------------------------------------------------------
52 // Constructors and destructors
53 //------------------------------------------------------------------
54 ProcessFreeBSD(lldb_private::Target& target,
Greg Clayton29d19302012-02-27 18:40:48 +000055 lldb_private::Listener &listener);
Johnny Chen9ed5b492012-01-05 21:48:15 +000056
Ed Maste7dcb77d2013-08-30 13:11:30 +000057 virtual lldb_private::Error
58 DoDetach(bool keep_stopped);
59
Greg Claytonc3c0b0e2012-04-12 19:04:34 +000060 virtual bool
Johnny Chen9ed5b492012-01-05 21:48:15 +000061 UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list);
62
Ed Maste7fd845c2013-12-09 15:51:17 +000063 virtual lldb_private::Error
64 DoResume();
65
66 virtual lldb_private::Error
67 WillResume();
68
69 virtual void
70 SendMessage(const ProcessMessage &message);
71
Johnny Chen9ed5b492012-01-05 21:48:15 +000072 //------------------------------------------------------------------
73 // PluginInterface protocol
74 //------------------------------------------------------------------
Greg Clayton57abc5d2013-05-10 21:47:16 +000075 virtual lldb_private::ConstString
Johnny Chen9ed5b492012-01-05 21:48:15 +000076 GetPluginName();
77
Johnny Chen9ed5b492012-01-05 21:48:15 +000078 virtual uint32_t
79 GetPluginVersion();
80
81 virtual void
82 GetPluginCommandHelp(const char *command, lldb_private::Stream *strm);
83
84 virtual lldb_private::Error
85 ExecutePluginCommand(lldb_private::Args &command,
86 lldb_private::Stream *strm);
87
88 virtual lldb_private::Log *
89 EnablePluginLogging(lldb_private::Stream *strm,
90 lldb_private::Args &command);
91
Ed Maste7fd845c2013-12-09 15:51:17 +000092protected:
93 friend class FreeBSDThread;
94
95 typedef std::vector<lldb::tid_t> tid_collection;
96 tid_collection m_suspend_tids;
97 tid_collection m_run_tids;
98 tid_collection m_step_tids;
99
100 int m_resume_signo;
101
Johnny Chen9ed5b492012-01-05 21:48:15 +0000102};
103
Ed Masteea660072013-12-04 13:41:18 +0000104#endif // liblldb_ProcessFreeBSD_H_