summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/DataExtractor.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-01-15 02:52:14 +0000
committerGreg Clayton <gclayton@apple.com>2011-01-15 02:52:14 +0000
commit49462ea7e44969fa325a441d41002760d049645e (patch)
tree6ca6a165b5098dd9cfa49371d0f09ad8a0a45902 /lldb/source/Core/DataExtractor.cpp
parent36c0c791a8869451b61d46758b749506b815d0aa (diff)
downloadbcm5719-llvm-49462ea7e44969fa325a441d41002760d049645e.tar.gz
bcm5719-llvm-49462ea7e44969fa325a441d41002760d049645e.zip
Added complete complex support for displaying and parsing complex types.
llvm-svn: 123509
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r--lldb/source/Core/DataExtractor.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index a5acf73cc2b..e6c8a4dcd0d 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -1390,6 +1390,19 @@ DataExtractor::Dump
s->Address(GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset), sizeof (addr_t));
break;
+
+ case eFormatComplexInteger:
+ {
+ uint32_t complex_int_byte_size = item_byte_size / 2;
+
+ if (complex_int_byte_size <= 8)
+ {
+ s->Printf("%llu", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
+ s->Printf(" + %llui", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
+ }
+ }
+ break;
+
case eFormatComplex:
if (sizeof(float) * 2 == item_byte_size)
{
@@ -1414,9 +1427,12 @@ DataExtractor::Dump
s->Printf ("%Lg + %Lgi", ld64_1, ld64_2);
break;
}
-
- // Fall through to hex for any other sizes
- item_format = eFormatHex;
+ else
+ {
+ s->Printf ("unsupported complex float byte size %u", item_byte_size);
+ return start_offset;
+ }
+ break;
default:
case eFormatDefault:
OpenPOWER on IntegriCloud