summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:12 +0000
commita4092fcbfb39b4d32a8e152a110d20132779d538 (patch)
tree37c84fe56b8ec43e3b08de27d76f53e259ddb0c7 /packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
parentcce7c2b0d24e364b1907670cf6f843531e5fe052 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp')
-rw-r--r--packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp b/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
index 6a2079f2ce74..0215b428925b 100644
--- a/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
+++ b/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
@@ -9,11 +9,25 @@
#include <cstdio>
+#ifdef _WIN32
+ #include <direct.h>
+ #define getcwd _getcwd // suppress "deprecation" warning
+#else
+ #include <unistd.h>
+#endif
+
int
main(int argc, char const *argv[])
{
- int a = 10;
+ int a = 10;
+
+ char buf[512];
+ char *ans = getcwd(buf, sizeof(buf));
+ if (ans) {
+ printf("cwd: %s\n", ans);
+ }
printf("argc=%d\n", argc); // BP_printf
+
return 0;
}