diff options
| author | Enrico Granata <egranata@apple.com> | 2013-06-11 00:18:18 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2013-06-11 00:18:18 +0000 |
| commit | 97fe23e00a88957494bf2c993c998907b894206a (patch) | |
| tree | 7471248c6db7b1200748a4243718fba33d51ced2 /lldb/source/Commands/CommandObjectMemory.cpp | |
| parent | 864dd750935f5cb3f69a8049180b2d618ad2737c (diff) | |
<rdar://problem/12783351>
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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"); |
