2014-08-09 00:47:42 +08:00
|
|
|
//===-- MICmnLLDBUtilSBValue.h ----------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//++
|
2014-11-18 02:06:21 +08:00
|
|
|
// File: MICmnLLDBUtilSBValue.h
|
2014-08-09 00:47:42 +08:00
|
|
|
//
|
2014-11-18 02:06:21 +08:00
|
|
|
// Overview: CMICmnLLDBUtilSBValue interface.
|
2014-08-09 00:47:42 +08:00
|
|
|
//
|
2014-11-18 02:06:21 +08:00
|
|
|
// Environment: Compilers: Visual C++ 12.
|
|
|
|
// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
|
|
|
|
// Libraries: See MIReadmetxt.
|
2014-08-09 00:47:42 +08:00
|
|
|
//
|
2014-11-18 02:06:21 +08:00
|
|
|
// Copyright: None.
|
2014-08-09 00:47:42 +08:00
|
|
|
//--
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Third Party Headers:
|
2015-01-20 08:04:26 +08:00
|
|
|
#include "lldb/API/SBValue.h"
|
2014-08-09 00:47:42 +08:00
|
|
|
|
|
|
|
// In-house headers:
|
|
|
|
#include "MIDataTypes.h"
|
|
|
|
|
|
|
|
// Declerations:
|
|
|
|
class CMIUtilString;
|
|
|
|
|
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: Utility helper class to lldb::SBValue. Using a lldb::SBValue extract
|
|
|
|
// value object information to help form verbose debug information.
|
|
|
|
// Gotchas: None.
|
|
|
|
// Authors: Illya Rudkin 08/07/2014.
|
|
|
|
// Changes: None.
|
2014-08-09 00:47:42 +08:00
|
|
|
//--
|
|
|
|
class CMICmnLLDBUtilSBValue
|
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Methods:
|
|
|
|
public:
|
|
|
|
/* ctor */ CMICmnLLDBUtilSBValue(const lldb::SBValue &vrValue, const bool vbHandleCharType = false);
|
|
|
|
/* dtor */ ~CMICmnLLDBUtilSBValue(void);
|
|
|
|
//
|
|
|
|
CMIUtilString GetName(void) const;
|
|
|
|
CMIUtilString GetValue(void) const;
|
|
|
|
CMIUtilString GetValueCString(void) const;
|
|
|
|
CMIUtilString GetChildValueCString(void) const;
|
|
|
|
CMIUtilString GetTypeName(void) const;
|
|
|
|
CMIUtilString GetTypeNameDisplay(void) const;
|
|
|
|
bool IsCharType(void) const;
|
|
|
|
bool IsChildCharType(void) const;
|
|
|
|
bool IsLLDBVariable(void) const;
|
|
|
|
bool IsNameUnknown(void) const;
|
|
|
|
bool IsValueUnknown(void) const;
|
|
|
|
bool IsValid(void) const;
|
|
|
|
bool HasName(void) const;
|
2014-08-09 00:47:42 +08:00
|
|
|
|
2014-11-18 02:06:21 +08:00
|
|
|
// Methods:
|
|
|
|
private:
|
|
|
|
CMIUtilString ReadCStringFromHostMemory(const lldb::SBValue &vrValueObj) const;
|
2014-08-09 00:47:42 +08:00
|
|
|
|
2014-11-18 02:06:21 +08:00
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
lldb::SBValue &m_rValue;
|
|
|
|
const MIchar *m_pUnkwn;
|
|
|
|
bool m_bValidSBValue; // True = SBValue is a valid object, false = not valid.
|
|
|
|
bool m_bHandleCharType; // True = Yes return text molding to char type, false = just return data.
|
2014-08-09 00:47:42 +08:00
|
|
|
};
|