From 97fe23e00a88957494bf2c993c998907b894206a Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Tue, 11 Jun 2013 00:18:18 +0000 Subject: Add support for half-floats, as specified by IEEE-754-2008 With this checkin, you can now say: (lldb) x/7hf foo to read 7 half-floats at address foo llvm-svn: 183716 --- lldb/source/Commands/CommandObjectMemory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Commands/CommandObjectMemory.cpp') diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index fe44ad052abd..8bf303e08e8d 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -180,12 +180,15 @@ public: case eFormatUnicode32: case eFormatUnsigned: case eFormatHexFloat: + case eFormatHalfFloat: if (!byte_size_option_set) byte_size_value = 4; if (!num_per_line_option_set) m_num_per_line = 1; if (!count_option_set) format_options.GetCountValue() = 8; + if (format_options.GetFormat() == eFormatFloat && byte_size_option_set && byte_size_value == 2) + format_options.GetFormatValue().SetCurrentValue(eFormatHalfFloat); break; case eFormatBytes: @@ -1170,6 +1173,7 @@ protected: case eFormatComplexInteger: case eFormatAddressInfo: case eFormatHexFloat: + case eFormatHalfFloat: case eFormatInstruction: case eFormatVoid: result.AppendError("unsupported format for writing memory"); -- cgit v1.2.3