summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Core/DataExtractor.h19
-rw-r--r--lldb/include/lldb/Core/Disassembler.h16
-rw-r--r--lldb/include/lldb/Core/FormatNavigator.h25
-rw-r--r--lldb/include/lldb/Interpreter/OptionGroupFormat.h7
-rw-r--r--lldb/include/lldb/Symbol/ClangASTType.h6
-rw-r--r--lldb/include/lldb/lldb-enumerations.h22
-rw-r--r--lldb/include/lldb/lldb-private-enumerations.h17
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp31
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp2
-rw-r--r--lldb/source/Core/DataExtractor.cpp109
-rw-r--r--lldb/source/Core/Disassembler.cpp19
-rw-r--r--lldb/source/Core/FormatManager.cpp13
-rw-r--r--lldb/source/Core/ValueObject.cpp5
-rw-r--r--lldb/source/Interpreter/OptionGroupFormat.cpp8
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp58
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp39
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h10
-rw-r--r--lldb/source/Symbol/ClangASTType.cpp49
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp55
-rw-r--r--lldb/source/lldb.cpp1
-rw-r--r--lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py2
24 files changed, 352 insertions, 169 deletions
diff --git a/lldb/include/lldb/Core/DataExtractor.h b/lldb/include/lldb/Core/DataExtractor.h
index 8a5b8aeeb3f..3aa0f22575c 100644
--- a/lldb/include/lldb/Core/DataExtractor.h
+++ b/lldb/include/lldb/Core/DataExtractor.h
@@ -274,15 +274,16 @@ public:
/// The offset at which dumping ended.
//------------------------------------------------------------------
uint32_t
- Dump(Stream *s,
- uint32_t offset,
- lldb::Format item_format,
- uint32_t item_byte_size,
- uint32_t item_count,
- uint32_t num_per_line,
- uint64_t base_addr,
- uint32_t item_bit_size,
- uint32_t item_bit_offset) const;
+ Dump (Stream *s,
+ uint32_t offset,
+ lldb::Format item_format,
+ uint32_t item_byte_size,
+ uint32_t item_count,
+ uint32_t num_per_line,
+ uint64_t base_addr,
+ uint32_t item_bit_size,
+ uint32_t item_bit_offset,
+ ExecutionContextScope *exe_scope = NULL) const;
//------------------------------------------------------------------
/// Dump a UUID value at \a offset.
diff --git a/lldb/include/lldb/Core/Disassembler.h b/lldb/include/lldb/Core/Disassembler.h
index f84e9b059d0..126a411374c 100644
--- a/lldb/include/lldb/Core/Disassembler.h
+++ b/lldb/include/lldb/Core/Disassembler.h
@@ -169,6 +169,12 @@ public:
void
Append (lldb::InstructionSP &inst_sp);
+ void
+ Dump (Stream *s,
+ bool show_address,
+ bool show_bytes,
+ const ExecutionContext* exe_ctx);
+
private:
typedef std::vector<lldb::InstructionSP> collection;
typedef collection::iterator iterator;
@@ -178,7 +184,7 @@ private:
};
class PseudoInstruction :
- public lldb_private::Instruction
+ public Instruction
{
public:
@@ -188,11 +194,11 @@ public:
~PseudoInstruction ();
virtual void
- Dump (lldb_private::Stream *s,
+ Dump (Stream *s,
uint32_t max_opcode_byte_size,
bool show_address,
bool show_bytes,
- const lldb_private::ExecutionContext* exe_ctx,
+ const ExecutionContext* exe_ctx,
bool raw);
virtual bool
@@ -217,8 +223,8 @@ public:
}
virtual size_t
- Decode (const lldb_private::Disassembler &disassembler,
- const lldb_private::DataExtractor &data,
+ Decode (const Disassembler &disassembler,
+ const DataExtractor &data,
uint32_t data_offset);
void
diff --git a/lldb/include/lldb/Core/FormatNavigator.h b/lldb/include/lldb/Core/FormatNavigator.h
index 00e9101d6d0..0b14efe73da 100644
--- a/lldb/include/lldb/Core/FormatNavigator.h
+++ b/lldb/include/lldb/Core/FormatNavigator.h
@@ -25,7 +25,6 @@
// Project includes
#include "lldb/lldb-public.h"
-#include "lldb/lldb-enumerations.h"
#include "lldb/Core/FormatClasses.h"
#include "lldb/Core/Log.h"
@@ -262,7 +261,7 @@ public:
lldb::DynamicValueType use_dynamic,
uint32_t* why = NULL)
{
- uint32_t value = lldb::eFormatterChoiceCriterionDirectChoice;
+ uint32_t value = lldb_private::eFormatterChoiceCriterionDirectChoice;
clang::QualType type = clang::QualType::getFromOpaquePtr(valobj.GetClangType());
bool ret = Get(valobj, type, entry, use_dynamic, value);
if (ret)
@@ -423,7 +422,7 @@ protected:
}
if (Get_ObjC(valobj, parent, entry, reason))
{
- reason |= lldb::eFormatterChoiceCriterionNavigatedBaseClasses;
+ reason |= lldb_private::eFormatterChoiceCriterionNavigatedBaseClasses;
return true;
}
return false;
@@ -468,7 +467,7 @@ protected:
}
else
{
- reason |= lldb::eFormatterChoiceCriterionStrippedBitField;
+ reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
if (log)
log->Printf("no bitfield direct match");
}
@@ -493,7 +492,7 @@ protected:
log->Printf("stripping reference");
if (Get(valobj,type.getNonReferenceType(),entry, use_dynamic, reason) && !entry->m_skip_references)
{
- reason |= lldb::eFormatterChoiceCriterionStrippedPointerReference;
+ reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
return true;
}
}
@@ -514,7 +513,7 @@ protected:
{
if (Get_ObjC(valobj, runtime->GetISA(valobj), entry, reason))
{
- reason |= lldb::eFormatterChoiceCriterionDynamicObjCHierarchy;
+ reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCHierarchy;
return true;
}
}
@@ -535,7 +534,7 @@ protected:
clang::QualType pointee = typePtr->getPointeeType();
if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->m_skip_pointers)
{
- reason |= lldb::eFormatterChoiceCriterionStrippedPointerReference;
+ reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
return true;
}
}
@@ -557,7 +556,7 @@ protected:
{
if (Get_ObjC(valobj, runtime->GetISA(valobj), entry, reason))
{
- reason |= lldb::eFormatterChoiceCriterionDynamicObjCHierarchy;
+ reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCHierarchy;
return true;
}
}
@@ -576,7 +575,7 @@ protected:
return false;
if (Get(*target, typePtr->getPointeeType(), entry, use_dynamic, reason) && !entry->m_skip_pointers)
{
- reason |= lldb::eFormatterChoiceCriterionStrippedPointerReference;
+ reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
return true;
}
}
@@ -601,7 +600,7 @@ protected:
clang::QualType ivar_qual_type(ast->getObjCInterfaceType(superclass_interface_decl));
if (Get(valobj, ivar_qual_type, entry, use_dynamic, reason) && entry->m_cascades)
{
- reason |= lldb::eFormatterChoiceCriterionNavigatedBaseClasses;
+ reason |= lldb_private::eFormatterChoiceCriterionNavigatedBaseClasses;
return true;
}
}
@@ -630,7 +629,7 @@ protected:
{
if ((Get(valobj, pos->getType(), entry, use_dynamic, reason)) && entry->m_cascades)
{
- reason |= lldb::eFormatterChoiceCriterionNavigatedBaseClasses;
+ reason |= lldb_private::eFormatterChoiceCriterionNavigatedBaseClasses;
return true;
}
}
@@ -644,7 +643,7 @@ protected:
{
if ((Get(valobj, pos->getType(), entry, use_dynamic, reason)) && entry->m_cascades)
{
- reason |= lldb::eFormatterChoiceCriterionNavigatedBaseClasses;
+ reason |= lldb_private::eFormatterChoiceCriterionNavigatedBaseClasses;
return true;
}
}
@@ -660,7 +659,7 @@ protected:
log->Printf("stripping typedef");
if ((Get(valobj, type_tdef->getDecl()->getUnderlyingType(), entry, use_dynamic, reason)) && entry->m_cascades)
{
- reason |= lldb::eFormatterChoiceCriterionNavigatedTypedefs;
+ reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs;
return true;
}
}
diff --git a/lldb/include/lldb/Interpreter/OptionGroupFormat.h b/lldb/include/lldb/Interpreter/OptionGroupFormat.h
index 44215db2fc0..d66ee95f5e7 100644
--- a/lldb/include/lldb/Interpreter/OptionGroupFormat.h
+++ b/lldb/include/lldb/Interpreter/OptionGroupFormat.h
@@ -26,9 +26,10 @@ namespace lldb_private {
class OptionGroupFormat : public OptionGroup
{
public:
- static const uint32_t OPTION_GROUP_FORMAT = LLDB_OPT_SET_1;
- static const uint32_t OPTION_GROUP_SIZE = LLDB_OPT_SET_2;
- static const uint32_t OPTION_GROUP_COUNT = LLDB_OPT_SET_3;
+ static const uint32_t OPTION_GROUP_FORMAT = LLDB_OPT_SET_1;
+ static const uint32_t OPTION_GROUP_GDB_FMT = LLDB_OPT_SET_2;
+ static const uint32_t OPTION_GROUP_SIZE = LLDB_OPT_SET_3;
+ static const uint32_t OPTION_GROUP_COUNT = LLDB_OPT_SET_4;
OptionGroupFormat (lldb::Format default_format,
uint64_t default_byte_size = UINT64_MAX, // Pass UINT64_MAX to disable the "--size" option
diff --git a/lldb/include/lldb/Symbol/ClangASTType.h b/lldb/include/lldb/Symbol/ClangASTType.h
index 841afd16598..800accc7101 100644
--- a/lldb/include/lldb/Symbol/ClangASTType.h
+++ b/lldb/include/lldb/Symbol/ClangASTType.h
@@ -148,7 +148,8 @@ public:
uint32_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
- uint32_t bitfield_bit_offset);
+ uint32_t bitfield_bit_offset,
+ ExecutionContextScope *exe_scope);
static bool
@@ -160,7 +161,8 @@ public:
uint32_t data_offset,
size_t data_byte_size,
uint32_t bitfield_bit_size,
- uint32_t bitfield_bit_offset);
+ uint32_t bitfield_bit_offset,
+ ExecutionContextScope *exe_scope);
void
DumpSummary (ExecutionContext *exe_ctx,
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index 7e068b2d841..9c31daf179c 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -117,8 +117,11 @@ namespace lldb {
eFormatVectorOfFloat32,
eFormatVectorOfFloat64,
eFormatVectorOfUInt128,
- eFormatComplexInteger, // Integer complex type
- eFormatCharArray, // Print characters with no single quotes, used for character arrays that can contain non printable characters
+ eFormatComplexInteger, // Integer complex type
+ eFormatCharArray, // Print characters with no single quotes, used for character arrays that can contain non printable characters
+ eFormatAddressInfo, // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc)
+ eFormatHexFloat, // ISO C99 hex float string
+ eFormatInstruction, // Disassemble an opcode
kNumFormats
} Format;
@@ -479,6 +482,7 @@ namespace lldb {
eSectionTypeDWARFAppleNames,
eSectionTypeDWARFAppleTypes,
eSectionTypeDWARFAppleNamespaces,
+ eSectionTypeDWARFAppleObjC,
eSectionTypeEHFrame,
eSectionTypeOther
@@ -507,20 +511,6 @@ namespace lldb {
eFunctionNameTypeSelector = (1u << 5) // Find function by selector name (ObjC) names
} FunctionNameType;
- //----------------------------------------------------------------------
- // Ways that the FormatManager picks a particular format for a type
- //----------------------------------------------------------------------
- typedef enum FormatterChoiceCriterion
- {
- eFormatterChoiceCriterionDirectChoice = 0x00000000,
- eFormatterChoiceCriterionStrippedPointerReference = 0x00000001,
- eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002,
- eFormatterChoiceCriterionNavigatedBaseClasses = 0x00000004,
- eFormatterChoiceCriterionRegularExpressionSummary = 0x00000008,
- eFormatterChoiceCriterionRegularExpressionFilter = 0x00000008,
- eFormatterChoiceCriterionDynamicObjCHierarchy = 0x00000010,
- eFormatterChoiceCriterionStrippedBitField = 0x00000020
- } FormatterChoiceCriterion;
//----------------------------------------------------------------------
// Basic types enumeration for the public API SBType::GetBasicType()
diff --git a/lldb/include/lldb/lldb-private-enumerations.h b/lldb/include/lldb/lldb-private-enumerations.h
index d4f8af7b271..44e242d322f 100644
--- a/lldb/include/lldb/lldb-private-enumerations.h
+++ b/lldb/include/lldb/lldb-private-enumerations.h
@@ -222,7 +222,22 @@ typedef enum {
eExecutionPolicyNever,
eExecutionPolicyAlways
} ExecutionPolicy;
-
+
+//----------------------------------------------------------------------
+// Ways that the FormatManager picks a particular format for a type
+//----------------------------------------------------------------------
+typedef enum FormatterChoiceCriterion
+{
+ eFormatterChoiceCriterionDirectChoice = 0x00000000,
+ eFormatterChoiceCriterionStrippedPointerReference = 0x00000001,
+ eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002,
+ eFormatterChoiceCriterionNavigatedBaseClasses = 0x00000004,
+ eFormatterChoiceCriterionRegularExpressionSummary = 0x00000008,
+ eFormatterChoiceCriterionRegularExpressionFilter = 0x00000008,
+ eFormatterChoiceCriterionDynamicObjCHierarchy = 0x00000010,
+ eFormatterChoiceCriterionStrippedBitField = 0x00000020
+} FormatterChoiceCriterion;
+
} // namespace lldb
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 29fea1efceb..3ec585ee33d 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -164,8 +164,8 @@ CommandObjectExpression::CommandObjectExpression (CommandInterpreter &interprete
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back (arg);
- // Add the "--format" and "--count" options to group 1 and 3
- m_option_group.Append (&m_format_options, OptionGroupFormat::OPTION_GROUP_FORMAT, LLDB_OPT_SET_1);
+ // Add the "--format" and "--gdb-format"
+ m_option_group.Append (&m_format_options, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_1);
m_option_group.Append (&m_command_options);
m_option_group.Finalize();
}
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 36f785a6aea..9a4665c82c9 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -355,7 +355,7 @@ public:
m_arguments.push_back (arg);
m_option_group.Append (&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
- m_option_group.Append (&m_option_format, OptionGroupFormat::OPTION_GROUP_FORMAT, LLDB_OPT_SET_1);
+ m_option_group.Append (&m_option_format, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_1);
m_option_group.Append (&m_option_watchpoint, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Append (&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Finalize();
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 63aa1108785..7a16a60bc0e 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -136,7 +136,21 @@ public:
case eFormatCString:
break;
-
+
+ case eFormatInstruction:
+ if (count_option_set)
+ byte_size_value = target->GetArchitecture().GetMaximumOpcodeByteSize() * format_options.GetCountValue().GetCurrentValue();
+ m_num_per_line = 1;
+ break;
+
+ case eFormatAddressInfo:
+ if (!byte_size_option_set)
+ byte_size_value = target->GetArchitecture().GetAddressByteSize();
+ m_num_per_line = 1;
+ if (!count_option_set)
+ format_options.GetCountValue() = 8;
+ break;
+
case eFormatPointer:
byte_size_value = target->GetArchitecture().GetAddressByteSize();
if (!num_per_line_option_set)
@@ -153,6 +167,7 @@ public:
case eFormatUnicode16:
case eFormatUnicode32:
case eFormatUnsigned:
+ case eFormatHexFloat:
if (!byte_size_option_set)
byte_size_value = 4;
if (!num_per_line_option_set)
@@ -160,7 +175,7 @@ public:
if (!count_option_set)
format_options.GetCountValue() = 8;
break;
-
+
case eFormatBytes:
case eFormatBytesWithASCII:
if (byte_size_option_set)
@@ -309,6 +324,9 @@ public:
m_option_group.Append (&m_format_options,
OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_COUNT,
LLDB_OPT_SET_1 | LLDB_OPT_SET_3);
+ m_option_group.Append (&m_format_options,
+ OptionGroupFormat::OPTION_GROUP_GDB_FMT,
+ LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3);
// Add the "--size" option to group 1 and 2
m_option_group.Append (&m_format_options,
OptionGroupFormat::OPTION_GROUP_SIZE,
@@ -653,6 +671,7 @@ public:
}
+ ExecutionContextScope *exe_scope = exe_ctx.GetBestExecutionContextScope();
if (clang_ast_type.GetOpaqueQualType())
{
for (uint32_t i = 0; i<item_count; ++i)
@@ -661,7 +680,7 @@ public:
Address address (NULL, item_addr);
StreamString name_strm;
name_strm.Printf ("0x%llx", item_addr);
- ValueObjectSP valobj_sp (ValueObjectMemory::Create (exe_ctx.GetBestExecutionContextScope(),
+ ValueObjectSP valobj_sp (ValueObjectMemory::Create (exe_scope,
name_strm.GetString().c_str(),
address,
clang_ast_type));
@@ -715,7 +734,8 @@ public:
num_per_line,
addr,
0,
- 0);
+ 0,
+ exe_scope);
output_stream->EOL();
return true;
}
@@ -1030,6 +1050,9 @@ public:
case eFormatVectorOfUInt128:
case eFormatOSType:
case eFormatComplexInteger:
+ case eFormatAddressInfo:
+ case eFormatHexFloat:
+ case eFormatInstruction:
result.AppendError("unsupported format for writing memory");
result.SetStatus(eReturnStatusFailed);
return false;
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index f1ef83754ca..7b0e0c38c99 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -62,7 +62,7 @@ public:
m_arguments.push_back (arg);
// Add the "--format"
- m_option_group.Append (&m_format_options, OptionGroupFormat::OPTION_GROUP_FORMAT, LLDB_OPT_SET_ALL);
+ m_option_group.Append (&m_format_options, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_ALL);
m_option_group.Append (&m_command_options);
m_option_group.Finalize();
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 89653b7bf0d..09bb205f962 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -525,7 +525,7 @@ public:
m_option_group.Append (&m_varobj_options, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Append (&m_option_variable, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
- m_option_group.Append (&m_option_format, OptionGroupFormat::OPTION_GROUP_FORMAT, LLDB_OPT_SET_1);
+ m_option_group.Append (&m_option_format, OptionGroupFormat::OPTION_GROUP_FORMAT | OptionGroupFormat::OPTION_GROUP_GDB_FMT, LLDB_OPT_SET_1);
m_option_group.Append (&m_option_compile_units, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Append (&m_option_shared_libraries, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
m_option_group.Finalize();
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index 6dccc42c990..ff2d293781a 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -13,6 +13,7 @@
#include <bitset>
#include <string>
+#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/MathExtras.h"
@@ -20,12 +21,16 @@
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/DataBuffer.h"
+#include "lldb/Core/Disassembler.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamString.h"
#include "lldb/Core/UUID.h"
#include "lldb/Core/dwarf.h"
#include "lldb/Host/Endian.h"
+#include "lldb/Target/ExecutionContext.h"
+#include "lldb/Target/ExecutionContextScope.h"
+#include "lldb/Target/Target.h"
using namespace lldb;
using namespace lldb_private;
@@ -1300,18 +1305,16 @@ DumpAPInt (Stream *s, const DataExtractor &data, uint32_t offset, uint32_t byte_
}
uint32_t
-DataExtractor::Dump
-(
- Stream *s,
- uint32_t start_offset,
- lldb::Format item_format,
- uint32_t item_byte_size,
- uint32_t item_count,
- uint32_t num_per_line,
- uint64_t base_addr,
- uint32_t item_bit_size, // If zero, this is not a bitfield value, if non-zero, the value is a bitfield
- uint32_t item_bit_offset // If "item_bit_size" is non-zero, this is the shift amount to apply to a bitfield
-) const
+DataExtractor::Dump (Stream *s,
+ uint32_t start_offset,
+ lldb::Format item_format,
+ uint32_t item_byte_size,
+ uint32_t item_count,
+ uint32_t num_per_line,
+ uint64_t base_addr,
+ uint32_t item_bit_size, // If zero, this is not a bitfield value, if non-zero, the value is a bitfield
+ uint32_t item_bit_offset, // If "item_bit_size" is non-zero, this is the shift amount to apply to a bitfield
+ ExecutionContextScope *exe_scope) const
{
if (s == NULL)
return start_offset;
@@ -1326,9 +1329,44 @@ DataExtractor::Dump
item_byte_size = s->GetAddressByteSize();
}
- if (item_format == eFormatOSType && item_byte_size > 8)
+ if (item_format == eFormatInstruction)
+ {
+ Target *target = NULL;
+ if (exe_scope)
+ target = exe_scope->CalculateTarget();
+ if (target)
+ {
+ DisassemblerSP disassembler_sp (Disassembler::FindPlugin(target->GetArchitecture(), NULL));
+ if (disassembler_sp)
+ {
+ lldb::addr_t addr = base_addr + start_offset;
+ lldb_private::Address so_addr;
+ if (!target->GetSectionLoadList().ResolveLoadAddress(addr, so_addr))
+ {
+ so_addr.SetOffset(addr);
+ so_addr.SetSection(NULL);
+ }
+
+ if (disassembler_sp->DecodeInstructions (so_addr, *this, start_offset, item_count, false))
+ {
+ const bool show_address = base_addr != LLDB_INVALID_ADDRESS;
+ const bool show_bytes = true;
+ ExecutionContext exe_ctx;
+ exe_scope->CalculateExecutionContext(exe_ctx);
+ disassembler_sp->GetInstructionList().Dump (s, show_address, show_bytes, &exe_ctx);
+ }
+ }
+ }
+ else
+ s->Printf ("invalid target");
+
+ return offset;
+ }
+
+ if ((item_format == eFormatOSType || item_format == eFormatAddressInfo) && item_byte_size > 8)
item_format = eFormatHex;
+
for (offset = start_offset, line_start_offset = start_offset, count = 0; ValidOffset(offset) && count < item_count; ++count)
{
if ((count % num_per_line) == 0)
@@ -1624,6 +1662,51 @@ DataExtractor::Dump
s->Printf("0x%8.8x", GetU32 (&offset));
break;
+ case eFormatAddressInfo:
+ {
+ addr_t addr = GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset);
+ s->Printf("0x%*.*llx", 2 * item_byte_size, 2 * item_byte_size, addr);
+ if (exe_scope)
+ {
+ Target *target = exe_scope->CalculateTarget();
+ lldb_private::Address so_addr;
+ if (target && target->GetSectionLoadList().ResolveLoadAddress(addr, so_addr))
+ {
+ s->PutChar(' ');
+ so_addr.Dump (s,
+ exe_scope,
+ Address::DumpStyleResolvedDescription,
+ Address::DumpStyleModuleWithFileAddress);
+ break;
+ }
+ }
+ }
+ break;
+
+ case eFormatHexFloat:
+ if (sizeof(float) == item_byte_size)
+ {
+ char float_cstr[256];
+ llvm::APFloat ap_float (GetFloat (&offset));
+ ap_float.convertToHexString (float_cstr, 0, false, llvm::APFloat::rmNearestTiesToEven);
+ s->Printf ("%s", float_cstr);
+ break;
+ }
+ else if (sizeof(double) == item_byte_size)
+ {
+ char float_cstr[256];
+ llvm::APFloat ap_float (GetDouble (&offset));
+ ap_float.convertToHexString (float_cstr, 0, false, llvm::APFloat::rmNearestTiesToEven);
+ s->Printf ("%s", float_cstr);
+ break;
+ }
+ else if (sizeof(long double) * 2 == item_byte_size)
+ {
+ s->Printf ("unsupported hex float byte size %u", item_byte_size);
+ return start_offset;
+ }
+ break;
+
// please keep the single-item formats below in sync with FormatManager::GetSingleItemFormat
// if you fail to do so, users will start getting different outputs depending on internal
// implementation details they should not care about ||
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index e219c16484d..9bc66f31644 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -834,6 +834,25 @@ InstructionList::GetInstructionAtIndex (uint32_t idx) const
}
void
+InstructionList::Dump (Stream *s,
+ bool show_address,
+ bool show_bytes,
+ const ExecutionContext* exe_ctx)
+{
+ const uint32_t max_opcode_byte_size = GetMaxOpcocdeByteSize();
+ collection::const_iterator pos, begin, end;
+ for (begin = m_instructions.begin(), end = m_instructions.end(), pos = begin;
+ pos != end;
+ ++pos)
+ {
+ if (pos != begin)
+ s->EOL();
+ (*pos)->Dump(s, max_opcode_byte_size, show_address, show_bytes, exe_ctx, false);
+ }
+}
+
+
+void
InstructionList::Clear()
{
m_instructions.clear();
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index 6e83deaf87b..58ca76d420a 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -39,7 +39,7 @@ g_format_infos[] =
{ eFormatCharPrintable , 'C' , "printable character" },
{ eFormatComplexFloat , 'F' , "complex float" },
{ eFormatCString , 's' , "c-string" },
- { eFormatDecimal , 'i' , "decimal" },
+ { eFormatDecimal , 'd' , "decimal" },
{ eFormatEnum , 'E' , "enumeration" },
{ eFormatHex , 'x' , "hex" },
{ eFormatFloat , 'f' , "float" },
@@ -62,7 +62,10 @@ g_format_infos[] =
{ eFormatVectorOfFloat64, '\0' , "float64[]" },
{ eFormatVectorOfUInt128, '\0' , "uint128_t[]" },
{ eFormatComplexInteger , 'I' , "complex integer" },
- { eFormatCharArray , 'a' , "character array" }
+ { eFormatCharArray , 'a' , "character array" },
+ { eFormatAddressInfo , 'A' , "address" },
+ { eFormatHexFloat , 'X' , "hex float" },
+ { eFormatInstruction , 'i' , "instruction" }
};
static uint32_t
@@ -180,7 +183,7 @@ FormatCategory::Get (ValueObject& valobj,
return true;
bool regex = GetRegexSummaryNavigator()->Get(valobj, entry, use_dynamic, reason);
if (regex && reason)
- *reason |= lldb::eFormatterChoiceCriterionRegularExpressionSummary;
+ *reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionSummary;
return regex;
}
@@ -228,14 +231,14 @@ FormatCategory::Get(ValueObject& valobj,
if (pick_synth)
{
if (regex_synth && reason)
- *reason |= lldb::eFormatterChoiceCriterionRegularExpressionFilter;
+ *reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionFilter;
entry = synth;
return true;
}
else
{
if (regex_filter && reason)
- *reason |= lldb::eFormatterChoiceCriterionRegularExpressionFilter;
+ *reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionFilter;
entry = filter;
return true;
}
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index e4241dea5b3..c6924c36f68 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1048,7 +1048,8 @@ ValueObject::GetValueAsCString ()
0, // Byte offset into "m_data"
GetByteSize(), // Byte size of item in "m_data"
GetBitfieldBitSize(), // Bitfield bit size
- GetBitfieldBitOffset())) // Bitfield bit offset
+ GetBitfieldBitOffset(),
+ GetExecutionContextScope())) // Bitfield bit offset
m_value_str.swap(sstr.GetString());
else
{
@@ -1067,7 +1068,7 @@ ValueObject::GetValueAsCString ()
if (reg_info)
{
StreamString reg_sstr;
- m_data.Dump(&reg_sstr, 0, reg_info->format, reg_info->byte_size, 1, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0);
+ m_data.Dump(&reg_sstr, 0, reg_info->format, reg_info->byte_size, 1, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0, GetExecutionContextScope());
m_value_str.swap(reg_sstr.GetString());
}
}
diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp
index 9ac603a436a..46ce80a8ea8 100644
--- a/lldb/source/Interpreter/OptionGroupFormat.cpp
+++ b/lldb/source/Interpreter/OptionGroupFormat.cpp
@@ -37,11 +37,9 @@ static OptionDefinition
g_option_table[] =
{
{ LLDB_OPT_SET_1, false, "format" ,'f', required_argument, NULL, 0, eArgTypeFormat , "Specify a format to be used for display."},
-{ LLDB_OPT_SET_1|
- LLDB_OPT_SET_2|
- LLDB_OPT_SET_3, false, "gdb-format",'G', required_argument, NULL, 0, eArgTypeGDBFormat, "Specify a format using a GDB format specifier string."},
-{ LLDB_OPT_SET_2, false, "size" ,'s', required_argument, NULL, 0, eArgTypeByteSize , "The size in bytes to use when displaying with the selected format."},
-{ LLDB_OPT_SET_3, false, "count" ,'c', required_argument, NULL, 0, eArgTypeCount , "The number of total items to display."},
+{ LLDB_OPT_SET_2, false, "gdb-format",'G', required_argument, NULL, 0, eArgTypeGDBFormat, "Specify a format using a GDB format specifier string."},
+{ LLDB_OPT_SET_3, false, "size" ,'s', required_argument, NULL, 0, eArgTypeByteSize , "The size in bytes to use when displaying with the selected format."},
+{ LLDB_OPT_SET_4, false, "count" ,'c', required_argument, NULL, 0, eArgTypeCount , "The number of total items to display."},
};
uint32_t
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 0d1289057ce..9a5ce34137a 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -233,32 +233,35 @@ ObjectFileMachO::GetAddressClass (lldb::addr_t file_addr)
return eAddressClassCode;
case eSectionTypeContainer: return eAddressClassUnknown;
- case eSectionTypeData: return eAddressClassData;
- case eSectionTypeDataCString: return eAddressClassData;
- case eSectionTypeDataCStringPointers: return eAddressClassData;
- case eSectionTypeDataSymbolAddress: return eAddressClassData;
- case eSectionTypeData4: return eAddressClassData;
- case eSectionTypeData8: return eAddressClassData;
- case eSectionTypeData16: return eAddressClassData;
- case eSectionTypeDataPointers: return eAddressClassData;
- case eSectionTypeZeroFill: return eAddressClassData;
- case eSectionTypeDataObjCMessageRefs: return eAddressClassData;
- case eSectionTypeDataObjCCFStrings: return eAddressClassData;
- case eSectionTypeDebug: return eAddressClassDebug;
- case eSectionTypeDWARFDebugAbbrev: return eAddressClassDebug;
- case eSectionTypeDWARFDebugAranges: return eAddressClassDebug;
- case eSectionTypeDWARFDebugFrame: return eAddressClassDebug;
- case eSectionTypeDWARFDebugInfo: return eAddressClassDebug;
- case eSectionTypeDWARFDebugLine: return eAddressClassDebug;
- case eSectionTypeDWARFDebugLoc: return eAddressClassDebug;
- case eSectionTypeDWARFDebugMacInfo: return eAddressClassDebug;
- case eSectionTypeDWARFDebugPubNames: return eAddressClassDebug;
- case eSectionTypeDWARFDebugPubTypes: return eAddressClassDebug;
- case eSectionTypeDWARFDebugRanges: return eAddressClassDebug;
- case eSectionTypeDWARFDebugStr: return eAddressClassDebug;
- case eSectionTypeDWARFAppleNames: return eAddressClassDebug;
- case eSectionTypeDWARFAppleTypes: return eAddressClassDebug;
- case eSectionTypeDWARFAppleNamespaces: return eAddressClassDebug;
+ case eSectionTypeData:
+ case eSectionTypeDataCString:
+ case eSectionTypeDataCStringPointers:
+ case eSectionTypeDataSymbolAddress:
+ case eSectionTypeData4:
+ case eSectionTypeData8:
+ case eSectionTypeData16:
+ case eSectionTypeDataPointers:
+ case eSectionTypeZeroFill:
+ case eSectionTypeDataObjCMessageRefs:
+ case eSectionTypeDataObjCCFStrings:
+ return eAddressClassData;
+ case eSectionTypeDebug:
+ case eSectionTypeDWARFDebugAbbrev:
+ case eSectionTypeDWARFDebugAranges:
+ case eSectionTypeDWARFDebugFrame:
+ case eSectionTypeDWARFDebugInfo:
+ case eSectionTypeDWARFDebugLine:
+ case eSectionTypeDWARFDebugLoc:
+ case eSectionTypeDWARFDebugMacInfo:
+ case eSectionTypeDWARFDebugPubNames:
+ case eSectionTypeDWARFDebugPubTypes:
+ case eSectionTypeDWARFDebugRanges:
+ case eSectionTypeDWARFDebugStr:
+ case eSectionTypeDWARFAppleNames:
+ case eSectionTypeDWARFAppleTypes:
+ case eSectionTypeDWARFAppleNamespaces:
+ case eSectionTypeDWARFAppleObjC:
+ return eAddressClassDebug;
case eSectionTypeEHFrame: return eAddressClassRuntime;
case eSectionTypeOther: return eAddressClassUnknown;
}
@@ -512,6 +515,7 @@ ObjectFileMachO::ParseSections ()
static ConstString g_sect_name_dwarf_apple_names ("__apple_names");
static ConstString g_sect_name_dwarf_apple_types ("__apple_types");
static ConstString g_sect_name_dwarf_apple_namespaces ("__apple_namespac");
+ static ConstString g_sect_name_dwarf_apple_objc ("__apple_objc");
static ConstString g_sect_name_eh_frame ("__eh_frame");
static ConstString g_sect_name_DATA ("__DATA");
static ConstString g_sect_name_TEXT ("__TEXT");
@@ -546,6 +550,8 @@ ObjectFileMachO::ParseSections ()
sect_type = eSectionTypeDWARFAppleTypes;
else if (section_name == g_sect_name_dwarf_apple_namespaces)
sect_type = eSectionTypeDWARFAppleNamespaces;
+ else if (section_name == g_sect_name_dwarf_apple_objc)
+ sect_type = eSectionTypeDWARFAppleObjC;
else if (section_name == g_sect_name_objc_selrefs)
sect_type = eSectionTypeDataCStringPointers;
else if (section_name == g_sect_name_objc_msgrefs)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 08b608808f8..52eb0913cb4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -184,6 +184,7 @@ SymbolFileDWARF::SymbolFileDWARF(ObjectFile* objfile) :
m_apple_names_ap (),
m_apple_types_ap (),
m_apple_namespaces_ap (),
+ m_apple_objc_ap (),
m_function_basename_index(),
m_function_fullname_index(),
m_function_method_index(),
@@ -287,6 +288,15 @@ SymbolFileDWARF::InitializeObject()
m_apple_namespaces_ap.reset();
}
+ get_apple_objc_data();
+ if (m_data_apple_objc.GetByteSize() > 0)
+ {
+ m_apple_objc_ap.reset (new DWARFMappedHash::MemoryTable (m_data_apple_objc, get_debug_str_data(), ".apple_objc"));
+ if (m_apple_objc_ap->IsValid())
+ m_using_apple_tables = true;
+ else
+ m_apple_objc_ap.reset();
+ }
}
bool
@@ -492,19 +502,25 @@ SymbolFileDWARF::get_debug_str_data()
const DataExtractor&
SymbolFileDWARF::get_apple_names_data()
{
- return GetCachedSectionData (flagsGotDebugNamesData, eSectionTypeDWARFAppleNames, m_data_apple_names);
+ return GetCachedSectionData (flagsGotAppleNamesData, eSectionTypeDWARFAppleNames, m_data_apple_names);
}
const DataExtractor&
SymbolFileDWARF::get_apple_types_data()
{
- return GetCachedSectionData (flagsGotDebugTypesData, eSectionTypeDWARFAppleTypes, m_data_apple_types);
+ return GetCachedSectionData (flagsGotAppleTypesData, eSectionTypeDWARFAppleTypes, m_data_apple_types);
}
const DataExtractor&
SymbolFileDWARF::get_apple_namespaces_data()
{
- return GetCachedSectionData (flagsGotDebugNamespacesData, eSectionTypeDWARFAppleNamespaces, m_data_apple_namespaces);
+ return GetCachedSectionData (flagsGotAppleNamespacesData, eSectionTypeDWARFAppleNamespaces, m_data_apple_namespaces);
+}
+
+const DataExtractor&
+SymbolFileDWARF::get_apple_objc_data()
+{
+ return GetCachedSectionData (flagsGotAppleObjCData, eSectionTypeDWARFAppleObjC, m_data_apple_objc);
}
@@ -1691,9 +1707,22 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type
if (!class_str.empty())
{
- ConstString class_name (class_str.c_str());
DIEArray method_die_offsets;
- if (m_objc_class_selectors_index.Find (class_name, method_die_offsets))
+ if (m_using_apple_tables)
+ {
+ if (m_apple_objc_ap.get())
+ m_apple_objc_ap->FindByName(class_str.c_str(), method_die_offsets);
+ }
+ else
+ {
+ if (!m_indexed)
+ Index ();
+
+ ConstString class_name (class_str.c_str());
+ m_objc_class_selectors_index.Find (class_name, method_die_offsets);
+ }
+
+ if (!method_die_offsets.empty())
{
DWARFDebugInfo* debug_info = DebugInfo();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index faba5745586..afbd102011d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -170,6 +170,7 @@ public:
const lldb_private::DataExtractor& get_apple_names_data ();
const lldb_private::DataExtractor& get_apple_types_data ();
const lldb_private::DataExtractor& get_apple_namespaces_data ();
+ const lldb_private::DataExtractor& get_apple_objc_data ();
DWARFDebugAbbrev* DebugAbbrev();
@@ -251,9 +252,10 @@ protected:
flagsGotDebugPubTypesData = (1 << 8),
flagsGotDebugRangesData = (1 << 9),
flagsGotDebugStrData = (1 << 10),
- flagsGotDebugNamesData = (1 << 11),
- flagsGotDebugTypesData = (1 << 12),
- flagsGotDebugNamespacesData = (1 << 13)
+ flagsGotAppleNamesData = (1 << 11),
+ flagsGotAppleTypesData = (1 << 12),
+ flagsGotAppleNamespacesData = (1 << 13),
+ flagsGotAppleObjCData = (1 << 14)
};
bool NamespaceDeclMatchesThisSymbolFile (const lldb_private::ClangNamespaceDecl *namespace_decl);
@@ -474,6 +476,7 @@ protected:
lldb_private::DataExtractor m_data_apple_names;
lldb_private::DataExtractor m_data_apple_types;
lldb_private::DataExtractor m_data_apple_namespaces;
+ lldb_private::DataExtractor m_data_apple_objc;
// The auto_ptr items below are generated on demand if and when someone accesses
// them through a non const version of this class.
@@ -483,6 +486,7 @@ protected:
std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_names_ap;
std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_types_ap;
std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_namespaces_ap;
+ std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_objc_ap;
NameToDIE m_function_basename_index; // All concrete functions
NameToDIE m_function_fullname_index; // All concrete functions
NameToDIE m_function_method_index; // All inlined functions
diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp
index 8867ba65ea9..7e98f793c48 100644
--- a/lldb/source/Symbol/ClangASTType.cpp
+++ b/lldb/source/Symbol/ClangASTType.cpp
@@ -937,16 +937,14 @@ ClangASTType::DumpValue
bool
-ClangASTType::DumpTypeValue
-(
- Stream *s,
- lldb::Format format,
- const lldb_private::DataExtractor &data,
- uint32_t byte_offset,
- size_t byte_size,
- uint32_t bitfield_bit_size,
- uint32_t bitfield_bit_offset
-)
+ClangASTType::DumpTypeValue (Stream *s,
+ lldb::Format format,
+ const lldb_private::DataExtractor &data,
+ uint32_t byte_offset,
+ size_t byte_size,
+ uint32_t bitfield_bit_size,
+ uint32_t bitfield_bit_offset,
+ ExecutionContextScope *exe_scope)
{
return DumpTypeValue (m_ast,
m_type,
@@ -956,23 +954,22 @@ ClangASTType::DumpTypeValue
byte_offset,
byte_size,
bitfield_bit_size,
- bitfield_bit_offset);
+ bitfield_bit_offset,
+ exe_scope);
}
bool
-ClangASTType::DumpTypeValue
-(
- clang::ASTContext *ast_context,
- clang_type_t clang_type,
- Stream *s,
- lldb::Format format,
- const lldb_private::DataExtractor &data,
- uint32_t byte_offset,
- size_t byte_size,
- uint32_t bitfield_bit_size,
- uint32_t bitfield_bit_offset
-)
+ClangASTType::DumpTypeValue (clang::ASTContext *ast_context,
+ clang_type_t clang_type,
+ Stream *s,
+ lldb::Format format,
+ const lldb_private::DataExtractor &data,
+ uint32_t byte_offset,
+ size_t byte_size,
+ uint32_t bitfield_bit_size,
+ uint32_t bitfield_bit_offset,
+ ExecutionContextScope *exe_scope)
{
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
if (ClangASTContext::IsAggregateType (clang_type))
@@ -1001,7 +998,8 @@ ClangASTType::DumpTypeValue
byte_offset, // Offset into "data" where to grab value from
typedef_byte_size, // Size of this type in bytes
bitfield_bit_size, // Size in bits of a bitfield value, if zero don't treat as a bitfield
- bitfield_bit_offset); // Offset in bits of a bitfield value if bitfield_bit_size != 0
+ bitfield_bit_offset, // Offset in bits of a bitfield value if bitfield_bit_size != 0
+ exe_scope);
}
break;
@@ -1094,7 +1092,8 @@ ClangASTType::DumpTypeValue
UINT32_MAX,
LLDB_INVALID_ADDRESS,
bitfield_bit_size,
- bitfield_bit_offset);
+ bitfield_bit_offset,
+ exe_scope);
}
break;
}
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index b7cb06e8005..5ccaa409ea9 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -198,32 +198,35 @@ ObjectFile::GetAddressClass (addr_t file_addr)
case eSectionTypeInvalid: return eAddressClassUnknown;
case eSectionTypeCode: return eAddressClassCode;
case eSectionTypeContainer: return eAddressClassUnknown;
- case eSectionTypeData: return eAddressClassData;
- case eSectionTypeDataCString: return eAddressClassData;
- case eSectionTypeDataCStringPointers: return eAddressClassData;
- case eSectionTypeDataSymbolAddress: return eAddressClassData;
- case eSectionTypeData4: return eAddressClassData;
- case eSectionTypeData8: return eAddressClassData;
- case eSectionTypeData16: return eAddressClassData;
- case eSectionTypeDataPointers: return eAddressClassData;
- case eSectionTypeZeroFill: return eAddressClassData;
- case eSectionTypeDataObjCMessageRefs: return eAddressClassData;
- case eSectionTypeDataObjCCFStrings: return eAddressClassData;
- case eSectionTypeDebug: return eAddressClassDebug;
- case eSectionTypeDWARFDebugAbbrev: return eAddressClassDebug;
- case eSectionTypeDWARFDebugAranges: return eAddressClassDebug;
- case eSectionTypeDWARFDebugFrame: return eAddressClassDebug;
- case eSectionTypeDWARFDebugInfo: return eAddressClassDebug;
- case eSectionTypeDWARFDebugLine: return eAddressClassDebug;
- case eSectionTypeDWARFDebugLoc: return eAddressClassDebug;
- case eSectionTypeDWARFDebugMacInfo: return eAddressClassDebug;
- case eSectionTypeDWARFDebugPubNames: return eAddressClassDebug;
- case eSectionTypeDWARFDebugPubTypes: return eAddressClassDebug;
- case eSectionTypeDWARFDebugRanges: return eAddressClassDebug;
- case eSectionTypeDWARFDebugStr: return eAddressClassDebug;
- case eSectionTypeDWARFAppleNames: return eAddressClassDebug;
- case eSectionTypeDWARFAppleTypes: return eAddressClassDebug;
- case eSectionTypeDWARFAppleNamespaces: return eAddressClassDebug;
+ case eSectionTypeData:
+ case eSectionTypeDataCString:
+ case eSectionTypeDataCStringPointers:
+ case eSectionTypeDataSymbolAddress:
+ case eSectionTypeData4:
+ case eSectionTypeData8:
+ case eSectionTypeData16:
+ case eSectionTypeDataPointers:
+ case eSectionTypeZeroFill:
+ case eSectionTypeDataObjCMessageRefs:
+ case eSectionTypeDataObjCCFStrings:
+ return eAddressClassData;
+ case eSectionTypeDebug:
+ case eSectionTypeDWARFDebugAbbrev:
+ case eSectionTypeDWARFDebugAranges:
+ case eSectionTypeDWARFDebugFrame:
+ case eSectionTypeDWARFDebugInfo:
+ case eSectionTypeDWARFDebugLine:
+ case eSectionTypeDWARFDebugLoc:
+ case eSectionTypeDWARFDebugMacInfo:
+ case eSectionTypeDWARFDebugPubNames:
+ case eSectionTypeDWARFDebugPubTypes:
+ case eSectionTypeDWARFDebugRanges:
+ case eSectionTypeDWARFDebugStr:
+ case eSectionTypeDWARFAppleNames:
+ case eSectionTypeDWARFAppleTypes:
+ case eSectionTypeDWARFAppleNamespaces:
+ case eSectionTypeDWARFAppleObjC:
+ return eAddressClassDebug;
case eSectionTypeEHFrame: return eAddressClassRuntime;
case eSectionTypeOther: return eAddressClassUnknown;
}
diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp
index 0749f0c9c43..cbea0a144bd 100644
--- a/lldb/source/lldb.cpp
+++ b/lldb/source/lldb.cpp
@@ -262,6 +262,7 @@ lldb_private::GetSectionTypeAsCString (SectionType sect_type)
case eSectionTypeDWARFAppleNames: return "apple-names";
case eSectionTypeDWARFAppleTypes: return "apple-types";
case eSectionTypeDWARFAppleNamespaces: return "apple-namespaces";
+ case eSectionTypeDWARFAppleObjC: return "apple-objc";
case eSectionTypeEHFrame: return "eh-frame";
case eSectionTypeOther: return "regular";
}
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
index af575dac830..f5c8627343c 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
@@ -175,7 +175,7 @@ class AdvDataFormatterTestCase(TestBase):
# check that we can format a variable in a summary even if a format is defined for its datatype
self.runCmd("type format add -f hex int")
- self.runCmd("type summary add --summary-string \"x=${var.x%i}\" Simple")
+ self.runCmd("type summary add --summary-string \"x=${var.x%d}\" Simple")
self.expect("frame variable a_simple_object",
substrs = ['x=3'])
OpenPOWER on IntegriCloud