summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
diff options
context:
space:
mode:
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 6a2079f2ce743..0215b428925b2 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;
}