summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp
diff options
context:
space:
mode:
authorDimitar Vlahovski <dvlahovski@google.com>2016-09-06 11:00:37 +0000
committerDimitar Vlahovski <dvlahovski@google.com>2016-09-06 11:00:37 +0000
commitee44a92df6964df623f8bddca96b3007c80ce613 (patch)
treeb63f0d3c19b7216a0e4b7703dac6aea077979d76 /lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp
parent209b6e2e78d3817e797386c92f234d380d92918d (diff)
downloadbcm5719-llvm-ee44a92df6964df623f8bddca96b3007c80ce613.tar.gz
bcm5719-llvm-ee44a92df6964df623f8bddca96b3007c80ce613.zip
Revert "Intel(R) Memory Protection Extensions (Intel(R) MPX) support."
This reverts commit rL280668 because the register tests fail on i386 Linux. I investigated a little bit what causes the failure - there are missing registers when running 'register read -a'. This is the output I got at the bottom: """ ... Memory Protection Extensions: bnd0 = {0x0000000000000000 0x0000000000000000} bnd1 = {0x0000000000000000 0x0000000000000000} bnd2 = {0x0000000000000000 0x0000000000000000} bnd3 = {0x0000000000000000 0x0000000000000000} unknown: 2 registers were unavailable. """ Also looking at the packets exchanged between the client and server: """ ... history[308] tid=0x7338 < 19> send packet: $qRegisterInfo4a#d7 history[309] tid=0x7338 < 130> read packet: $name:bnd0;bitsize:128;offset:1032;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:101;dwarf:101;#48 history[310] tid=0x7338 < 19> send packet: $qRegisterInfo4b#d8 history[311] tid=0x7338 < 130> read packet: $name:bnd1;bitsize:128;offset:1048;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:102;dwarf:102;#52 history[312] tid=0x7338 < 19> send packet: $qRegisterInfo4c#d9 history[313] tid=0x7338 < 130> read packet: $name:bnd2;bitsize:128;offset:1064;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:103;dwarf:103;#53 history[314] tid=0x7338 < 19> send packet: $qRegisterInfo4d#da history[315] tid=0x7338 < 130> read packet: $name:bnd3;bitsize:128;offset:1080;encoding:vector;format:vector-uint64;set:Memory Protection Extensions;ehframe:104;dwarf:104;#54 history[316] tid=0x7338 < 19> send packet: $qRegisterInfo4e#db history[317] tid=0x7338 < 76> read packet: $name:bndcfgu;bitsize:64;offset:1096;encoding:vector;format:vector-uint8;#99 history[318] tid=0x7338 < 19> send packet: $qRegisterInfo4f#dc history[319] tid=0x7338 < 78> read packet: $name:bndstatus;bitsize:64;offset:1104;encoding:vector;format:vector-uint8;#8e ... """ The bndcfgu and bndstatus registers don't have the 'Memory Protections Extension' set. I looked at the code and it seems that that is set correctly. So I'm not sure what's the problem or where does it come from. Also there is a second failure related to something like this in the tests: """ registerSet.GetName().lower() """ For some reason the registerSet.GetName() returns None. llvm-svn: 280703
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp
new file mode 100644
index 00000000000..156515768dd
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/register/main.cpp
@@ -0,0 +1,36 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+#include <stdio.h>
+
+#include <chrono>
+#include <thread>
+
+long double outermost_return_long_double (long double my_long_double);
+
+int main (int argc, char const *argv[])
+{
+ lldb_enable_attach();
+
+ char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0};
+ double my_double = 1234.5678;
+ long double my_long_double = 1234.5678;
+
+ // For simplicity assume that any cmdline argument means wait for attach.
+ if (argc > 1)
+ {
+ volatile int wait_for_attach=1;
+ while (wait_for_attach)
+ std::this_thread::sleep_for(std::chrono::microseconds(1));
+ }
+
+ printf("my_string=%s\n", my_string);
+ printf("my_double=%g\n", my_double);
+ outermost_return_long_double (my_long_double);
+ return 0;
+}
OpenPOWER on IntegriCloud