summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
diff options
context:
space:
mode:
authorAntonio Afonso <antonio.afonso@gmail.com>2019-06-18 17:51:56 +0000
committerAntonio Afonso <antonio.afonso@gmail.com>2019-06-18 17:51:56 +0000
commitfda83c9b0b1a80c4241c735e87c3f1df9e5fdaf7 (patch)
tree11cb7f0ca9011e4a6dec174628d50292fbc48ea8 /lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
parent5cf216c9a72a212f8afaa0c877dc14a86f397c39 (diff)
downloadbcm5719-llvm-fda83c9b0b1a80c4241c735e87c3f1df9e5fdaf7.tar.gz
bcm5719-llvm-fda83c9b0b1a80c4241c735e87c3f1df9e5fdaf7.zip
Implement xfer:libraries-svr4:read packet
Summary: This is the fourth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Implement the `xfer:libraries-svr4` packet by adding a new function that generates the list and then in Handle_xfer I generate the XML for it. The XML is really simple so I'm just using string concatenation because I believe it's more readable than having to deal with a DOM api. Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: emaste, mgorny, srhines, krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62502 llvm-svn: 363707
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
new file mode 100644
index 00000000000..b62ca71b561
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
@@ -0,0 +1,15 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+int main(int argc, char **argv) {
+ // Perform a null pointer access.
+ int *const null_int_ptr = nullptr;
+ *null_int_ptr = 0xDEAD;
+
+ return 0;
+}
OpenPOWER on IntegriCloud