]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
Merge ^/head r275715 through r275748.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnLLDBDebuggerHandleEvents.h
1 //===-- MICmnLLDBDebuggerHandleEvents.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 //++
11 // File:                MICmnLLDBDebuggerHandleEvents.h
12 //
13 // Overview:    CMICmnLLDBDebuggerHandleEvents interface.
14 //
15 // Environment: Compilers:      Visual C++ 12.
16 //                                                      gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //                              Libraries:      See MIReadmetxt. 
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // In-house headers:
25 #include "MICmnBase.h"
26 #include "MICmnMIValueTuple.h"
27 #include "MIUtilSingletonBase.h"
28
29 // Declarations:
30 class CMICmnLLDBDebugSessionInfo;
31 class CMICmnMIResultRecord;
32 class CMICmnStreamStdout;
33 class CMICmnMIOutOfBandRecord;
34
35 //++ ============================================================================
36 // Details:     MI class to take LLDB SBEvent objects, filter them and form
37 //                      MI Out-of-band records from the information inside the event object.
38 //                      These records are then pushed to stdout.
39 //                      A singleton class.
40 // Gotchas:     None.
41 // Authors:     Illya Rudkin 02/03/2014.
42 // Changes:     None.
43 //--
44 class CMICmnLLDBDebuggerHandleEvents 
45 :       public CMICmnBase
46 ,       public MI::ISingleton< CMICmnLLDBDebuggerHandleEvents >
47 {
48         friend class MI::ISingleton< CMICmnLLDBDebuggerHandleEvents >;
49
50 // Methods:
51 public:
52         bool    Initialize( void );
53         bool    Shutdown( void );
54         //
55         bool    HandleEvent( const lldb::SBEvent & vEvent, bool & vrbHandledEvent, bool & vrbExitAppEvent );
56
57 // Methods:
58 private:
59         /* ctor */      CMICmnLLDBDebuggerHandleEvents( void );
60         /* ctor */      CMICmnLLDBDebuggerHandleEvents( const CMICmnLLDBDebuggerHandleEvents & );
61         void            operator=( const CMICmnLLDBDebuggerHandleEvents & );
62         //
63         bool    ChkForStateChanges( void );
64         bool    GetProcessStdout( void );
65         bool    GetProcessStderr( void );
66         bool    HandleEventSBBreakPoint( const lldb::SBEvent & vEvent );
67         bool    HandleEventSBBreakpointCmn( const lldb::SBEvent & vEvent );
68         bool    HandleEventSBBreakpointAdded( const lldb::SBEvent & vEvent );
69         bool    HandleEventSBBreakpointLocationsAdded( const lldb::SBEvent & vEvent );
70         bool    HandleEventSBProcess( const lldb::SBEvent & vEvent, bool & vrbExitAppEvent );
71         bool    HandleEventSBThread( const lldb::SBEvent & vEvent );
72         bool    HandleEventSBThreadBitStackChanged( const lldb::SBEvent & vEvent );
73         bool    HandleEventSBThreadSuspended( const lldb::SBEvent & vEvent );
74         bool    HandleEventSBCommandInterpreter( const lldb::SBEvent & vEvent );
75         bool    HandleProcessEventBroadcastBitStateChanged( const lldb::SBEvent & vEvent, bool & vrbExitAppEvent );
76         bool    HandleProcessEventStateRunning( void );
77         bool    HandleProcessEventStateExited( void );
78         bool    HandleProcessEventStateStopped( bool & vwrbShouldBrk );
79         bool    HandleProcessEventStopReasonTrace( void );
80         bool    HandleProcessEventStopReasonBreakpoint( void );
81         bool    HandleProcessEventStopSignal( bool & vwrbShouldBrk );
82         bool    HandleProcessEventStateSuspended( const lldb::SBEvent & vEvent );
83         bool    MiHelpGetCurrentThreadFrame( CMICmnMIValueTuple & vwrMiValueTuple );
84         bool    MiResultRecordToStdout( const CMICmnMIResultRecord & vrMiResultRecord );
85         bool    MiOutOfBandRecordToStdout( const CMICmnMIOutOfBandRecord & vrMiResultRecord );
86         bool    MiStoppedAtBreakPoint( const MIuint64 vBrkPtId, const lldb::SBBreakpoint & vBrkPt );
87         bool    TextToStdout( const CMIUtilString & vrTxt );
88         bool    TextToStderr( const CMIUtilString & vrTxt );
89         bool    UpdateSelectedThread( void );
90         bool    ConvertPrintfCtrlCodeToString( const MIchar vCtrl, CMIUtilString & vwrStrEquivalent );
91
92 // Overridden:
93 private:
94         // From CMICmnBase
95         /* dtor */ virtual ~CMICmnLLDBDebuggerHandleEvents( void );
96 };
97