aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-21 22:12:05 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-21 22:12:05 +0000
commite1a916a74de2d2d86835a99e1eb11a9538f07778 (patch)
treec573d1a9e96c118e9060231603d250377644e7cd /lldb/source/Commands/CommandObjectExpression.cpp
parenta57b97e7e7d4bd44ebc90c743e6db318fa5348d6 (diff)
downloadllvm-e1a916a74de2d2d86835a99e1eb11a9538f07778.zip
llvm-e1a916a74de2d2d86835a99e1eb11a9538f07778.tar.gz
llvm-e1a916a74de2d2d86835a99e1eb11a9538f07778.tar.bz2
Change over to using the definitions for mach-o types and defines to the
defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO and ObjectContainerUniversalMachO to be able to be cross compiled in Linux. Also did some cleanup on the ASTType by renaming it to ClangASTType and renaming the header file. Moved a lot of "AST * + opaque clang type *" functionality from lldb_private::Type over into ClangASTType. llvm-svn: 109046
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 637d3dc..4135ed8 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -12,8 +12,10 @@
// C Includes
// C++ Includes
// Other libraries and framework includes
+#include "llvm/ADT/StringRef.h"
+
// Project includes
-#include "lldb/Interpreter/Args.h"
+#include "lldb/Core/Debugger.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/InputReader.h"
#include "lldb/Expression/ClangExpression.h"
@@ -21,15 +23,15 @@
#include "lldb/Expression/ClangExpressionVariable.h"
#include "lldb/Expression/DWARFExpression.h"
#include "lldb/Host/Host.h"
-#include "lldb/Core/Debugger.h"
+#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/Variable.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
-#include "llvm/ADT/StringRef.h"
using namespace lldb;
using namespace lldb_private;
@@ -402,22 +404,26 @@ CommandObjectExpression::EvaluateExpression (const char *expr, bool bare, Stream
if (clang_type)
{
if (m_options.show_types)
- Type::DumpClangTypeName (&output_stream, clang_type);
+ {
+ ConstString type_name(ClangASTType::GetClangTypeName (clang_type));
+ if (type_name)
+ output_stream.Printf("(%s) ", type_name.AsCString("<invalid>"));
+ }
- Type::DumpValue (&m_exe_ctx, // The execution context for memory and variable access
- ast_context, // The ASTContext that the clang type belongs to
- clang_type, // The opaque clang type we want to dump that value of
- &output_stream, // Stream to dump to
- format, // Format to use when dumping
- data, // A buffer containing the bytes for the clang type
- 0, // Byte offset within "data" where value is
- data.GetByteSize (), // Size in bytes of the value we are dumping
- 0, // Bitfield bit size
- 0, // Bitfield bit offset
- m_options.show_types, // Show types?
- m_options.show_summary, // Show summary?
- m_options.debug, // Debug logging output?
- UINT32_MAX); // Depth to dump in case this is an aggregate type
+ ClangASTType::DumpValue (ast_context, // The ASTContext that the clang type belongs to
+ clang_type, // The opaque clang type we want to dump that value of
+ &m_exe_ctx, // The execution context for memory and variable access
+ &output_stream, // Stream to dump to
+ format, // Format to use when dumping
+ data, // A buffer containing the bytes for the clang type
+ 0, // Byte offset within "data" where value is
+ data.GetByteSize (), // Size in bytes of the value we are dumping
+ 0, // Bitfield bit size
+ 0, // Bitfield bit offset
+ m_options.show_types, // Show types?
+ m_options.show_summary, // Show summary?
+ m_options.debug, // Debug logging output?
+ UINT32_MAX); // Depth to dump in case this is an aggregate type
}
else
{