1 //===-- MICmnLLDBUtilSBValue.h ----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MICmnLLDBUtilSBValue.h
13 // Overview: CMICmnLLDBUtilSBValue interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
24 // Third Party Headers:
25 #include <lldb/API/SBValue.h>
28 #include "MIDataTypes.h"
33 //++ ============================================================================
34 // Details: Utility helper class to lldb::SBValue. Using a lldb::SBValue extract
35 // value object information to help form verbose debug information.
37 // Authors: Illya Rudkin 08/07/2014.
40 class CMICmnLLDBUtilSBValue
44 /* ctor */ CMICmnLLDBUtilSBValue( const lldb::SBValue & vrValue, const bool vbHandleCharType = false );
45 /* dtor */ ~CMICmnLLDBUtilSBValue( void );
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;
63 CMIUtilString ReadCStringFromHostMemory( const lldb::SBValue & vrValueObj ) const;
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.