]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h
Merge ^/head r274961 through r275386.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnLLDBUtilSBValue.h
1 //===-- MICmnLLDBUtilSBValue.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:                MICmnLLDBUtilSBValue.h
12 //
13 // Overview:    CMICmnLLDBUtilSBValue 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 // Third Party Headers:
25 #include <lldb/API/SBValue.h>
26
27 // In-house headers:
28 #include "MIDataTypes.h"
29
30 // Declerations:
31 class CMIUtilString;
32
33 //++ ============================================================================
34 // Details:     Utility helper class to lldb::SBValue. Using a lldb::SBValue extract
35 //                      value object information to help form verbose debug information.
36 // Gotchas:     None.
37 // Authors:     Illya Rudkin 08/07/2014.
38 // Changes:     None.
39 //--
40 class CMICmnLLDBUtilSBValue
41 {
42 // Methods:
43 public:
44         /* ctor */      CMICmnLLDBUtilSBValue( const lldb::SBValue & vrValue, const bool vbHandleCharType = false );
45         /* dtor */      ~CMICmnLLDBUtilSBValue( void );
46         //
47         CMIUtilString   GetName( void ) const;
48         CMIUtilString   GetValue( void ) const;
49         CMIUtilString   GetValueCString( void ) const;
50         CMIUtilString   GetChildValueCString( void ) const;
51         CMIUtilString   GetTypeName( void ) const;
52         CMIUtilString   GetTypeNameDisplay( void ) const;
53         bool                    IsCharType( void ) const;
54         bool                    IsChildCharType( void ) const;
55         bool                    IsLLDBVariable( void ) const;
56         bool                    IsNameUnknown( void ) const;
57         bool                    IsValueUnknown( void ) const;
58         bool                    IsValid( void ) const;
59         bool                    HasName( void ) const;
60
61 // Methods:
62 private:
63         CMIUtilString   ReadCStringFromHostMemory( const lldb::SBValue & vrValueObj ) const;
64
65 // Attributes:
66 private:
67         lldb::SBValue & m_rValue;
68         const MIchar *  m_pUnkwn;
69         bool                    m_bValidSBValue;        // True = SBValue is a valid object, false = not valid.
70         bool                    m_bHandleCharType;      // True = Yes return text molding to char type, false = just return data.
71 };