[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-07 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG5e9b16b67f5b: [lldb] Fix unaligned load in DataExtractor (authored by JDevlieghere). Herald added a project: LLDB. Reposi

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-07 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 276100. JDevlieghere marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83256/new/ https://reviews.llvm.org/D83256 Files: lldb/include/lldb/Utility/DataExtractor.h lldb/source/Utility/DataExtractor.cpp lldb/uni

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-07 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The approach is right, but can be simplified. I'd also remove the sizeof checks in the tests. We have a lot of code depending on the fact that floats and doubles are consistent across targets (e.g. the swapByteOrder function I mention). If that ever becomes untrue it wou

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 275915. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83256/new/ https://reviews.llvm.org/D83256 Files: lldb/include/lldb/Utility/DataExtractor.h lldb/source/Utility/DataExtractor.cpp lldb/unittests/Utility/DataExtractorTest.cpp Index: ll

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. sizeof(double) instead of sizeof(float) for the double tests. Comment at: lldb/unittests/Utility/DataExtractorTest.cpp:358 +TEST(DataExtractorTest, GetDouble) {

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 275890. JDevlieghere added a comment. I was stil checking the Windows float thing but skipping them based on the sizeof() seems more robust. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83256/new/ https://reviews.llvm.org/D83256 Files: lld

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Just need some sanity checks to make sure the sizeof(float) == 4 and sizeof(double) == 8 for the tests to make sure this doesn't fail on systems where that isn't true. ===

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 275886. JDevlieghere added a comment. Add unit tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83256/new/ https://reviews.llvm.org/D83256 Files: lldb/include/lldb/Utility/DataExtractor.h lldb/source/Utility/DataExtractor.cpp lldb/uni

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Here are the next values for 32 bit and 64 bit floats: float a = 2.25; // 0x4010 double b = 2.25; // 0x4002 You might disable this on windows as I believe they have 10 byte floats for doubles? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8325

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. FYI: values like 4.0 or 2.25 work well for float values in tests as they encode perfectly on all systems. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83256/new/ https://reviews.llvm.org/D83256 ___ lldb-commits m

[Lldb-commits] [PATCH] D83256: [lldb] Fix unaligned load in DataExtractor

2020-07-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Just need some DataExtractorTest.cpp additions to test the unaligned loads for float and doubles? Comment at: lldb/source/Utility/DataExtractor.cpp:626 float DataExtractor::GetFloat(offset_t *offset_ptr) const { - typedef float float_type; - float_