summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-02-16 23:09:08 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-02-16 23:09:08 +0000
commit3517d128263607187e815621190052d64d0f0061 (patch)
tree7455dd14cd6fb2f6ead875a11c21d268bd4c6c71
parent4c006e557dc8ef7205744fb8aaef0e9aa891792e (diff)
downloadbcm5719-llvm-3517d128263607187e815621190052d64d0f0061.tar.gz
bcm5719-llvm-3517d128263607187e815621190052d64d0f0061.zip
memory read -f X doesn't print anything (lldb should warn when encountering an unsupported byte size)
Also add a test sequence for it. rdar://problem/10876841 llvm-svn: 150766
-rw-r--r--lldb/source/Core/DataExtractor.cpp2
-rw-r--r--lldb/test/functionalities/memory/read/TestMemoryRead.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index d5296e2451f..28303ab2e66 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -1756,7 +1756,7 @@ DataExtractor::Dump (Stream *s,
s->Printf ("%s", float_cstr);
break;
}
- else if (sizeof(long double) * 2 == item_byte_size)
+ else
{
s->Printf ("unsupported hex float byte size %u", item_byte_size);
return start_offset;
diff --git a/lldb/test/functionalities/memory/read/TestMemoryRead.py b/lldb/test/functionalities/memory/read/TestMemoryRead.py
index 72792562ae3..a46f6a11a2e 100644
--- a/lldb/test/functionalities/memory/read/TestMemoryRead.py
+++ b/lldb/test/functionalities/memory/read/TestMemoryRead.py
@@ -85,6 +85,11 @@ class MemoryReadTestCase(TestBase):
self.expect("memory read --format char[] --size 7 --count 1 `&my_string`",
substrs = ['abcdefg'])
+ # (lldb) memory read --format 'hex float' --size 16 `&argc`
+ # 0x7fff5fbff9a0: unsupported hex float byte size 16
+ self.expect("memory read --format 'hex float' --size 16 `&argc`",
+ substrs = ['unsupported hex float byte size'])
+
if __name__ == '__main__':
import atexit
OpenPOWER on IntegriCloud